Spire will create CAs that are longer lived than the upstream CA #5097
Open
Description
- Version: 1.7.1
- Platform: linux
- Subsystem: server
Spire will create a CA that outlives the upstream CA being signed with. This doesn't appear to be an issue for standard mint/verify workflows on a single spire, but it does cause federation to stop working. Take the following use case.
ServerA and ServerB are configured with an upstreamCA that lasts 1month, their internal CA_TTL is set to 6 months.
ServerA is configured to trust ServerB using Web PKI (https_web
). ServerA calls ServerB's PKI endpoint https://serverb.com/ and gets a payload of keys like this
{ keys: [{"use": "x509-svid", "x5c": ["{{base64encoded upstream CA public key}}"}, { "jwt-svid" ... }...}]}
Now we have a uni-direction federation link that will stop working in 1month.
Repo Steps:
- Fast forward 1month + 1second... [[touch the ground to speed up time]]
- client mints a token on ServerB
- Client verifies the token on serverA. ServerA reports an error like this:
SVID is not valid: public key "X5ZOAszrYj0LnaHdUqRWLZcMtzpgcY9L" not found in trust domain "serverb.com"
- Notice serverA makes no attempt to refresh the bundle on errors. Also no errors are mentioned about the bundle being untrustworthy due to upstreamCA public keys