vrli_certificate

VCF Operations for Logs (vRLI) — appliance certificate lifecycle.

vRLI exposes its appliance certificate at /api/v2/certificate (singular — the plural /api/v2/certificates used by earlier vRLI releases returns 404 on the 9.0.2.0 build we probed live).

Verbs discovered live:

GET  /api/v2/certificate       -> [ { owner: {...}, issuer: {...},
                                      serialNum: "...",
                                      validityPeriod: {from, until} } ]

POST /api/v2/certificate       {"certificate": "<PEM cert + key>"}
    -> replaces the appliance cert; restarts the API listener

The certificate field must contain both the leaf certificate and its private key concatenated in PEM form; an optional intermediate chain is appended between them. The API service restarts after a successful POST — callers should expect the next request to timeout briefly. No DELETE handler exists (returns 404 for DELETE).

saltext.vcf.clients.vrli_certificate.list_(opts, profile=None)[source]

Return every certificate currently installed on the appliance.

Each entry: {"owner": {commonName, organization, ...}, "issuer": {...}, "serialNum": "...", "validityPeriod": {"from": ..., "until": ...}}. The list is normally length-1 (the appliance’s own leaf).

saltext.vcf.clients.vrli_certificate.get(opts, profile=None)[source]

Return the first (typically only) certificate, or None if none.

saltext.vcf.clients.vrli_certificate.install(opts, cert_pem, key_pem, chain_pem=None, profile=None)[source]

Install a replacement appliance certificate.

cert_pem — the leaf certificate in PEM form. key_pem — its private key in PEM form (unencrypted). chain_pem — optional intermediate chain in PEM form (concatenated between the leaf and the key).

Note: this operation restarts the appliance API listener. The next REST call will typically time out for 30-90 s.

saltext.vcf.clients.vrli_certificate.serial_number(opts, profile=None)[source]

Return the hex serialNum of the installed cert, or None.