-
TaskThe final project in question is worker app (runtime: net6.0, target OS: Windows Server 2012R2) intended to be used as Windows Service to gather data from KEPServer, which is a proxy for internal system, using OPC UA protocol. OPC UA server settingsSupported security policies:
Server admin assured me that no certificates with private keys are used. Extension used are of My configurationSensitive data has been substituted by dummy stub such as 'port', 'ip' due to security considerations.
So far so good. The subject is set. Paths to storage folders are set. I also added KEPServer's certificate to .CertificatesStores/pki/issuer/certs. App certificate has been passed to server admin to be added to the trusted list. My code sampleAfter having taken a look at "ConsoleReferenceClient" from UA-.NETStandard-Samples (as it seems the most appropriate to me) repo, I've dropped the following lines of code:
Issue descriptionWhen I deploy and start my app at a production server I get an error: I tried to test connection with UaExpert program, but when I set Authentication Settings => Certificate, I get error that says X509 certificate private key isn't found. The program also doesn't allow to use generated
What should I do? Convert So, I can sum up the following:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
To anyone who could possibly face the same issue. Certificate created by library is for application and not user identity. To put it simple, one of |
Beta Was this translation helpful? Give feedback.
To anyone who could possibly face the same issue. Certificate created by library is for application and not user identity. To put it simple, one of
Opc.Ua.UserIdentity
constructor's overloads takesX509
certificate as an argument, so I used to pass application certificate as in the example provided above. In my particular case administrator just didn't gave me login and password to pass authentication. Moreover I put the server's certificate to the trusted/certs folder, not issuer/certs.