pythonauthenticationsecurityopc-ua

Python OPC-UA : authentification


I'm trying to set up authentication for my OPC-UA server. I don't want my clients to be able to connect to my server in ‘anonymous’ mode.

So I used this configuration in my opc-ua server:

Python opc-ua server configuration

I'm testing with UaExpert in client mode and the password login works (I have to enter the right login + the right password).

The certificate login is blocked, which is fair enough.

However, I can still connect in ‘anonymous’ mode, which obviously doesn't work for me.

The logs from UaExpert when connecting in "anonymous": UaExpert logs with anonymous auth. I'd prefer to use the certificate authentication mode but I wanted to test the password login first.

I've tested the certificate mode and I can also connect in anonymous mode!

Does anyone have any ideas?


Solution

  • The python opcua library is no longer supported. There was a fix for this issue, but the pip package never got uppdated. So either use the current master from github. Or you switch to asyncua, which has a sync layer for easier porting, but i would recommend use it via async, if possible.