Connecting to a PLC via OPC UA (With Security)
How to connect to a PLC with OPC UA security enabled

Here we connect with user authentication and encryption
Only the security part is described, based on no security
I do not know the official way, but I was able to connect with these steps
Overall flow
- PLC security settings
- Connect once from the client
- Move the certificate from rejected to trusted in the PLC's client authentication
- Connect from the client again
PLC OPC UA security settings
OPC UA Server Settings - Security Settings
While online,
right-click "OPC UA Server Settings" and open "Security Settings"
Prohibit "Anonymous login", uncheck None under "Security policy" and transfer
Connect once from the OPC UA client (for UaExpert)
When creating a new connection setting, select the policy, enter the Username and Password and create the connection setting
Connecting with the created connection setting outputs the error
Error 'BadSecurityChecksFailed' was returned during OpenSecureChannel
Proceed to client authentication as is
How to register an OPC UA client certificate
Client authentication
Select client authentication while online with the PLC
Trusted certificates
The certificate of UaExpert or Prosys OPC UA Client remains as a rejected certificate under Rejected Certificates at the bottom of the client authentication screen
Press the "Move to Trusted Certificates" button to move it to trusted certificates
Connect from the client again
The connection succeeded
Mobile apps, PC apps and others
For the mobile app (Prosys OPC UA Client)
Connect once
When adding with Add new connection, check Secure connection
Check Secure connection and Add
Tap the added connection setting to try connecting
An error is displayed
To client authentication
Proceed to client authentication as is, move it from "Rejected Certificates" to "Trusted Certificates" and connect again
Reconnect
The connection succeeded
NOTE
The mobile version of Prosys OPC UA Client seems to support only anonymous login, so set the PLC to Anonymous
The same applies to Python, C# and other applications
Connect once → client authentication → reconnect
Frequently Asked Questions (FAQ)
What is BadSecurityChecksFailed?
An error that occurs when the client certificate is not trusted on the OPC UA server side.
Why can't UaExpert connect?
The client certificate may be registered as a rejected certificate.
Can anonymous login be used with OPC UA?
Yes, if it is allowed in the PLC settings.
