python-opcua icon indicating copy to clipboard operation
python-opcua copied to clipboard

Only username and password (withour certificate and private key)

Open Aburub opened this issue 6 years ago • 8 comments

Hey all,

I am trying to access SINUMERIK (Siemens) OPC UA. The server is only username and password protected (without certificate and private key). I have tried to connect with the following:

 client = Client(url)
 client.set_user("my_user")
 client.set_passwotd("my_password")
 client.connect()

but I have received a "TimeoutError" I have also tried the following:

 client = Client(url)
 client.connect_socket()
 client.create_session()
 client.activate_session(username="my_user", password = "my_password")

and I also received TimeoutError can someone please help me ? PS: I am new to this field

Thanks

Aburub avatar Dec 05 '19 13:12 Aburub

Test the server with UaExpert first. However if you are getting timeout it's probably a networking issue.

zerox1212 avatar Dec 05 '19 14:12 zerox1212

It is working perfectly on UaExpert.

Aburub avatar Dec 05 '19 14:12 Aburub

The user identity token is valid but the server has rejected it.(BadIdentityTokenRejected)

aigefjk avatar Dec 18 '19 07:12 aigefjk

The user identity token is valid but the server has rejected it.(BadIdentityTokenRejected)

this is the problem which I met using:

client = Client(url) client.set_user("my_user") client.set_passwotd("my_password") client.connect()

aigefjk avatar Dec 18 '19 07:12 aigefjk

client.set_user("user1") client.set_password("pw1") client.set_security_string("Basic256Sha256,Sign,cert.der,key.pem") client.connect()

AndreasHeine avatar Dec 18 '19 07:12 AndreasHeine

BadIdentity could be a certificate issue!

AndreasHeine avatar Dec 18 '19 07:12 AndreasHeine

Same problem. Did you solve it?

Interstella12 avatar Mar 30 '20 09:03 Interstella12

it would be important to post the full stacktrace to tell us the pyrhon-opcua version and how the opc ua server is configured (messagesecuritymode, ...) we only know that you want to user user/pw auth ... if you use sign an encrypt: do you have created your own cert and key which matches the ip and applicationuri of your client pc? its not possible to help you with that little information... otherwise its just quessing 😅

AndreasHeine avatar Apr 09 '21 04:04 AndreasHeine