-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
fix(inputs.opcua): Fix opcua and opcua-listener for servers using password-based auth #12529
Conversation
@LarsStegman does this look right to you? There's a few layers of abstraction and several different things called |
Hi, yeah this looks right. Thanks! Looks like it fell through the cracks during the refactor. Interesting we got no bug reports for this. Maybe almost everybody is using it without the auth part. Could you look into adding a test for this? I'm not sure if the test container with the OPC server also supports a config with authentication required. |
@LarsStegman done! Took some digging around in how open62541 is structured but happily they have a binary packaged in the existing docker container which sets itself up with password auth. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking the time to put up a PR!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your fix @vsinha. I have one comment regarding the placement of the call to Init()
. Furthermore, I would prefer to split this PR into the fix, which is the missing call to Init()
AFAICS, and the cleanup of the test and read_client.
What do you think?
Download PR build artifacts for linux_amd64.tar.gz, darwin_amd64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
I made these changes and split out the refactor for a future PR! Thanks for the feedback @srebhan |
The Gopcua/opcua client was never properly initialized, which meant that authentication to the opcua server was never configured. My guess is this got lost in the shuffle of the addition of the opcua_listener plugin.
In testing before this change, without calling init, the server gave an error like
After Init(), the plugin works and is able to ingest data as expected.