-
Notifications
You must be signed in to change notification settings - Fork 664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
User authentication has security bug #1457
Comments
UAExpert allows to select every Security Policy even if it is not support, if you go over the Properties menu. |
nether the less it should not be able to connect with anonymus... |
Note that the security policy and authorization for this server are set in the code server.set_security_policy([ My problem was that I bypassed the password entry using the method above. |
I quickly scanned through the code and I think the server always accepts ever UserToken even if it is disabled via set_security_policy. The server only provides the supported UserTokens for discovery/GetEndpoints, but on create_session this is not checked. |
Its not see: python-opcua/opcua/server/internal_server.py Lines 348 to 353 in 8582747
I can provide a pr in the next days. |
@schroeder- could you check asyncua aswell probably the same there! |
@AndreasHeine same, I can provide the same fix there. |
Hi, Is there a chance that this PR will be merged even if this package is not maintained anymore ? |
Describe the bug
User authentication has security bug, even enable server.set_security_IDs(“Username”),But I can log still in anonymously
To Reproduce
Steps to reproduce the behavior incl code.
The code comes from here #1153 (comment)
it is Mr. AndreasHeine's demonstration code, I didn't make any changes.
Expected behavior
Create a ua server, the security policy is Basic256Sha256_SignAndEncrypt , the authentication user/pwd is 'user1' and 'pw1'
Screenshots

This screenshot is as expected, we see the security policy, and can only authenticate with username and password, anonymous is disabled, Select ok, then, we do not connect to this server, but right-click to open properties,


At this time I see that Anonymous has been enabled, choose anonymous,
ok , and connect to the server, we see that the server has been connected without entering a password.
Version

Python-Version: python 3.9 64bit
python-opcua Version (e.g. master branch, 0.9): 0.98.13
The text was updated successfully, but these errors were encountered: