Engineering-Research-and-Development / iotagent-opcua

IoT Agent for OPC UA protocol
https://iotagent-opcua.rtfd.io/
GNU Affero General Public License v3.0
41 stars 21 forks source link

OPC UA server useridentity #111

Closed barry-fip closed 1 year ago

barry-fip commented 1 year ago

Currently the V2 version of the agent is only supporting ANONYMOUS identities. Would it be possible to implement opcua.UserTokenType.UserName for the opc ua binding?

manfredipist commented 1 year ago

Hi @barry-fip , could you please share the configurations of your opc ua server and iotagent? thanks

barry-fip commented 1 year ago

Hi @manfredipist , I use the docker-compose file to set the environment variables that configure the opc ua connection. These are the main values.

  - IOTA_OPCUA_ENDPOINT=opc.tcp://{address}:4840
  - IOTA_OPCUA_SECURITY_MODE=SignAndEncrypt
  - IOTA_OPCUA_SECURITY_POLICY=Basic256Sha256
  - IOTA_OPCUA_SECURITY_USERNAME=admin
  - IOTA_OPCUA_SECURITY_PASSWORD={pwd}
  - 

I noticed that the config values for username and password are not used in the code to create the session.

manfredipist commented 1 year ago

hi @barry-fip , it should be fixed on v2.1.7, please let us know if everything is now working.

manfredipist commented 1 year ago

Closing as stale, if you need further assistance feel free to open a new issue.