Skip to content

Conversation

@amcasey
Copy link
Member

@amcasey amcasey commented Feb 29, 2024

Under somewhat contrived circumstances, it's possible that the keyring, on determining that no suitable default key is available, will generate a new, immediately-activated key and that that key will also be immediately-revoked. For example, it's possible to revoke all keys created before a given date and clock skew between servers could result in that being in the future for some servers.

It's also possible that a third-party IDefaultKeyResolver could select a revoked key, since the contract doesn't state that it should not. Having said that, we haven't really hardened against other misbehavior by resolvers, so this isn't terribly compelling.

Still, no harm in throwing - better than using a revoked key to encrypt data.

Under somewhat contrived circumstances, it's possible that the keyring, on determining that no suitable default key is available, will generate a new, immediately-activated key and that that key will also be immediately-revoked.  For example, it's possible to revoke all keys created before a given date and clock skew between servers could result in that being in the future for some servers.

It's also possible that a third-party `IDefaultKeyResolver` could select a revoked key, since the contract doesn't state that it should not.  Having said that, we haven't really hardened against other misbehavior by resolvers, so this isn't terribly compelling.

Still, no harm in throwing - better than using a revoked key to encrypt data.
@amcasey amcasey added the area-dataprotection Includes: DataProtection label Feb 29, 2024
@amcasey amcasey merged commit 919618d into dotnet:main Mar 4, 2024
@amcasey amcasey deleted the NewKeyRevoked branch March 4, 2024 21:46
@danroth27 danroth27 added this to the 9.0-preview3 milestone Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-dataprotection Includes: DataProtection

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants