Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Improve logging of certifiate validation
July 21, 2023
14:09, EEST
Avatar
gerstale
Member
Members
Forum Posts: 12
Member Since:
November 26, 2019
sp_UserOfflineSmall Offline

Hello,

In SDK version 4.10.0-58 in case of certificate validation failed(application uri not same), the failed reason is only logged with DEBUG logging level. This should be reported at least for WARN level. Method public StatusCode validateCertificate(ApplicationDescription applicationDescription, Cert cert) in Class DefaultCertificateValidator

Thank you for support
Best regards

Alexej Gerstmaier

July 21, 2023
15:01, EEST
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 983
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

The intended way is to add a DefaultCertificateValidatorListener as in the sampleconsoleclient example com.prosysopc.ua.samples.client.MyCertificateValidationListener. Then you can e.g. in this case log (or have e.g. in the client side UI popup to accept the cert) when CertificateCheck.Uri is not part of the EnumSet passedChecks. .

In general I should note that we have observed that the current DefaultCertificateValidator is not good enough for all situations, plus some OPC UA 1.05 clarifications means we’ll have to do changes in SDK 5.x that we are working on right now (might not be in the first 5.0.0 release).

Thanks anyway for the note. It would seem we do have a bit mixed logging levels, some of the more recent checks do log on ERROR or WARN, but some of them also cannot be disabled (e.g. such that the x509 cert is of version 3) and some cannot be reacted to, just be disabled. Most of the “older ones” are in DEBUG.

Though, I would lean more towards fixing this by having them all in DEBUG level, at least once it is possible to observed them via the listener. I’m not like 100% sure on this, but if it is in ERROR or WARN, this might just be something outside of your control as a server developer, plus if a client continously would try to connect with such cert it would just flood the logs, which is also not good. That being said, this is exactly what would happen currently if the x509 version would not be ‘3’).

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
12 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

Ibrahim: 76

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 684

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6261

Newest Members:

digitechroshni, LouieWreve, Kickbiche, karrimacvitie5, graciela2073, sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPooma

Moderators: Jouni Aro: 1010, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1