Class IdcsRoleMapperProviderBase
java.lang.Object
io.helidon.security.providers.idcs.mapper.IdcsRoleMapperProviderBase
- All Implemented Interfaces:
SecurityProvider,SubjectMappingProvider
- Direct Known Subclasses:
IdcsMtRoleMapperProvider,IdcsRoleMapperProvider
@Deprecated(forRemoval=true,
since="2.4.0")
public abstract class IdcsRoleMapperProviderBase
extends Object
implements SubjectMappingProvider
Deprecated, for removal: This API element is subject to removal in a future version.
Common functionality for IDCS role mapping.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classDeprecated, for removal: This API element is subject to removal in a future version.A token for app access to IDCS.static classDeprecated, for removal: This API element is subject to removal in a future version.Fluent API builder forIdcsRoleMapperProviderBase. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final StringDeprecated, for removal: This API element is subject to removal in a future version.Json key for token to be retrieved from IDCS response when requesting application token.static final StringDeprecated, for removal: This API element is subject to removal in a future version.Client subject type used when requesting roles from IDCS.static final StringDeprecated, for removal: This API element is subject to removal in a future version.User subject type used when requesting roles from IDCS.protected static final StringDeprecated, for removal: This API element is subject to removal in a future version.Property sent with JAX-RS requests to override parent span context in outbound calls.protected static final StringDeprecated, for removal: This API element is subject to removal in a future version.Json key for app roles to be retrieved from IDCS response.protected static final StringDeprecated, for removal: This API element is subject to removal in a future version.Json key for group roles to be retrieved from IDCS response. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDeprecated, for removal: This API element is subject to removal in a future version.Configures the needed fields from the provided builder. -
Method Summary
Modifier and TypeMethodDescriptionprotected SubjectbuildSubject(Subject originalSubject, List<? extends Grant> grants) Deprecated, for removal: This API element is subject to removal in a future version.Updates original subject with the list of grants.protected CompletionStage<AuthenticationResponse>complete(AuthenticationResponse response) Deprecated, for removal: This API element is subject to removal in a future version.Create aCompletionStagewith the provided response as its completion.protected StringDeprecated, for removal: This API element is subject to removal in a future version.Default subject type to use when requesting data from IDCS.protected abstract Subjectenhance(Subject subject, ProviderRequest request, AuthenticationResponse previousResponse) Deprecated, for removal: This API element is subject to removal in a future version.Enhance subject with IDCS roles.map(ProviderRequest authenticatedRequest, AuthenticationResponse previousResponse) Deprecated, for removal: This API element is subject to removal in a future version.Map grants from authenticated request (e.g.protected OidcConfigDeprecated, for removal: This API element is subject to removal in a future version.Access toOidcConfigso the field is not duplicated by classes that extend this provider.processServerResponse(Response groupResponse, String subjectName) Deprecated, for removal: This API element is subject to removal in a future version.Process the server response to retrieve groups and app roles from it.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.helidon.security.spi.SecurityProvider
supportedAnnotations, supportedAttributes, supportedConfigKeys, supportedCustomObjects
-
Field Details
-
IDCS_SUBJECT_TYPE_USER
Deprecated, for removal: This API element is subject to removal in a future version.User subject type used when requesting roles from IDCS. An attempt is made to obtain it from JWT claimsub_type. If not defined, default is used as configured inIdcsRoleMapperProviderBase.Builder.- See Also:
-
IDCS_SUBJECT_TYPE_CLIENT
Deprecated, for removal: This API element is subject to removal in a future version.Client subject type used when requesting roles from IDCS. An attempt is made to obtain it from JWT claimsub_type. If not defined, default is used as configured inIdcsRoleMapperProviderBase.Builder.- See Also:
-
ROLE_GROUP
Deprecated, for removal: This API element is subject to removal in a future version.Json key for group roles to be retrieved from IDCS response.- See Also:
-
ROLE_APPROLE
Deprecated, for removal: This API element is subject to removal in a future version.Json key for app roles to be retrieved from IDCS response.- See Also:
-
ACCESS_TOKEN_KEY
Deprecated, for removal: This API element is subject to removal in a future version.Json key for token to be retrieved from IDCS response when requesting application token.- See Also:
-
PARENT_CONTEXT_CLIENT_PROPERTY
Deprecated, for removal: This API element is subject to removal in a future version.Property sent with JAX-RS requests to override parent span context in outbound calls. We cannot use the constant declared inClientTracingFilter, as it is not a required dependency.- See Also:
-
-
Constructor Details
-
IdcsRoleMapperProviderBase
Deprecated, for removal: This API element is subject to removal in a future version.Configures the needed fields from the provided builder.- Parameters:
builder- builder with oidcConfig and other needed fields.
-
-
Method Details
-
map
public CompletionStage<AuthenticationResponse> map(ProviderRequest authenticatedRequest, AuthenticationResponse previousResponse) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:SubjectMappingProviderMap grants from authenticated request (e.g. one or both ofProviderRequest.subject()orProviderRequest.service()returns a non-empty value) to a new authentication response. The provider can change/add/remove grants (such as groups, scopes, permissions) or change the subject to a different one. This method is only invoked after a successful authentication.- Specified by:
mapin interfaceSubjectMappingProvider- Parameters:
authenticatedRequest- request to get user and service subjects frompreviousResponse- response from previous authentication or subject mapping provider- Returns:
- a new authentication response with updated user and/or service subjects
-
complete
Deprecated, for removal: This API element is subject to removal in a future version.Create aCompletionStagewith the provided response as its completion.- Parameters:
response- authentication response to complete with- Returns:
- stage completed with the response
-
enhance
protected abstract Subject enhance(Subject subject, ProviderRequest request, AuthenticationResponse previousResponse) Deprecated, for removal: This API element is subject to removal in a future version.Enhance subject with IDCS roles.- Parameters:
subject- subject of the user (never null)request- provider requestpreviousResponse- authenticated response (never null)- Returns:
- stage with the new authentication response
-
buildSubject
Deprecated, for removal: This API element is subject to removal in a future version.Updates original subject with the list of grants.- Parameters:
originalSubject- as was created by authentication providergrants- grants added by this role mapper- Returns:
- new subject
-
processServerResponse
protected Optional<List<? extends Grant>> processServerResponse(Response groupResponse, String subjectName) Deprecated, for removal: This API element is subject to removal in a future version.Process the server response to retrieve groups and app roles from it.- Parameters:
groupResponse- response from IDCSsubjectName- name of the subject- Returns:
- list of grants obtained from the IDCS response
-
oidcConfig
Deprecated, for removal: This API element is subject to removal in a future version.Access toOidcConfigso the field is not duplicated by classes that extend this provider.- Returns:
- open ID Connect configuration (also used to configure access to IDCS)
-
defaultIdcsSubjectType
Deprecated, for removal: This API element is subject to removal in a future version.Default subject type to use when requesting data from IDCS.- Returns:
- configured default subject type or
IDCS_SUBJECT_TYPE_USER
-
IdcsRoleMapperRxProviderBaseinstead