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

UserTokenPolicy with SecurityPolicyUri blank instead of null #219

Open
damianozucconi opened this issue Sep 6, 2021 · 0 comments
Open

Comments

@damianozucconi
Copy link

Hi,
I'm using UA-Java-Legacy 1.4.1 connecting to a Schneider PLC endpoint with security none. I found that its EndpointDescription contains a UserTokenPolicy UserName with SecurityPolicyUri = "" (not null)
So when I try to activate sessionchannel with username and password, EndpointUtil.createUserNameIdentityToken throws exception with message
UserName not supported
despite of it is actually available
This is caused by EndpointDescription.findUserTokenPolicy that uses SecurityPolicy.getSecurityPolicy and checks:
if (securityPolicyUri == null) return NONE;
but not something like
if (securityPolicyUri == null || securityPolicyUri.trim().equals("")) return NONE;

So a connection with UAExpert is possible (with a security warning because account data is not encrypted) but with UA-Java-Legacy I get a UserName not supported message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant