Sign with AWS KMS¶
Deprecated.
signingKey.kmslogs a warning at start. New installations use the signing ring: sluis wraps generated key pairs under a symmetric key named bykeys.sign. To move, see signing on AWS. For the ring keys, see configuration.
Keep the issuer's signing key in AWS KMS so the master key is never in a pod, a Secret or a backup.
Before you start¶
-
Create one
ECC_NIST_P384SIGN_VERIFYkey with an alias such asalias/sluis-<instance>-sign. For RS256 relying parties (Kargo, EKS's OIDC provider) add oneRSA_2048,RSA_3072orRSA_4096SIGN_VERIFYkey undersigningKey.kms.additional. -
Give the pod an AWS identity: Pod Identity, or
serviceAccount.awsIdentity: irsa(chart values). -
Set the sign-in state secret
issuer/state-secret(secrets). A KMS key has no private bytes to derive it from. -
signingKey.kmsexcludessigningKey.file. In the chart writeconfig.signingKey.file: nulland removesigningKey.existingSecretandsigningKey.additional. -
A key of another spec or usage stops the start. Without
kms:GetPublicKeythe start fails naming the permission. Withoutkms:Signit starts and fails every token, counted insluis.kms_signatures{result="error"}. -
Grant on the key, not the alias, or use a
kms:ResourceAliasescondition. Each token is onekms:Signcall, so the account's request quota bounds throughput.
Steps¶
- Attach this statement to the service's role, for each key in
signingKey.kms.keysandsigningKey.kms.additional[].keys:
{
"Effect": "Allow",
"Action": ["kms:Sign", "kms:GetPublicKey"],
"Resource": ["<the ARN of each key>"]
}
- Configure the keys. List them oldest first: the last one signs.
config:
signingKey:
file: null
kms:
keys: [alias/sluis-<instance>-sign]
region: eu-west-1
stateSecret: issuer/state-secret
The algorithm is ES384. The start log names each key and its kid.
- To rotate, append a new key to
keys. It is published at once and signs aftersigningKey.activationDelay. The earlier key stays published forsigningKey.overlap. The list is reread everypollInterval. Never insert a key before one already seen.
Verify¶
aws kms get-public-key --key-id <key> as the role succeeds. curl -s https://<issuer>/keys | jq -r '.keys[].kid' lists the key, a sign-in succeeds and sluis.kms_signatures{result="ok"} rises. Alert on result="error" and result="throttled" (telemetry).
Roll back¶
Detach the statement. Restore signingKey.file and the chart's certificate; tokens the KMS key signed stop verifying unless it stays as a verify-only key (cut over).