Setting up OIDC Provider#
Currently, the KYPO CRP is tested and supports the following OIDC providers:
General Setup#
Regardless of the used OIDC provider, you must register a new Client to obtain client_id
.
Warning
Make sure that OIDC provider:
-
Uses JSON Web Token (JWT) access tokens. Opaque tokens are not supported by the KYPO platform.
-
Supports the user info endpoint to validate the access token and retrieve base info about a user.
Set up the following parameters with given values.
-
Redirect URI
https://<YOUR-SERVER-ADDRESS> https://<YOUR-SERVER-ADDRESS>/index.html https://<YOUR-SERVER-ADDRESS>/silent-refresh.html
-
Scopes
- openid
- profile
-
Grant Type
- implicit
-
Response Types
- token
- id_token
-
Post-Logout Redirect
https://<YOUR-SERVER-ADDRESS>/logout-confirmed
CSIRT-MU OIDC Dummy Issuer Setup#
CSIRT-MU OIDC Dummy Issuer is the default implementation for Internal local OIDC issuer. Deploy KYPO with Internal local OIDC issuer by following Deployment of KYPO-CRP Helm application guide.
Microsoft Azure Setup#
- Open and log in to the Microsoft Azure portal.
- Azure services > App registrations > New registration
- Name - optional, e.g. “KYPO PROD/Devel Client”
- Redirect URI
- Select “Single-page application (SPA)”
- Add Redirect URI
https://<YOUR-SERVER-ADDRESS>
- Click the Register button
- In the Authentication tab
- Single-page application > Redirect URIs
https://<YOUR-SERVER-ADDRESS>
https://<YOUR-SERVER-ADDRESS>/index.html
https://<YOUR-SERVER-ADDRESS>/silent-refresh.html
- Front-channel logout URL
https://<YOUR-SERVER-ADDRESS>/logout-confirmed
- Implicit grant and hybrid flows
- Check “Access tokens (used for implicit flows)”
- Check “ID tokens (used for implicit and hybrid flows)”
- Single-page application > Redirect URIs
- In the API permissions tab
- Add a permissions > Microsoft APIs > Microsoft Graph > Delegated permissions > OpenId permissions
- openid
- profile
- Add a permissions > Microsoft APIs > Microsoft Graph > Delegated permissions > OpenId permissions
- In the Overview tab
- Save the value “Application (client) ID”
- Save the value “Directory (tenant) ID”
Required variables#
The following variables are needed to deploy and use KYPO CRP with Microsoft Azure:
- client_id -
Application (client) ID
(see the 6. step described above) - url -
https://login.microsoftonline.com/<tenant ID>/v2.0/
- issuer_identifier -
https://sts.windows.net/<tenant ID>/
- user_info_url -
https://graph.microsoft.com/oidc/userinfo
Selecting the Right Grant Types#
The selection of the right grant type is especially important for security reasons. In OpenID Connect exists 4 grant types:
- Authorization code grant
- Implicit code grant
- Resource owner password credentials grant
- Client credentials grant
Each type was predesigned for a different type of applications (web, user-agent, native), where web means web application that contains back-end, e.g., Spring MVC using JSP, user-agent represents just browser web apps as is Angular or React, and native represents desktop or mobile applications. Here:
-
Authorization code grant was mainly developed for a web application where the client_id and client_secret are safely stored in the back-end part of the application.
-
Implicit code grant was designed for user-agent applications that could not save client_secret in the code since it is directly propagated to the user in HTML. For that reason, we had used the Implicit code grant in our OIDC settings tutorial.
Currently, the best practice for security reasons in user-agent applications is to use the Authorization code grant + PKCE. This is perfectly described in the following RFC 7636.