From 2abcb77627952aa451793ea4d8285558086ee49a Mon Sep 17 00:00:00 2001 From: lovasoa Date: Fri, 26 Apr 2024 01:11:51 +0200 Subject: [PATCH] initial oidc example --- Dockerfile | 4 + README.md | 1 + .../README.md | 62 + .../docker-compose.yaml | 38 + .../index.sql | 8 + .../keycloak-configuration.json | 3843 +++++++++++++++++ .../oidc_login.sql | 13 + .../oidc_logout.sql | 10 + .../oidc_redirect_handler.sql | 50 + .../sqlpage/migrations/000_sessions.sql | 7 + 10 files changed, 4036 insertions(+) create mode 100644 examples/single sign on with openid connect/README.md create mode 100644 examples/single sign on with openid connect/docker-compose.yaml create mode 100644 examples/single sign on with openid connect/index.sql create mode 100644 examples/single sign on with openid connect/keycloak-configuration.json create mode 100644 examples/single sign on with openid connect/oidc_login.sql create mode 100644 examples/single sign on with openid connect/oidc_logout.sql create mode 100644 examples/single sign on with openid connect/oidc_redirect_handler.sql create mode 100644 examples/single sign on with openid connect/sqlpage/migrations/000_sessions.sql diff --git a/Dockerfile b/Dockerfile index 931477e2..dbfcd9d0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,9 +21,13 @@ RUN apt-get update && \ fi && \ rustup target add $(cat TARGET) && \ cargo init . + +# Build dependencies (creates a layer that avoids recompiling dependencies on every build) COPY Cargo.toml Cargo.lock ./ COPY .cargo ./.cargo RUN cargo build --target $(cat TARGET) --profile superoptimized + +# Build the project COPY . . RUN touch src/main.rs && \ cargo build --target $(cat TARGET) --profile superoptimized && \ diff --git a/README.md b/README.md index 8984c3e7..441fbca4 100644 --- a/README.md +++ b/README.md @@ -203,6 +203,7 @@ An alternative for Mac OS users is to use [SQLPage's homebrew package](https://f - [Bulk data import from CSV files](./examples/official-site/examples/handle_csv_upload.sql) : A simple form letting users import CSV files to fill a database table. - [Advanced authentication example using PostgreSQL stored procedures](https://github.com/mnesarco/sqlpage_auth_example) - [Complex web application in SQLite with user management, file uploads, plots, maps, tables, menus, ...](https://github.com/DSMejantel/Ecole_inclusive) +- [Single sign-on with OpenID Connect](./examples/single%20sign%20on%20with%20openid%20connect/): An example of how to implement OAuth and OpenID Connect (OIDC) authentication in SQLPage. You can try all the examples online without installing anything on your computer using [SQLPage's online demo on replit](https://replit.com/@pimaj62145/SQLPage). diff --git a/examples/single sign on with openid connect/README.md b/examples/single sign on with openid connect/README.md new file mode 100644 index 00000000..de57f723 --- /dev/null +++ b/examples/single sign on with openid connect/README.md @@ -0,0 +1,62 @@ +# SQLPage OIDC Implementation Demo + +This project demonstrates how to implement OpenID Connect (OIDC) authentication in a SQLPage application. + +OIDC is an authentication protocol that allows users to authenticate with a third-party identity provider and then access applications without having to log in again. This is useful for single sign-on (SSO) scenarios where users need to access multiple applications with a single set of credentials. +OIDC can be used to implement a "Login with Google" or "Login with Facebook" button in your application, since these providers support the OIDC protocol. + +SQLPage currently doesn't have a native OIDC implementation, but you can implement OIDC authentication in your SQLPage yourself. This project provides a basic implementation of OIDC authentication in a SQLPage application, using [Keycloak](https://www.keycloak.org/) as the OIDC provider. + + +## Running the Demo + +To run the demo, you just need docker and docker-compose installed on your machine. Then, run the following commands: + +```bash +docker-compose up +``` + +This will start a Keycloak server and a SQLPage server. You can access the SQLPage application at http://localhost:8080. + +The credentials for the demo are: + - **Username: `demo`** + - **Password: `demo`** + +The credentials to the keycloak admin console accessible at http://localhost:8180 are `admin/admin`. + +## Configuration + +If you want to use this implementation in your own SQLPage application, +with a different OIDC provider, here are the steps you need to follow: + +1. Create an OIDC application in your OIDC provider (e.g., Keycloak). You will need to provide the following information: + - Redirect URI: This is the URL of your SQLPage application, followed by `/oidc_redirect_handler.sql`. For example, `https://example.com/oidc_redirect_handler.sql`. + - Client ID: This is a unique identifier for your application. You will need to provide this value to your SQLPage application as an environment variable. + - Client type (`public` or `confidential`). For this implementation, you should use `confidential` (sometimes called `web application`, `server-side`, or `backend`). + - Client secret: This is a secret key that is used to authenticate your application with the OIDC provider. You will need to provide this value to your SQLPage application as an environment variable. + +2. You need to replace the following placeholders in the `oidc_redirect_handler.sql` file with your actual values: +- `http://keycloak:8181/realms/sqlpage_demo/protocol/openid-connect/`: Replace this with the base URL of your OIDC implementation. +- `http://localhost:8080/`: Replace this with the URL of your application. + +You also need to set the following environment variables: + +- `OIDC_CLIENT_ID`: The client ID of your OIDC application. +- `OIDC_CLIENT_SECRET`: The client secret of your OIDC application. + +## Overview + +The main logic is contained in the `oidc_redirect_handler.sql` file. This script handles the OIDC redirect after the user has authenticated with the OIDC provider. It performs the following steps: + +1. Checks if the `oauth_state` cookie matches the `state` parameter in the query string. This is a security measure to prevent CSRF attacks. If the states do not match, the user is redirected to the login page. + +2. Exchanges the authorization code for an access token. This is done by making a POST request to the OIDC provider's token endpoint. The request includes the authorization code, the redirect URI, and the client ID and secret. + +3. If the access token cannot be obtained, the user is redirected to the login page. + +## References + +- An accessible explanation of OIDC: https://annotate.dev/p/hello-world/learn-oauth-2-0-by-building-your-own-oauth-client-U2HaZNtvQojn4F +- [OpenID Connect](https://openid.net/connect/) +- [Authorization Code Flow](https://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuth) + diff --git a/examples/single sign on with openid connect/docker-compose.yaml b/examples/single sign on with openid connect/docker-compose.yaml new file mode 100644 index 00000000..ab84a4bd --- /dev/null +++ b/examples/single sign on with openid connect/docker-compose.yaml @@ -0,0 +1,38 @@ +# This file lets you run the example with a single command: docker-compose up +# Download docker here: https://www.docker.com/products/docker-desktop +# +# This docker compose starts two services: +# 1. a SQLPage service that serves a simple page with a login button +# 2. a Keycloak service that acts as an OpenID Connect provider (manages users and authentication) +# + +services: + sqlpage: + image: lovasoa/sqlpage:main # Use the latest development version of SQLPage + volumes: + - .:/var/www + - ./sqlpage:/etc/sqlpage + ports: + - 8080:8080 + environment: + - OIDC_CLIENT_ID=sqlpage + - OIDC_CLIENT_SECRET=qiawfnYrYzsmoaOZT28rRjPPRamfvrYr + - RUST_LOG=sqlpage=debug + networks: + - sqlpage-network + + keycloak: + image: keycloak/keycloak + environment: + - KEYCLOAK_ADMIN=admin + - KEYCLOAK_ADMIN_PASSWORD=admin + ports: + - 8181:8181 + volumes: + - ./keycloak-configuration.json:/opt/keycloak/data/import/realm.json + command: start-dev --import-realm --http-port 8181 + networks: + - sqlpage-network + +networks: + sqlpage-network: diff --git a/examples/single sign on with openid connect/index.sql b/examples/single sign on with openid connect/index.sql new file mode 100644 index 00000000..5f9302ca --- /dev/null +++ b/examples/single sign on with openid connect/index.sql @@ -0,0 +1,8 @@ +select 'button' as component; + +set $user_email = (select email from user_sessions where session_id = sqlpage.cookie('session_id')); + + +select 'Login' as title, '/oidc_login.sql' as link where $user_email is null; +select CONCAT('Currentlty logged in as ',$user_email,'. Log out ?') as title, + '/oidc_logout.sql' as link where $user_email is not null; \ No newline at end of file diff --git a/examples/single sign on with openid connect/keycloak-configuration.json b/examples/single sign on with openid connect/keycloak-configuration.json new file mode 100644 index 00000000..6a1a9a1d --- /dev/null +++ b/examples/single sign on with openid connect/keycloak-configuration.json @@ -0,0 +1,3843 @@ +[ { + "id" : "d7757cae-367b-4dfa-87f7-a19a789af2b9", + "realm" : "sqlpage_demo", + "displayName" : "SQLPage Demo", + "displayNameHtml" : "
Keycloak
", + "notBefore" : 0, + "defaultSignatureAlgorithm" : "RS256", + "revokeRefreshToken" : false, + "refreshTokenMaxReuse" : 0, + "accessTokenLifespan" : 60, + "accessTokenLifespanForImplicitFlow" : 900, + "ssoSessionIdleTimeout" : 1800, + "ssoSessionMaxLifespan" : 36000, + "ssoSessionIdleTimeoutRememberMe" : 0, + "ssoSessionMaxLifespanRememberMe" : 0, + "offlineSessionIdleTimeout" : 2592000, + "offlineSessionMaxLifespanEnabled" : false, + "offlineSessionMaxLifespan" : 5184000, + "clientSessionIdleTimeout" : 0, + "clientSessionMaxLifespan" : 0, + "clientOfflineSessionIdleTimeout" : 0, + "clientOfflineSessionMaxLifespan" : 0, + "accessCodeLifespan" : 60, + "accessCodeLifespanUserAction" : 300, + "accessCodeLifespanLogin" : 1800, + "actionTokenGeneratedByAdminLifespan" : 43200, + "actionTokenGeneratedByUserLifespan" : 300, + "oauth2DeviceCodeLifespan" : 600, + "oauth2DevicePollingInterval" : 5, + "enabled" : true, + "sslRequired" : "external", + "registrationAllowed" : false, + "registrationEmailAsUsername" : false, + "rememberMe" : false, + "verifyEmail" : false, + "loginWithEmailAllowed" : true, + "duplicateEmailsAllowed" : false, + "resetPasswordAllowed" : false, + "editUsernameAllowed" : false, + "bruteForceProtected" : false, + "permanentLockout" : false, + "maxTemporaryLockouts" : 0, + "maxFailureWaitSeconds" : 900, + "minimumQuickLoginWaitSeconds" : 60, + "waitIncrementSeconds" : 60, + "quickLoginCheckMilliSeconds" : 1000, + "maxDeltaTimeSeconds" : 43200, + "failureFactor" : 30, + "roles" : { + "realm" : [ { + "id" : "50468abf-dd38-4957-8e16-d7b1b8345a19", + "name" : "offline_access", + "description" : "${role_offline-access}", + "composite" : false, + "clientRole" : false, + "containerId" : "d7757cae-367b-4dfa-87f7-a19a789af2b9", + "attributes" : { } + }, { + "id" : "5c8a5401-1d48-467d-bb5a-f9b8b07ea281", + "name" : "uma_authorization", + "description" : "${role_uma_authorization}", + "composite" : false, + "clientRole" : false, + "containerId" : "d7757cae-367b-4dfa-87f7-a19a789af2b9", + "attributes" : { } + }, { + "id" : "3473c742-cfa1-4d81-975e-0d74bdf56795", + "name" : "default-roles-master", + "description" : "${role_default-roles}", + "composite" : true, + "composites" : { + "realm" : [ "offline_access", "uma_authorization" ] + }, + "clientRole" : false, + "containerId" : "d7757cae-367b-4dfa-87f7-a19a789af2b9", + "attributes" : { } + } ], + "client" : { + "realm-management" : [ { + "id" : "16d9a55f-c85f-4e81-88b1-fae50781e9cd", + "name" : "query-groups", + "description" : "${role_query-groups}", + "composite" : false, + "clientRole" : true, + "containerId" : "5cfd9edd-a0a5-4ead-ac29-0a4b1ffa17db", + "attributes" : { } + }, { + "id" : "356acf1d-dcae-448a-ad91-1eb7e87d5a66", + "name" : "view-identity-providers", + "description" : "${role_view-identity-providers}", + "composite" : false, + "clientRole" : true, + "containerId" : "5cfd9edd-a0a5-4ead-ac29-0a4b1ffa17db", + "attributes" : { } + }, { + "id" : "52d49f80-5549-471f-ac67-5eb50b047405", + "name" : "manage-realm", + "description" : "${role_manage-realm}", + "composite" : false, + "clientRole" : true, + "containerId" : "5cfd9edd-a0a5-4ead-ac29-0a4b1ffa17db", + "attributes" : { } + }, { + "id" : "5142283f-9900-4ab8-9759-19ec861f0b4e", + "name" : "realm-admin", + "description" : "${role_realm-admin}", + "composite" : true, + "composites" : { + "client" : { + "realm-management" : [ "query-groups", "view-identity-providers", "manage-realm", "create-client", "view-events", "view-authorization", "view-realm", "query-users", "manage-authorization", "manage-users", "query-clients", "manage-identity-providers", "manage-clients", "view-users", "impersonation", "manage-events", "view-clients", "query-realms" ] + } + }, + "clientRole" : true, + "containerId" : "5cfd9edd-a0a5-4ead-ac29-0a4b1ffa17db", + "attributes" : { } + }, { + "id" : "31ded332-e8e0-4bd0-928a-aec9c2917edc", + "name" : "create-client", + "description" : "${role_create-client}", + "composite" : false, + "clientRole" : true, + "containerId" : "5cfd9edd-a0a5-4ead-ac29-0a4b1ffa17db", + "attributes" : { } + }, { + "id" : "bf4d4971-836b-49bb-bf66-5d07992bda20", + "name" : "view-events", + "description" : "${role_view-events}", + "composite" : false, + "clientRole" : true, + "containerId" : "5cfd9edd-a0a5-4ead-ac29-0a4b1ffa17db", + "attributes" : { } + }, { + "id" : "9d665e00-274f-4389-ba0e-a8a8f7eae5fe", + "name" : "view-authorization", + "description" : "${role_view-authorization}", + "composite" : false, + "clientRole" : true, + "containerId" : "5cfd9edd-a0a5-4ead-ac29-0a4b1ffa17db", + "attributes" : { } + }, { + "id" : "d4d35d92-798c-4740-bf10-6ef454cb954d", + "name" : "view-realm", + "description" : "${role_view-realm}", + "composite" : false, + "clientRole" : true, + "containerId" : "5cfd9edd-a0a5-4ead-ac29-0a4b1ffa17db", + "attributes" : { } + }, { + "id" : "053ad20f-3570-4e1c-af3a-6d275236cdc2", + "name" : "query-users", + "description" : "${role_query-users}", + "composite" : false, + "clientRole" : true, + "containerId" : "5cfd9edd-a0a5-4ead-ac29-0a4b1ffa17db", + "attributes" : { } + }, { + "id" : "65bdc99b-ab0d-4693-b089-648d75650da2", + "name" : "manage-authorization", + "description" : "${role_manage-authorization}", + "composite" : false, + "clientRole" : true, + "containerId" : "5cfd9edd-a0a5-4ead-ac29-0a4b1ffa17db", + "attributes" : { } + }, { + "id" : "3c21aad6-86eb-48cd-a700-81e3195bfb58", + "name" : "manage-users", + "description" : "${role_manage-users}", + "composite" : false, + "clientRole" : true, + "containerId" : "5cfd9edd-a0a5-4ead-ac29-0a4b1ffa17db", + "attributes" : { } + }, { + "id" : "6b1169bb-7bd1-4154-9ef8-d104c94dff04", + "name" : "query-clients", + "description" : "${role_query-clients}", + "composite" : false, + "clientRole" : true, + "containerId" : "5cfd9edd-a0a5-4ead-ac29-0a4b1ffa17db", + "attributes" : { } + }, { + "id" : "752ec963-dcd1-4558-85c0-9c606f5d1181", + "name" : "manage-clients", + "description" : "${role_manage-clients}", + "composite" : false, + "clientRole" : true, + "containerId" : "5cfd9edd-a0a5-4ead-ac29-0a4b1ffa17db", + "attributes" : { } + }, { + "id" : "10befa18-80c8-461e-bcea-5dba1d864cb0", + "name" : "manage-identity-providers", + "description" : "${role_manage-identity-providers}", + "composite" : false, + "clientRole" : true, + "containerId" : "5cfd9edd-a0a5-4ead-ac29-0a4b1ffa17db", + "attributes" : { } + }, { + "id" : "c9991186-694b-4758-8e1b-ec6aa334ef4b", + "name" : "impersonation", + "description" : "${role_impersonation}", + "composite" : false, + "clientRole" : true, + "containerId" : "5cfd9edd-a0a5-4ead-ac29-0a4b1ffa17db", + "attributes" : { } + }, { + "id" : "b65a8c12-f5f8-427a-9d90-eccf22d847a2", + "name" : "view-users", + "description" : "${role_view-users}", + "composite" : true, + "composites" : { + "client" : { + "realm-management" : [ "query-users", "query-groups" ] + } + }, + "clientRole" : true, + "containerId" : "5cfd9edd-a0a5-4ead-ac29-0a4b1ffa17db", + "attributes" : { } + }, { + "id" : "57dbd22f-cb06-47fb-a0d3-d7bd7f715595", + "name" : "manage-events", + "description" : "${role_manage-events}", + "composite" : false, + "clientRole" : true, + "containerId" : "5cfd9edd-a0a5-4ead-ac29-0a4b1ffa17db", + "attributes" : { } + }, { + "id" : "d533dda6-e2f7-4163-a0b6-4752cf74bcde", + "name" : "view-clients", + "description" : "${role_view-clients}", + "composite" : true, + "composites" : { + "client" : { + "realm-management" : [ "query-clients" ] + } + }, + "clientRole" : true, + "containerId" : "5cfd9edd-a0a5-4ead-ac29-0a4b1ffa17db", + "attributes" : { } + }, { + "id" : "439fe1a2-c13b-4043-832d-00558a53ec6e", + "name" : "query-realms", + "description" : "${role_query-realms}", + "composite" : false, + "clientRole" : true, + "containerId" : "5cfd9edd-a0a5-4ead-ac29-0a4b1ffa17db", + "attributes" : { } + } ], + "security-admin-console" : [ ], + "admin-cli" : [ ], + "account-console" : [ ], + "sqlpage" : [ ], + "broker" : [ ], + "master-realm" : [ ], + "account" : [ { + "id" : "f97398fd-8608-46eb-ad58-39b92dee69a7", + "name" : "view-groups", + "composite" : false, + "clientRole" : true, + "containerId" : "d50163a2-d59f-4c1d-a1e5-087b5fa3920d", + "attributes" : { } + }, { + "id" : "722736c4-47ce-4a8f-a74a-38b37f172bc3", + "name" : "delete-account", + "description" : "${role_delete-account}", + "composite" : false, + "clientRole" : true, + "containerId" : "d50163a2-d59f-4c1d-a1e5-087b5fa3920d", + "attributes" : { } + }, { + "id" : "9cd94925-88bd-4cd2-af60-797da71aa1e5", + "name" : "manage-account", + "composite" : false, + "clientRole" : true, + "containerId" : "d50163a2-d59f-4c1d-a1e5-087b5fa3920d", + "attributes" : { } + } ] + } + }, + "groups" : [ ], + "defaultRole" : { + "id" : "3473c742-cfa1-4d81-975e-0d74bdf56795", + "name" : "default-roles-master", + "description" : "${role_default-roles}", + "composite" : true, + "clientRole" : false, + "containerId" : "d7757cae-367b-4dfa-87f7-a19a789af2b9" + }, + "requiredCredentials" : [ "password" ], + "otpPolicyType" : "totp", + "otpPolicyAlgorithm" : "HmacSHA1", + "otpPolicyInitialCounter" : 0, + "otpPolicyDigits" : 6, + "otpPolicyLookAheadWindow" : 1, + "otpPolicyPeriod" : 30, + "otpPolicyCodeReusable" : false, + "otpSupportedApplications" : [ "totpAppFreeOTPName", "totpAppGoogleName", "totpAppMicrosoftAuthenticatorName" ], + "localizationTexts" : { }, + "webAuthnPolicyRpEntityName" : "keycloak", + "webAuthnPolicySignatureAlgorithms" : [ "ES256" ], + "webAuthnPolicyRpId" : "", + "webAuthnPolicyAttestationConveyancePreference" : "not specified", + "webAuthnPolicyAuthenticatorAttachment" : "not specified", + "webAuthnPolicyRequireResidentKey" : "not specified", + "webAuthnPolicyUserVerificationRequirement" : "not specified", + "webAuthnPolicyCreateTimeout" : 0, + "webAuthnPolicyAvoidSameAuthenticatorRegister" : false, + "webAuthnPolicyAcceptableAaguids" : [ ], + "webAuthnPolicyExtraOrigins" : [ ], + "webAuthnPolicyPasswordlessRpEntityName" : "keycloak", + "webAuthnPolicyPasswordlessSignatureAlgorithms" : [ "ES256" ], + "webAuthnPolicyPasswordlessRpId" : "", + "webAuthnPolicyPasswordlessAttestationConveyancePreference" : "not specified", + "webAuthnPolicyPasswordlessAuthenticatorAttachment" : "not specified", + "webAuthnPolicyPasswordlessRequireResidentKey" : "not specified", + "webAuthnPolicyPasswordlessUserVerificationRequirement" : "not specified", + "webAuthnPolicyPasswordlessCreateTimeout" : 0, + "webAuthnPolicyPasswordlessAvoidSameAuthenticatorRegister" : false, + "webAuthnPolicyPasswordlessAcceptableAaguids" : [ ], + "webAuthnPolicyPasswordlessExtraOrigins" : [ ], + "users" : [ { + "id" : "0cc0472e-a38b-4f45-8d91-77ecfe5c8b7d", + "username" : "demo", + "firstName" : "John", + "lastName" : "Smith", + "email" : "demo@example.com", + "emailVerified" : false, + "createdTimestamp" : 1714079479552, + "enabled" : true, + "totp" : false, + "credentials" : [ { + "id" : "d453f7cb-5ba5-45ab-a694-38ddffb93503", + "type" : "password", + "userLabel" : "My password", + "createdDate" : 1714079498525, + "secretData" : "{\"value\":\"gxi8oR/w6GPvZjUXJAsxSuxWZCDsxL3hwzjlfymoeYsRLXxJIvJdy5SeRch4BOYwNdfRwrbOenBGScCleyQkfA==\",\"salt\":\"HTsvAP/Cig6pIOVo3SPFnw==\",\"additionalParameters\":{}}", + "credentialData" : "{\"hashIterations\":210000,\"algorithm\":\"pbkdf2-sha512\",\"additionalParameters\":{}}" + } ], + "disableableCredentialTypes" : [ ], + "requiredActions" : [ ], + "realmRoles" : [ "default-roles-master" ], + "notBefore" : 0, + "groups" : [ ] + } ], + "scopeMappings" : [ { + "clientScope" : "offline_access", + "roles" : [ "offline_access" ] + } ], + "clientScopeMappings" : { + "account" : [ { + "client" : "account-console", + "roles" : [ "manage-account", "view-groups" ] + } ] + }, + "clients" : [ { + "id" : "d50163a2-d59f-4c1d-a1e5-087b5fa3920d", + "clientId" : "account", + "name" : "${client_account}", + "rootUrl" : "${authBaseUrl}", + "baseUrl" : "/realms/master/account/", + "surrogateAuthRequired" : false, + "enabled" : true, + "alwaysDisplayInConsole" : false, + "clientAuthenticatorType" : "client-secret", + "redirectUris" : [ "/realms/master/account/*" ], + "webOrigins" : [ ], + "notBefore" : 0, + "bearerOnly" : false, + "consentRequired" : false, + "standardFlowEnabled" : true, + "implicitFlowEnabled" : false, + "directAccessGrantsEnabled" : false, + "serviceAccountsEnabled" : false, + "publicClient" : true, + "frontchannelLogout" : false, + "protocol" : "openid-connect", + "attributes" : { + "post.logout.redirect.uris" : "+" + }, + "authenticationFlowBindingOverrides" : { }, + "fullScopeAllowed" : false, + "nodeReRegistrationTimeout" : 0, + "defaultClientScopes" : [ "web-origins", "acr", "profile", "roles", "email" ], + "optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ] + }, { + "id" : "ff46bc2b-4c0b-49b3-9bca-0938b05a9581", + "clientId" : "account-console", + "name" : "${client_account-console}", + "rootUrl" : "${authBaseUrl}", + "baseUrl" : "/realms/master/account/", + "surrogateAuthRequired" : false, + "enabled" : true, + "alwaysDisplayInConsole" : false, + "clientAuthenticatorType" : "client-secret", + "redirectUris" : [ "/realms/master/account/*" ], + "webOrigins" : [ ], + "notBefore" : 0, + "bearerOnly" : false, + "consentRequired" : false, + "standardFlowEnabled" : true, + "implicitFlowEnabled" : false, + "directAccessGrantsEnabled" : false, + "serviceAccountsEnabled" : false, + "publicClient" : true, + "frontchannelLogout" : false, + "protocol" : "openid-connect", + "attributes" : { + "post.logout.redirect.uris" : "+", + "pkce.code.challenge.method" : "S256" + }, + "authenticationFlowBindingOverrides" : { }, + "fullScopeAllowed" : false, + "nodeReRegistrationTimeout" : 0, + "protocolMappers" : [ { + "id" : "46a75d57-9af5-4466-8e0c-deb66d6d58e8", + "name" : "audience resolve", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-audience-resolve-mapper", + "consentRequired" : false, + "config" : { } + } ], + "defaultClientScopes" : [ "web-origins", "acr", "profile", "roles", "email" ], + "optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ] + }, { + "id" : "12f13df0-1a10-4792-b62a-c67b3d0f9bb0", + "clientId" : "admin-cli", + "name" : "${client_admin-cli}", + "surrogateAuthRequired" : false, + "enabled" : true, + "alwaysDisplayInConsole" : false, + "clientAuthenticatorType" : "client-secret", + "redirectUris" : [ ], + "webOrigins" : [ ], + "notBefore" : 0, + "bearerOnly" : false, + "consentRequired" : false, + "standardFlowEnabled" : false, + "implicitFlowEnabled" : false, + "directAccessGrantsEnabled" : true, + "serviceAccountsEnabled" : false, + "publicClient" : true, + "frontchannelLogout" : false, + "protocol" : "openid-connect", + "attributes" : { + "post.logout.redirect.uris" : "+" + }, + "authenticationFlowBindingOverrides" : { }, + "fullScopeAllowed" : false, + "nodeReRegistrationTimeout" : 0, + "defaultClientScopes" : [ "web-origins", "acr", "profile", "roles", "email" ], + "optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ] + }, { + "id" : "1b5f331e-aaa5-4225-888d-b212d60211fb", + "clientId" : "broker", + "name" : "${client_broker}", + "surrogateAuthRequired" : false, + "enabled" : true, + "alwaysDisplayInConsole" : false, + "clientAuthenticatorType" : "client-secret", + "redirectUris" : [ ], + "webOrigins" : [ ], + "notBefore" : 0, + "bearerOnly" : true, + "consentRequired" : false, + "standardFlowEnabled" : true, + "implicitFlowEnabled" : false, + "directAccessGrantsEnabled" : false, + "serviceAccountsEnabled" : false, + "publicClient" : false, + "frontchannelLogout" : false, + "protocol" : "openid-connect", + "attributes" : { + "post.logout.redirect.uris" : "+" + }, + "authenticationFlowBindingOverrides" : { }, + "fullScopeAllowed" : false, + "nodeReRegistrationTimeout" : 0, + "defaultClientScopes" : [ "web-origins", "acr", "profile", "roles", "email" ], + "optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ] + }, { + "id" : "a3bb7f5a-8746-4d66-a6d3-60c355489276", + "clientId" : "master-realm", + "name" : "master Realm", + "surrogateAuthRequired" : false, + "enabled" : true, + "alwaysDisplayInConsole" : false, + "clientAuthenticatorType" : "client-secret", + "redirectUris" : [ ], + "webOrigins" : [ ], + "notBefore" : 0, + "bearerOnly" : true, + "consentRequired" : false, + "standardFlowEnabled" : true, + "implicitFlowEnabled" : false, + "directAccessGrantsEnabled" : false, + "serviceAccountsEnabled" : false, + "publicClient" : false, + "frontchannelLogout" : false, + "protocol" : "openid-connect", + "attributes" : { + "post.logout.redirect.uris" : "+" + }, + "authenticationFlowBindingOverrides" : { }, + "fullScopeAllowed" : false, + "nodeReRegistrationTimeout" : 0, + "defaultClientScopes" : [ "web-origins", "acr", "profile", "roles", "email" ], + "optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ] + }, { + "id" : "5cfd9edd-a0a5-4ead-ac29-0a4b1ffa17db", + "clientId" : "realm-management", + "name" : "${client_realm-management}", + "surrogateAuthRequired" : false, + "enabled" : true, + "alwaysDisplayInConsole" : false, + "clientAuthenticatorType" : "client-secret", + "redirectUris" : [ ], + "webOrigins" : [ ], + "notBefore" : 0, + "bearerOnly" : true, + "consentRequired" : false, + "standardFlowEnabled" : true, + "implicitFlowEnabled" : false, + "directAccessGrantsEnabled" : false, + "serviceAccountsEnabled" : false, + "publicClient" : false, + "frontchannelLogout" : false, + "protocol" : "openid-connect", + "attributes" : { + "post.logout.redirect.uris" : "+" + }, + "authenticationFlowBindingOverrides" : { }, + "fullScopeAllowed" : false, + "nodeReRegistrationTimeout" : 0, + "defaultClientScopes" : [ ], + "optionalClientScopes" : [ ] + }, { + "id" : "12a6effc-cf82-4dff-9bdc-d7610b86d89c", + "clientId" : "security-admin-console", + "name" : "${client_security-admin-console}", + "rootUrl" : "${authAdminUrl}", + "baseUrl" : "/admin/master/console/", + "surrogateAuthRequired" : false, + "enabled" : true, + "alwaysDisplayInConsole" : false, + "clientAuthenticatorType" : "client-secret", + "redirectUris" : [ "/admin/master/console/*" ], + "webOrigins" : [ "+" ], + "notBefore" : 0, + "bearerOnly" : false, + "consentRequired" : false, + "standardFlowEnabled" : true, + "implicitFlowEnabled" : false, + "directAccessGrantsEnabled" : false, + "serviceAccountsEnabled" : false, + "publicClient" : true, + "frontchannelLogout" : false, + "protocol" : "openid-connect", + "attributes" : { + "post.logout.redirect.uris" : "+", + "pkce.code.challenge.method" : "S256" + }, + "authenticationFlowBindingOverrides" : { }, + "fullScopeAllowed" : false, + "nodeReRegistrationTimeout" : 0, + "protocolMappers" : [ { + "id" : "baecafba-25d9-473e-a7af-72d18a84fd83", + "name" : "locale", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "locale", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "locale", + "jsonType.label" : "String" + } + } ], + "defaultClientScopes" : [ "web-origins", "acr", "profile", "roles", "email" ], + "optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ] + }, { + "id" : "a2bec2b8-f850-405e-9f26-59063ffa6f08", + "clientId" : "sqlpage", + "name" : "SQLPage Example App", + "description" : "", + "rootUrl" : "http://localhost:8080/", + "adminUrl" : "http://localhost:8080/", + "baseUrl" : "", + "surrogateAuthRequired" : false, + "enabled" : true, + "alwaysDisplayInConsole" : true, + "clientAuthenticatorType" : "client-secret", + "secret" : "qiawfnYrYzsmoaOZT28rRjPPRamfvrYr", + "redirectUris" : [ "http://localhost:8080/oidc_redirect_handler.sql" ], + "webOrigins" : [ "http://localhost:8080" ], + "notBefore" : 0, + "bearerOnly" : false, + "consentRequired" : false, + "standardFlowEnabled" : true, + "implicitFlowEnabled" : false, + "directAccessGrantsEnabled" : true, + "serviceAccountsEnabled" : false, + "publicClient" : false, + "frontchannelLogout" : true, + "protocol" : "openid-connect", + "attributes" : { + "client.secret.creation.time" : "1714080951", + "post.logout.redirect.uris" : "+", + "oauth2.device.authorization.grant.enabled" : "false", + "backchannel.logout.revoke.offline.tokens" : "false", + "use.refresh.tokens" : "true", + "oidc.ciba.grant.enabled" : "false", + "client.use.lightweight.access.token.enabled" : "false", + "backchannel.logout.session.required" : "true", + "client_credentials.use_refresh_token" : "false", + "tls.client.certificate.bound.access.tokens" : "false", + "require.pushed.authorization.requests" : "false", + "acr.loa.map" : "{}", + "display.on.consent.screen" : "false", + "token.response.type.bearer.lower-case" : "false" + }, + "authenticationFlowBindingOverrides" : { }, + "fullScopeAllowed" : true, + "nodeReRegistrationTimeout" : -1, + "defaultClientScopes" : [ "web-origins", "acr", "profile", "roles", "email" ], + "optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ] + } ], + "clientScopes" : [ { + "id" : "c14c09ff-087e-4272-9cc4-b2a997f64a55", + "name" : "address", + "description" : "OpenID Connect built-in scope: address", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "true", + "display.on.consent.screen" : "true", + "consent.screen.text" : "${addressScopeConsentText}" + }, + "protocolMappers" : [ { + "id" : "60c43d69-2518-4424-a5b8-5cdc33e2ac17", + "name" : "address", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-address-mapper", + "consentRequired" : false, + "config" : { + "user.attribute.formatted" : "formatted", + "user.attribute.country" : "country", + "introspection.token.claim" : "true", + "user.attribute.postal_code" : "postal_code", + "userinfo.token.claim" : "true", + "user.attribute.street" : "street", + "id.token.claim" : "true", + "user.attribute.region" : "region", + "access.token.claim" : "true", + "user.attribute.locality" : "locality" + } + } ] + }, { + "id" : "03ea4147-a506-45a9-84ae-e1efe2708eea", + "name" : "email", + "description" : "OpenID Connect built-in scope: email", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "true", + "display.on.consent.screen" : "true", + "consent.screen.text" : "${emailScopeConsentText}" + }, + "protocolMappers" : [ { + "id" : "04d4097a-16b3-4155-9ff3-672d04079e16", + "name" : "email", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "email", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "email", + "jsonType.label" : "String" + } + }, { + "id" : "f3bdae59-35e2-46b8-9625-a53a066993b2", + "name" : "email verified", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-property-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "emailVerified", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "email_verified", + "jsonType.label" : "boolean" + } + } ] + }, { + "id" : "7bbedae3-a3b5-4d76-b457-b00010254408", + "name" : "profile", + "description" : "OpenID Connect built-in scope: profile", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "true", + "display.on.consent.screen" : "true", + "consent.screen.text" : "${profileScopeConsentText}" + }, + "protocolMappers" : [ { + "id" : "7c97d390-3a24-4013-85a7-674427d49ab8", + "name" : "updated at", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "updatedAt", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "updated_at", + "jsonType.label" : "long" + } + }, { + "id" : "b740d3b8-38c7-460e-94aa-6525aec2e00b", + "name" : "profile", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "profile", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "profile", + "jsonType.label" : "String" + } + }, { + "id" : "df3c39d5-cd3f-4d38-899c-d0899d82dcbb", + "name" : "gender", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "gender", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "gender", + "jsonType.label" : "String" + } + }, { + "id" : "9dbeb8fe-333d-4311-a389-42075ff057b4", + "name" : "birthdate", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "birthdate", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "birthdate", + "jsonType.label" : "String" + } + }, { + "id" : "19e29316-24dd-4e4a-aa85-e767cd867a79", + "name" : "locale", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "locale", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "locale", + "jsonType.label" : "String" + } + }, { + "id" : "2bfa792d-ea47-4d43-b456-11cde3c937f2", + "name" : "given name", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "firstName", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "given_name", + "jsonType.label" : "String" + } + }, { + "id" : "c4aa41a4-bef1-401b-abe8-3d48f101020d", + "name" : "full name", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-full-name-mapper", + "consentRequired" : false, + "config" : { + "id.token.claim" : "true", + "introspection.token.claim" : "true", + "access.token.claim" : "true", + "userinfo.token.claim" : "true" + } + }, { + "id" : "c9617211-8247-4b5e-9b71-58e61bdaab21", + "name" : "nickname", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "nickname", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "nickname", + "jsonType.label" : "String" + } + }, { + "id" : "b7ae04f4-415e-4e0e-b7b6-1af6841d22bb", + "name" : "middle name", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "middleName", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "middle_name", + "jsonType.label" : "String" + } + }, { + "id" : "51a166d3-ba9a-4ba6-b1a1-d259563aa49a", + "name" : "family name", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "lastName", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "family_name", + "jsonType.label" : "String" + } + }, { + "id" : "e3c90b13-0db0-40f7-b640-487f18b01214", + "name" : "username", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "username", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "preferred_username", + "jsonType.label" : "String" + } + }, { + "id" : "cd5cfea9-9151-486c-9ec1-e9d503543201", + "name" : "zoneinfo", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "zoneinfo", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "zoneinfo", + "jsonType.label" : "String" + } + }, { + "id" : "bfc74493-3b09-4dac-b7be-41cc6d2e209e", + "name" : "website", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "website", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "website", + "jsonType.label" : "String" + } + }, { + "id" : "8dfd3646-a624-43ee-85de-82aa171f3ad7", + "name" : "picture", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "picture", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "picture", + "jsonType.label" : "String" + } + } ] + }, { + "id" : "990085f5-6624-43e0-bd8e-ee19427c9900", + "name" : "microprofile-jwt", + "description" : "Microprofile - JWT built-in scope", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "true", + "display.on.consent.screen" : "false" + }, + "protocolMappers" : [ { + "id" : "824634cf-dfc0-4fc9-b47b-3803a5868e6f", + "name" : "groups", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-realm-role-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "multivalued" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "foo", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "groups", + "jsonType.label" : "String" + } + }, { + "id" : "5b5a7a38-9746-4593-b94d-4dbcb79a57d8", + "name" : "upn", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "username", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "upn", + "jsonType.label" : "String" + } + } ] + }, { + "id" : "34321bc7-3fee-4999-b718-19d907b221a4", + "name" : "role_list", + "description" : "SAML role list", + "protocol" : "saml", + "attributes" : { + "consent.screen.text" : "${samlRoleListScopeConsentText}", + "display.on.consent.screen" : "true" + }, + "protocolMappers" : [ { + "id" : "2a7bc0fb-adce-4b3d-b423-7035f31fb5a9", + "name" : "role list", + "protocol" : "saml", + "protocolMapper" : "saml-role-list-mapper", + "consentRequired" : false, + "config" : { + "single" : "false", + "attribute.nameformat" : "Basic", + "attribute.name" : "Role" + } + } ] + }, { + "id" : "bd166300-5b05-4726-b0eb-68c29e35f1af", + "name" : "phone", + "description" : "OpenID Connect built-in scope: phone", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "true", + "display.on.consent.screen" : "true", + "consent.screen.text" : "${phoneScopeConsentText}" + }, + "protocolMappers" : [ { + "id" : "ef839796-9f9a-47c0-9685-c9edcf6754a5", + "name" : "phone number verified", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "phoneNumberVerified", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "phone_number_verified", + "jsonType.label" : "boolean" + } + }, { + "id" : "f74a2e81-da33-4e8d-943a-d5e665adf499", + "name" : "phone number", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "phoneNumber", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "phone_number", + "jsonType.label" : "String" + } + } ] + }, { + "id" : "d5196e6b-5bb9-4eb0-92b3-2f8d129d5802", + "name" : "web-origins", + "description" : "OpenID Connect scope for add allowed web origins to the access token", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "false", + "display.on.consent.screen" : "false", + "consent.screen.text" : "" + }, + "protocolMappers" : [ { + "id" : "cdf64576-9f80-482a-bcff-6c547309d9bd", + "name" : "allowed web origins", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-allowed-origins-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "access.token.claim" : "true" + } + } ] + }, { + "id" : "6c3ffd12-fa43-4cb8-a118-c4643b98df70", + "name" : "offline_access", + "description" : "OpenID Connect built-in scope: offline_access", + "protocol" : "openid-connect", + "attributes" : { + "consent.screen.text" : "${offlineAccessScopeConsentText}", + "display.on.consent.screen" : "true" + } + }, { + "id" : "c2045a80-7b4d-4e06-acb9-7299ba16134c", + "name" : "acr", + "description" : "OpenID Connect scope for add acr (authentication context class reference) to the token", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "false", + "display.on.consent.screen" : "false" + }, + "protocolMappers" : [ { + "id" : "ad467869-6344-40b2-af7a-70687d76e6fd", + "name" : "acr loa level", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-acr-mapper", + "consentRequired" : false, + "config" : { + "id.token.claim" : "true", + "introspection.token.claim" : "true", + "access.token.claim" : "true", + "userinfo.token.claim" : "true" + } + } ] + }, { + "id" : "7c7710a3-e3a7-4c70-a246-04a14c9733bb", + "name" : "roles", + "description" : "OpenID Connect scope for add user roles to the access token", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "false", + "display.on.consent.screen" : "true", + "consent.screen.text" : "${rolesScopeConsentText}" + }, + "protocolMappers" : [ { + "id" : "780cb5bb-a37d-4f87-a7d5-a0942a2c1589", + "name" : "realm roles", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-realm-role-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "multivalued" : "true", + "user.attribute" : "foo", + "access.token.claim" : "true", + "claim.name" : "realm_access.roles", + "jsonType.label" : "String" + } + }, { + "id" : "3f65310d-21f0-4973-8c67-457a0d851ba3", + "name" : "client roles", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-client-role-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "multivalued" : "true", + "user.attribute" : "foo", + "access.token.claim" : "true", + "claim.name" : "resource_access.${client_id}.roles", + "jsonType.label" : "String" + } + }, { + "id" : "1a6720eb-c33d-4c39-9d42-051aa1cf7d85", + "name" : "audience resolve", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-audience-resolve-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "access.token.claim" : "true" + } + } ] + } ], + "defaultDefaultClientScopes" : [ "role_list", "profile", "email", "roles", "web-origins", "acr" ], + "defaultOptionalClientScopes" : [ "offline_access", "address", "phone", "microprofile-jwt" ], + "browserSecurityHeaders" : { + "contentSecurityPolicyReportOnly" : "", + "xContentTypeOptions" : "nosniff", + "referrerPolicy" : "no-referrer", + "xRobotsTag" : "none", + "xFrameOptions" : "SAMEORIGIN", + "contentSecurityPolicy" : "frame-src 'self'; frame-ancestors 'self'; object-src 'none';", + "xXSSProtection" : "1; mode=block", + "strictTransportSecurity" : "max-age=31536000; includeSubDomains" + }, + "smtpServer" : { }, + "loginTheme" : "keycloak", + "accountTheme" : "", + "adminTheme" : "", + "emailTheme" : "", + "eventsEnabled" : false, + "eventsListeners" : [ "jboss-logging" ], + "enabledEventTypes" : [ ], + "adminEventsEnabled" : false, + "adminEventsDetailsEnabled" : false, + "identityProviders" : [ ], + "identityProviderMappers" : [ ], + "components" : { + "org.keycloak.services.clientregistration.policy.ClientRegistrationPolicy" : [ { + "id" : "e89fe502-91fd-4f04-bdcc-4b14e817e4dc", + "name" : "Full Scope Disabled", + "providerId" : "scope", + "subType" : "anonymous", + "subComponents" : { }, + "config" : { } + }, { + "id" : "1414070f-5cd6-4446-b53a-dcd9c28c26a5", + "name" : "Allowed Client Scopes", + "providerId" : "allowed-client-templates", + "subType" : "authenticated", + "subComponents" : { }, + "config" : { + "allow-default-scopes" : [ "true" ] + } + }, { + "id" : "1e6d1ac0-d10b-4eaf-8b87-39ccf6a755d2", + "name" : "Allowed Protocol Mapper Types", + "providerId" : "allowed-protocol-mappers", + "subType" : "authenticated", + "subComponents" : { }, + "config" : { + "allowed-protocol-mapper-types" : [ "saml-user-property-mapper", "oidc-sha256-pairwise-sub-mapper", "oidc-full-name-mapper", "oidc-address-mapper", "oidc-usermodel-attribute-mapper", "oidc-usermodel-property-mapper", "saml-user-attribute-mapper", "saml-role-list-mapper" ] + } + }, { + "id" : "b34cb2f6-806e-49c3-822a-614b4465faf7", + "name" : "Consent Required", + "providerId" : "consent-required", + "subType" : "anonymous", + "subComponents" : { }, + "config" : { } + }, { + "id" : "81af21c3-da8a-4f70-9b33-43d0150f0bbb", + "name" : "Max Clients Limit", + "providerId" : "max-clients", + "subType" : "anonymous", + "subComponents" : { }, + "config" : { + "max-clients" : [ "200" ] + } + }, { + "id" : "58f683ad-378d-4f9f-93db-630007bef02a", + "name" : "Trusted Hosts", + "providerId" : "trusted-hosts", + "subType" : "anonymous", + "subComponents" : { }, + "config" : { + "host-sending-registration-request-must-match" : [ "true" ], + "client-uris-must-match" : [ "true" ] + } + }, { + "id" : "26a3c97d-052b-40b6-8d8f-8950befb1837", + "name" : "Allowed Protocol Mapper Types", + "providerId" : "allowed-protocol-mappers", + "subType" : "anonymous", + "subComponents" : { }, + "config" : { + "allowed-protocol-mapper-types" : [ "oidc-sha256-pairwise-sub-mapper", "oidc-usermodel-attribute-mapper", "oidc-full-name-mapper", "saml-role-list-mapper", "saml-user-property-mapper", "oidc-address-mapper", "oidc-usermodel-property-mapper", "saml-user-attribute-mapper" ] + } + }, { + "id" : "1a2b238f-2b2c-488f-977e-955c62134b1a", + "name" : "Allowed Client Scopes", + "providerId" : "allowed-client-templates", + "subType" : "anonymous", + "subComponents" : { }, + "config" : { + "allow-default-scopes" : [ "true" ] + } + } ], + "org.keycloak.userprofile.UserProfileProvider" : [ { + "id" : "a49f2d51-c152-468d-a070-28a931fab95c", + "providerId" : "declarative-user-profile", + "subComponents" : { }, + "config" : { + "kc.user.profile.config" : [ "{\"attributes\":[{\"name\":\"username\",\"displayName\":\"${username}\",\"validations\":{\"length\":{\"min\":3,\"max\":255},\"username-prohibited-characters\":{},\"up-username-not-idn-homograph\":{}},\"permissions\":{\"view\":[\"admin\",\"user\"],\"edit\":[\"admin\",\"user\"]},\"multivalued\":false},{\"name\":\"email\",\"displayName\":\"${email}\",\"validations\":{\"email\":{},\"length\":{\"max\":255}},\"permissions\":{\"view\":[\"admin\",\"user\"],\"edit\":[\"admin\",\"user\"]},\"multivalued\":false},{\"name\":\"firstName\",\"displayName\":\"${firstName}\",\"validations\":{\"length\":{\"max\":255},\"person-name-prohibited-characters\":{}},\"permissions\":{\"view\":[\"admin\",\"user\"],\"edit\":[\"admin\",\"user\"]},\"multivalued\":false},{\"name\":\"lastName\",\"displayName\":\"${lastName}\",\"validations\":{\"length\":{\"max\":255},\"person-name-prohibited-characters\":{}},\"permissions\":{\"view\":[\"admin\",\"user\"],\"edit\":[\"admin\",\"user\"]},\"multivalued\":false}],\"groups\":[{\"name\":\"user-metadata\",\"displayHeader\":\"User metadata\",\"displayDescription\":\"Attributes, which refer to user metadata\"}]}" ] + } + } ], + "org.keycloak.keys.KeyProvider" : [ { + "id" : "74f24861-5376-4224-bdc0-1d511b60e8df", + "name" : "rsa-enc-generated", + "providerId" : "rsa-enc-generated", + "subComponents" : { }, + "config" : { + "privateKey" : [ "MIIEpAIBAAKCAQEAvYkJyhtq3Pi3GjppeBXN8QLvNd6LNM/78d/3XJCZPNizPfCEQk5IDJlxJaqEIsoYZaB0f2Hr3/SBTVvYnSPQhr2hY/FKnk4ptkgieJf6Sc6rUO/2w/zITePexTjIdmbOD9ftS3FxLoiNq/kJ8ZeBpx/Jdpusu20CyrCIVmDS57O0lumXMrwenyu8bF2rx9MNwDlUzFcKENaQDcWnxmD9xPOue+MvtaAqG/BRf1/QRiu5CT1IPh1FjevCmiUOlpe4CUuZ2vRhb6SXKdE+Ha/HvbvjSuloZ9bFOL1LcOPRDY6wlHFiWNJ3Zs+Es0jMJ3dT7+/rAh4Z0pPQLBAhzryFqwIDAQABAoIBAAOzyRQAbBp2kJu7t11dTlaztXjVE4gLu1f9WtIdOvkOzJWG/LZk3BBu8OBeT9LJetIwC7EvTacOxMso4kwo1m/DWtiJGT7gDP2JXtmsh6WTGr1BKrinrUFO6bDq4TOQN4c6CGHDDLBu12xGuD8sCUrP7/oCpCGhyVOslhqF1/4m97IlYjNPLQ5PPTIg9Am1zDOl/psXxgu+zWzUlI89ARGDNsrwCbcd3qFrxKCidoNkXjbaNa/YsMSbOdSNLbthjvpR78qAoGBC0vYwaR/4c+jaAc2E29gahEn0DOKGEKKFqnprj7BRIiiXasEQX+A6Wfs6v/pPdcQlklLFFncZKF0CgYEA7UMx+/CaGZMSc/AVPnbRO6FQ1d/jjZEXI3tflz9cELM2gyqMMEIe9/uxRCu/RKH73t+V07z65iGRVdDWNMZ1iIQpt50hblicJvF83YT2tjxQExnQo7sle9Jm9wApTfIOb4bolrdtSc7hEYYYiTUIgPBA2tuj9dOQt91kLnN1r+cCgYEAzIDtw3Kmurn72kJ168z1CkHuWBx4DtfEQY0IGUu/X68x/jF6VE8ouXvJuWx49FLJtf1xFnBT4HJ0Il+4UFGomKn6Xd7z7635KZfgQ1L7rwYv7GqOlI4XS4FmMYezyAOtYaosOBLzB/yabNCCGKHMRSrulHzYUCK9aPY7/B5Ck50CgYEAlqeKP53BW+flWbTi6Gzt4t1FxOiLR0MP3DnkstdKkFgbjyIfLi1uGKy7HLxikSQCGL0EGBTxg9tgu4sF2TEDRJIXIz4lEjo1vQyt6sMZHRIjDl3f+3dED+HD+6cgkxvWSr7xRXJndOxmQYhSYB1KrwTfSZkZ/Wg/hmCP0mcCHZUCgYEAhuvQ8g/kXHFz7g3HCulQCZJyE4PE2dYUz0Kiwz2sZw6JJzGxiYooTieTcVhVfKxaFE2/nJRDYmNgp4ULb0JQv1f1rJT5z3myV3SyKvjGwDSOzaWHqA8O42vd5nOncyCp9TN2tRAbc3t+zqfKDUJCKKgoe6LafBRPbr512OKF/ikCgYAZrlAVoN3jzwZxdszFzyz5czDtv2MMepNoYvNsSBNo0tfo8qThByTcN6S5u3q5yMuAMPyhajJ/UYtPxKK75bLkjobkxeX9MjSzwCK6s8DNCwqJJlXFjOsNOigTuB9ku0xq9P5D7AGD1rOgaUE72NjBZLS/c2jwX3Xv2mE2qWpViQ==" ], + "certificate" : [ "MIICpzCCAY8CBgGPFxVXxDANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxzcWxwYWdlX2RlbW8wHhcNMjQwNDI1MjEwNTI1WhcNMzQwNDI1MjEwNzA1WjAXMRUwEwYDVQQDDAxzcWxwYWdlX2RlbW8wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC9iQnKG2rc+LcaOml4Fc3xAu813os0z/vx3/dckJk82LM98IRCTkgMmXElqoQiyhhloHR/Yevf9IFNW9idI9CGvaFj8UqeTim2SCJ4l/pJzqtQ7/bD/MhN497FOMh2Zs4P1+1LcXEuiI2r+Qnxl4GnH8l2m6y7bQLKsIhWYNLns7SW6ZcyvB6fK7xsXavH0w3AOVTMVwoQ1pANxafGYP3E86574y+1oCob8FF/X9BGK7kJPUg+HUWN68KaJQ6Wl7gJS5na9GFvpJcp0T4dr8e9u+NK6Whn1sU4vUtw49ENjrCUcWJY0ndmz4SzSMwnd1Pv7+sCHhnSk9AsECHOvIWrAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAHVqRlWO/uDsyIztqQjJyYbk3TtA1JaCeCOUhHN+7MD78/KGHQwAMU8dTuU/3YajVwm+0uMbnZ4gpV/mUkZqt9aVsiDk2GJ6P4z4H5Tg8BGSLYCVYEuKU7lSXNePxfrHsYf0jC209KJmGPynPwVYmpqZ92ucC0GGQyFRARyjhpx0pg7yxy3ARbzhYT2uggtzdv9DdkZ6vnm6siPlQb4VjDZB76XueT6b8/qNeDVzjfh1igBTyavY3UES9l2bdpQAjUHc6JZVP2xQEAEioHpYv3opAOo6Egu90ON7DeQupukSQEqizvhS9LbVsGKg0iKiVFFazdNtYvamOG1+d4slhoU=" ], + "priority" : [ "100" ], + "algorithm" : [ "RSA-OAEP" ] + } + }, { + "id" : "814f5c3e-a455-4b04-a90f-4752382b106e", + "name" : "aes-generated", + "providerId" : "aes-generated", + "subComponents" : { }, + "config" : { + "kid" : [ "17498c29-d8ba-4851-bd66-3b56739fbe42" ], + "secret" : [ "Qo8khARW9YKp0Zdh7rLE1g" ], + "priority" : [ "100" ] + } + }, { + "id" : "6685a900-2ea7-49ec-b5b9-bd8717784f0d", + "name" : "rsa-generated", + "providerId" : "rsa-generated", + "subComponents" : { }, + "config" : { + "privateKey" : [ "MIIEogIBAAKCAQEAuP4foFrftmCEJmZ740D+Top9ezC7gnFVGmXxMbPFmGb8HAqRab2pTKy5CRv6e9DIGyrkEKfbkLM8Vj1XgWg/+7YEovDc08v7biHyHX1LlorVTcZQ6w7fXYdq63iIACV2B1HqhOgd9kGpkwplJRYSGG1+dg1+YySxghiziS3MIfGuwL7sTTAsOePrLj2Y6/MIUDqlu2bXcGXj8CB7ScWy/gdhOu8fAPLKniGIOhQno7me5tbj4s34VoqBy1t9CuWexEi+NIrPJdeum5EDPJ0x/BCGzlHBoA1Iq7MhmhKeFFARmQ+ubPfHdUfvuyswj4fKD2w37cZT8PtUgd3eMssQXQIDAQABAoIBACfA+IPps2SKViu4X0wlReET8sY74Te1ah/ro0rWgpJvIyNVhA0wpEalYXgbKpdb9PydmXgY0l7EnaU8tmbJQ+KwKUvordPX5Ha01cZPjCRUPmVhxjbVMdv0A16JvtQlOLl2+YpJJVMrpijClZzEIuxb706oNK5SjtDRxRcoH9N1MW+d4KNdJzuyHAfFBhFtydx02Uxjg5ptkwCCNwZGqdMtlp4/VGQGGRQEiZCnuOr9JX0U2o0slcCdc4OnJSs1Sf8QVHuefqM3Kf34WEDJ0jScDKV0EMKjGNBdMLLEXBpI9V9sKKvR72Bx5nP/j8/pFN7WOmSwYhwHiDkLS3Gk8hMCgYEA+mzM8W1MZBwToaHAOwMHvc/8lMDBztbfN6/mJrxlDal8v+f932C4ifvKZNmSCBtwFMJxIAcbcxBcJuX4Dj397Ch6ocXvs7kTOxdzppyWc4oI7uaEhGGcLHVQY27qkx4RLCS0ptipWdHTz/51Uj1dVgRtg3KEmIHInqe/4UZKCb8CgYEAvRxqvs2kwAoVxBM4CFBVFjNNnxgPFtVmHAfbKZTPAej87sfLzQCj4QBS8mK603A4J0fh6eJ08kL4FZovnyVGV9oevFIMvOPXZbU953qktGwCIrK9AxmiqZP4sgI8/plEh0VgMwhUg5uh4Mp/ZP9Ag/MXCkxKal19ppmRuRr+lOMCgYBtRsjvmRg6nx3Z7DFsDthz9axsZOitj4n8TN+Li641Ff5/54Ya0aP1YlBhTaexrfdst6SRq0hJH5x2xOdHn7mMMeXBbhQ5Qsunf4ZR8AafCF75kNHGyqlRpSedHCt0YyxvLN0/6U+NCEj7fDhJ2Mk/3dLEB1bhDdEzmlPaw8dPFQKBgEBgeh42F02goUQ8XqjF4BFMqbHtGMXnI3mLWxpOpCG8VM5ciY5iF2ezGomU/pCX9SW6HLfn9XO7RITmFiwRHl8ty6TEMb3juiHPjyFL6OHamueA/UMe6Pbdfp3qkSUCvAdooJT+0vZydqr1hGS3WBkTGdbRncuTxACA6tCe1eeNAoGABeQZWBOW/EvUx7k3lEYr51xWK+R8Lk3xibvg1oiNKtmj+9A+p9Adt5l8z6Q1vwnV10qPbDIy0ja8wkcX7mqCMDZf7A5yEQtvQFNbbk64iwLSPx2H207vn6lVimiSskAUZ1eVFMTxzIddaqmOxzEng6y6gfBOVK0xksgLNnV+NKw=" ], + "certificate" : [ "MIICpzCCAY8CBgGPFxVYJTANBgkqhkiG9w0BAQsFADAXMRUwEwYDVQQDDAxzcWxwYWdlX2RlbW8wHhcNMjQwNDI1MjEwNTI1WhcNMzQwNDI1MjEwNzA1WjAXMRUwEwYDVQQDDAxzcWxwYWdlX2RlbW8wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC4/h+gWt+2YIQmZnvjQP5Oin17MLuCcVUaZfExs8WYZvwcCpFpvalMrLkJG/p70MgbKuQQp9uQszxWPVeBaD/7tgSi8NzTy/tuIfIdfUuWitVNxlDrDt9dh2rreIgAJXYHUeqE6B32QamTCmUlFhIYbX52DX5jJLGCGLOJLcwh8a7AvuxNMCw54+suPZjr8whQOqW7ZtdwZePwIHtJxbL+B2E67x8A8sqeIYg6FCejuZ7m1uPizfhWioHLW30K5Z7ESL40is8l166bkQM8nTH8EIbOUcGgDUirsyGaEp4UUBGZD65s98d1R++7KzCPh8oPbDftxlPw+1SB3d4yyxBdAgMBAAEwDQYJKoZIhvcNAQELBQADggEBALKVXfayldWsdDjwtUZOtzu9fTU3YbUekvkuYr0Fvs9348ZiWoPvt6JQ9i7ytqDxok9CvgVL347ZS+lDkMKhBpw7ryVS0bG/Vg7DeNmjmutGuGdiJR2nUF8z6SgDVWXqr4XrcDy6xwfVtAazc8MXau+eQozlZBiLV4bKDD793m9zqPeSIIipDozMrfKm4jYnam33d9pRQFGDgEGHqXiwR96x8tC5zlFjngKlX1IgigYqARSsOMaV4vU2aIhIq3bLpvSIGGSDo9iw6iYhBYn9tpmtsHCU/RFqsWPhglU168+0VQesCQphKCXoOZp3qIGnRUVySNZSZrHynQ/wLzI1Dos=" ], + "priority" : [ "100" ] + } + }, { + "id" : "2b7d2bdf-aee4-4f31-8bec-97bd01182220", + "name" : "hmac-generated-hs512", + "providerId" : "hmac-generated", + "subComponents" : { }, + "config" : { + "kid" : [ "f908ef09-5b02-4d60-8aa9-906f5be4b4b3" ], + "secret" : [ "_PZq7evS8vCHPBBLIRlgHrcXtE46TgjSaao5Yh1LlyjHUyHhxarMYYbenDFELpc7nw3WDWr2U0lS-y0QY7EHySYvf6zx5er1hNwPV78g4kvJUYRKKf9U8OmWlsr2E8bDGKBr547El5HyU11_KWykzvi_dBkqX6LsceQB8guy8t4" ], + "priority" : [ "100" ], + "algorithm" : [ "HS512" ] + } + } ] + }, + "internationalizationEnabled" : false, + "supportedLocales" : [ ], + "authenticationFlows" : [ { + "id" : "68f8d935-47fb-42dc-8e23-94cca509c6b1", + "alias" : "Account verification options", + "description" : "Method with which to verity the existing account", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "idp-email-verification", + "authenticatorFlow" : false, + "requirement" : "ALTERNATIVE", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "ALTERNATIVE", + "priority" : 20, + "autheticatorFlow" : true, + "flowAlias" : "Verify Existing Account by Re-authentication", + "userSetupAllowed" : false + } ] + }, { + "id" : "c5c5650b-a462-4b37-9dd9-f1499e369219", + "alias" : "Browser - Conditional OTP", + "description" : "Flow to determine if the OTP is required for the authentication", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "conditional-user-configured", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "auth-otp-form", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + } ] + }, { + "id" : "16124aaf-0384-4d6d-a108-338b5749aa5d", + "alias" : "Direct Grant - Conditional OTP", + "description" : "Flow to determine if the OTP is required for the authentication", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "conditional-user-configured", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "direct-grant-validate-otp", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + } ] + }, { + "id" : "3bbf73c5-00f6-4a2a-a2cb-d74f82653fa3", + "alias" : "First broker login - Conditional OTP", + "description" : "Flow to determine if the OTP is required for the authentication", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "conditional-user-configured", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "auth-otp-form", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + } ] + }, { + "id" : "b0e4e594-f55d-46be-86fd-676ec72d979e", + "alias" : "Handle Existing Account", + "description" : "Handle what to do if there is existing account with same email/username like authenticated identity provider", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "idp-confirm-link", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : true, + "flowAlias" : "Account verification options", + "userSetupAllowed" : false + } ] + }, { + "id" : "04618969-a055-4e6f-9e41-27c24b037d30", + "alias" : "Reset - Conditional OTP", + "description" : "Flow to determine if the OTP should be reset or not. Set to REQUIRED to force.", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "conditional-user-configured", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "reset-otp", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + } ] + }, { + "id" : "079f9946-bc86-4b50-970f-0fde0eebafb0", + "alias" : "User creation or linking", + "description" : "Flow for the existing/non-existing user alternatives", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticatorConfig" : "create unique user config", + "authenticator" : "idp-create-user-if-unique", + "authenticatorFlow" : false, + "requirement" : "ALTERNATIVE", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "ALTERNATIVE", + "priority" : 20, + "autheticatorFlow" : true, + "flowAlias" : "Handle Existing Account", + "userSetupAllowed" : false + } ] + }, { + "id" : "b4056290-6f49-4343-a803-8029b8cab587", + "alias" : "Verify Existing Account by Re-authentication", + "description" : "Reauthentication of existing account", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "idp-username-password-form", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "CONDITIONAL", + "priority" : 20, + "autheticatorFlow" : true, + "flowAlias" : "First broker login - Conditional OTP", + "userSetupAllowed" : false + } ] + }, { + "id" : "1b02c9b7-50d4-4001-8648-4674d2b5c83f", + "alias" : "browser", + "description" : "browser based authentication", + "providerId" : "basic-flow", + "topLevel" : true, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "auth-cookie", + "authenticatorFlow" : false, + "requirement" : "ALTERNATIVE", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "auth-spnego", + "authenticatorFlow" : false, + "requirement" : "DISABLED", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "identity-provider-redirector", + "authenticatorFlow" : false, + "requirement" : "ALTERNATIVE", + "priority" : 25, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "ALTERNATIVE", + "priority" : 30, + "autheticatorFlow" : true, + "flowAlias" : "forms", + "userSetupAllowed" : false + } ] + }, { + "id" : "2c52b4db-2764-4930-ba72-eed08a3568f9", + "alias" : "clients", + "description" : "Base authentication for clients", + "providerId" : "client-flow", + "topLevel" : true, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "client-secret", + "authenticatorFlow" : false, + "requirement" : "ALTERNATIVE", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "client-jwt", + "authenticatorFlow" : false, + "requirement" : "ALTERNATIVE", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "client-secret-jwt", + "authenticatorFlow" : false, + "requirement" : "ALTERNATIVE", + "priority" : 30, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "client-x509", + "authenticatorFlow" : false, + "requirement" : "ALTERNATIVE", + "priority" : 40, + "autheticatorFlow" : false, + "userSetupAllowed" : false + } ] + }, { + "id" : "d4b0242b-f4a2-4e28-9dc5-5ee8bd64c4a7", + "alias" : "direct grant", + "description" : "OpenID Connect Resource Owner Grant", + "providerId" : "basic-flow", + "topLevel" : true, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "direct-grant-validate-username", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "direct-grant-validate-password", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "CONDITIONAL", + "priority" : 30, + "autheticatorFlow" : true, + "flowAlias" : "Direct Grant - Conditional OTP", + "userSetupAllowed" : false + } ] + }, { + "id" : "5c90d095-2a79-40c5-a452-98e0cd9402e6", + "alias" : "docker auth", + "description" : "Used by Docker clients to authenticate against the IDP", + "providerId" : "basic-flow", + "topLevel" : true, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "docker-http-basic-authenticator", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + } ] + }, { + "id" : "87054128-dec5-47c4-a461-0491ac601ee8", + "alias" : "first broker login", + "description" : "Actions taken after first broker login with identity provider account, which is not yet linked to any Keycloak account", + "providerId" : "basic-flow", + "topLevel" : true, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticatorConfig" : "review profile config", + "authenticator" : "idp-review-profile", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : true, + "flowAlias" : "User creation or linking", + "userSetupAllowed" : false + } ] + }, { + "id" : "197b6d93-54f1-46a1-8bc1-fee099e06978", + "alias" : "forms", + "description" : "Username, password, otp and other auth forms.", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "auth-username-password-form", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "CONDITIONAL", + "priority" : 20, + "autheticatorFlow" : true, + "flowAlias" : "Browser - Conditional OTP", + "userSetupAllowed" : false + } ] + }, { + "id" : "ca5c0b1a-51cf-4a79-bb61-5b923eed9bf7", + "alias" : "registration", + "description" : "registration flow", + "providerId" : "basic-flow", + "topLevel" : true, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "registration-page-form", + "authenticatorFlow" : true, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : true, + "flowAlias" : "registration form", + "userSetupAllowed" : false + } ] + }, { + "id" : "856a26b0-cf52-4173-94fb-8726c77de2ab", + "alias" : "registration form", + "description" : "registration form", + "providerId" : "form-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "registration-user-creation", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "registration-password-action", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 50, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "registration-recaptcha-action", + "authenticatorFlow" : false, + "requirement" : "DISABLED", + "priority" : 60, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "registration-terms-and-conditions", + "authenticatorFlow" : false, + "requirement" : "DISABLED", + "priority" : 70, + "autheticatorFlow" : false, + "userSetupAllowed" : false + } ] + }, { + "id" : "ea7cafde-a77b-4fd6-9510-396748960980", + "alias" : "reset credentials", + "description" : "Reset credentials for a user if they forgot their password or something", + "providerId" : "basic-flow", + "topLevel" : true, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "reset-credentials-choose-user", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "reset-credential-email", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "reset-password", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 30, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "CONDITIONAL", + "priority" : 40, + "autheticatorFlow" : true, + "flowAlias" : "Reset - Conditional OTP", + "userSetupAllowed" : false + } ] + }, { + "id" : "35a9e22a-3775-4cad-9a8b-d646cd74c8eb", + "alias" : "saml ecp", + "description" : "SAML ECP Profile Authentication Flow", + "providerId" : "basic-flow", + "topLevel" : true, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "http-basic-authenticator", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + } ] + } ], + "authenticatorConfig" : [ { + "id" : "4a307cbf-79bc-4125-8eca-4ea98f7cb27b", + "alias" : "create unique user config", + "config" : { + "require.password.update.after.registration" : "false" + } + }, { + "id" : "0a0aaedd-39f6-4dc0-9153-ac6dbd255d3a", + "alias" : "review profile config", + "config" : { + "update.profile.on.first.login" : "missing" + } + } ], + "requiredActions" : [ { + "alias" : "CONFIGURE_TOTP", + "name" : "Configure OTP", + "providerId" : "CONFIGURE_TOTP", + "enabled" : true, + "defaultAction" : false, + "priority" : 10, + "config" : { } + }, { + "alias" : "TERMS_AND_CONDITIONS", + "name" : "Terms and Conditions", + "providerId" : "TERMS_AND_CONDITIONS", + "enabled" : false, + "defaultAction" : false, + "priority" : 20, + "config" : { } + }, { + "alias" : "UPDATE_PASSWORD", + "name" : "Update Password", + "providerId" : "UPDATE_PASSWORD", + "enabled" : true, + "defaultAction" : false, + "priority" : 30, + "config" : { } + }, { + "alias" : "UPDATE_PROFILE", + "name" : "Update Profile", + "providerId" : "UPDATE_PROFILE", + "enabled" : true, + "defaultAction" : false, + "priority" : 40, + "config" : { } + }, { + "alias" : "VERIFY_EMAIL", + "name" : "Verify Email", + "providerId" : "VERIFY_EMAIL", + "enabled" : true, + "defaultAction" : false, + "priority" : 50, + "config" : { } + }, { + "alias" : "delete_account", + "name" : "Delete Account", + "providerId" : "delete_account", + "enabled" : false, + "defaultAction" : false, + "priority" : 60, + "config" : { } + }, { + "alias" : "webauthn-register", + "name" : "Webauthn Register", + "providerId" : "webauthn-register", + "enabled" : true, + "defaultAction" : false, + "priority" : 70, + "config" : { } + }, { + "alias" : "webauthn-register-passwordless", + "name" : "Webauthn Register Passwordless", + "providerId" : "webauthn-register-passwordless", + "enabled" : true, + "defaultAction" : false, + "priority" : 80, + "config" : { } + }, { + "alias" : "VERIFY_PROFILE", + "name" : "Verify Profile", + "providerId" : "VERIFY_PROFILE", + "enabled" : true, + "defaultAction" : false, + "priority" : 90, + "config" : { } + }, { + "alias" : "delete_credential", + "name" : "Delete Credential", + "providerId" : "delete_credential", + "enabled" : true, + "defaultAction" : false, + "priority" : 100, + "config" : { } + }, { + "alias" : "update_user_locale", + "name" : "Update User Locale", + "providerId" : "update_user_locale", + "enabled" : true, + "defaultAction" : false, + "priority" : 1000, + "config" : { } + } ], + "browserFlow" : "browser", + "registrationFlow" : "registration", + "directGrantFlow" : "direct grant", + "resetCredentialsFlow" : "reset credentials", + "clientAuthenticationFlow" : "clients", + "dockerAuthenticationFlow" : "docker auth", + "firstBrokerLoginFlow" : "first broker login", + "attributes" : { + "cibaBackchannelTokenDeliveryMode" : "poll", + "cibaAuthRequestedUserHint" : "login_hint", + "clientOfflineSessionMaxLifespan" : "0", + "oauth2DevicePollingInterval" : "5", + "clientSessionIdleTimeout" : "0", + "clientOfflineSessionIdleTimeout" : "0", + "cibaInterval" : "5", + "realmReusableOtpCode" : "false", + "cibaExpiresIn" : "120", + "oauth2DeviceCodeLifespan" : "600", + "parRequestUriLifespan" : "60", + "clientSessionMaxLifespan" : "0", + "frontendUrl" : "http://localhost:8181", + "acr.loa.map" : "{}" + }, + "keycloakVersion" : "24.0.3", + "userManagedAccessAllowed" : false, + "clientProfiles" : { + "profiles" : [ ] + }, + "clientPolicies" : { + "policies" : [ ] + } +}, { + "id" : "f6844ab2-2bd1-46f5-a899-70f4a8ef1ced", + "realm" : "master", + "displayName" : "Keycloak", + "displayNameHtml" : "
Keycloak
", + "notBefore" : 0, + "defaultSignatureAlgorithm" : "RS256", + "revokeRefreshToken" : false, + "refreshTokenMaxReuse" : 0, + "accessTokenLifespan" : 60, + "accessTokenLifespanForImplicitFlow" : 900, + "ssoSessionIdleTimeout" : 1800, + "ssoSessionMaxLifespan" : 36000, + "ssoSessionIdleTimeoutRememberMe" : 0, + "ssoSessionMaxLifespanRememberMe" : 0, + "offlineSessionIdleTimeout" : 2592000, + "offlineSessionMaxLifespanEnabled" : false, + "offlineSessionMaxLifespan" : 5184000, + "clientSessionIdleTimeout" : 0, + "clientSessionMaxLifespan" : 0, + "clientOfflineSessionIdleTimeout" : 0, + "clientOfflineSessionMaxLifespan" : 0, + "accessCodeLifespan" : 60, + "accessCodeLifespanUserAction" : 300, + "accessCodeLifespanLogin" : 1800, + "actionTokenGeneratedByAdminLifespan" : 43200, + "actionTokenGeneratedByUserLifespan" : 300, + "oauth2DeviceCodeLifespan" : 600, + "oauth2DevicePollingInterval" : 5, + "enabled" : true, + "sslRequired" : "external", + "registrationAllowed" : false, + "registrationEmailAsUsername" : false, + "rememberMe" : false, + "verifyEmail" : false, + "loginWithEmailAllowed" : true, + "duplicateEmailsAllowed" : false, + "resetPasswordAllowed" : false, + "editUsernameAllowed" : false, + "bruteForceProtected" : false, + "permanentLockout" : false, + "maxTemporaryLockouts" : 0, + "maxFailureWaitSeconds" : 900, + "minimumQuickLoginWaitSeconds" : 60, + "waitIncrementSeconds" : 60, + "quickLoginCheckMilliSeconds" : 1000, + "maxDeltaTimeSeconds" : 43200, + "failureFactor" : 30, + "roles" : { + "realm" : [ { + "id" : "5948db96-73a1-49dc-b0a6-d8b128af8cca", + "name" : "offline_access", + "description" : "${role_offline-access}", + "composite" : false, + "clientRole" : false, + "containerId" : "f6844ab2-2bd1-46f5-a899-70f4a8ef1ced", + "attributes" : { } + }, { + "id" : "814bdf99-efa7-462c-805b-4f60053da434", + "name" : "create-realm", + "description" : "${role_create-realm}", + "composite" : false, + "clientRole" : false, + "containerId" : "f6844ab2-2bd1-46f5-a899-70f4a8ef1ced", + "attributes" : { } + }, { + "id" : "cc6777ee-15b4-49f7-a4f8-5be17a3f839a", + "name" : "admin", + "description" : "${role_admin}", + "composite" : true, + "composites" : { + "realm" : [ "create-realm" ], + "client" : { + "sqlpage_demo-realm" : [ "manage-events", "create-client", "manage-realm", "manage-identity-providers", "impersonation", "query-groups", "view-events", "query-users", "view-authorization", "manage-authorization", "query-realms", "manage-clients", "view-users", "view-clients", "view-identity-providers", "view-realm", "query-clients", "manage-users" ], + "master-realm" : [ "query-realms", "view-identity-providers", "create-client", "query-groups", "manage-clients", "query-users", "manage-realm", "manage-users", "query-clients", "manage-events", "view-authorization", "view-clients", "manage-identity-providers", "view-realm", "manage-authorization", "impersonation", "view-users", "view-events" ] + } + }, + "clientRole" : false, + "containerId" : "f6844ab2-2bd1-46f5-a899-70f4a8ef1ced", + "attributes" : { } + }, { + "id" : "eb3f24b6-ced1-417b-aedf-477b5e2b5f02", + "name" : "default-roles-master", + "description" : "${role_default-roles}", + "composite" : true, + "composites" : { + "realm" : [ "offline_access", "uma_authorization" ], + "client" : { + "account" : [ "manage-account", "view-profile" ] + } + }, + "clientRole" : false, + "containerId" : "f6844ab2-2bd1-46f5-a899-70f4a8ef1ced", + "attributes" : { } + }, { + "id" : "709cdb3d-c5ec-4595-8c5b-489e0932307b", + "name" : "uma_authorization", + "description" : "${role_uma_authorization}", + "composite" : false, + "clientRole" : false, + "containerId" : "f6844ab2-2bd1-46f5-a899-70f4a8ef1ced", + "attributes" : { } + } ], + "client" : { + "sqlpage_demo-realm" : [ { + "id" : "3fb1d18f-d5cc-43fb-9e47-b1e9bef61487", + "name" : "manage-events", + "description" : "${role_manage-events}", + "composite" : false, + "clientRole" : true, + "containerId" : "f43df650-3430-4824-8e3d-b09b21e0d42c", + "attributes" : { } + }, { + "id" : "6d7442ff-7dc4-42df-a734-55e9137e6b04", + "name" : "view-authorization", + "description" : "${role_view-authorization}", + "composite" : false, + "clientRole" : true, + "containerId" : "f43df650-3430-4824-8e3d-b09b21e0d42c", + "attributes" : { } + }, { + "id" : "c786606d-9b1f-47ee-b197-9645379c8ed6", + "name" : "manage-authorization", + "description" : "${role_manage-authorization}", + "composite" : false, + "clientRole" : true, + "containerId" : "f43df650-3430-4824-8e3d-b09b21e0d42c", + "attributes" : { } + }, { + "id" : "50ec314b-6dbe-4c13-9137-53c3682c0860", + "name" : "query-realms", + "description" : "${role_query-realms}", + "composite" : false, + "clientRole" : true, + "containerId" : "f43df650-3430-4824-8e3d-b09b21e0d42c", + "attributes" : { } + }, { + "id" : "9acd0828-60f4-4406-abec-d50a838bf32a", + "name" : "create-client", + "description" : "${role_create-client}", + "composite" : false, + "clientRole" : true, + "containerId" : "f43df650-3430-4824-8e3d-b09b21e0d42c", + "attributes" : { } + }, { + "id" : "d73a34c2-d8d9-4e94-8f4b-c770c103bf6a", + "name" : "manage-realm", + "description" : "${role_manage-realm}", + "composite" : false, + "clientRole" : true, + "containerId" : "f43df650-3430-4824-8e3d-b09b21e0d42c", + "attributes" : { } + }, { + "id" : "e6dd4568-7850-493b-896c-d55e4f9a9a7d", + "name" : "manage-clients", + "description" : "${role_manage-clients}", + "composite" : false, + "clientRole" : true, + "containerId" : "f43df650-3430-4824-8e3d-b09b21e0d42c", + "attributes" : { } + }, { + "id" : "7930a98d-9911-447d-b33c-5d5474a80bf7", + "name" : "view-users", + "description" : "${role_view-users}", + "composite" : true, + "composites" : { + "client" : { + "sqlpage_demo-realm" : [ "query-groups", "query-users" ] + } + }, + "clientRole" : true, + "containerId" : "f43df650-3430-4824-8e3d-b09b21e0d42c", + "attributes" : { } + }, { + "id" : "9a869db4-c03e-4e72-82f9-484f2f45f4d4", + "name" : "manage-identity-providers", + "description" : "${role_manage-identity-providers}", + "composite" : false, + "clientRole" : true, + "containerId" : "f43df650-3430-4824-8e3d-b09b21e0d42c", + "attributes" : { } + }, { + "id" : "84cfef65-2e83-4751-b006-c7ea4a337cc4", + "name" : "view-clients", + "description" : "${role_view-clients}", + "composite" : true, + "composites" : { + "client" : { + "sqlpage_demo-realm" : [ "query-clients" ] + } + }, + "clientRole" : true, + "containerId" : "f43df650-3430-4824-8e3d-b09b21e0d42c", + "attributes" : { } + }, { + "id" : "e92647a9-57c4-4b44-ad6c-bea3c51f1e16", + "name" : "view-identity-providers", + "description" : "${role_view-identity-providers}", + "composite" : false, + "clientRole" : true, + "containerId" : "f43df650-3430-4824-8e3d-b09b21e0d42c", + "attributes" : { } + }, { + "id" : "0903742f-de03-4c63-b551-1ca01389a178", + "name" : "view-realm", + "description" : "${role_view-realm}", + "composite" : false, + "clientRole" : true, + "containerId" : "f43df650-3430-4824-8e3d-b09b21e0d42c", + "attributes" : { } + }, { + "id" : "48c119a6-fe08-47f6-956a-5abfb7419f1d", + "name" : "impersonation", + "description" : "${role_impersonation}", + "composite" : false, + "clientRole" : true, + "containerId" : "f43df650-3430-4824-8e3d-b09b21e0d42c", + "attributes" : { } + }, { + "id" : "ad24ea3a-8903-443e-a3b3-88b5b5fa46ec", + "name" : "manage-users", + "description" : "${role_manage-users}", + "composite" : false, + "clientRole" : true, + "containerId" : "f43df650-3430-4824-8e3d-b09b21e0d42c", + "attributes" : { } + }, { + "id" : "342cf87a-2909-4b46-92f3-0e75229a8e0e", + "name" : "query-clients", + "description" : "${role_query-clients}", + "composite" : false, + "clientRole" : true, + "containerId" : "f43df650-3430-4824-8e3d-b09b21e0d42c", + "attributes" : { } + }, { + "id" : "2e773780-b6e5-4693-8b27-f8e6c1c594ea", + "name" : "query-groups", + "description" : "${role_query-groups}", + "composite" : false, + "clientRole" : true, + "containerId" : "f43df650-3430-4824-8e3d-b09b21e0d42c", + "attributes" : { } + }, { + "id" : "cafa41ca-ac54-4429-93aa-853b5fd73573", + "name" : "query-users", + "description" : "${role_query-users}", + "composite" : false, + "clientRole" : true, + "containerId" : "f43df650-3430-4824-8e3d-b09b21e0d42c", + "attributes" : { } + }, { + "id" : "408a0d1a-16dc-459d-8405-da8d61d0dda0", + "name" : "view-events", + "description" : "${role_view-events}", + "composite" : false, + "clientRole" : true, + "containerId" : "f43df650-3430-4824-8e3d-b09b21e0d42c", + "attributes" : { } + } ], + "security-admin-console" : [ ], + "admin-cli" : [ ], + "account-console" : [ ], + "broker" : [ { + "id" : "53e5c9b9-9335-4b59-ad3f-1afcc51d7853", + "name" : "read-token", + "description" : "${role_read-token}", + "composite" : false, + "clientRole" : true, + "containerId" : "8b8be563-25c3-4b98-be78-325d6e481062", + "attributes" : { } + } ], + "master-realm" : [ { + "id" : "6190ee57-8de0-47c0-93c2-515c1aa9cf07", + "name" : "query-realms", + "description" : "${role_query-realms}", + "composite" : false, + "clientRole" : true, + "containerId" : "04d0e12e-d4e7-4a35-9285-18134fa60742", + "attributes" : { } + }, { + "id" : "37a6ea02-f94f-4247-aaac-5d6929c05e40", + "name" : "view-realm", + "description" : "${role_view-realm}", + "composite" : false, + "clientRole" : true, + "containerId" : "04d0e12e-d4e7-4a35-9285-18134fa60742", + "attributes" : { } + }, { + "id" : "bbdc2b84-c006-4af7-99b5-9d9b2548321d", + "name" : "view-identity-providers", + "description" : "${role_view-identity-providers}", + "composite" : false, + "clientRole" : true, + "containerId" : "04d0e12e-d4e7-4a35-9285-18134fa60742", + "attributes" : { } + }, { + "id" : "520054e2-8813-4fbe-b65f-9639dd6c3db7", + "name" : "manage-authorization", + "description" : "${role_manage-authorization}", + "composite" : false, + "clientRole" : true, + "containerId" : "04d0e12e-d4e7-4a35-9285-18134fa60742", + "attributes" : { } + }, { + "id" : "9df3605e-4114-483a-a2ea-5a71484837d0", + "name" : "impersonation", + "description" : "${role_impersonation}", + "composite" : false, + "clientRole" : true, + "containerId" : "04d0e12e-d4e7-4a35-9285-18134fa60742", + "attributes" : { } + }, { + "id" : "b44b9920-3826-4f7c-81b9-2b1a0ec1dde7", + "name" : "view-users", + "description" : "${role_view-users}", + "composite" : true, + "composites" : { + "client" : { + "master-realm" : [ "query-groups", "query-users" ] + } + }, + "clientRole" : true, + "containerId" : "04d0e12e-d4e7-4a35-9285-18134fa60742", + "attributes" : { } + }, { + "id" : "47e977f7-b7a6-4c81-8d39-4173ed7542f5", + "name" : "create-client", + "description" : "${role_create-client}", + "composite" : false, + "clientRole" : true, + "containerId" : "04d0e12e-d4e7-4a35-9285-18134fa60742", + "attributes" : { } + }, { + "id" : "16d9ad8b-f8fe-491b-8d89-3417690dc3c7", + "name" : "query-groups", + "description" : "${role_query-groups}", + "composite" : false, + "clientRole" : true, + "containerId" : "04d0e12e-d4e7-4a35-9285-18134fa60742", + "attributes" : { } + }, { + "id" : "ab6c00d9-47d4-4d3e-a14e-2cdeb69b9775", + "name" : "view-events", + "description" : "${role_view-events}", + "composite" : false, + "clientRole" : true, + "containerId" : "04d0e12e-d4e7-4a35-9285-18134fa60742", + "attributes" : { } + }, { + "id" : "4dd2ee76-9a3e-4b34-bcc9-d8ec7d56d839", + "name" : "manage-clients", + "description" : "${role_manage-clients}", + "composite" : false, + "clientRole" : true, + "containerId" : "04d0e12e-d4e7-4a35-9285-18134fa60742", + "attributes" : { } + }, { + "id" : "19dc35d6-b800-4d7d-b11a-ca18ef86ec3c", + "name" : "query-users", + "description" : "${role_query-users}", + "composite" : false, + "clientRole" : true, + "containerId" : "04d0e12e-d4e7-4a35-9285-18134fa60742", + "attributes" : { } + }, { + "id" : "af5964ae-1e7f-4501-b340-8edb3e0ae82c", + "name" : "manage-realm", + "description" : "${role_manage-realm}", + "composite" : false, + "clientRole" : true, + "containerId" : "04d0e12e-d4e7-4a35-9285-18134fa60742", + "attributes" : { } + }, { + "id" : "e4b57868-6b32-4546-84ef-ff065e4f6496", + "name" : "manage-users", + "description" : "${role_manage-users}", + "composite" : false, + "clientRole" : true, + "containerId" : "04d0e12e-d4e7-4a35-9285-18134fa60742", + "attributes" : { } + }, { + "id" : "fee8e509-2198-49b7-b5b1-39ec041e37ab", + "name" : "query-clients", + "description" : "${role_query-clients}", + "composite" : false, + "clientRole" : true, + "containerId" : "04d0e12e-d4e7-4a35-9285-18134fa60742", + "attributes" : { } + }, { + "id" : "b5be15a9-9d33-4166-b1ab-64f446634a00", + "name" : "manage-events", + "description" : "${role_manage-events}", + "composite" : false, + "clientRole" : true, + "containerId" : "04d0e12e-d4e7-4a35-9285-18134fa60742", + "attributes" : { } + }, { + "id" : "2104f013-1118-47d8-8718-e09f18fcc47a", + "name" : "view-authorization", + "description" : "${role_view-authorization}", + "composite" : false, + "clientRole" : true, + "containerId" : "04d0e12e-d4e7-4a35-9285-18134fa60742", + "attributes" : { } + }, { + "id" : "5bae4bfe-90bd-4079-a873-bab6f3b4d494", + "name" : "view-clients", + "description" : "${role_view-clients}", + "composite" : true, + "composites" : { + "client" : { + "master-realm" : [ "query-clients" ] + } + }, + "clientRole" : true, + "containerId" : "04d0e12e-d4e7-4a35-9285-18134fa60742", + "attributes" : { } + }, { + "id" : "39b42be5-098a-4b1f-ba55-09d19d13bc72", + "name" : "manage-identity-providers", + "description" : "${role_manage-identity-providers}", + "composite" : false, + "clientRole" : true, + "containerId" : "04d0e12e-d4e7-4a35-9285-18134fa60742", + "attributes" : { } + } ], + "account" : [ { + "id" : "c547a7f5-d7d9-4f76-ad65-ecdc896294ed", + "name" : "delete-account", + "description" : "${role_delete-account}", + "composite" : false, + "clientRole" : true, + "containerId" : "7b979283-853c-494c-b0f8-2de9b104a45b", + "attributes" : { } + }, { + "id" : "5eabf0b5-3531-47be-9ffb-ef9351752fbc", + "name" : "manage-account", + "description" : "${role_manage-account}", + "composite" : true, + "composites" : { + "client" : { + "account" : [ "manage-account-links" ] + } + }, + "clientRole" : true, + "containerId" : "7b979283-853c-494c-b0f8-2de9b104a45b", + "attributes" : { } + }, { + "id" : "56b5248d-acdc-45bf-90b0-84ca2c154722", + "name" : "view-profile", + "description" : "${role_view-profile}", + "composite" : false, + "clientRole" : true, + "containerId" : "7b979283-853c-494c-b0f8-2de9b104a45b", + "attributes" : { } + }, { + "id" : "eb888ba0-8a6b-4434-88fa-a1916f0a840a", + "name" : "manage-consent", + "description" : "${role_manage-consent}", + "composite" : true, + "composites" : { + "client" : { + "account" : [ "view-consent" ] + } + }, + "clientRole" : true, + "containerId" : "7b979283-853c-494c-b0f8-2de9b104a45b", + "attributes" : { } + }, { + "id" : "7ee2dbee-daa6-47ab-8fd5-3d925127a071", + "name" : "view-groups", + "description" : "${role_view-groups}", + "composite" : false, + "clientRole" : true, + "containerId" : "7b979283-853c-494c-b0f8-2de9b104a45b", + "attributes" : { } + }, { + "id" : "8c757e70-9973-4a2f-b13c-8409b8181f1d", + "name" : "view-applications", + "description" : "${role_view-applications}", + "composite" : false, + "clientRole" : true, + "containerId" : "7b979283-853c-494c-b0f8-2de9b104a45b", + "attributes" : { } + }, { + "id" : "efb23159-7c91-43a9-bf98-86f0660a1595", + "name" : "manage-account-links", + "description" : "${role_manage-account-links}", + "composite" : false, + "clientRole" : true, + "containerId" : "7b979283-853c-494c-b0f8-2de9b104a45b", + "attributes" : { } + }, { + "id" : "181828f5-e613-4a27-ab12-a0cc84e1dd04", + "name" : "view-consent", + "description" : "${role_view-consent}", + "composite" : false, + "clientRole" : true, + "containerId" : "7b979283-853c-494c-b0f8-2de9b104a45b", + "attributes" : { } + } ] + } + }, + "groups" : [ ], + "defaultRole" : { + "id" : "eb3f24b6-ced1-417b-aedf-477b5e2b5f02", + "name" : "default-roles-master", + "description" : "${role_default-roles}", + "composite" : true, + "clientRole" : false, + "containerId" : "f6844ab2-2bd1-46f5-a899-70f4a8ef1ced" + }, + "requiredCredentials" : [ "password" ], + "otpPolicyType" : "totp", + "otpPolicyAlgorithm" : "HmacSHA1", + "otpPolicyInitialCounter" : 0, + "otpPolicyDigits" : 6, + "otpPolicyLookAheadWindow" : 1, + "otpPolicyPeriod" : 30, + "otpPolicyCodeReusable" : false, + "otpSupportedApplications" : [ "totpAppFreeOTPName", "totpAppGoogleName", "totpAppMicrosoftAuthenticatorName" ], + "localizationTexts" : { }, + "webAuthnPolicyRpEntityName" : "keycloak", + "webAuthnPolicySignatureAlgorithms" : [ "ES256" ], + "webAuthnPolicyRpId" : "", + "webAuthnPolicyAttestationConveyancePreference" : "not specified", + "webAuthnPolicyAuthenticatorAttachment" : "not specified", + "webAuthnPolicyRequireResidentKey" : "not specified", + "webAuthnPolicyUserVerificationRequirement" : "not specified", + "webAuthnPolicyCreateTimeout" : 0, + "webAuthnPolicyAvoidSameAuthenticatorRegister" : false, + "webAuthnPolicyAcceptableAaguids" : [ ], + "webAuthnPolicyExtraOrigins" : [ ], + "webAuthnPolicyPasswordlessRpEntityName" : "keycloak", + "webAuthnPolicyPasswordlessSignatureAlgorithms" : [ "ES256" ], + "webAuthnPolicyPasswordlessRpId" : "", + "webAuthnPolicyPasswordlessAttestationConveyancePreference" : "not specified", + "webAuthnPolicyPasswordlessAuthenticatorAttachment" : "not specified", + "webAuthnPolicyPasswordlessRequireResidentKey" : "not specified", + "webAuthnPolicyPasswordlessUserVerificationRequirement" : "not specified", + "webAuthnPolicyPasswordlessCreateTimeout" : 0, + "webAuthnPolicyPasswordlessAvoidSameAuthenticatorRegister" : false, + "webAuthnPolicyPasswordlessAcceptableAaguids" : [ ], + "webAuthnPolicyPasswordlessExtraOrigins" : [ ], + "users" : [ { + "id" : "99252a4f-4766-4a50-9396-351d8007e7b3", + "username" : "admin", + "emailVerified" : false, + "createdTimestamp" : 1714084872886, + "enabled" : true, + "totp" : false, + "credentials" : [ { + "id" : "d2b29267-d15a-4076-b6dd-d431a45f05d1", + "type" : "password", + "createdDate" : 1714084873225, + "secretData" : "{\"value\":\"XpQnwbGl6wR1tANKjgTkKbaJqJrD69Z6h4spHEVpDqG/reT8OumSILDjx9LB3S8lVPBEUr3ON3trOw0qYNAUFA==\",\"salt\":\"BiopVuWSjKWB9Q+V64EzWQ==\",\"additionalParameters\":{}}", + "credentialData" : "{\"hashIterations\":210000,\"algorithm\":\"pbkdf2-sha512\",\"additionalParameters\":{}}" + } ], + "disableableCredentialTypes" : [ ], + "requiredActions" : [ ], + "realmRoles" : [ "default-roles-master", "admin" ], + "notBefore" : 0, + "groups" : [ ] + } ], + "scopeMappings" : [ { + "clientScope" : "offline_access", + "roles" : [ "offline_access" ] + } ], + "clientScopeMappings" : { + "account" : [ { + "client" : "account-console", + "roles" : [ "manage-account", "view-groups" ] + } ] + }, + "clients" : [ { + "id" : "7b979283-853c-494c-b0f8-2de9b104a45b", + "clientId" : "account", + "name" : "${client_account}", + "rootUrl" : "${authBaseUrl}", + "baseUrl" : "/realms/master/account/", + "surrogateAuthRequired" : false, + "enabled" : true, + "alwaysDisplayInConsole" : false, + "clientAuthenticatorType" : "client-secret", + "redirectUris" : [ "/realms/master/account/*" ], + "webOrigins" : [ ], + "notBefore" : 0, + "bearerOnly" : false, + "consentRequired" : false, + "standardFlowEnabled" : true, + "implicitFlowEnabled" : false, + "directAccessGrantsEnabled" : false, + "serviceAccountsEnabled" : false, + "publicClient" : true, + "frontchannelLogout" : false, + "protocol" : "openid-connect", + "attributes" : { + "post.logout.redirect.uris" : "+" + }, + "authenticationFlowBindingOverrides" : { }, + "fullScopeAllowed" : false, + "nodeReRegistrationTimeout" : 0, + "defaultClientScopes" : [ "web-origins", "acr", "profile", "roles", "email" ], + "optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ] + }, { + "id" : "d3eb17ed-3bc9-44f9-b0c2-86bdcfde1f2c", + "clientId" : "account-console", + "name" : "${client_account-console}", + "rootUrl" : "${authBaseUrl}", + "baseUrl" : "/realms/master/account/", + "surrogateAuthRequired" : false, + "enabled" : true, + "alwaysDisplayInConsole" : false, + "clientAuthenticatorType" : "client-secret", + "redirectUris" : [ "/realms/master/account/*" ], + "webOrigins" : [ ], + "notBefore" : 0, + "bearerOnly" : false, + "consentRequired" : false, + "standardFlowEnabled" : true, + "implicitFlowEnabled" : false, + "directAccessGrantsEnabled" : false, + "serviceAccountsEnabled" : false, + "publicClient" : true, + "frontchannelLogout" : false, + "protocol" : "openid-connect", + "attributes" : { + "post.logout.redirect.uris" : "+", + "pkce.code.challenge.method" : "S256" + }, + "authenticationFlowBindingOverrides" : { }, + "fullScopeAllowed" : false, + "nodeReRegistrationTimeout" : 0, + "protocolMappers" : [ { + "id" : "c690d0e6-9dc7-4d4c-8cdf-4e8c6b9f0205", + "name" : "audience resolve", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-audience-resolve-mapper", + "consentRequired" : false, + "config" : { } + } ], + "defaultClientScopes" : [ "web-origins", "acr", "profile", "roles", "email" ], + "optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ] + }, { + "id" : "042f592d-0c93-48c0-afd5-340253636665", + "clientId" : "admin-cli", + "name" : "${client_admin-cli}", + "surrogateAuthRequired" : false, + "enabled" : true, + "alwaysDisplayInConsole" : false, + "clientAuthenticatorType" : "client-secret", + "redirectUris" : [ ], + "webOrigins" : [ ], + "notBefore" : 0, + "bearerOnly" : false, + "consentRequired" : false, + "standardFlowEnabled" : false, + "implicitFlowEnabled" : false, + "directAccessGrantsEnabled" : true, + "serviceAccountsEnabled" : false, + "publicClient" : true, + "frontchannelLogout" : false, + "protocol" : "openid-connect", + "attributes" : { }, + "authenticationFlowBindingOverrides" : { }, + "fullScopeAllowed" : false, + "nodeReRegistrationTimeout" : 0, + "defaultClientScopes" : [ "web-origins", "acr", "profile", "roles", "email" ], + "optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ] + }, { + "id" : "8b8be563-25c3-4b98-be78-325d6e481062", + "clientId" : "broker", + "name" : "${client_broker}", + "surrogateAuthRequired" : false, + "enabled" : true, + "alwaysDisplayInConsole" : false, + "clientAuthenticatorType" : "client-secret", + "redirectUris" : [ ], + "webOrigins" : [ ], + "notBefore" : 0, + "bearerOnly" : true, + "consentRequired" : false, + "standardFlowEnabled" : true, + "implicitFlowEnabled" : false, + "directAccessGrantsEnabled" : false, + "serviceAccountsEnabled" : false, + "publicClient" : false, + "frontchannelLogout" : false, + "protocol" : "openid-connect", + "attributes" : { }, + "authenticationFlowBindingOverrides" : { }, + "fullScopeAllowed" : false, + "nodeReRegistrationTimeout" : 0, + "defaultClientScopes" : [ "web-origins", "acr", "profile", "roles", "email" ], + "optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ] + }, { + "id" : "04d0e12e-d4e7-4a35-9285-18134fa60742", + "clientId" : "master-realm", + "name" : "master Realm", + "surrogateAuthRequired" : false, + "enabled" : true, + "alwaysDisplayInConsole" : false, + "clientAuthenticatorType" : "client-secret", + "redirectUris" : [ ], + "webOrigins" : [ ], + "notBefore" : 0, + "bearerOnly" : true, + "consentRequired" : false, + "standardFlowEnabled" : true, + "implicitFlowEnabled" : false, + "directAccessGrantsEnabled" : false, + "serviceAccountsEnabled" : false, + "publicClient" : false, + "frontchannelLogout" : false, + "attributes" : { }, + "authenticationFlowBindingOverrides" : { }, + "fullScopeAllowed" : false, + "nodeReRegistrationTimeout" : 0, + "defaultClientScopes" : [ "web-origins", "acr", "profile", "roles", "email" ], + "optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ] + }, { + "id" : "3156fc25-0a1b-42bc-a21c-760b907f6829", + "clientId" : "security-admin-console", + "name" : "${client_security-admin-console}", + "rootUrl" : "${authAdminUrl}", + "baseUrl" : "/admin/master/console/", + "surrogateAuthRequired" : false, + "enabled" : true, + "alwaysDisplayInConsole" : false, + "clientAuthenticatorType" : "client-secret", + "redirectUris" : [ "/admin/master/console/*" ], + "webOrigins" : [ "+" ], + "notBefore" : 0, + "bearerOnly" : false, + "consentRequired" : false, + "standardFlowEnabled" : true, + "implicitFlowEnabled" : false, + "directAccessGrantsEnabled" : false, + "serviceAccountsEnabled" : false, + "publicClient" : true, + "frontchannelLogout" : false, + "protocol" : "openid-connect", + "attributes" : { + "post.logout.redirect.uris" : "+", + "pkce.code.challenge.method" : "S256" + }, + "authenticationFlowBindingOverrides" : { }, + "fullScopeAllowed" : false, + "nodeReRegistrationTimeout" : 0, + "protocolMappers" : [ { + "id" : "6a3a832f-a336-4250-b583-bd0857b3f1c4", + "name" : "locale", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "locale", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "locale", + "jsonType.label" : "String" + } + } ], + "defaultClientScopes" : [ "web-origins", "acr", "profile", "roles", "email" ], + "optionalClientScopes" : [ "address", "phone", "offline_access", "microprofile-jwt" ] + }, { + "id" : "f43df650-3430-4824-8e3d-b09b21e0d42c", + "clientId" : "sqlpage_demo-realm", + "name" : "sqlpage_demo Realm", + "surrogateAuthRequired" : false, + "enabled" : true, + "alwaysDisplayInConsole" : false, + "clientAuthenticatorType" : "client-secret", + "redirectUris" : [ ], + "webOrigins" : [ ], + "notBefore" : 0, + "bearerOnly" : true, + "consentRequired" : false, + "standardFlowEnabled" : true, + "implicitFlowEnabled" : false, + "directAccessGrantsEnabled" : false, + "serviceAccountsEnabled" : false, + "publicClient" : false, + "frontchannelLogout" : false, + "attributes" : { }, + "authenticationFlowBindingOverrides" : { }, + "fullScopeAllowed" : false, + "nodeReRegistrationTimeout" : 0, + "defaultClientScopes" : [ ], + "optionalClientScopes" : [ ] + } ], + "clientScopes" : [ { + "id" : "7389b445-eab8-44a1-b393-a3a1ef79a9fb", + "name" : "address", + "description" : "OpenID Connect built-in scope: address", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "true", + "display.on.consent.screen" : "true", + "consent.screen.text" : "${addressScopeConsentText}" + }, + "protocolMappers" : [ { + "id" : "7e540bc3-ccb2-41d2-8073-c4d7e952f53c", + "name" : "address", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-address-mapper", + "consentRequired" : false, + "config" : { + "user.attribute.formatted" : "formatted", + "user.attribute.country" : "country", + "introspection.token.claim" : "true", + "user.attribute.postal_code" : "postal_code", + "userinfo.token.claim" : "true", + "user.attribute.street" : "street", + "id.token.claim" : "true", + "user.attribute.region" : "region", + "access.token.claim" : "true", + "user.attribute.locality" : "locality" + } + } ] + }, { + "id" : "2e6f9b4d-f9e0-457b-bbc5-94d2ca43c73b", + "name" : "web-origins", + "description" : "OpenID Connect scope for add allowed web origins to the access token", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "false", + "display.on.consent.screen" : "false", + "consent.screen.text" : "" + }, + "protocolMappers" : [ { + "id" : "3a131073-3bd1-43ad-8e08-3329da57c721", + "name" : "allowed web origins", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-allowed-origins-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "access.token.claim" : "true" + } + } ] + }, { + "id" : "5e888df3-75ed-4bc6-8209-6c304d20c6de", + "name" : "profile", + "description" : "OpenID Connect built-in scope: profile", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "true", + "display.on.consent.screen" : "true", + "consent.screen.text" : "${profileScopeConsentText}" + }, + "protocolMappers" : [ { + "id" : "9d7d8e62-2cd3-4d58-bb52-79efcd41c06e", + "name" : "family name", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "lastName", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "family_name", + "jsonType.label" : "String" + } + }, { + "id" : "b172a872-78ef-4786-8c49-588bc4c48d33", + "name" : "locale", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "locale", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "locale", + "jsonType.label" : "String" + } + }, { + "id" : "bc61b202-2747-4531-b2b9-d878e1af7de9", + "name" : "username", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "username", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "preferred_username", + "jsonType.label" : "String" + } + }, { + "id" : "c950f9dc-5fdc-4e81-a8b5-dc419e08c974", + "name" : "updated at", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "updatedAt", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "updated_at", + "jsonType.label" : "long" + } + }, { + "id" : "4311eff7-6dd0-4a4a-a8c3-93ad33537ad7", + "name" : "picture", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "picture", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "picture", + "jsonType.label" : "String" + } + }, { + "id" : "aaa5f509-7811-4497-bc2f-1a579e318990", + "name" : "given name", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "firstName", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "given_name", + "jsonType.label" : "String" + } + }, { + "id" : "e693b725-a081-499e-870d-ee99cd9a8ed5", + "name" : "zoneinfo", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "zoneinfo", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "zoneinfo", + "jsonType.label" : "String" + } + }, { + "id" : "84c3fabb-b581-484a-9d3d-0fc1b02d98f1", + "name" : "profile", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "profile", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "profile", + "jsonType.label" : "String" + } + }, { + "id" : "47642c77-fbc5-4bde-8f81-c0bf4a0b147a", + "name" : "birthdate", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "birthdate", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "birthdate", + "jsonType.label" : "String" + } + }, { + "id" : "d347cfa1-ab75-4a20-b464-db7a02e3b3e2", + "name" : "nickname", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "nickname", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "nickname", + "jsonType.label" : "String" + } + }, { + "id" : "4626a925-eebf-4407-ad4b-c8252fe930ff", + "name" : "full name", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-full-name-mapper", + "consentRequired" : false, + "config" : { + "id.token.claim" : "true", + "introspection.token.claim" : "true", + "access.token.claim" : "true", + "userinfo.token.claim" : "true" + } + }, { + "id" : "e576c26d-f98c-42fe-a4c8-d51da43776bb", + "name" : "website", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "website", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "website", + "jsonType.label" : "String" + } + }, { + "id" : "15892301-c18a-4ee9-9ba7-c1817a355878", + "name" : "middle name", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "middleName", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "middle_name", + "jsonType.label" : "String" + } + }, { + "id" : "8c428084-5a27-411a-bc01-d5ea2a1c47b8", + "name" : "gender", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "gender", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "gender", + "jsonType.label" : "String" + } + } ] + }, { + "id" : "12f9f392-c2d5-4796-8740-08c4e96eb100", + "name" : "offline_access", + "description" : "OpenID Connect built-in scope: offline_access", + "protocol" : "openid-connect", + "attributes" : { + "consent.screen.text" : "${offlineAccessScopeConsentText}", + "display.on.consent.screen" : "true" + } + }, { + "id" : "cd54aaf7-9fcf-46f7-9381-43dbc4395cd2", + "name" : "role_list", + "description" : "SAML role list", + "protocol" : "saml", + "attributes" : { + "consent.screen.text" : "${samlRoleListScopeConsentText}", + "display.on.consent.screen" : "true" + }, + "protocolMappers" : [ { + "id" : "98d32646-cd91-4063-908f-9b995626826d", + "name" : "role list", + "protocol" : "saml", + "protocolMapper" : "saml-role-list-mapper", + "consentRequired" : false, + "config" : { + "single" : "false", + "attribute.nameformat" : "Basic", + "attribute.name" : "Role" + } + } ] + }, { + "id" : "fcf9ea74-7631-4a18-900f-eaa5a16becfe", + "name" : "acr", + "description" : "OpenID Connect scope for add acr (authentication context class reference) to the token", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "false", + "display.on.consent.screen" : "false" + }, + "protocolMappers" : [ { + "id" : "b08702be-7fd0-441a-9d30-ea941d8e0c3e", + "name" : "acr loa level", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-acr-mapper", + "consentRequired" : false, + "config" : { + "id.token.claim" : "true", + "introspection.token.claim" : "true", + "access.token.claim" : "true" + } + } ] + }, { + "id" : "b533d6c5-7892-4a9d-905e-8f0a18308c2d", + "name" : "email", + "description" : "OpenID Connect built-in scope: email", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "true", + "display.on.consent.screen" : "true", + "consent.screen.text" : "${emailScopeConsentText}" + }, + "protocolMappers" : [ { + "id" : "62372a20-a23e-41a3-8766-84689d113778", + "name" : "email", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "email", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "email", + "jsonType.label" : "String" + } + }, { + "id" : "d70776c8-278c-4b12-a184-fd4d9d360772", + "name" : "email verified", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-property-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "emailVerified", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "email_verified", + "jsonType.label" : "boolean" + } + } ] + }, { + "id" : "e1e30325-b870-4562-93d0-e1df93fe3035", + "name" : "phone", + "description" : "OpenID Connect built-in scope: phone", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "true", + "display.on.consent.screen" : "true", + "consent.screen.text" : "${phoneScopeConsentText}" + }, + "protocolMappers" : [ { + "id" : "c079dca4-04a9-49c4-984e-ee9dfd2992b2", + "name" : "phone number", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "phoneNumber", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "phone_number", + "jsonType.label" : "String" + } + }, { + "id" : "0e7df248-4d86-41cf-9b95-1ceb6045812d", + "name" : "phone number verified", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "phoneNumberVerified", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "phone_number_verified", + "jsonType.label" : "boolean" + } + } ] + }, { + "id" : "aabaa19c-f3ed-402e-9262-c59c053229d5", + "name" : "roles", + "description" : "OpenID Connect scope for add user roles to the access token", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "false", + "display.on.consent.screen" : "true", + "consent.screen.text" : "${rolesScopeConsentText}" + }, + "protocolMappers" : [ { + "id" : "9891c11a-c469-4557-b1e1-209ee4a0ce38", + "name" : "realm roles", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-realm-role-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "multivalued" : "true", + "user.attribute" : "foo", + "access.token.claim" : "true", + "claim.name" : "realm_access.roles", + "jsonType.label" : "String" + } + }, { + "id" : "869511ad-c0b8-4c08-8a26-66b41bff4a43", + "name" : "audience resolve", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-audience-resolve-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "access.token.claim" : "true" + } + }, { + "id" : "a3aae002-6408-4797-9089-2f0d36d5f650", + "name" : "client roles", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-client-role-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "multivalued" : "true", + "user.attribute" : "foo", + "access.token.claim" : "true", + "claim.name" : "resource_access.${client_id}.roles", + "jsonType.label" : "String" + } + } ] + }, { + "id" : "f261d81b-e0f5-4201-be8d-bcd61205a431", + "name" : "microprofile-jwt", + "description" : "Microprofile - JWT built-in scope", + "protocol" : "openid-connect", + "attributes" : { + "include.in.token.scope" : "true", + "display.on.consent.screen" : "false" + }, + "protocolMappers" : [ { + "id" : "db2b3453-10cd-4c5f-b203-0569431dfa40", + "name" : "upn", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-attribute-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "userinfo.token.claim" : "true", + "user.attribute" : "username", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "upn", + "jsonType.label" : "String" + } + }, { + "id" : "80610610-1e1a-44c6-9605-60515e1cb1c6", + "name" : "groups", + "protocol" : "openid-connect", + "protocolMapper" : "oidc-usermodel-realm-role-mapper", + "consentRequired" : false, + "config" : { + "introspection.token.claim" : "true", + "multivalued" : "true", + "user.attribute" : "foo", + "id.token.claim" : "true", + "access.token.claim" : "true", + "claim.name" : "groups", + "jsonType.label" : "String" + } + } ] + } ], + "defaultDefaultClientScopes" : [ "role_list", "profile", "email", "roles", "web-origins", "acr" ], + "defaultOptionalClientScopes" : [ "offline_access", "address", "phone", "microprofile-jwt" ], + "browserSecurityHeaders" : { + "contentSecurityPolicyReportOnly" : "", + "xContentTypeOptions" : "nosniff", + "referrerPolicy" : "no-referrer", + "xRobotsTag" : "none", + "xFrameOptions" : "SAMEORIGIN", + "xXSSProtection" : "1; mode=block", + "contentSecurityPolicy" : "frame-src 'self'; frame-ancestors 'self'; object-src 'none';", + "strictTransportSecurity" : "max-age=31536000; includeSubDomains" + }, + "smtpServer" : { }, + "eventsEnabled" : false, + "eventsListeners" : [ "jboss-logging" ], + "enabledEventTypes" : [ ], + "adminEventsEnabled" : false, + "adminEventsDetailsEnabled" : false, + "identityProviders" : [ ], + "identityProviderMappers" : [ ], + "components" : { + "org.keycloak.services.clientregistration.policy.ClientRegistrationPolicy" : [ { + "id" : "fc1beac7-416a-48ce-a413-506d21c8fa2e", + "name" : "Allowed Client Scopes", + "providerId" : "allowed-client-templates", + "subType" : "authenticated", + "subComponents" : { }, + "config" : { + "allow-default-scopes" : [ "true" ] + } + }, { + "id" : "845108d9-531f-4ec3-a39a-70f668bb21aa", + "name" : "Trusted Hosts", + "providerId" : "trusted-hosts", + "subType" : "anonymous", + "subComponents" : { }, + "config" : { + "host-sending-registration-request-must-match" : [ "true" ], + "client-uris-must-match" : [ "true" ] + } + }, { + "id" : "f35f51dd-7082-4e24-9a3e-9b54caf61af2", + "name" : "Full Scope Disabled", + "providerId" : "scope", + "subType" : "anonymous", + "subComponents" : { }, + "config" : { } + }, { + "id" : "96f9d1f4-0b8f-474a-bd7c-108273d2de40", + "name" : "Allowed Protocol Mapper Types", + "providerId" : "allowed-protocol-mappers", + "subType" : "anonymous", + "subComponents" : { }, + "config" : { + "allowed-protocol-mapper-types" : [ "saml-user-attribute-mapper", "oidc-full-name-mapper", "saml-role-list-mapper", "oidc-usermodel-attribute-mapper", "oidc-sha256-pairwise-sub-mapper", "saml-user-property-mapper", "oidc-usermodel-property-mapper", "oidc-address-mapper" ] + } + }, { + "id" : "c7e0444c-869d-49f3-895a-238d0d7fe68d", + "name" : "Consent Required", + "providerId" : "consent-required", + "subType" : "anonymous", + "subComponents" : { }, + "config" : { } + }, { + "id" : "cdc8777c-56d3-450f-9465-e407baf3b5e7", + "name" : "Allowed Client Scopes", + "providerId" : "allowed-client-templates", + "subType" : "anonymous", + "subComponents" : { }, + "config" : { + "allow-default-scopes" : [ "true" ] + } + }, { + "id" : "134a63a1-ddb4-443a-8526-21afc99ad3f4", + "name" : "Allowed Protocol Mapper Types", + "providerId" : "allowed-protocol-mappers", + "subType" : "authenticated", + "subComponents" : { }, + "config" : { + "allowed-protocol-mapper-types" : [ "oidc-usermodel-attribute-mapper", "oidc-usermodel-property-mapper", "oidc-address-mapper", "saml-user-property-mapper", "oidc-full-name-mapper", "saml-user-attribute-mapper", "oidc-sha256-pairwise-sub-mapper", "saml-role-list-mapper" ] + } + }, { + "id" : "fe0cb69b-309e-4e71-84f4-09c12b9f10d7", + "name" : "Max Clients Limit", + "providerId" : "max-clients", + "subType" : "anonymous", + "subComponents" : { }, + "config" : { + "max-clients" : [ "200" ] + } + } ], + "org.keycloak.userprofile.UserProfileProvider" : [ { + "id" : "49e609af-404c-47fa-9626-82eb0550640e", + "providerId" : "declarative-user-profile", + "subComponents" : { }, + "config" : { + "kc.user.profile.config" : [ "{\"attributes\":[{\"name\":\"username\",\"displayName\":\"${username}\",\"validations\":{\"length\":{\"min\":3,\"max\":255},\"username-prohibited-characters\":{},\"up-username-not-idn-homograph\":{}},\"permissions\":{\"view\":[\"admin\",\"user\"],\"edit\":[\"admin\",\"user\"]},\"multivalued\":false},{\"name\":\"email\",\"displayName\":\"${email}\",\"validations\":{\"email\":{},\"length\":{\"max\":255}},\"permissions\":{\"view\":[\"admin\",\"user\"],\"edit\":[\"admin\",\"user\"]},\"multivalued\":false},{\"name\":\"firstName\",\"displayName\":\"${firstName}\",\"validations\":{\"length\":{\"max\":255},\"person-name-prohibited-characters\":{}},\"permissions\":{\"view\":[\"admin\",\"user\"],\"edit\":[\"admin\",\"user\"]},\"multivalued\":false},{\"name\":\"lastName\",\"displayName\":\"${lastName}\",\"validations\":{\"length\":{\"max\":255},\"person-name-prohibited-characters\":{}},\"permissions\":{\"view\":[\"admin\",\"user\"],\"edit\":[\"admin\",\"user\"]},\"multivalued\":false}],\"groups\":[{\"name\":\"user-metadata\",\"displayHeader\":\"User metadata\",\"displayDescription\":\"Attributes, which refer to user metadata\"}]}" ] + } + } ], + "org.keycloak.keys.KeyProvider" : [ { + "id" : "b7b7dc71-7f67-4539-86ff-386584354b8b", + "name" : "rsa-generated", + "providerId" : "rsa-generated", + "subComponents" : { }, + "config" : { + "privateKey" : [ "MIIEowIBAAKCAQEA322kgd04yaw1xs3BYNrNaQPIZKMJ4TLB5cOUQTKTIzGCbY6/Thdhu/7SMTJYa6IA9yKhj1J3/aJAdUq9u7dYRWsD3ZN1BpLnRGw1wp+4Nq0wJRR8YAiu+fS1vQSnlMAx/lidLn+LRvM8/SlWclI1tY76sgKITxtZSDCUNmTEkciqCfAz3XX1AabqYEDMEE7+d94RypO560UstOHpDbZWyNR8O8eociRhsHtfoi23YqNtgrFi+JWnWnq2M09xK0SNlLm9cb9JfG7FEv60vqQZ63T64KERGziSQnkSXgMC2u7gBdW6MNnA8czx9DKRsKGvF2S0vDlD9h04ZNy9KdhHiwIDAQABAoIBACHn+CqTAU6tmR2Z1OpXWgvBPLR0/4dS1hUBqKp6O9T/6uyoWITHzJekdI5ttvhiheX7NexTlg0CBekm1gM6MCWct2H1QjGksn7yMvhdl62Ie8FsyfEi8DbTeY79OVc8EXopRXUsetziBdPfZZSEwEzUrVu9QaVLn7FyWdOlWCVNN0LmCBXpPbivdJrQsWUHYEcPX6jzNuCC1zO3zlwXLz89gIsQCa4DLEbmZ4Lii88F8M9icQH/qV6Jm0V4SXbNBUWIRFySgcU4ykdA6wDBLhNohfWoCSbEt4mMZLf8te5j2NZLD4haaac+SkKWrFrJ9Zr/om62zVsrtddVB76CmqUCgYEA+ky80O/f1xGHUg/z8rJ7vW8tUJptA7P3ptAnsXHzcwFuoOwNENPDG2KJANnLqGQel1gJzKsJ/z+om+TNU8kogjZ+Smz39fX9Wl2NJPjFOFZHZ5i4zhQfmIv7g4UHnUcYAiB/SZAtfVTJ5M7JP1tW9swNHE6B3r+wMnAGCGf0AD8CgYEA5IQ+KL5ezDOcIcKD2cXLzqVQ8ZJNWjbl85WM0n2KgoVrSyAlWAaoXKHeSECnLdrjTsb4CojiqYc5/tb+n0rNV3R71Bbj6jc9Fjpfzp0HaeNckU6gJ8YYBy5aFL0etu1UxQBazrKdg8ejqGOQI7FYCxAym8DC6Y6VqrgH1Fb1JbUCgYAOhUkm7eOUfIXXMum6GLSpBrwgQvU0E8q4OLc0yiGPeHPMjiUr5r0Y55x/GiOAf15u9UKMRxfrYOwNLzbiN3dMJpEpDC1ObZjnFypLDMuUOx0lW2zNN8mldel/dcY9T5SK+wunXt/kt3iG96AhNtFSu/++tqc+Huy/4FPZRP6YzQKBgFfVVKcIdRt8AtkfENrVof6toC0aFM1GKKC1rMkDJAgDDDh2BKSO+ouQVAXlg9ymM5SF+bTi5GxQ48PGE1xavg6NYUMmATh3Pu2aRlT+Gmli0KOxWvGuvHGWKV2rS3D4TArklgK4uL58L7V7f12YvsSR10Hyl3h6K6DQ14GQYu25AoGBAMy7weDailIzreI+BTBP+T81E1izvLZVrf3AtBt8pQyLaSNTvyPGo9SIwP1qoi8IcHLTbVCrXTEl7BKWeTF3Un8fsXDnhpKvzZAL4PpRJsIfP57OeyGdisNtmCBh5ikO6Bej3KkrTnbj+EJrCR7ICNXA6Y6ia+HEbUYoMjWfgURw" ], + "keyUse" : [ "SIG" ], + "certificate" : [ "MIICmzCCAYMCBgGPF2t8qDANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDDAZtYXN0ZXIwHhcNMjQwNDI1MjIzOTMxWhcNMzQwNDI1MjI0MTExWjARMQ8wDQYDVQQDDAZtYXN0ZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDfbaSB3TjJrDXGzcFg2s1pA8hkownhMsHlw5RBMpMjMYJtjr9OF2G7/tIxMlhrogD3IqGPUnf9okB1Sr27t1hFawPdk3UGkudEbDXCn7g2rTAlFHxgCK759LW9BKeUwDH+WJ0uf4tG8zz9KVZyUjW1jvqyAohPG1lIMJQ2ZMSRyKoJ8DPddfUBpupgQMwQTv533hHKk7nrRSy04ekNtlbI1Hw7x6hyJGGwe1+iLbdio22CsWL4ladaerYzT3ErRI2Uub1xv0l8bsUS/rS+pBnrdPrgoREbOJJCeRJeAwLa7uAF1bow2cDxzPH0MpGwoa8XZLS8OUP2HThk3L0p2EeLAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAFjkzSzIMVB24dImmJNsN61hxxEJFsgX/4zViVOOV6qYVTSnHBYSyUC+XfmNBgU2yi0xDDvGU3JLVUPUhMYpfy706RiVsy5ho441c2N8ezaVA13BwddfD3/Nx8KIuGahORUWzJKPYU0eeL7ySteH1yKU54TnpelxRv1sH8XfhYCtddcDuSeIG0547MJhtJ89KDGPfJHPTD/KSX9+Gbs16CVgl1QBblsja3JS1Zk2MiUNGhYAzAKs2JYDvN3OF+TLjmItQWki+lUTYJiaclGccD+KdySLx8qN6cxT2OpATZLV3SBdCJvsgtzuVeo1NM3drRWnwyNsFHnmoA8OKwCbaTs=" ], + "priority" : [ "100" ] + } + }, { + "id" : "341673e6-7476-41f1-8d9d-e653c1f2e4d2", + "name" : "aes-generated", + "providerId" : "aes-generated", + "subComponents" : { }, + "config" : { + "kid" : [ "57165862-8466-45bc-af2c-606e9aef48a1" ], + "secret" : [ "Ex4gxm8sJVo6rZmNfhKbfA" ], + "priority" : [ "100" ] + } + }, { + "id" : "a62fa3d5-8186-43a1-8e36-f9a6e1eb7473", + "name" : "rsa-enc-generated", + "providerId" : "rsa-enc-generated", + "subComponents" : { }, + "config" : { + "privateKey" : [ "MIIEowIBAAKCAQEA71JxNCPf/FIP1kT9d4bIB/bB63wTBJ62KfJM0XRAiae/FhNioC00Z3r4sVNgPU9QLzdmCF6mDezgLsBmwc+SvMwxtkG9CA51vc38g8DRM3yMPZvWSBMPQP0awat3FK8k1BSb+Y5FB0o47R4dvzOlpgDYbNTz6jJOUXbwoUw6MQHohcB4XYEHVjcdjBx0pxO/TF9ARmsQ1a2SrYmL3x4SoUbrVGsYsQjFbBnuG1pklw6Xctqmhp86nYfLmak8qAwpuQJNOBI1KNbAS4AZtV2VsBruU24eafReYIcD7z4wQ8XPuxffKrT9CmgcvYuDQBXv/LvN1vfQqkBB0WV7l74v1QIDAQABAoIBAC+XvI166Os7woyA8csYUaVLzCqxZPLRQTa8ScyJiuAVLOoN9toVw0sk6FoTU5s9r5uEL9VQRUOVrMt/VbALQIotLWGqVxZIEeAqG6Jz8OaFSTpjSEzTBYCOFQkYuTiyz+chJheN1Gprt0Bocc/5TGLj3iZefxc+49ZNifL5vsTJ0uD66ax30TYo90nT9vfu3NsM9rf75UZL38ZJAD1t8FtIeGAg7uCNzCB1QUpIykZ1+TccgrgQq60w9UiUYjkp7Y4pfQlhKyDs6y3KnE0GoHWCbJBES6dxUzofGW3hDoBiC5O9AerpThWD7EtsXFQ4QHWOs1RnukuqZWV+5nwhBi0CgYEA/ljXYirUsMHbp5Vn7uPkiKdIspbqJquvZvs+zKIMDBO5PH0mjh4kmBMsbqGY3NxzcABdWxpJ6He+kxtH7dMohM4s2i95fM8a5Xdm35Nz5pMl38e+XlaRsB/tFkAri2QYVt0aBrt0MZe0/XW2+V+WWem1mRRbmahr42Nueyd4tVMCgYEA8OCaixowZpGko8Yf2lM+1VaAkXpCrq7U8JbWFImI8faayotsFNjYLo9oiw3Wu6ib1Asx+Bu2iVNxNpPqLizTU6ylGvqlekxWM/3DqatfQRLN7XlN0IqOfWSPaK9vveO7nZBBQ9xXxsbUAeOA3dtNJpZo0Dpjg1R4rTy3JP4ZeTcCgYEA37jpixG9j9SVDy1eBEU0ifcK/Pu97lHpsR2iOYD4M89NiiVTOoLNEW8cEBvYR70pVQUdGLtg8zgQy3idplWsOFTaIvjLVbseH2UNee9LbS9Viyc5DeX7s/4BHydGpg9fUVieQfm01MJqkt9uGJ+5slDeSU4c3GXGsHaPgYhQpr0CgYABcNZ7zoRLmMNrV1wJakYN8J6EQD713IXZio1tQgVXrSnv3DWhSkrAvIrbihGmvbNw6UA7Q68r0xvyP6A+9nWtInM6XhVvTdWWKgZplWTUdtBUg0072hhQF7Hj5mi8sggFQT+isEa2IapS+JFkwlML0AqAdFj0CCVQo/RUfFCasQKBgBybXwcY3K7tZllxYhJHN1iGJAFjaEKfWl8OunZT6eedTF8HsEPfhZ8zErOVy71lkk6v4gZEyS1UjNHL7YBYi7tSH13jTcSvaMQkEDUr4FY0oTyG2J4ryvy+Z8+mndDDieFAdDOVIf2rXSq+4h0SFrtfsqghFNJq/xO/w3HKKml7" ], + "keyUse" : [ "ENC" ], + "certificate" : [ "MIICmzCCAYMCBgGPF2t9cTANBgkqhkiG9w0BAQsFADARMQ8wDQYDVQQDDAZtYXN0ZXIwHhcNMjQwNDI1MjIzOTMxWhcNMzQwNDI1MjI0MTExWjARMQ8wDQYDVQQDDAZtYXN0ZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDvUnE0I9/8Ug/WRP13hsgH9sHrfBMEnrYp8kzRdECJp78WE2KgLTRnevixU2A9T1AvN2YIXqYN7OAuwGbBz5K8zDG2Qb0IDnW9zfyDwNEzfIw9m9ZIEw9A/RrBq3cUryTUFJv5jkUHSjjtHh2/M6WmANhs1PPqMk5RdvChTDoxAeiFwHhdgQdWNx2MHHSnE79MX0BGaxDVrZKtiYvfHhKhRutUaxixCMVsGe4bWmSXDpdy2qaGnzqdh8uZqTyoDCm5Ak04EjUo1sBLgBm1XZWwGu5Tbh5p9F5ghwPvPjBDxc+7F98qtP0KaBy9i4NAFe/8u83W99CqQEHRZXuXvi/VAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAAUlDhdqHzoX5No3IV6g/NvojB4kRtd0LIRq5fjO+RwVuhNJayZxkCUCj8q4u3VfC6lJ2OG9fb1pYXAsFv/eKXQZy4hwdR02kINqar2CMIMfKQLMHCuVhcQ2TH2u71xg1/9gDYQW8nQOm1MtEmMZP2CtYt9VoNVhYHipG+BNUyDe6Jlr+Sdaw6cM0Nf4ul1IP1w5Ma7rygbVJC+BBXxYcDbhYaMLwfNZ/6jIK76EHn45E4M+2f5aiks0LVEckWMLy/DUF9IVglVbL05qvHgXnR9VZStPItneiKqx2dfTGhq+zEuY9JG4m8sdeLZJecsrYsex8WRZ1ptolYjbp7Lnea4=" ], + "priority" : [ "100" ], + "algorithm" : [ "RSA-OAEP" ] + } + }, { + "id" : "1584b448-90c9-427c-92db-76a4818898bc", + "name" : "hmac-generated-hs512", + "providerId" : "hmac-generated", + "subComponents" : { }, + "config" : { + "kid" : [ "8b962dcc-4cd4-49dd-80d5-a4725443bc32" ], + "secret" : [ "bhPlUJSw1m1JE5o-QyX_Yh1gWuHn966sMA9N3lJdYnhy4SZ-FPcIu08MmUfPM1KvnK47JKivPZNqj2J60xj77Yb1dV-iQ8W6uMJgobzCtt_C6MMOXsCmxIIeRglqzNR3sOnYZyXr2jsShD_aXfM8zYGFmynYqE3pM0MvG9RYLJs" ], + "priority" : [ "100" ], + "algorithm" : [ "HS512" ] + } + } ] + }, + "internationalizationEnabled" : false, + "supportedLocales" : [ ], + "authenticationFlows" : [ { + "id" : "855d7e3c-b589-4cec-a359-0753e2d4f86f", + "alias" : "Account verification options", + "description" : "Method with which to verity the existing account", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "idp-email-verification", + "authenticatorFlow" : false, + "requirement" : "ALTERNATIVE", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "ALTERNATIVE", + "priority" : 20, + "autheticatorFlow" : true, + "flowAlias" : "Verify Existing Account by Re-authentication", + "userSetupAllowed" : false + } ] + }, { + "id" : "d6fc3837-a41a-447d-bcb3-03a466b2c419", + "alias" : "Browser - Conditional OTP", + "description" : "Flow to determine if the OTP is required for the authentication", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "conditional-user-configured", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "auth-otp-form", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + } ] + }, { + "id" : "e8bd7fec-5d8c-4020-9771-2993bfd1e0a0", + "alias" : "Direct Grant - Conditional OTP", + "description" : "Flow to determine if the OTP is required for the authentication", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "conditional-user-configured", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "direct-grant-validate-otp", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + } ] + }, { + "id" : "154d2ebd-d3df-4729-a026-f60ed5325ba6", + "alias" : "First broker login - Conditional OTP", + "description" : "Flow to determine if the OTP is required for the authentication", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "conditional-user-configured", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "auth-otp-form", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + } ] + }, { + "id" : "9fdabddf-3c58-4da5-a5ff-c718f2737923", + "alias" : "Handle Existing Account", + "description" : "Handle what to do if there is existing account with same email/username like authenticated identity provider", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "idp-confirm-link", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : true, + "flowAlias" : "Account verification options", + "userSetupAllowed" : false + } ] + }, { + "id" : "8f058c67-e34a-4e70-afae-f58bfd8f5b88", + "alias" : "Reset - Conditional OTP", + "description" : "Flow to determine if the OTP should be reset or not. Set to REQUIRED to force.", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "conditional-user-configured", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "reset-otp", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + } ] + }, { + "id" : "d3b3bb01-3964-4497-ad16-878ae8b44d71", + "alias" : "User creation or linking", + "description" : "Flow for the existing/non-existing user alternatives", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticatorConfig" : "create unique user config", + "authenticator" : "idp-create-user-if-unique", + "authenticatorFlow" : false, + "requirement" : "ALTERNATIVE", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "ALTERNATIVE", + "priority" : 20, + "autheticatorFlow" : true, + "flowAlias" : "Handle Existing Account", + "userSetupAllowed" : false + } ] + }, { + "id" : "9b4b4132-b185-4935-9a6d-e70ed7bcd8e5", + "alias" : "Verify Existing Account by Re-authentication", + "description" : "Reauthentication of existing account", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "idp-username-password-form", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "CONDITIONAL", + "priority" : 20, + "autheticatorFlow" : true, + "flowAlias" : "First broker login - Conditional OTP", + "userSetupAllowed" : false + } ] + }, { + "id" : "5e6a47c3-ca2c-40b4-a70a-ab022b7cbbcb", + "alias" : "browser", + "description" : "browser based authentication", + "providerId" : "basic-flow", + "topLevel" : true, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "auth-cookie", + "authenticatorFlow" : false, + "requirement" : "ALTERNATIVE", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "auth-spnego", + "authenticatorFlow" : false, + "requirement" : "DISABLED", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "identity-provider-redirector", + "authenticatorFlow" : false, + "requirement" : "ALTERNATIVE", + "priority" : 25, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "ALTERNATIVE", + "priority" : 30, + "autheticatorFlow" : true, + "flowAlias" : "forms", + "userSetupAllowed" : false + } ] + }, { + "id" : "570a3dcf-0bb3-4cb9-9499-ace30a022d96", + "alias" : "clients", + "description" : "Base authentication for clients", + "providerId" : "client-flow", + "topLevel" : true, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "client-secret", + "authenticatorFlow" : false, + "requirement" : "ALTERNATIVE", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "client-jwt", + "authenticatorFlow" : false, + "requirement" : "ALTERNATIVE", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "client-secret-jwt", + "authenticatorFlow" : false, + "requirement" : "ALTERNATIVE", + "priority" : 30, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "client-x509", + "authenticatorFlow" : false, + "requirement" : "ALTERNATIVE", + "priority" : 40, + "autheticatorFlow" : false, + "userSetupAllowed" : false + } ] + }, { + "id" : "54203619-30a5-4625-928c-94c60c20a9d5", + "alias" : "direct grant", + "description" : "OpenID Connect Resource Owner Grant", + "providerId" : "basic-flow", + "topLevel" : true, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "direct-grant-validate-username", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "direct-grant-validate-password", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "CONDITIONAL", + "priority" : 30, + "autheticatorFlow" : true, + "flowAlias" : "Direct Grant - Conditional OTP", + "userSetupAllowed" : false + } ] + }, { + "id" : "52a9ea67-b61e-4265-817f-d0f88aa0ac84", + "alias" : "docker auth", + "description" : "Used by Docker clients to authenticate against the IDP", + "providerId" : "basic-flow", + "topLevel" : true, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "docker-http-basic-authenticator", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + } ] + }, { + "id" : "33b51681-e751-418c-b3b6-8193f5071048", + "alias" : "first broker login", + "description" : "Actions taken after first broker login with identity provider account, which is not yet linked to any Keycloak account", + "providerId" : "basic-flow", + "topLevel" : true, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticatorConfig" : "review profile config", + "authenticator" : "idp-review-profile", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : true, + "flowAlias" : "User creation or linking", + "userSetupAllowed" : false + } ] + }, { + "id" : "a137f512-41d9-4ebd-8e23-069a18bae5af", + "alias" : "forms", + "description" : "Username, password, otp and other auth forms.", + "providerId" : "basic-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "auth-username-password-form", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "CONDITIONAL", + "priority" : 20, + "autheticatorFlow" : true, + "flowAlias" : "Browser - Conditional OTP", + "userSetupAllowed" : false + } ] + }, { + "id" : "963af825-c010-436b-a158-389b9d2cb9f3", + "alias" : "registration", + "description" : "registration flow", + "providerId" : "basic-flow", + "topLevel" : true, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "registration-page-form", + "authenticatorFlow" : true, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : true, + "flowAlias" : "registration form", + "userSetupAllowed" : false + } ] + }, { + "id" : "3445d10d-719a-494f-aec4-72de47634d05", + "alias" : "registration form", + "description" : "registration form", + "providerId" : "form-flow", + "topLevel" : false, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "registration-user-creation", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "registration-password-action", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 50, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "registration-recaptcha-action", + "authenticatorFlow" : false, + "requirement" : "DISABLED", + "priority" : 60, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "registration-terms-and-conditions", + "authenticatorFlow" : false, + "requirement" : "DISABLED", + "priority" : 70, + "autheticatorFlow" : false, + "userSetupAllowed" : false + } ] + }, { + "id" : "1217bac2-e3d4-4b36-a882-572f2c7d625e", + "alias" : "reset credentials", + "description" : "Reset credentials for a user if they forgot their password or something", + "providerId" : "basic-flow", + "topLevel" : true, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "reset-credentials-choose-user", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "reset-credential-email", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 20, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticator" : "reset-password", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 30, + "autheticatorFlow" : false, + "userSetupAllowed" : false + }, { + "authenticatorFlow" : true, + "requirement" : "CONDITIONAL", + "priority" : 40, + "autheticatorFlow" : true, + "flowAlias" : "Reset - Conditional OTP", + "userSetupAllowed" : false + } ] + }, { + "id" : "76dbec74-5388-4fc8-b12e-0038d3b40b7d", + "alias" : "saml ecp", + "description" : "SAML ECP Profile Authentication Flow", + "providerId" : "basic-flow", + "topLevel" : true, + "builtIn" : true, + "authenticationExecutions" : [ { + "authenticator" : "http-basic-authenticator", + "authenticatorFlow" : false, + "requirement" : "REQUIRED", + "priority" : 10, + "autheticatorFlow" : false, + "userSetupAllowed" : false + } ] + } ], + "authenticatorConfig" : [ { + "id" : "075f779a-d3d6-42ec-afb7-49238bf3cdb3", + "alias" : "create unique user config", + "config" : { + "require.password.update.after.registration" : "false" + } + }, { + "id" : "5a9f9728-344c-4aac-8185-20b88e98c333", + "alias" : "review profile config", + "config" : { + "update.profile.on.first.login" : "missing" + } + } ], + "requiredActions" : [ { + "alias" : "CONFIGURE_TOTP", + "name" : "Configure OTP", + "providerId" : "CONFIGURE_TOTP", + "enabled" : true, + "defaultAction" : false, + "priority" : 10, + "config" : { } + }, { + "alias" : "TERMS_AND_CONDITIONS", + "name" : "Terms and Conditions", + "providerId" : "TERMS_AND_CONDITIONS", + "enabled" : false, + "defaultAction" : false, + "priority" : 20, + "config" : { } + }, { + "alias" : "UPDATE_PASSWORD", + "name" : "Update Password", + "providerId" : "UPDATE_PASSWORD", + "enabled" : true, + "defaultAction" : false, + "priority" : 30, + "config" : { } + }, { + "alias" : "UPDATE_PROFILE", + "name" : "Update Profile", + "providerId" : "UPDATE_PROFILE", + "enabled" : true, + "defaultAction" : false, + "priority" : 40, + "config" : { } + }, { + "alias" : "VERIFY_EMAIL", + "name" : "Verify Email", + "providerId" : "VERIFY_EMAIL", + "enabled" : true, + "defaultAction" : false, + "priority" : 50, + "config" : { } + }, { + "alias" : "delete_account", + "name" : "Delete Account", + "providerId" : "delete_account", + "enabled" : false, + "defaultAction" : false, + "priority" : 60, + "config" : { } + }, { + "alias" : "webauthn-register", + "name" : "Webauthn Register", + "providerId" : "webauthn-register", + "enabled" : true, + "defaultAction" : false, + "priority" : 70, + "config" : { } + }, { + "alias" : "webauthn-register-passwordless", + "name" : "Webauthn Register Passwordless", + "providerId" : "webauthn-register-passwordless", + "enabled" : true, + "defaultAction" : false, + "priority" : 80, + "config" : { } + }, { + "alias" : "VERIFY_PROFILE", + "name" : "Verify Profile", + "providerId" : "VERIFY_PROFILE", + "enabled" : true, + "defaultAction" : false, + "priority" : 90, + "config" : { } + }, { + "alias" : "delete_credential", + "name" : "Delete Credential", + "providerId" : "delete_credential", + "enabled" : true, + "defaultAction" : false, + "priority" : 100, + "config" : { } + }, { + "alias" : "update_user_locale", + "name" : "Update User Locale", + "providerId" : "update_user_locale", + "enabled" : true, + "defaultAction" : false, + "priority" : 1000, + "config" : { } + } ], + "browserFlow" : "browser", + "registrationFlow" : "registration", + "directGrantFlow" : "direct grant", + "resetCredentialsFlow" : "reset credentials", + "clientAuthenticationFlow" : "clients", + "dockerAuthenticationFlow" : "docker auth", + "firstBrokerLoginFlow" : "first broker login", + "attributes" : { + "cibaBackchannelTokenDeliveryMode" : "poll", + "cibaExpiresIn" : "120", + "cibaAuthRequestedUserHint" : "login_hint", + "parRequestUriLifespan" : "60", + "cibaInterval" : "5", + "realmReusableOtpCode" : "false" + }, + "keycloakVersion" : "24.0.3", + "userManagedAccessAllowed" : false, + "clientProfiles" : { + "profiles" : [ ] + }, + "clientPolicies" : { + "policies" : [ ] + } +} ] \ No newline at end of file diff --git a/examples/single sign on with openid connect/oidc_login.sql b/examples/single sign on with openid connect/oidc_login.sql new file mode 100644 index 00000000..120a17d8 --- /dev/null +++ b/examples/single sign on with openid connect/oidc_login.sql @@ -0,0 +1,13 @@ +set $oauth_state = sqlpage.random_string(32); + +SELECT 'cookie' as component, 'oauth_state' as name, $oauth_state as value; + +select 'redirect' as component, + 'http://localhost:8181/realms/sqlpage_demo/protocol/openid-connect/auth' -- replace this with the URL of your OpenID Connect provider + || '?response_type=code' + || '&client_id=' || sqlpage.url_encode(sqlpage.environment_variable('OIDC_CLIENT_ID')) + || '&redirect_uri=http://localhost:8080/oidc_redirect_handler.sql' -- replace this with the URL of your application + || '&state=' || $oauth_state + || '&scope=openid+profile+email' + || '&nonce=' || sqlpage.random_string(32) + as link; \ No newline at end of file diff --git a/examples/single sign on with openid connect/oidc_logout.sql b/examples/single sign on with openid connect/oidc_logout.sql new file mode 100644 index 00000000..32add62c --- /dev/null +++ b/examples/single sign on with openid connect/oidc_logout.sql @@ -0,0 +1,10 @@ +-- remove the session cookie +select 'cookie' as component, 'session_id' as name, true as remove; +-- remove the session from the database +delete from user_sessions + where session_id = sqlpage.cookie('session_id'); +-- redirect the user to the oidc provider to logout +select 'redirect' as component, + 'http://localhost:8181/realms/sqlpage_demo/protocol/openid-connect/logout' -- replace this with the logout URL of your OpenID Connect provider + || '?redirect_url=http://localhost:8080/' -- replace this with the URL of your application + as link; \ No newline at end of file diff --git a/examples/single sign on with openid connect/oidc_redirect_handler.sql b/examples/single sign on with openid connect/oidc_redirect_handler.sql new file mode 100644 index 00000000..064c07e2 --- /dev/null +++ b/examples/single sign on with openid connect/oidc_redirect_handler.sql @@ -0,0 +1,50 @@ +-- If the oauth_state cookie does not match the state parameter in the query string, then the request is invalid (CSRF attack) +-- and we should redirect the user to the login page. +select 'redirect' as component, '/oidc_login.sql' as link + where sqlpage.cookie('oauth_state') != $state; + +-- Exchange the authorization code for an access token +set $authorization_code_request = json_object( + 'url', 'http://keycloak:8181/realms/sqlpage_demo/protocol/openid-connect/token', -- replace this with the URL of your OpenID Connect provider + 'method', 'POST', + 'headers', json_object( + 'Content-Type', 'application/x-www-form-urlencoded' + ), + 'body', 'grant_type=authorization_code' + || '&code=' || $code + || '&redirect_uri=http://localhost:8080/oidc_redirect_handler.sql' -- replace this with the URL of your application + || '&client_id=' || sqlpage.environment_variable('OIDC_CLIENT_ID') + || '&client_secret=' || sqlpage.environment_variable('OIDC_CLIENT_SECRET') +); +set $access_token = sqlpage.fetch($authorization_code_request); + +-- Redirect the user to the login page if the access token could not be obtained +select 'redirect' as component, '/oidc_login.sql' as link + where $access_token is null or $access_token->>'error' is not null; + +-- At this point we have $access_token which contains {"access_token":"eyJ...", "scope":"openid profile email" } + +-- Fetch the user's profile +set $profile_request = json_object( + 'url', 'http://keycloak:8181/realms/sqlpage_demo/protocol/openid-connect/userinfo', -- replace this with the URL of your OpenID Connect provider + 'method', 'GET', + 'headers', json_object( + 'Authorization', 'Bearer ' || ($access_token->>'access_token') + ) +); +set $user_profile = sqlpage.fetch($profile_request); + +-- Redirect the user to the login page if the user's profile could not be obtained +select 'redirect' as component, '/oidc_login.sql' as link + where $user_profile is null or $user_profile->>'error' is not null; + +-- at this point we have $user_profile which contains {"sub":"0cc01234","email_verified":false,"name":"John Smith","preferred_username":"demo","given_name":"John","family_name":"Smith","email":"demo@example.com"} + +-- Now we have a valid access token, we can create a session for the user +-- in our database +insert into user_sessions(session_id, user_id, email) + values(sqlpage.random_string(32), $user_profile->>'sub', $user_profile->>'email') -- you can get additional information like 'name', 'given_name', 'family_name', 'email_verified', 'preferred_username', 'picture' from the user profile + returning 'cookie' as component, 'session_id' as name, session_id as value; + +-- Redirect the user to the home page +select 'redirect' as component, '/' as link; \ No newline at end of file diff --git a/examples/single sign on with openid connect/sqlpage/migrations/000_sessions.sql b/examples/single sign on with openid connect/sqlpage/migrations/000_sessions.sql new file mode 100644 index 00000000..56ce3444 --- /dev/null +++ b/examples/single sign on with openid connect/sqlpage/migrations/000_sessions.sql @@ -0,0 +1,7 @@ +-- Table to store user sessions +CREATE TABLE user_sessions( + session_id TEXT PRIMARY KEY, + user_id TEXT NOT NULL, + email TEXT NOT NULL, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP +) \ No newline at end of file