HashiCorp Vault
Relution can issue device certificates from the PKI secrets engine of HashiCorp Vault →. Relution generates the key pair, has Vault sign the request through a PKI role and delivers the certificate to the device with the policy. Only Relution talks to Vault; the key of the certificate authority stays in Vault.
Supported: Vault Community Edition, Vault Enterprise, HCP Vault and OpenBao.
Preparing Vault
A PKI mount with an issuing CA.
A PKI role for Relution. The role, not Relution, sets O, OU, C, L, ST, the key usages and the maximum validity (
max_ttl). EC keys needkey_type=any.A policy for Relution, here for the mount
pki:path "pki/sign/*" { capabilities = ["create", "update"] } path "pki/revoke" { capabilities = ["create", "update"] } path "pki/cert/ca_chain" { capabilities = ["read"] } path "pki/roles/*" { capabilities = ["read"] } path "pki/roles/" { capabilities = ["list"] }The last two lines are optional: with them Relution checks the role when a template is saved and lists the roles in the connection check.
Credentials: an AppRole → (recommended) or a static token. Relution does not renew a static token: once it has expired, issuing and revoking stop.
Certificate authority
Settings → Certificate Authorities → Add, type HashiCorp Vault:
| Field | Value |
|---|---|
| Vault URL | https://host:port, without /v1 |
| Namespace | Vault Enterprise / HCP only, empty for the root namespace |
| PKI mount path | e.g. pki (without slashes) |
| Default role | Used by templates that do not name a role |
| Authentication | AppRole (role ID + secret ID) or static token |
Check connection shows the Vault version and warns about an expiring token, an ignored namespace or a missing sign permission. Afterwards, PKI mount path and Default role suggest the mounts and roles Vault reported while typing.
Certificate template
Settings → Certificate Templates → Add, type Certificate, with the Vault certificate authority:
- Vault PKI role: optional, otherwise the default role. Role names are case-sensitive.
- Subject name: only CN, UID and serialNumber, e.g.
CN=${device.serialnumber}. Placeholders are case-sensitive too. - Key algorithm: RSA or EC, as far as the role allows.
- Validity / automatic renewal: Vault caps the validity at the
max_ttlof the role. The renewal period must be shorter than that.
Key usages and directory name SANs are not available, the role defines them. SCEP on device is not available with Vault.
Revocation
Relution revokes a Vault certificate when it is revoked under Settings → Issued Certificates, when automatic renewal replaces it and the template is set to Directly invalidate old certificates, and when its device is deleted. If Vault is unreachable, Relution retries until Vault confirms or the certificate has expired. Vault publishes the revocation in its CRL and OCSP.
Limitations
- When a device is enrolled again, its previous certificates are not revoked at Vault.
- Plain
http://is only allowed for a Vault on the same machine and only withrelution.pki.vault.allow-plain-http-loopback: true. relution.pki.vault.namespace: REQUIREDmakes a namespace mandatory for every Vault certificate authority of the server.