You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@plc4x.apache.org by "Torsten (Jira)" <ji...@apache.org> on 2021/08/20 11:49:00 UTC

[jira] [Comment Edited] (PLC4X-303) OPCUA should support username / password authentication

    [ https://issues.apache.org/jira/browse/PLC4X-303?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17402167#comment-17402167 ] 

Torsten edited comment on PLC4X-303 at 8/20/21, 11:48 AM:
----------------------------------------------------------

Hi Ben, You have pointed to the right thing: the milo server does not binds to localhost. If I use the hostname it will connect. Thank You very much.
Two notes:
1. the boolean field "ns=2;s=HelloWorld/ScalarTypes/Boolean" is returned as '0' (in 0.8.0 it is returned as 'false')
2. if I provide wrong credentials in the URL, the app will hang in call of new PlcDriverManager().getConnection( connectionString ) and never come back.
 !screenshot-1.png! 
The console outputs: [nioEventLoopGroup-2-1] ERROR org.apache.plc4x.java.opcua.context.SecureChannel - Failed to connect to opc ua server for the following reason:- 2149580800, BadIdentityTokenInvalid
I would expect some kind of exception. 


was (Author: torsten.uhr@sql-ag.de):
Hi Ben, You have pointed to the right thing: the milo server does not binds to localhost. If I use the hostname it will connect. Thank You very much.
Two notes:
1. the boolean field "ns=2;s=HelloWorld/ScalarTypes/Boolean" is returned as '0' (in 0.8.0 it is returned as 'false')
2. if I provide wrong credentials in the URL, the app will hang in call of new PlcDriverManager().getConnection( connectionString ) and never come back.
 !screenshot-1.png! 
The console outputs: [nioEventLoopGroup-2-1] ERROR org.apache.plc4x.java.opcua.context.SecureChannel - Failed to connect to opc ua server for the following reason:- 2149580800, BadIdentityTokenInvalid

> 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)

Re: [jira] [Comment Edited] (PLC4X-303) OPCUA should support username / password authentication

Posted by Stephen Snow <s4...@gmail.com>.
Hello Torsten,

--snip

> 1. the boolean field "ns=2;s=HelloWorld/ScalarTypes/Boolean" is
> returned as '0' (in 0.8.0 it is returned as 'false')

By definition boolean has two states, false and true. In PLC
perspective, and digital in general, false=0 and true=1.

> 2. if I provide wrong credentials in the URL, the app will hang in
> call of new PlcDriverManager().getConnection( connectionString ) and
> never come back.
>  !screenshot-1.png! 
> The console outputs: [nioEventLoopGroup-2-1] ERROR
> org.apache.plc4x.java.opcua.context.SecureChannel - Failed to connect
> to opc ua server for the following reason:- 2149580800,
> BadIdentityTokenInvalid
> I would expect some kind of exception. 
> 
You likely need to surround it with a try catch pair. I would expect to
have incorrect credentials entered randomly.

--snip

Just offering my opinion, not answering for anyone.
Regards,
Stephen