4.x: Unified constants for configuring outbound id and secret. #7415
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.
Description
A single location to store constants that allow overriding of user id and secret (username and password for Basic authentication, user id for JWT).
This PR does not change Digest authentication at all, as we do not support outbound security with digest, and we do not plan to (it is an outdated insecure technology).
Related to #7207
Documentation
We had a few constants in the providers named
EP_PROPERTY_OUTBOUND_USER
andEP_PROPERTY_OUTBOUND_PASSWORD
.The new location is
io.helidon.security.EndpointConfig
.New constants:
PROPERTY_OUTBOUND_ID
- user name, client id to be used for the outbound callPROPERTY_OUTBOUND_SECRET
- password, client secret to be used for the outbound callThe set of providers supporting these constants is current unchanges (Basic authentication, JWT Authentication provider, and MP JWT Authentication provider).
To use, configure the client request similar to the following:
And if the correct outbound provider is configured with web client security, the provided values will be used.
This also works when security is invoked manually through API (and other clients may support configuraiton of custom properites that are propagated to security).