OPC UA security: modes, policies, certificates — and why a certificate is rejected

Security modes and policies, application instance certificates, trust lists, user authentication and a checklist for the most common connection failures.

Two layers

  1. Secure channel (application authentication, message signing and encryption) — chosen by security mode and security policy.
  2. User authentication inside the session — Anonymous, UserName/password, X.509 user certificate or issued token (e.g. JWT).

Security modes

ModeMessagesUse
NoneNo signing, no encryptionIsolated tests only
SignSigned (integrity), readable on the wireRare; protects against tampering
SignAndEncryptSigned and encryptedRecommended for production

Security policies

A policy is a fixed set of algorithms. Current RSA-based policies:

PolicySymmetricAsymmetric signatureKey sizeStatus
Basic128Rsa15AES-128-CBC, HMAC-SHA1RSA PKCS#1 v1.5 SHA-11024–2048deprecated
Basic256AES-256-CBC, HMAC-SHA1RSA PKCS#1 v1.5 SHA-11024–2048deprecated
Aes128_Sha256_RsaOaepAES-128-CBC, HMAC-SHA256RSA PKCS#1 v1.5 SHA-2562048–4096current
Basic256Sha256AES-256-CBC, HMAC-SHA256RSA PKCS#1 v1.5 SHA-2562048–4096current
Aes256_Sha256_RsaPssAES-256-CBC, HMAC-SHA256RSA-PSS SHA-2562048–4096current

Version 1.05 adds elliptic-curve policies (ECC_nistP256, ECC_nistP384, brainpool and curve25519/448 variants). Both sides must support the policy; the server offers its list in the endpoints.

Application instance certificates

Every client and server has an X.509 certificate. Important fields:

  • Subject Alternative Name — URI must equal the application's ApplicationUri;
  • SAN DNS names / IP addresses of a server must contain the hostname the client uses;
  • validity period, key length matching the policy, key usage.

Each application keeps folders such as trusted, rejected and issuers. An unknown certificate lands in rejected until an administrator moves it to trusted (or trusts the issuing CA).

Why a certificate is rejected — checklist

Symptom / statusLikely causeWhat to do
BadCertificateUntrustedPeer certificate not in the trust listMove it from rejected to trusted on the receiving side
BadCertificateTimeInvalidExpired / not yet valid, or wrong clockCheck PLC/PC time; renew the certificate
BadCertificateHostNameInvalidHostname/IP in endpoint URL not in SANConnect with the name in the certificate or regenerate
BadCertificateUriInvalidSAN URI ≠ ApplicationUriRegenerate the certificate with the right URI
BadSecurityPolicyRejectedPolicy not allowed / key too shortChoose a policy both sides enable
BadIdentityTokenRejectedUser/password or user certificate refusedCheck user management on the server

Trust both ways: the server must trust the client and the client must trust the server.

Loading the map…

Sources

  1. OPC 10000-2 Part 2: Security Model (v1.05) — OPC Foundation
  2. OPC 10000-4 Part 4: Services (v1.05) — OPC Foundation
  3. OPC 10000-7 Part 7: Profiles (v1.05) — OPC Foundation
  4. OPC 10000-6 Part 6: Mappings (v1.05) — OPC Foundation

Updated 2026-10-02