Skip to content

Spire will create CAs that are longer lived than the upstream CA #5097

Open
@drewwells

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:

  1. Fast forward 1month + 1second... [[touch the ground to speed up time]]
  2. client mints a token on ServerB
  3. 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"
  1. 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

Metadata

Assignees

No one assigned

    Labels

    help wantedIssues with this label are ready to start work but are in need of someone to do itpriority/backlogIssue is approved and in the backlog

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions