Giter Club home page Giter Club logo

Comments (17)

oroulet avatar oroulet commented on June 26, 2024

Yes, there is an issue with the password implementation. I do not know how to encode it. it is probably just a matter of reading the doc , though.... so help welcome here

from python-opcua.

mertz3hack avatar mertz3hack commented on June 26, 2024

Should this issue be combined into the other issue?
Do you know which documentation this may be covered in? I would be interested in trying to solve the issue.

from python-opcua.

oroulet avatar oroulet commented on June 26, 2024

yes there is already an issue on this #23 . you are welcome to try to solve this :-)
look at line 199 in client.py. We need to encrypt password and set correct encryption in line under.

To find out what should be there you can read the opc-ua specification (But I could not find anything) and/or start wireshark, set filter type to opcua, and connect with a client supporting encryption (uaexpert for example). then do the same with python-opcua and look at the difference in the ActivateSession message

from python-opcua.

oroulet avatar oroulet commented on June 26, 2024

btw what server are you using?

from python-opcua.

mertz3hack avatar mertz3hack commented on June 26, 2024

I am using an Arburg Injection Molding Machine that hosts its own opc-ua server

from python-opcua.

oroulet avatar oroulet commented on June 26, 2024

That's interesting!. Do you manage to connect if you disable password?

from python-opcua.

oroulet avatar oroulet commented on June 26, 2024

yesterday I registered a session between a client and a prosys server:
server return 2 supported PolicyId: username_basic256 and username_basic128
and security policy URI is set to http://opcfoundation.org/UA/SecurityPolicy#Basic256
when sending password in activateSession it refers to following EncryptionAlgorythm
http://www.w3.org/2001/04/xmlenc#rsa-oaep
I have no idea where the key for the encryption is taken from ...

from python-opcua.

mertz3hack avatar mertz3hack commented on June 26, 2024

I am not able to disable the password even though the security policy is none?

When connecting with UaExpert I see:
Found security policy 'http://opcfoundation.org/UA/SecurityPolicy#None'
ApplicationUri: 'uri://Arburg/App/Selogica/direct'

Looking at the Certificate UaExpert has with the server I can see that the Signature algorithm is sha1RSA and the Public key is RSA(1024 bits)
You can view the public key in the windows certificate Details?

I tried watching with wire shark but haven't figured anything out so far.

Where do you take the typed password out of the connection url?

from python-opcua.

oroulet avatar oroulet commented on June 26, 2024

password and encryption is supposed to be implemented for client now. Can someone test and resport?

from python-opcua.

mertz3hack avatar mertz3hack commented on June 26, 2024

I am having the worst time trying to get python with pycrypto setup on my new computer. I will be able to test this out on Wednesday assuming I get pycrypto working.

from python-opcua.

oroulet avatar oroulet commented on June 26, 2024

Master should not use pycrypto but cryptography module... But I am not sure
all patch have been merged

On Mon, Dec 28, 2015, 23:25 mertz3hack [email protected] wrote:

I am having the worst time trying to get python with pycrypto setup on my
new computer. I will be able to test this out on Wednesday assuming I get
pycrypto working.


Reply to this email directly or view it on GitHub
#42 (comment)
.

from python-opcua.

oroulet avatar oroulet commented on June 26, 2024

I merged the last patch removing pycrypto ( I hope I did not break to much things for you @alkor !!!). Everything is in place for password encryption, but it might no be implemented yet. I am waiting for @alkor to merge the rest of his crypto stuff

from python-opcua.

mertz3hack avatar mertz3hack commented on June 26, 2024

No errors about pycrypto anymore.

test
code

from python-opcua.

oroulet avatar oroulet commented on June 26, 2024

Now I tested password encryption and it works against prosys server. Thanks @alkor

from python-opcua.

alkor avatar alkor commented on June 26, 2024

That's great!

from python-opcua.

joaopmrod avatar joaopmrod commented on June 26, 2024

I'm trying to connect using this: opc.tcp://admin:password@localhost:4096 and I get this error:

showing error: name 'uri' is not defined 1.

If I enable anonymous access I can do it.

from python-opcua.

mertz3hack avatar mertz3hack commented on June 26, 2024

@joaopmrod is the error you are getting similar to the one in this issue #135
unfortunately in that specific case I am not able to enable anonymous access

from python-opcua.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.