AXIAM PHP SDK

CaCertificate
in package
implements JsonSerializable

FinalYes

A CA (Certificate Authority) certificate at the organization level. CA certificates are the root of trust for all tenant certificates within the organization. Private keys for signing CAs are encrypted with AES-256-GCM and stored separately; non-signing CAs only store the public certificate.

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
$publicCertPem  : string
$status  : CertificateStatus
$subject  : string
$tenantId  : string|null

Methods

__construct()  : mixed
Constructs a CaCertificate.
fromArray()  : self
Rebuilds a CaCertificate 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

$mtlsTrustAnchor read-only

public bool|null $mtlsTrustAnchor = null

Methods

__construct()

Constructs a CaCertificate.

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 ]) : mixed
Parameters
$createdAt : string

the server's created_at field

$fingerprint : string

SHA-256 fingerprint of the certificate.

$id : string

the server's id field

$keyAlgorithm : KeyAlgorithm

the server's key_algorithm field

$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_pki custody is the intermediate rather than the root beneath which it was created.

$status : CertificateStatus

the server's status field

$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. None for a CA that is its own root, which is every CA AXIAM generated before Vault's PKI engine was an option. Present for a vault_pki CA, 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, and root/generate/internal returns 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; None for 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_PATH at 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 what axiam_pki::mtls needs to authenticate an IoT device or a service account by certificate rather than by secret. # What is and is not copied Only public_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 its RootCertStore once, 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 to false, 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. None for 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. None for an organization-level CA — the trust anchor, and the only kind that existed before tenant signing CAs. Some for 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)

fromArray()

Rebuilds a CaCertificate from one decoded JSON object.

public static fromArray(array<string, mixed> $data) : self
Parameters
$data : array<string, mixed>

The raw wire object.

Return values
self

jsonSerialize()

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.

Return values
array<string, mixed>
On this page

Search results