feat: make ParticipantSecureTokenService a default provider - #1058
Open
paullatzelsperger wants to merge 3 commits into
Open
feat: make ParticipantSecureTokenService a default provider#1058paullatzelsperger wants to merge 3 commits into
paullatzelsperger wants to merge 3 commits into
Conversation
The embedded STS was registered via a plain @Provider, so replacing the ParticipantSecureTokenService (e.g. to add custom claims to self-issued tokens) required excluding the sts-core module from the runtime. It is now a default provider, so any extension providing the service takes precedence. The StsClientTokenGeneratorService provider is moved to a separate extension that injects the resolved ParticipantSecureTokenService, so the STS API uses a replacement implementation as well instead of being hard-wired to the embedded one. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ronjaquensel
approved these changes
Aug 14, 2026
jimmarino
approved these changes
Aug 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR changes/adds
Marks the
ParticipantSecureTokenServiceprovider inEmbeddedStsServiceExtensionas a default provider (@Provider(isDefault = true)).Moves the
StsClientTokenGeneratorServiceprovider out ofEmbeddedStsServiceExtensioninto a newStsClientTokenGeneratorExtension(same module), which injects the resolvedParticipantSecureTokenServiceinstead of calling the embedded implementation directly.Why it does that
The self-issued token claims (e.g. for DCP credential requests to an issuer) are fixed by the callers of
ParticipantSecureTokenService, and there is no decorator hook in the token generation chain. Previously, customizing the token (e.g. adding a claim) required excluding the entirests-coremodule from the runtime, because the service was registered via a plain@Provider. With a default provider, downstream extensions can simply out-provideParticipantSecureTokenServicewith their own implementation.Splitting off the
StsClientTokenGeneratorServiceprovider ensures consistency: it was previously hard-wired to the embedded STS, so an out-providedParticipantSecureTokenServicewould have been used by the DCP flows but silently bypassed by the STS API token endpoint.🤖 Generated with Claude Code