Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expiry time when UseX509Certificate is set to true #1571

Open
AndersAbel opened this issue Jun 4, 2024 · 0 comments
Open

Expiry time when UseX509Certificate is set to true #1571

AndersAbel opened this issue Jun 4, 2024 · 0 comments
Labels
bug report Bug report from a user

Comments

@AndersAbel
Copy link
Member

When we create an X509Certificate2 to wrap our keys when UseX509Certificate is set to true, we use the configured expiry lifetime of the keys as the certificate's expiry time.

If the key lifetime (rotation interval) is then increased that will let the current keys live for longer. However, the expiry time captured in the certificate will now not be honoured. We will continue to the use the key beyond that time, which is confusing.

The JWK spec does not mention the expiry time. It does however state that

If other members are present, the contents of those members MUST be
semantically consistent with the related fields in the first
certificate.

If all information in the certificate should be consistent with they key data and usage, then we should not continue using a certificate beyond it's lifetime. Updating the certificate when the lifetime changes is non-trivial; the certificates would not be the same and that could cause issues with key lookup.

This is an edge case, but the right thing to do would probably be to take the X5C expiry time into consideration when deciding when to create a new key.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Bug report from a user
Projects
None yet
Development

No branches or pull requests

1 participant