OIDC Integration¶
Overview¶
Insight can be integrated with various OpenID-Connect (OIDC) providers.
OIDC is an open standard, integration is tested with Keycloak
.
Please follow Keycloak installation.
You can find configuration examples here.
OIDC provider configuration¶
In order to use OIDC with Insight, two clients must be created on the OIDC provider.
Client for technical user via middleware¶
- clientId for the insight-middleware configured in
insight.properties
- client must not be public
- accessType must be
confidential
, client_secret is required
- accessType must be
- DirectGrantAccess (keycloak) must be enabled resp. 'resource owner password credentials grant' (OAuth2)
- Standardflow must be off (keycloak)
- ServiceAccounts must be enabled (keycloak) resp. 'client credentials grant' (OAuth2)
- A user and password must be configured
- client must not be public
Client for access via browser & app¶
Private client, login procedure via backend¶
- clientId should be
insight-app
- client must not be public and can support the
Authorization Code with PKCE
flow- accessType must be
confidential
, client_secret is required - if
PKCE
is not usedoidc.server.pkce=false
must be set
- accessType must be
- DirectGrantAccess (keycloak) must be off
- Standardflow must be enabled (keycloak) resp. 'Authorization Code flow' (OAuth2)
- client must not be public and can support the
Public client, login procedure via client itself¶
- clientId should be
insight-app
- This client must be public and support the
Authorization Code with PKCE
flow- accessType must be
public
so clients do not require a secret (keycloak)
- accessType must be
- DirectGrantAccess (keycloak) must be off resp. 'resource owner password credentials grant' (OAuth2)
- Standardflow must be enabled (keycloak) resp. 'Authorization Code flow' (OAuth2)
- This client must be public and support the
Callback URLs¶
Those URLs must be valid callback URLs:
insightmobile://authcallback
(Android and iOS)http://localhost:9990/authcallback
(Insight Electron)https://your-insight-endpoint/insight/*
(Insight via browser)
OIDC configuration Insight¶
In order to enable OIDC the following property must be set:
Enable OIDC¶
oidc.server
- must point to your realm's root (e.g.
https://auth.local.ibfs.de/realms/insight
)
- must point to your realm's root (e.g.
Additional properties¶
oidc.server.pkce=false
(default: true)- disable usage of
PKCE
- disable usage of
oidc.userinfo.username
- configure which property of the token contains the username
oidc.accesstoken.transform=mas8
- Transform access token between requests when using
Maximo Application Suite 8
- Transform access token between requests when using
oidc.accesstoken.validation=local
- How to validate token in insight-middleware of incoming request?
local
is default.remote
uses for validation a remote call to userinfo-endpoint
- How to validate token in insight-middleware of incoming request?
oidc.accesstoken.validation.remote.return=access_token
- which value should used to retrieve user/roles data if oidc.accesstoken.validation=remote is configured. "userinfo", "access_token" is possible.
access_token
is default
- which value should used to retrieve user/roles data if oidc.accesstoken.validation=remote is configured. "userinfo", "access_token" is possible.
oidc.token.name=access_token
- Which token should be used for OIDC? Default is access_token. Hxgn uses 'id_token'
oidc.client.scope
(default:openid
)- used with login procedure via backend
oidc.cache.duration
(default:900000
- 15 min)- expiry time of pkce verifier in cache
Configure access for technical user via middleware¶
oidc.techuser.username
andeam.username
the technical user's usernameoidc.techuser.password
the technical user's passwordoidc.techuser.client_id
the keycloak client's name (e.g.insight-api
)oidc.techuser.client_secret
the client's secret that was copied to the clipboard in the previous paragraphoidc.techuser.authflow
tech-user uses OIDC-Login if property is set otherwise classic login- for OIDC-Login possible values are
Resource Owner Password Credentials
orClient Credentials
- for OIDC-Login possible values are
Configure Insight Clients¶
Client Configuration is done via config.json
Private client, login procedure via backend¶
insight.properties
oidc.client.client_id=insight-app
oidc.client.client_secret=your_client_secret
config.json
"oidc": {
"backend": true
}
Public client, login procedure via client itself¶
config.json:
"oidc": {
"clientId": "insight-app",
"server": "https://auth.local.ibfs.de/realms/insight",
}
additional properties¶
scope
- default:
openid
, but can be extended:openid profile email
- default:
clearCache
true
: The auth window starts with a new session. (default on android)false
: The auth window starts with an existing session. If the user was already logged in to the IDP, the login is performed immediately. (default on ios)