Skip to content
This repository was archived by the owner on Feb 5, 2025. It is now read-only.
This repository was archived by the owner on Feb 5, 2025. It is now read-only.

Error related to the signing key in Staging (Non-prod) environments #1371

@nisargshah1711

Description

@nisargshah1711

Which version of Duende IdentityServer are you using?
7.0.6

Which version of .NET are you using?
.NET 8.0

Describe the bug
"Error unprotecting the IdentityServer signing key with kid 51EE19033AA5D1582685D66DD1193DFC. This is likely due to the ASP.NET Core data protection key that was used to protect it is not available. This could occur because data protection has not been configured properly for your load balanced environment, or the IdentityServer signing key store was populated with keys from a different environment with different ASP.NET Core data protection keys. Once you have corrected the problem and if you keep getting this error then it is safe to delete the specific IdentityServer signing key with that kid."

To Reproduce
When we try to logout from our one of the application, it should redirect to the login page of Identity server, instead we are getting an error page:
image

Expected behavior

It should show the login page.

Log output/exception with stacktrace

"Error unprotecting the IdentityServer signing key with kid 51EE19033AA5D1582685D66DD1193DFC. This is likely due to the ASP.NET Core data protection key that was used to protect it is not available. This could occur because data protection has not been configured properly for your load balanced environment, or the IdentityServer signing key store was populated with keys from a different environment with different ASP.NET Core data protection keys. Once you have corrected the problem and if you keep getting this error then it is safe to delete the specific IdentityServer signing key with that kid."

Additional context

This problem is happening only in non production environments, also we are seeing new keys generated in keys folder. So at this moment there are 4 to 5 files in the keys folder. This could be the cause. But we need to know the exact reason why it is happening.

Add any other context about the problem here.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions