Skip to content

Commit

Permalink
Fix User Authentication with certificates from UAExpert. Relates to #430
Browse files Browse the repository at this point in the history


UAExpert sends its application certificate as client certificate in the initial `CreateSessionRequest`.
The user certificate is sent as `ua.X509IdentityToken` in the request body and has to be looked up there.
  • Loading branch information
Dr. Tobias Nils Ackermann authored and oroulet committed Apr 19, 2022
1 parent 573a8a3 commit f2f7722
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions asyncua/server/internal_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ def activate_session(self, params, peer_certificate):
if self.iserver.user_manager is not None:
if isinstance(id_token, ua.UserNameIdentityToken):
username, password = self.iserver.check_user_token(self, id_token)
elif isinstance(id_token, ua.X509IdentityToken):
peer_certificate = id_token.CertificateData
username, password = None, None
else:
username, password = None, None

Expand Down

0 comments on commit f2f7722

Please sign in to comment.