[
https://issues.apache.org/jira/browse/PLC4X-303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17417503#comment-17417503
]
Torsten commented on PLC4X-303:
-------------------------------
Hi,
if I want to specify an empty password by
"opcua:tcp://myhost:12686/milo?discovery=false&username=user&password=" or
"opcua:tcp://myhost:12686/milo?discovery=false&username=user&password"
the URL validation fails with
"Connection string doesn't match the format ..."
If I remove it from the URL
"opcua:tcp://myhost:12686/milo?discovery=false&username=user"
I got:
Caused by: java.lang.NullPointerException
at
org.apache.plc4x.java.opcua.context.SecureChannel.getIdentityToken(SecureChannel.java:1187)
at
org.apache.plc4x.java.opcua.context.SecureChannel.onConnectActivateSessionRequest(SecureChannel.java:511)
at
org.apache.plc4x.java.opcua.context.SecureChannel.lambda$onConnectCreateSessionRequest$15(SecureChannel.java:434)
at
org.apache.plc4x.java.opcua.context.SecureChannel.lambda$submit$3(SecureChannel.java:212)
at
org.apache.plc4x.java.spi.Plc4xNettyWrapper.decode(Plc4xNettyWrapper.java:175)
at
io.netty.handler.codec.MessageToMessageCodec$2.decode(MessageToMessageCodec.java:81)
at
io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:88)
... 23 more
Possible, instead of
byte[] passwordBytes = this.password.getBytes();
we should create an empty password?
byte[] passwordBytes = this.password == null ? new byte[0] :
this.password.getBytes();
Torsten
> OPCUA should support username / password authentication
> -------------------------------------------------------
>
> Key: PLC4X-303
> URL: https://issues.apache.org/jira/browse/PLC4X-303
> Project: Apache PLC4X
> Issue Type: Wish
> Components: Driver-OPC-UA
> Affects Versions: 0.9.0
> Reporter: Torsten
> Priority: Major
> Attachments: screenshot-1.png
>
>
> OPCUA servers might request user authentication, the OPCUA driver should
> support username and password
--
This message was sent by Atlassian Jira
(v8.3.4#803005)