Bad Session Channel Closed exception when trying to connect OpcUaClient to server using X509IdentityProvider #1551
Replies: 4 comments 6 replies
-
Are you using a separate certificate for the X509 authentication than the one you use for the secure channel connection? Have you configured this user certificate in the Prosys simulation server somehow?
All connections that use security are "certificate-based". Using the X509IdentityProvider means using another, separate, certificate that is used to identify and authenticate the user of the Session. |
Beta Was this translation helpful? Give feedback.
-
Yes @kevinherron, I am using a different certificate for authentication with a private key. I have copied this certificate in Prosys server's PKI/cert directory and I can this certificate trusted in Prosys Simulation server UI ![]() |
Beta Was this translation helpful? Give feedback.
-
Hi @kevinherron, My requirement is to build the client with an application instance certificate, which will go to the server, and when we accept that certificate in the server, then a connection will be established. So instead of the default certificate, I want to use my certificate to establish a client-server connection. Is this possible? |
Beta Was this translation helpful? Give feedback.
-
Hi @kevinherron, Thanks for your help!! The steps you mentioned above solved my issue, and I am now able to connect to the server with the generated certificate. I just wanted to know what the significance of "certificateChain" in configuration is. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
I am using the Eclipse-milo SDK to establish a secured connection with the server.
I am able to establish a username-password-based connection with the server using UsernameProvider.
I am trying to establish certificate-based connection to server (Security Mode: SignAndEncrypt, Security Policy: Basic256Sha256) using X509IdentityProvider
Following is the code snippet I am using:
clientLocal.connect().get() method is throwing the exception "Bad_SessionChannelClosed" (I think it is not opening the session).
I have already added the certificate to the "cert" folder of the server.
Expected behavior
When the certificate is added to the cert folder, the connection should be established and client should connect to server.
If the certificate is not already accepted, it should appear to the server for accepting.
Logs and Packet Captures
Additional context
Eclipse Milo version: 0.6.16
OPC Ua server: Prosys Simulation Server free edition.
Beta Was this translation helpful? Give feedback.
All reactions