GeneratedCaCertificate
in package
implements
JsonSerializable
Response returned when a CA certificate is generated. Includes the private key PEM, which is returned **once** and never stored or retrievable again — when the custodian produced one at all. Under `vault_pki` custody the key was born inside Vault and there is nothing to return, which is the point of that custodian rather than a shortcoming of this response.
Table of Contents
Interfaces
- JsonSerializable
Properties
- $chainPem : string|null
- $createdAt : string
- $fingerprint : string
- $id : string
- $keyAlgorithm : KeyAlgorithm
- $keyCustody : string|null
- $keyLocator : string|null
- $mtlsTrustAnchor : bool|null
- $notAfter : string
- $notBefore : string
- $organizationId : string
- $parentCaId : string|null
- $privateKeyPem : Sensitive|null
- $publicCertPem : string
- $status : CertificateStatus
- $subject : string
- $tenantId : string|null
Methods
- __construct() : mixed
- Constructs a GeneratedCaCertificate.
- fromArray() : self
- Rebuilds a GeneratedCaCertificate from one decoded JSON object.
- jsonSerialize() : array<string, mixed>
- Renders this object for `json_encode()`.
- toArray() : array<string, mixed>
- Renders this object back to its wire form.
Properties
$chainPem read-only
public
string|null
$chainPem
= null
$createdAt read-only
public
string
$createdAt
$fingerprint read-only
public
string
$fingerprint
$id read-only
public
string
$id
$keyAlgorithm read-only
public
KeyAlgorithm
$keyAlgorithm
$keyCustody read-only
public
string|null
$keyCustody
= null
$keyLocator read-only
public
string|null
$keyLocator
= null
$mtlsTrustAnchor read-only
public
bool|null
$mtlsTrustAnchor
= null
$notAfter read-only
public
string
$notAfter
$notBefore read-only
public
string
$notBefore
$organizationId read-only
public
string
$organizationId
$parentCaId read-only
public
string|null
$parentCaId
= null
$privateKeyPem read-only
public
Sensitive|null
$privateKeyPem
= null
$publicCertPem read-only
public
string
$publicCertPem
$status read-only
public
CertificateStatus
$status
$subject read-only
public
string
$subject
$tenantId read-only
public
string|null
$tenantId
= null
Methods
__construct()
Constructs a GeneratedCaCertificate.
public
__construct(string $createdAt, string $fingerprint, string $id, KeyAlgorithm $keyAlgorithm, string $notAfter, string $notBefore, string $organizationId, string $publicCertPem, CertificateStatus $status, string $subject[, string|null $chainPem = null ][, string|null $keyCustody = null ][, string|null $keyLocator = null ][, bool|null $mtlsTrustAnchor = null ][, string|null $parentCaId = null ][, string|null $tenantId = null ][, Sensitive|null $privateKeyPem = null ]) : mixed
Parameters
- $createdAt : string
-
the server's
created_atfield - $fingerprint : string
-
SHA-256 fingerprint of the certificate.
- $id : string
-
the server's
idfield - $keyAlgorithm : KeyAlgorithm
-
the server's
key_algorithmfield - $notAfter : string
-
Validity end.
- $notBefore : string
-
Validity start.
- $organizationId : string
-
The organization this CA belongs to.
- $publicCertPem : string
-
PEM-encoded public certificate. The certificate that signs*, which under
vault_pkicustody is the intermediate rather than the root beneath which it was created. - $status : CertificateStatus
-
the server's
statusfield - $subject : string
-
The certificate subject (e.g.,
CN=ACME Corp Root CA). - $chainPem : string|null = null
-
The issuers above [
Self::public_cert_pem], concatenated PEM, nearest issuer first and the root last.Nonefor a CA that is its own root, which is every CA AXIAM generated before Vault's PKI engine was an option. Present for avault_pkiCA, where it is the only copy of the root certificate anything outside Vault will ever see — a relying party cannot validate an AXIAM-issued leaf without it, androot/generate/internalreturns it exactly once. (optional) - $keyCustody : string|null = null
-
Which custodian holds this CA's signing key. Recorded per CA rather than read from configuration, so adopting a new custodian does not strand the CAs that already exist. Not secret — an operator needs to see it, and it discloses only where a key is kept. (optional)
- $keyLocator : string|null = null
-
Where the custodian put the key. A Vault path under its mount;
Nonefor database custody, whose locator is the row itself. (optional) - $mtlsTrustAnchor : bool|null = null
-
Whether this CA is offered as a trust anchor for mutual TLS. When set, the server exports this CA's public certificate to the bundle named by
AXIAM__SERVER__TLS__CLIENT_CA_BUNDLE_PATHat startup and turns client-certificate authentication on (optional) if the operator has not configured it explicitly. A client presenting a certificate that chains to this CA is then verified by the TLS layer itself, which is whataxiam_pki::mtlsneeds to authenticate an IoT device or a service account by certificate rather than by secret. # What is and is not copied Onlypublic_cert_pem— the certificate. The private key stays where its custodian put it (Vault, or sealed into the row) and is never written to the server volume. A trust anchor is public by construction: it is what the server hands every client during the TLS handshake, and every device that has to validate the chain already holds a copy. # Why a restart rustls builds itsRootCertStoreonce, when the listener is constructed, and actix-web binds that config for the process's life. Toggling this changes what the next boot trusts, and the API says so in its response rather than pretending the change took effect. Defaults tofalse, so a deployment that never touches this keeps exactly the TLS posture it has today. (optional) - $parentCaId : string|null = null
-
The CA in this organization that signed this one.
Nonefor an organization-level CA, which is either self-signed or imported and has no parent inside AXIAM. (optional) - $tenantId : string|null = null
-
The tenant this CA signs for, when it is a tenant signing CA.
Nonefor an organization-level CA — the trust anchor, and the only kind that existed before tenant signing CAs.Somefor an intermediate created under one, which exists so a tenant's user, service and device certificates chain through a CA that can be revoked and replaced without touching the anchor the rest of the estate trusts. (optional) - $privateKeyPem : Sensitive|null = null
-
PEM-encoded private key — returned only on generation, and only when there is one to return. Absent under
vault_pkicustody, where the key was generated inside Vault and no API exports it. The field is omitted rather than sent asnullso a client that has always read it keeps working unchanged for every custodian that does produce a key. (optional)
fromArray()
Rebuilds a GeneratedCaCertificate from one decoded JSON object.
public
static fromArray(array<string, mixed> $data) : self
Parameters
- $data : array<string, mixed>
-
The raw wire object.
Return values
selfjsonSerialize()
Renders this object for `json_encode()`.
public
jsonSerialize() : array<string, mixed>
Any Sensitive it carries stays WRAPPED here, so a log line or a
json_encode($model) in application code prints [SENSITIVE]. The one place a secret
is revealed is ManagementTransport, on the way to the wire
and nowhere else (§27.5).
Return values
array<string, mixed>toArray()
Renders this object back to its wire form.
public
toArray() : array<string, mixed>
§27.4 rule 5: a null property is OMITTED, not emitted as null. On a sparse update those two say opposite things — "leave this alone" versus "set this to nothing" — and only omission means the first.