Skip to content

feat: added options to configure read-only key store, and key mapping bug fixes#10

Merged
jhbritton-RSK merged 6 commits into
mainfrom
feat/16820
Jun 9, 2026
Merged

feat: added options to configure read-only key store, and key mapping bug fixes#10
jhbritton-RSK merged 6 commits into
mainfrom
feat/16820

Conversation

@jhbritton-RSK

Copy link
Copy Markdown
Collaborator

No description provided.

@jhbritton-RSK jhbritton-RSK changed the title Feat/16820 feat: added options to configure read-only key store, and key mapping bug fixes Jun 5, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the IdentityServer compatibility signing/validation key stores to support time-based filtering (max key lifetime) via TimeProvider, adds configurable options, and updates unit/integration tests accordingly.

Changes:

  • Introduces CompatibilityKeyStoreOptions and a shared IdentityServerSigningKeyStore base to centralize key retrieval and max-lifetime filtering.
  • Updates signing/validation key stores and DI registration (AddCompatibilityKeyStores) to use TimeProvider and optional signing-store registration.
  • Adds/updates tests and test helpers for deterministic time and key expiration behavior; adds DataProtectionConstants and converter tests.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
src/Open.IdentityServer/test/Open.IdentityServer.UnitTests/Stores/Compatibility/IdentityServerValidationKeysStoreTests.cs Updates validation key store unit tests to use FakeTimeProvider and adds max-lifetime filtering test.
src/Open.IdentityServer/test/Open.IdentityServer.UnitTests/Stores/Compatibility/IdentityServerSigningCredentialStoreTests.cs Updates signing credential store unit tests to use FakeTimeProvider and adds max-lifetime filtering test.
src/Open.IdentityServer/test/Open.IdentityServer.UnitTests/Stores/Compatibility/FakeKeyData.cs Refactors test key/cert helpers (parameter initializers, RSA import, PFX export).
src/Open.IdentityServer/test/Open.IdentityServer.UnitTests/DataProtection/DataProtectedIdentityServerKeyMaterialConverterTests.cs Adds unit tests covering key material conversion (RSA/EC/X509, protected/unprotected).
src/Open.IdentityServer/test/Open.IdentityServer.IntegrationTests/Open.IdentityServer.IntegrationTests.csproj Adds Microsoft.Extensions.TimeProvider.Testing package reference for integration tests.
src/Open.IdentityServer/test/Open.IdentityServer.IntegrationTests/Endpoints/Discovery/JwkEndpointTests.cs Injects a FakeTimeProvider into the pipeline for deterministic integration testing.
src/Open.IdentityServer/test/Open.IdentityServer.IntegrationTests/Endpoints/Discovery/FakeIdentityServerKeyStore.cs Adds a fixed FakeNow timestamp and an “expired” key for max-lifetime filtering coverage.
src/Open.IdentityServer/src/Stores/Compatibility/IdentityServerValidationKeysStore.cs Switches to shared base key retrieval/filtering logic.
src/Open.IdentityServer/src/Stores/Compatibility/IdentityServerSigningCredentialStore.cs Switches to shared base key retrieval/filtering logic and returns newest valid signing credential.
src/Open.IdentityServer/src/Stores/Compatibility/IdentityServerKeyStore.cs Adds new shared base class implementing key filtering and ordering.
src/Open.IdentityServer/src/DataProtectionConstants.cs Adds a constant for the data protector purpose used by the converter.
src/Open.IdentityServer/src/DataProtection/DataProtectedIdentityServerKeyMaterialConverter.cs Uses the new constant for protector purpose and improves X509 conversions (Created/KeyId).
src/Open.IdentityServer/src/Configuration/DependencyInjection/Options/CompatibilityKeyStoreOptions.cs Adds options for key max lifetime and whether to register the signing credential store.
src/Open.IdentityServer/src/Configuration/DependencyInjection/BuilderExtensions/Crypto.cs Extends AddCompatibilityKeyStores to accept options/configure callback and conditionally register signing store.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Open.IdentityServer/src/Stores/Compatibility/IdentityServerKeyStore.cs Outdated
Comment thread src/Open.IdentityServer/src/DataProtectionConstants.cs Outdated
Comment thread src/Open.IdentityServer/src/Stores/Compatibility/IdentityServerKeyStore.cs Outdated
@jhbritton-RSK jhbritton-RSK merged commit ba038a0 into main Jun 9, 2026
1 check passed
@jhbritton-RSK jhbritton-RSK deleted the feat/16820 branch June 9, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants