Skip to content

Device Certificates

A Policy can require that a Windows machine holds a certificate issued by a certificate authority (CA) you trust. You upload the CAs that issue your machine certificates, for example your Active Directory Certificate Services (AD CS), Intune SCEP or PKCS profiles, or another PKI. An operating system condition can then grant access only to machines that hold a certificate from one of them.

Why a certificate

The operating system condition can already require that a Windows machine is joined to your Microsoft Entra ID or managed by your Intune. The machine reports both itself, and a local administrator of the machine can change what it reports.

A device certificate is harder to fake. It is not enough for a matching certificate to be on the machine:

  • The XplicitTrust controller checks the chain of the certificate against the CAs you uploaded. A self-signed certificate that carries the name of your CA does not pass.
  • The agent proves that the machine holds the certificate's private key: it signs a random challenge from the controller with the key, and the controller checks the signature. The private key never leaves the machine, and a certificate copied without its key does not pass.
  • A challenge can be used once only and is bound to the machine, so a proof cannot be replayed or used by another machine.

The controller decides whether a machine passes, not the agent.

Requirements

  • Windows machines, as Clients or as Assets, with a current agent. The condition can be set on Windows operating system conditions only. macOS and Linux agents do not prove a certificate.
  • The certificate is in the Personal store of the local computer (Cert:\LocalMachine\My) with its private key. Certificates in a user's store are not used.
  • It is issued by an uploaded CA, directly or through intermediate CAs. The agent sends intermediate certificates it finds in the machine's Personal and Intermediate Certification Authorities stores along, so they do not have to be uploaded.
  • It is valid now. If it has a key usage, the key usage includes Digital Signature.
  • The key is RSA or ECDSA (P-256 or P-384). It can be kept in the TPM (the Microsoft Platform Crypto Provider), in software, or in the legacy Microsoft Enhanced RSA and AES Cryptographic Provider. The agent uses the key where it is: it does not export it, and no prompt appears on the machine.

Certificates that AD CS autoenrollment, Intune SCEP or PKCS certificate profiles, or another device management system install into the machine store qualify. A certificate template or profile for Computer (machine) certificates is what you need, not one for users.

Setting it up

1. Upload your CAs

Under Settings, on the Device trust tab, the card Device certificates lists the Trusted certificate authorities. Add CA adds one:

  • CA certificate (PEM): paste exactly one CA certificate, starting with -----BEGIN CERTIFICATE-----. Only the public certificate: a private key, a second certificate or any other text after the certificate is refused.
  • Name (optional): the name the console shows, for example Corp Issuing CA. Without a name, the certificate's common name is used.

You can upload your root CA or an issuing (intermediate) CA. With the root, every certificate issued below it passes. With an issuing CA, only the certificates of that CA pass: its chain only has to reach the uploaded CA.

The controller refuses:

  • certificates that are not a CA (Basic Constraints without CA:true), or whose key usage lacks Certificate Sign,
  • expired CAs,
  • public CAs, and CAs issued by a public CA. The condition checks that the machine holds a certificate from the CA, not which machine it is, so a public CA would let any machine with any publicly issued certificate pass,
  • a CA that is already uploaded,
  • more than 20 CAs.

The list shows each CA with its subject, its expiry and the number of machines currently verified through it.

Machines pick up a new CA within a few minutes and prove their certificate right away. Their result shows in the machine's details, see Checking a machine.

2. Require the certificate in a policy

In the policy, add or edit an operating system condition for Windows and check Require a device certificate. Then choose the Issuing CA:

  • Any trusted CA: a certificate from any uploaded CA passes.
  • A single CA by name: only a certificate from that CA passes.

To accept two CAs but not all of them, add one Windows operating system condition per CA: a machine needs to meet one of the operating system conditions of a policy. Within one condition, the device certificate is required in addition to the other requirements of the condition, such as the minimum version or disk encryption.

Require a device certificate can only be checked once a CA is uploaded. The condition list of the policy shows the requirement as Device certificate: Required (CA name).

Before you require the certificate in a policy that people rely on, check on the machines that they are verified (see below). A machine without a verified certificate loses the access of the policy at once.

How long a proof counts

