Skip to content
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

Could not instantiate the SecurityPolicy for the UserToken when try connect username/password #2747

Closed
1 of 3 tasks
reyanvaldes opened this issue May 20, 2019 · 18 comments
Closed
1 of 3 tasks

Comments

@reyanvaldes
Copy link

Hi, thank you so much for sharing this amazing work you guys are doing and supporting.
I am facing since some weeks same problem trying to connect to Kepware V6 using username & password with security police #None. I can connect if no username/password is used. I read multiple issues related, and based on recommendation I tried to include the supported security policies manually but with no success after multiple back and for. I got message 'Could not create securityContext', I am using the ca.crt and ca.key generated by the self-signed tool provided. Attached is section of code in C++ and screenshot. Please could you recommend where to looks, or the proper way to complete the token properties to allow get connection
connect_username_password_kepware.txt
Thank you so much for any info
error_connect_username_passord

  • [ X] open62541 Version (Master V0.3.0 Latest commit 0574b60):
  • [X ] Other OPC UA SDKs used (client or server): client
  • [ X] Operating system: Debian Jessie
  • Logs (with UA_LOGLEVEL set as low as necessary) attached
  • Wireshark network dump attached
  • [X ] Self-contained code example attached (95%)
  • Critical issue
@jpfr
Copy link
Member

jpfr commented May 23, 2019

"Could not create SecurityContext" is not very detailed.
It looks like a problem with the certificate.

  • Do you get more information if you increase the log level?
    Otherwise we will add more detailed log output to the code.
  • Can you debug into the creation of the security context?

@fanucwj
Copy link

fanucwj commented May 24, 2019

the same situation when using UA_Client_connect_username() with username/password. do you resovle this problem ?

@reyanvaldes
Copy link
Author

reyanvaldes commented May 24, 2019 via email

@fanucwj
Copy link

fanucwj commented May 24, 2019

i only make use UA_Client_connect_username(client, "opc.tcp://190.1.1.2:412",name,secret),but can not connect to server. use open62541.c/h , sometimes i thought whether the library is well,and you?

@fanucwj
Copy link

fanucwj commented May 24, 2019

and i think it is very basic to use this fanuction ,but still not work. make me crayz

@fanucwj
Copy link

fanucwj commented May 24, 2019 via email

@reyanvaldes
Copy link
Author

reyanvaldes commented May 24, 2019 via email

@reyanvaldes
Copy link
Author

reyanvaldes commented May 24, 2019 via email

@fanucwj
Copy link

fanucwj commented May 24, 2019 via email

@fanucwj
Copy link

fanucwj commented May 24, 2019 via email

@fanucwj
Copy link

fanucwj commented May 25, 2019

hello
this is my siample demo #2762
is it like this?

@reyanvaldes
Copy link
Author

reyanvaldes commented May 25, 2019 via email

@fanucwj
Copy link

fanucwj commented May 25, 2019

hello, i am new to study opcua and will do hard research at this project. i would like to exchange experience on this

thanks for all

@Pro
Copy link
Member

Pro commented May 27, 2019

Did you already have a look at the examples here:
https://github.com/open62541/open62541/tree/master/examples/encryption

First try to understand the example code and what is happening there. Then adapt that code to use it with a Kepware Server & Co. Especially try to use your own certificates and make sure that the example code is working for you. Then adapt it.

See also #934

@heppth
Copy link

heppth commented Jun 4, 2019

I think, this could be the same issue like #2574 and #2562. It seems like there is still a problem in the library. I have already tried to solve the problem to provide a fix, but unfortunately without success.

You can reproduce to problem with the cpp server from unified automation.

@fanucwj
Copy link

fanucwj commented Jun 6, 2019

i have already solved this problem successfully,referring to examples
https://github.com/open62541/open62541/tree/master/examples/encryption
thanks you guys @Pro @jpfr contribition and help

@jpfr
Copy link
Member

jpfr commented Jun 6, 2019

You're welcome

@jpfr jpfr closed this as completed Jun 6, 2019
@opcua-tsn-team-kalycito
Copy link
Contributor

This pull request #2804 will resolve the issue.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants