Comments (4)
It seems that there is a bug in the logic of loading the application instance certificate when explicitly provided per command line argument the way you intended.
In the meanwhile, as alternative option you can do the following:
Create the public and private key for the OPC PLC server in /tmp/opcua_certs/
in slightly different manner, as follows:
md certs
md private
openssl req -x509 -newkey rsa:2048 -keyout private/cert.pem -outform der -out certs/cert.der -sha256 -days 365 -nodes `
-subj "/CN=OpcPlc" `
-addext "subjectAltName=URI:urn:OpcPlc:opcplc, DNS:opcplc" `
-addext "keyUsage=critical, nonRepudiation, digitalSignature, keyEncipherment, dataEncipherment, keyCertSign" `
-addext "extendedKeyUsage = critical, serverAuth, clientAuth" `
-addext "basicConstraints=CA:FALSE"
Run the docker with the following arguments:
docker run -v /tmp/opcua_certs:/app/pki --rm -it -p 50000:50000 -p 8080:8080 --name opcplc mcr.microsoft.com/iotedge/opc-plc:latest
--pn=50000 --autoaccept --sph --sn=5 --sr=10 --st=uint --fn=5 --fr=1 --ft=uint --gn=5 --ll=trace
--ph=opcplc --cdn=opcplc --ap=app/pki/
Besides the bug I mentioned above, your generated cert is probably not really OPC UA compliant. Typically the server require the public key to be in .der format. Besides this, the subject common name is rather hardcoded to OpcPlc
therefore your generated cert is not accepted as a valid certificate. The certificate shall also contain the hostname of the system you're running on. In this case is 'opcplc' as per docker name, which I specified here:
-addext "subjectAltName=URI:urn:OpcPlc:opcplc, DNS:opcplc
and here:
--ph=opcplc --cdn=opcplc
I hope this helps you moving forward.
from iot-edge-opc-plc.
Thanks, Luis!
I didn't know that OPC UA had specific requirements to the server certificate, so great of you to share that.
Makes me wonder if there are any requirements with regards to client certificates as well.
from iot-edge-opc-plc.
Related Issues (20)
- Need help with certificates and connecting to ACI HOT 5
- NodesFile (--nf) is not picked by latest docker image and errors out HOT 2
- Wrong architecture for image mcr.microsoft.com/iotedge/opc-plc:2.4.0-linux-arm64v8 HOT 2
- Certificate error : unable to load CRL in trust store HOT 5
- V2.5.0 Broken HOT 7
- Connecting with all Security None to opcplc 2.5.0 running in EFLOW VM form host system fails HOT 5
- OPC BadConnectionClosed Errors HOT 4
- Add the same cli option RejectUnknownRevocationStatus to bypase the BadCertificateRevocationUnknown error HOT 1
- Ability to import an XML NodeSet file into the simulator HOT 1
- Certificate Push Management Inquiry HOT 3
- BuildInfo members not containing values HOT 4
- Fix code scanning alert - Clear text storage of sensitive information HOT 1
- certdnsnames and plchostname not used in the certificate HOT 4
- Container fails to run on kubernetes (You must install .NET to run this application) HOT 2
- Verbose logging is no longer working
- Cannot choose Slow or Fast nodes type of Bool or UIntArray HOT 1
- OPC PLC seem to have issues with responding to session keep-alive requests HOT 2
- Add full parameter list to documentation
- Fast node with default configuration seem to be publishing data each 10 seconds instead of 1. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iot-edge-opc-plc.