Skip to content

fm pki ​

Reference for the fm pki command group (auto-generated from fm pki --help).

fm pki ​

text
Work with the Frostmoln platform certificate authority.

Managed instances (databases, caches, message brokers, webservers) present TLS
certificates signed by the Frostmoln customer CA. Trust the CA bundle in your
client to connect with full certificate and hostname verification.

Usage:
  fm pki [command]

Available Commands:
  ca-bundle   Download the platform CA bundle (PEM)

Flags:
  -h, --help[=true|false]   help for pki

Global Flags:
      --config string           config file (default is $FM_CONFIG, else $HOME/.fm/config.yaml)
  -d, --debug[=true|false]      enable debug/verbose output
      --no-color[=true|false]   disable colored output
  -o, --output string           output format: table, json, yaml, wide (default "table")
  -q, --quiet[=true|false]      suppress non-essential output
      --tenant string           tenant ID to operate on (overrides the active/default tenant; also FM_TENANT)

Use "fm pki [command] --help" for more information about a command.

fm pki ca-bundle ​

text
Download the Frostmoln customer CA bundle.

The bundle holds the root certificate(s) that sign every managed instance's TLS
certificate; during a root rollover it holds both the current and the next root.
Trust the whole file, not one certificate from it.

By default the PEM is written to stdout. --file writes it to a file (mode 0644,
it is public material; the file is replaced atomically, and a symlink at that
path is replaced rather than followed) and prints the SHA-256 fingerprints to
stderr. With -o json|yaml the whole bundle is printed instead: {pem,
certificates: [{subject, fingerprintSha256, notBefore, notAfter}]}, all derived
from the parsed certificates. A warning goes to stderr for every certificate
whose validity has ended; the command still succeeds.

Only self-signed CA certificates are accepted, and the output is re-encoded from
the parsed certificates. The command also refuses a response whose certificate
list contradicts its own PEM, but that only catches an inconsistent server: it
is NOT an integrity check, because both come from the same response.

To verify the bundle, compare its fingerprints with the ones published in the
Frostmoln documentation, or pass them with --expect-fingerprint (repeatable):
the bundle must then hold exactly those certificates, or nothing is written.
Fingerprints are accepted as hex, upper or lower case, with or without colons.

Root rollover with --expect-fingerprint: a rollover first ADDS the next root to
the bundle, and its fingerprint is published on the documentation page in
advance. The pinned set then no longer matches and the command fails until you
update the pin to the newly published set (old and next root). When the old
root is later removed from the bundle, the published set changes again; update
the pin again. Update your pin whenever the published set changes.

Examples:
  fm pki ca-bundle > frostmoln-customer-ca.pem
  fm pki ca-bundle --file frostmoln-customer-ca.pem
  fm pki ca-bundle --file frostmoln-customer-ca.pem --expect-fingerprint <sha256>
  fm pki ca-bundle -o json
  psql "host=<host> sslmode=verify-full sslrootcert=frostmoln-customer-ca.pem ..."

Usage:
  fm pki ca-bundle [flags]

Flags:
      --expect-fingerprint stringArray   SHA-256 fingerprint the bundle must hold (repeatable); the bundle must match the given set exactly
      --file string                      write the PEM to this file instead of stdout (replaced atomically)
  -h, --help[=true|false]                help for ca-bundle

Global Flags:
      --config string           config file (default is $FM_CONFIG, else $HOME/.fm/config.yaml)
  -d, --debug[=true|false]      enable debug/verbose output
      --no-color[=true|false]   disable colored output
  -o, --output string           output format: table, json, yaml, wide (default "table")
  -q, --quiet[=true|false]      suppress non-essential output
      --tenant string           tenant ID to operate on (overrides the active/default tenant; also FM_TENANT)