includes.security.providers.idcs-role-mapper.adoc Maven / Gradle / Ivy
The newest version!
///////////////////////////////////////////////////////////////////////////////
Copyright (c) 2020, 2024 Oracle and/or its affiliates.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
///////////////////////////////////////////////////////////////////////////////
ifndef::rootdir[:rootdir: {docdir}/../../..]
=== IDCS Role Mapper
:description: Helidon Security IDCS Role Mapper Provider
:keywords: helidon, security, idcs
:feature-name: IDCS Role Mapper Security Provider
A role mapper to retrieve roles from Oracle IDCS.
==== Setup
[source,xml]
.Maven dependency
----
io.helidon.security.providers
helidon-security-providers-idcs-mapper
----
==== Single-tenant IDCS Role Mapper
include::{rootdir}/config/io_helidon_security_providers_idcs_mapper_IdcsRoleMapperProvider.adoc[leveloffset=+2,tag=config]
==== Multi-tenant IDCS Role Mapper
include::{rootdir}/config/io_helidon_security_providers_idcs_mapper_IdcsMtRoleMapperProvider.adoc[leveloffset=+2,tag=config]
==== Example code
See the link:{helidon-github-examples-url}/security/idcs-login/[example] on GitHub.
[source,yaml]
.Configuration example
----
security:
providers:
- idcs-role-mapper:
multitenant: false
oidc-config:
client-id: "client-id"
client-secret: "changeit"
identity-uri: "IDCS identity server address"
----
==== How does it work?
The provider asks the IDCS server to provide list of roles for the currently
authenticated user.
The result is cached for a certain period of time (see `cache-config` above).