Why are some of our grants giving CryptographicException ? #155
-
Sometimes, when merely listing grants for a user (GetAllUserGrantsAsync) we get an exception logged "System.Security.Cryptography.CryptographicException: The payload was invalid. ..." We are currently on 6.2.5, and I'm aware of DuendeSoftware/products#1479 which was fixed in 6.3.8. But my question is: what can we do about these failing decryptions on some existing grant? There is no information in the message to know WHICH grant is failing. Is there something that will identify them, or purge them? For context, we upgraded from static signing key to dynamic keys in Sept 2023, but most of those grants are long gone. We are seeing it with current automated users that have grants only in 2025. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
@aaronclawrence this could be caused by misconfigured ASP.NET Core Data Protection. Can you check the docs at https://docs.duendesoftware.com/identityserver/deployment#aspnet-core-data-protection, and verify a couple of things?
You could also try to decrypt the entries in the grants table with some custom code, and see which ones are failing. |
Beta Was this translation helpful? Give feedback.
@aaronclawrence this could be caused by misconfigured ASP.NET Core Data Protection.
Can you check the docs at https://docs.duendesoftware.com/identityserver/deployment#aspnet-core-data-protection, and verify a couple of things?
You could also try to decrypt th…