-
Notifications
You must be signed in to change notification settings - Fork 219
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
[Feature Request] Help certificate rotation of client certificates #956
Comments
What happens:
$cert=New-SelfSignedCertificate -Subject "Expired" -CertStoreLocation "Cert:\CurrentUser\My" -KeyExportPolicy Exportable -KeySpec Signature -NotAfter "15/03/2021 16:05"
Proposal
|
A few questions:
Thanks! |
Thanks for these questions, @wuwei8372
|
Thanks for replay @jmprieur!
|
Yes @wuwei8372, LKG = Last Known Good (the latest valid certificate in AKV). The issue is, the certificate could be valid in AKV, but not registered as a client credential in the app registration for the app. |
@jmprieur, could we do the check to update certificateDescription.Certificate when LoadIfNeeded(CertificateDescription) is called? So that we could use CertificateDescription.KeyVaultCertificateName to find the cert in AKV even if the cert is not registered in the app registration? Then in our code we could call loadIfNeeded periodically, or just before sending each request to update certificateDescription.Certificate. |
@wuwei8372, we could add a boolean to do the check. I don't think we'd want to check keyvault each time we call LoadIfNeeded, because this would be basically each time we validate a token or acquire a token ... |
@jmprieur it makes sense to add a boolean to LoadIfNeeded to determine if checking in AKV is needed or not. I think it would work for us. |
@jmprieur could we have a cache behind LoadIfNeeded for certificate when checking certificate in AVK, so we don't have to call AKV every time if the cache is valid? |
yes, that's what I mean, @wuwei8372 by LKG :) |
Things to test: The certificates:
Depending on all these cases, the error message should help the developer to troubleshoot.
|
included in 1.10.0 release |
Is your feature request related to a problem? Please describe.
Today, Microsoft.Identity.Web:
For the client certificates, it also supports send5xc, however, it could help a bit more by fetching from keyvault a newer version of a certificate when the confidential client flow fail because of certificate expiry or invalidation.
Describe the solution you'd like
When:
Describe alternatives you've considered
Subscribe to KeyVault events, but this would require too much configuration from customers
The text was updated successfully, but these errors were encountered: