Signing keys¶
LightHouse-light always manages signing keys on the filesystem: the
kms / pk_backend / pkcs11 options of LightHouse do not exist here.
- Private keys live in
signing.filesystem.key_file(a single key file) orsigning.filesystem.key_dir(a multi-key directory; rotated keys land here). At least one of the two is required — see config.md. - Public keys are published in the entity configuration's JWKS and the historical-keys endpoint. Private keys never appear in the data-dir JSON files.
- The signing key's
kidis stable across restarts (it is only generated once and persists in the key dir / key file).
First boot¶
With auto_generate_keys: true (default) a key for the configured algorithm
is created if none exists. It persists and is not regenerated on later
boots — the entity-configuration kid stays the same. With
auto_generate_keys: false and no key present, startup fails.
Algorithm and key length¶
signing.alg— signing algorithm, defaultES512(ES256,ES384,ES512,RS256, …). Changing it triggers a new key.signing.rsa_key_len— RSA key length, default2048(RSA algorithms only).
Both are config-owned settings: they are applied from the config file at
every start and are never written into the data files. Removing alg from
the config falls back to the default (ES512).
Changing alg keeps the old key
Changing signing.alg adds a new key for the new algorithm, but the old
key stays in key_dir and remains published in the entity
configuration's JWKS (it is not rotated out of the active set). In
particular:
- Both keys appear in the EC JWKS after the change; new statements are signed with the new key.
- Superiors that have this entity as a subordinate keep only the keys
you provisioned for them — a signature by the new key no longer
verifies against their stored copy, so chain resolution,
jwks_updateandjwks_update_triggerfail against them until they refresh. - To phase the old key out, use
key_rotationinstead, or retire it manually (remove the old<kid>.pemfromkey_dirand restart). - The refresh endpoints verify newly received keys against the keys
currently stored for the subordinate: a full key swap with no
overlap is rejected (
jwks_update→ signature verification failure,jwks_update_trigger→invalid_client). An operator who rotates a subordinate's keys must publish the transition keys in the subordinate's EC JWKS before signing with them, or manually re-provision the subordinate row insubordinates.json.
Rotation¶
signing.key_rotation.*controls rotation. Rotation is disabled unlessintervalis configured, and it requireskey_dir(a singlekey_filecannot rotate).- Validation: an enabled rotation interval smaller than
federation_data.configuration_lifetimeis a configuration error and aborts startup. Below that bound the rotation loop degenerates into generating keys in a tight loop (unbounded key-dir growth and an ever-growing published JWKS) — even without that, an interval below the lifetime of the JWTs signed with the federation key invalidates them before they expire. Keepinterval≥ the longest lifetime of ECs, statements, and trust marks. - Authority hints with a
jwks_syncdirective (see data-directory.md) are notified automatically after each rotation so superiors fetch the new keys.