The agent proves its certificate when it starts, when the list of CAs changes, and every 4 hours after that. A proof counts for 24 hours, or until the certificate expires if that is sooner. A machine that is offline or cannot prove for 24 hours fails the condition until its next proof.

  • When a proof fails, the agent tries again every 15 minutes.
  • 10 minutes before a certificate expires, the agent proves again. If the machine has received its renewed certificate by then, the new certificate takes over without a gap in access.
  • When the machine holds several matching certificates, the agent uses the one it proved last, otherwise the one valid the longest. If the controller refuses it, for example because it is blocked, the agent tries the next one.

The result belongs to the machine, not to the user signed in on it: another user signing in on a shared machine keeps the result.

Checking a machine

The details of a Windows Asset, and of a Windows Client under Users & Clients, show the Device certificate of the machine:

Field Meaning
Status Verified, Not verified, or Not reported when the machine has not proven a certificate yet
Reason Why the certificate is not verified, see below
Subject, Issuer The certificate the machine presented
Certificate expires The end of the certificate's validity
Key storage Where the machine keeps the key: TPM, Software, Legacy CSP or Unknown. The machine reports this; it is for information and not checked
Counts until When the proof stops counting without a new one
Last check The time of the last proof
Reason Code in events What to do
No certificate from a trusted CA on the machine no_certificate Check that the certificate is in the local computer's Personal store, with its private key, and that its chain reaches an uploaded CA.
The agent cannot use the certificate's private key key_not_accessible The key's provider does not let the agent sign, for example a smart card or another vendor's cryptographic provider. The message shows the Windows error. Issue the certificate with a key in the TPM or in the Microsoft software provider.
Not issued by a trusted CA untrusted_chain Upload the CA that issued the certificate, or install the missing intermediate CAs on the machine.
The certificate has expired certificate_expired Renew the certificate.
The certificate is not valid yet certificate_not_yet_valid Check the machine's clock and the certificate's validity.
The certificate may not be used for signing key_usage Issue the certificate with the key usage Digital Signature.
The certificate could not be read invalid_certificate The certificate is damaged or in a format the controller does not accept.
The proof's signature did not match the certificate invalid_signature The key that signed does not belong to the certificate.
The certificate is blocked certificate_blocked An administrator blocked the certificate, see Blocking a certificate.
Its CA was deleted authority_removed The CA the certificate chained to is no longer uploaded.
No new proof for 24 hours verification_expired The machine has not proven its certificate for 24 hours, for example because it was offline.

Blocking a certificate

XplicitTrust does not check certificate revocation lists or OCSP. A certificate revoked on your CA keeps passing here until it expires. To take it away from a machine, block it:

  • In the machine's details: Block certificate, with an optional reason.
  • Under Settings > Device trust > Blocked certificates: Block by thumbprint with the certificate's SHA-256 thumbprint and an optional reason. Use this for a certificate no machine has presented yet. The certificate dialog of Windows shows a SHA-1 thumbprint, which does not fit. To get the SHA-256 one, export the certificate as DER (.cer) and run certutil -hashfile cert.cer SHA256.

A block takes effect at once: every machine that presents the certificate fails the condition, and its access through the policy ends. The list of blocked certificates shows who blocked which certificate when and why.

A block covers one certificate. When the machine is issued a new certificate, for example by autoenrollment, the new certificate passes again. To cut a machine off for good, disable or delete the Asset or Client.

Unblock removes the block. The machine passes again after its next proof, within about 15 minutes.

Deleting a CA

Deleting a CA fails every machine verified through it at once. A CA that an operating system condition names as its Issuing CA cannot be deleted: change the condition first.

Events

  • client_compliance.device_certificate_changed is written when the result of a machine changes: it becomes verified, presents another certificate, or fails for another reason. old_value and new_value read, for example, verified (CN=PC-0042) and failed: certificate_blocked. A proof that confirms the result writes no event.
  • Uploading and deleting a CA, and blocking and unblocking a certificate, are configuration changes (configuration_change.created and .deleted) with the object_type device_certificate_authority or blocked_device_certificate.

See Event Forwarding and the Wazuh rules 117130 and 117131.