diff --git a/.gitignore b/.gitignore index 92a43e0..4d3ea5b 100644 --- a/.gitignore +++ b/.gitignore @@ -33,5 +33,8 @@ Session.vim # Chart dependencies **/charts/*.tgz +/charts/**/Chart.lock .history + +/local-development/*.tgz diff --git a/.travis.yml b/.travis.yml index 9923d99..28fb01d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,8 +8,9 @@ env: - APPNAME="hyperspace" - ORG="fairspace" - ARTIFACT_BUILD_FILE="" - - BUILD_SCRIPTS_REPO="fairspace/build-scripts" - - DEPLOYMENT_CONFIG_DIR="./.travis" + - BUILD_SCRIPTS_REPO="fairspace/fairspace-build-scripts" + - DEPLOYMENT_CONFIG_REPO="fairspace/fairspace-config-priv" + - ACCOUNT_CONFIG_DIR="./.travis" - RELEASE_BRANCH="release" - SNAPSHOT_BRANCH="dev" - GCP_PROJECT="fairspace-207108" @@ -26,7 +27,7 @@ env: - secure: "vXd6WTtZ5wO5hXi2Tm9lgSDWXkf8MyZ+zkSKr0DNXRqBFPPGpifzhB8qN1qRYVLD8UsdrFwU4q53kxqlmWd6/P9dQkFuFpkouZkax4LRoP7QhRbxcLUcbcqEui4pA579uAIynu61q+furr+4Yl6RcTTG6nE9T43eofgGQqf0haVRM9hYeeMXjHGBNPooHJepGxFqpMBSN/+nb3MoB9dOzqc+dvj99Z5BLiAnl5t9ZCHcqTaLlZpwhWY+vR5WyEj7D2mkAiswXmRCOB7n0z2dN/mxDvMLtXAM7pfmmpQUoZYI8bGUc2zBnzKb5slSvvVG4vgZKx0Tv8RDQnpj7geLmIoiWYfz4wGolp1kn4tvjIA5pSx/xXxpOAX/dVAM9hvtOYt48Unr76UzpQm1e3+2DYIZdf0jz5n9V3H2ZqYY81UWFI8nSTmvaO/dw3GtLiPts/+FAHPsXVAkUFmDf0AGrIXIQ7P31pLgtXwXMslr7HkDUDmdN3PMHn30QhJWsaFe+MWXKnqNjCgIfflHpmAVBkbjsKWG1wpsNUHB66rq3U9UPCXpxu1XVpJLxT5QfVXR8p10s4YBvhwHHqhBDbMETTCYz4Q5T7YwgWIU0JTwCut+OMmW4rR3IAwmgIF0Pnr64y+fZL+qNXSJp/W/wrN84ZoGFGBflSnaCIhK7dm+paA=" # GITHUB_PASSWORD=.... - - secure: "JGk+4XeLruK1LMZ4zJcmX4k4T7nR7DVwPcl/IaPNKaR2+MdiN2Wi5gAXrsXDDKIs4fJzHtRBK1K+VNam4K8vwb5aOX0MnYDoHPZc3ye+UYUXLlTeoozSmfMy08zGaNtz+GjP+QSzvFcRMlhFRLjJ+Cae+Rwpt9gldSLhc04VPGBCMmnHAIg86m2PFqfEfm3Kjy7HkvrPYkAN8JvMRzSjXfBi0JmDjSFuXS0mcp/UOUZLtTzfASpaApijbkp2iposBfN83TbkmnZ/DbZULHtXcKB+mZWADRsh7vyIQQQLVkRWx3HcQSJKSEyCazYoINBufKXDek8v6EbPpIupwF8MVIZTL+vZKXteaNVkcad69ZD3iBhSje8M41ev1Q+m68z6+0IFm6xwajVPL02P3P64zaqWShrG8MLwNiZ7bYmZnziik+fKLGG0/ABiiTxVbUD4qW7XHzbdDNPSE4D9xTuKg+A2naydSNAdozKZLQUNK4/sk5S4xj5Ot0An3Jt9lHKMb/ayqn2b42MfvO3b6cW2pbJTd6f79z2O3bSjL0tNAWbkLrtQLnEPcr0d/CDPBnjWWk4N+1kcOaYqd6/KegkgxXCXSwDnbEhDp/GlEKiIvGo/F3JduqMnVZFfEK8IBIL0pm1z3T7Kvv2Fq5hE19TUB22dlExwudM1nDu8UUFjuig=" + - secure: "dD7Fd1fyxJKMqN1aPjQPDlIYhSw8gMiKXFUImA013eAXaLmhGq7yc823evqpalx01+Ih8lrlE7Cg8NcXCcZw6RVaOAt44o3TbqrWOODnQ9epexEgB/yvbkmYoCfMY/cB3zfTOzNkUxMV4kHJ73MoC67bGKWyla+hdBu9iNLCVtPR38I87fj0CaSPmyaXEuOfEu/U0ADd6MeNEr1G+18rDze1LJt2fwORh+GXGa5ZdqTT0y/a0RvCIvfmmWMjhq0QOJubhjDlmK//r8hcRohz3R0NWi+8lxoytJa7A2MP2l4bFLZHDPFrbPFZ6IDgvG1Rh+ROOq8IDNVf1a8c0ct+fXwTTIwfQohq2k0Kl9BpUYdJVTR139N329QYQz1d8+WEjt9ywIdCJG0zDiZlOw/I12Tr9Rb+xVrFkDBCk/uEHzlhnSsq1H6WE/F5VDMi4GOhgxZyzV0Bk8Inl0sgHJO2QNVJyRZ6XKba5wcKAcxVxHWKXR/2WEQsdbgyCweXfAunYKFVWb7zHNv9w3Gt3Q99kE2HewscMiO5UfXGEAJgTOnKD7KpqE3NtB55R9Hk0qXCYs77DxV5BX41+K2lFMOaaWiJZaLl6QgrWTvhOSPGg/HqUpEdtEyqJpu0214cCYyIXev0Ouu5GP5EttZC055LpchBwh3mU+ccrZbxQs0ymx8=" cache: directories: @@ -35,10 +36,12 @@ cache: before_install: - nvm install $NODE_VERSION - - export KUBE_CONFIG_ENC_KEY=$encrypted_985abdf32880_key - - export KUBE_CONFIG_ENC_IV=$encrypted_985abdf32880_iv + - export KUBE_CONFIG_ENC_KEY=$encrypted_6c9f30024cb1_key + - export KUBE_CONFIG_ENC_IV=$encrypted_6c9f30024cb1_iv - git clone https://$GITHUB_USERNAME:$GITHUB_PASSWORD@github.com/$BUILD_SCRIPTS_REPO ci - export BUILD_SCRIPTS_DIR=$(pwd)/ci + - git clone https://$GITHUB_USERNAME:$GITHUB_PASSWORD@github.com/$DEPLOYMENT_CONFIG_REPO ci-config + - export DEPLOYMENT_CONFIG_DIR="$(pwd)/ci-config/fairspace-keycloak" - 'if [[ "$TRAVIS_BRANCH" = "$SNAPSHOT_BRANCH" ]]; then export ALLOW_SNAPSHOTS=1 DEPLOY_TARGET=ci KUBERNETES_CONTEXT="$SNAPSHOT_CONTEXT" DEPLOY_PLATFORM="GCP" KUBERNETES_CONTEXT="$SNAPSHOT_CONTEXT" CLUSTER_NAME="$SNAPSHOT_CLUSTER_NAME" CLUSTER_ZONE="$SNAPSHOT_CLUSTER_ZONE"; fi' - 'if [[ "$TRAVIS_BRANCH" = "$RELEASE_BRANCH" ]]; then export DEPLOY_TARGET=test KUBERNETES_CONTEXT="$RELEASE_CONTEXT" CLUSTER_NAME="$RELEASE_CLUSTER_NAME" DEPLOY_PLATFORM="GCP" CLUSTER_ZONE="$RELEASE_CLUSTER_ZONE"; fi' - source ./ci/setup_env.sh diff --git a/.travis/ci-service-account.json.enc b/.travis/ci-service-account.json.enc index bc27381..ff0f6bf 100644 Binary files a/.travis/ci-service-account.json.enc and b/.travis/ci-service-account.json.enc differ diff --git a/.travis/test-values.yaml b/.travis/test-values.yaml deleted file mode 100644 index e694186..0000000 --- a/.travis/test-values.yaml +++ /dev/null @@ -1,19 +0,0 @@ -hyperspace: - name: test - ingress: - domain: keycloak.test.fairway.app - tls: - certificate: - force: true - -# Set passwords to prevent having a new password at every upgrade -keycloak: - postgresql: - postgresPassword: "9FGwLKpEu$4w/knG" - extraEnv: | - - name: KEYCLOAK_USER - value: keycloak - - name: KEYCLOAK_PASSWORD - value: keycloak-ci-123 - - name: PROXY_ADDRESS_FORWARDING - value: "true" diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..a492044 --- /dev/null +++ b/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2021 The Hyve B.V. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0.txt + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md index 4f84efe..6c0f319 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# A Helm chart for VRE hyperspace +# Fairspace Keycloak helm chart This repository contains the helm chart to install and setup Keycloak. @@ -7,3 +7,15 @@ See [charts/hyperspace](charts/hyperspace/README.md) for more information. # Deployment scripts Deployment scripts can be found in the [build-scripts](https://github.com/fairspace/build-scripts) repository. They are run by travis-ci, as setup in the `.travis.yml` file. + +# License + +Copyright (c) 2021 The Hyve B.V. + +This program is free software: you can redistribute it and/or modify it under the terms of the Apache 2.0 +License published by the Apache Software Foundation, either version 2.0 of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty +of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Apache 2.0 License for more details. + +You should have received a copy of the Apache 2.0 License along with this program (see [LICENSE](LICENSE)). If not, see https://www.apache.org/licenses/LICENSE-2.0.txt. diff --git a/VERSION b/VERSION index 844f6a9..d2b13eb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.6.3 +0.6.4 diff --git a/charts/hyperspace/Chart.yaml b/charts/hyperspace/Chart.yaml index 85aa198..0dcf4d8 100644 --- a/charts/hyperspace/Chart.yaml +++ b/charts/hyperspace/Chart.yaml @@ -1,7 +1,13 @@ -apiVersion: v1 +apiVersion: v2 appVersion: "1.0" description: A Helm chart for Kubernetes name: hyperspace namespace: hyperspace icon: https://raw.githubusercontent.com/fairspace/hyperspace/dev/charts/hyperspace/logo.jpg version: 0.0.0-RELEASEVERSION + +dependencies: + - name: keycloak + version: ~10.0.0 + repository: https://codecentric.github.io/helm-charts + condition: keycloak.enabled diff --git a/charts/hyperspace/requirements.yaml b/charts/hyperspace/requirements.yaml deleted file mode 100644 index 7a6a335..0000000 --- a/charts/hyperspace/requirements.yaml +++ /dev/null @@ -1,5 +0,0 @@ -dependencies: -- name: keycloak - version: 10.0.0 - repository: https://codecentric.github.io/helm-charts - condition: keycloak.enabled diff --git a/charts/hyperspace/templates/_helpers.tpl b/charts/hyperspace/templates/_helpers.tpl index 1567bca..46c115e 100644 --- a/charts/hyperspace/templates/_helpers.tpl +++ b/charts/hyperspace/templates/_helpers.tpl @@ -31,6 +31,21 @@ Create chart name and version as used by the chart label. {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- end -}} +{{/* +Common labels +*/}} +{{- define "hyperspace.labels" -}} +chart: {{ include "hyperspace.chart" . }} +release: {{ .Release.Name }} +heritage: {{ .Release.Service }} +helm.sh/chart: {{ include "hyperspace.chart" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +app.kubernetes.io/release-name: {{ .Release.Name }} +{{- end }} + {{- define "keycloak.prefix" -}} {{- printf "%s-%s" .Release.Name "keycloak" | trunc 20 | trimSuffix "-" -}} {{- end -}} diff --git a/charts/hyperspace/templates/config/keycloak-config-map.yaml b/charts/hyperspace/templates/config/keycloak-config-map.yaml index 9cfa790..169a988 100644 --- a/charts/hyperspace/templates/config/keycloak-config-map.yaml +++ b/charts/hyperspace/templates/config/keycloak-config-map.yaml @@ -4,7 +4,5 @@ kind: ConfigMap metadata: name: "{{.Release.Name}}-keycloak-config-map" labels: - heritage: {{.Release.Service | quote }} - release: {{.Release.Name | quote }} - chart: "{{.Chart.Name}}-{{.Chart.Version}}" + {{- include "hyperspace.labels" . | nindent 4 }} {{- end -}} diff --git a/charts/hyperspace/templates/ingress/certificate.yaml b/charts/hyperspace/templates/ingress/certificate.yaml index 7c1210a..4b90e1e 100644 --- a/charts/hyperspace/templates/ingress/certificate.yaml +++ b/charts/hyperspace/templates/ingress/certificate.yaml @@ -8,9 +8,7 @@ metadata: name: {{ .Release.Name }}-hyperspace labels: app: {{ template "hyperspace.name" . }} - chart: {{ template "hyperspace.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} + {{- include "hyperspace.labels" . | nindent 4 }} spec: secretName: {{ template "hyperspace.tlsSecretName" . }} {{- with $ingress.tls.certificate.issuerRef }} diff --git a/charts/hyperspace/templates/ingress/keycloak-ingress.yaml b/charts/hyperspace/templates/ingress/keycloak-ingress.yaml index ec43b1c..7637d1f 100644 --- a/charts/hyperspace/templates/ingress/keycloak-ingress.yaml +++ b/charts/hyperspace/templates/ingress/keycloak-ingress.yaml @@ -11,11 +11,9 @@ metadata: {{- end }} labels: app: {{ template "hyperspace.name" . }} - chart: {{ template "hyperspace.chart" . }} - heritage: {{ .Release.Service }} - release: {{ .Release.Name }} + {{- include "hyperspace.labels" . | nindent 4 }} spec: -{{- if $ingress.tls }} +{{- if $ingress.tls.enabled }} tls: - hosts: - {{ $ingress.domain }} diff --git a/charts/hyperspace/values.yaml b/charts/hyperspace/values.yaml index c631219..7fe624f 100644 --- a/charts/hyperspace/values.yaml +++ b/charts/hyperspace/values.yaml @@ -8,6 +8,7 @@ hyperspace: domain: keycloak.ci.fairway.app annotations: kubernetes.io/ingress.class: nginx + nginx.ingress.kubernetes.io/proxy-buffer-size: "16k" nginx.ingress.kubernetes.io/configuration-snippet: | proxy_set_header X-Forwarded-Proto \$scheme; tls: diff --git a/local-development/README.md b/local-development/README.md new file mode 100644 index 0000000..68177b4 --- /dev/null +++ b/local-development/README.md @@ -0,0 +1,49 @@ +# Local development + +You can run the chart locally for testing. + +## Run Hyperspace using minikube + +Please check the [deploy.sh](deploy.sh) script. +It assumes Helm3 to be available in `~/bin/helm3/helm`. + +The ingress node will listen to http://keycloak.local, so make sure to add `$(minikube ip) keycloak.local` to `/etc/hosts`: +```shell +echo "$(minikube ip) keycloak.local" >> /etc/hosts +``` + +To start Hyperspace: +```shell +# Start minikube +minikube start +minikube addons enable ingress + +# Open kubernetes dashboard +minikube dashboard + +# Push images to minikube repository and start Keycloak +./deploy.sh +``` +The script creates the `hyperspace-dev` namespace where all other objects are created. + +Keycloak will be available at http://keycloak.local. Login with username `keycloak` and password `keycloak`. +Create a new realm named `fairspace`: +- Click _Add realm_: + + ![Add realm](screenshots/Add%20realm%20button.png) +- Click _Select file_ and import the file [fairspace-realm.json](fairspace-realm.json). + + ![Add realm page](screenshots/Add%20realm%20page.png) + +This should create the _fairspace_ realm and configure the _workspace-client_ client for Fairspace. +![Fairspace realm](screenshots/Realm%20created.png) + +You need to add users to the realm manually. Please create a user with username `organisation-admin-fairspace`. This user will have superadmin privileges, which allows you to assign privileges to other users in Fairspace (e.g., admin privilege). + +To shutdown Keycloak, use one of the following: +```shell +# Uninstall Hyperspace using Helm +helm uninstall hyperspace-local -n hyperspace-dev +# Delete hyperspace-dev namespace +kubectl delete ns hyperspace-dev +``` diff --git a/local-development/deploy.sh b/local-development/deploy.sh new file mode 100755 index 0000000..29a4da9 --- /dev/null +++ b/local-development/deploy.sh @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +here=$(realpath $(dirname "${0}")) +helm_cmd=$(realpath ~/bin/helm3/helm) + +# Prerequisites: +# $ minikube start +# $ minikube addons enable ingress + +pushd "${here}" + +(kubectl get ns hyperspace-dev || kubectl create ns hyperspace-dev) && \ +((${helm_cmd} repo list | cut -f1 | grep '^codecentric') || ${helm_cmd} repo add codecentric https://codecentric.github.io/helm-charts) && \ +${helm_cmd} dependency update ../charts/hyperspace && \ +${helm_cmd} package ../charts/hyperspace && \ +${helm_cmd} upgrade hyperspace-local --install --namespace hyperspace-dev hyperspace-0.0.0-RELEASEVERSION.tgz \ + -f local-values.yaml + +popd diff --git a/local-development/fairspace-realm.json b/local-development/fairspace-realm.json new file mode 100644 index 0000000..a9928eb --- /dev/null +++ b/local-development/fairspace-realm.json @@ -0,0 +1,2150 @@ +{ + "id": "fairspace", + "realm": "fairspace", + "displayName": "Fairspace (local environment)", + "displayNameHtml": "Local environment
Fairspace
", + "notBefore": 0, + "revokeRefreshToken": false, + "refreshTokenMaxReuse": 0, + "accessTokenLifespan": 300, + "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, + "enabled": true, + "sslRequired": "external", + "registrationAllowed": false, + "registrationEmailAsUsername": false, + "rememberMe": false, + "verifyEmail": false, + "loginWithEmailAllowed": true, + "duplicateEmailsAllowed": false, + "resetPasswordAllowed": false, + "editUsernameAllowed": false, + "bruteForceProtected": false, + "permanentLockout": false, + "maxFailureWaitSeconds": 900, + "minimumQuickLoginWaitSeconds": 60, + "waitIncrementSeconds": 60, + "quickLoginCheckMilliSeconds": 1000, + "maxDeltaTimeSeconds": 43200, + "failureFactor": 30, + "roles": { + "realm": [ + { + "id": "21b58310-c1b8-4def-99fd-7947730e8c09", + "name": "offline_access", + "description": "${role_offline-access}", + "composite": false, + "clientRole": false, + "containerId": "fairspace", + "attributes": {} + }, + { + "id": "e2653225-25d0-4119-ac3f-1af86886a7c6", + "name": "uma_authorization", + "description": "${role_uma_authorization}", + "composite": false, + "clientRole": false, + "containerId": "fairspace", + "attributes": {} + } + ], + "client": { + "realm-management": [ + { + "id": "8a3d19b0-c55c-4214-912d-ba7b8f6be931", + "name": "manage-authorization", + "description": "${role_manage-authorization}", + "composite": false, + "clientRole": true, + "containerId": "4d62b11b-c0bf-4222-9609-4a1618164e17", + "attributes": {} + }, + { + "id": "af529641-18f3-499a-abce-db11b5b9568f", + "name": "manage-realm", + "description": "${role_manage-realm}", + "composite": false, + "clientRole": true, + "containerId": "4d62b11b-c0bf-4222-9609-4a1618164e17", + "attributes": {} + }, + { + "id": "e3f139b9-593c-4c3f-8096-d915238253d5", + "name": "query-clients", + "description": "${role_query-clients}", + "composite": false, + "clientRole": true, + "containerId": "4d62b11b-c0bf-4222-9609-4a1618164e17", + "attributes": {} + }, + { + "id": "929bc876-c887-4053-a0d4-ed49dce0de52", + "name": "view-authorization", + "description": "${role_view-authorization}", + "composite": false, + "clientRole": true, + "containerId": "4d62b11b-c0bf-4222-9609-4a1618164e17", + "attributes": {} + }, + { + "id": "7442f710-69b5-4512-9fd1-3a0626efd664", + "name": "view-identity-providers", + "description": "${role_view-identity-providers}", + "composite": false, + "clientRole": true, + "containerId": "4d62b11b-c0bf-4222-9609-4a1618164e17", + "attributes": {} + }, + { + "id": "2e52b07f-0681-4cbe-9334-93e27c492cb7", + "name": "view-realm", + "description": "${role_view-realm}", + "composite": false, + "clientRole": true, + "containerId": "4d62b11b-c0bf-4222-9609-4a1618164e17", + "attributes": {} + }, + { + "id": "276a57f6-2fb2-4ecd-aa71-00194fa7cc69", + "name": "query-users", + "description": "${role_query-users}", + "composite": false, + "clientRole": true, + "containerId": "4d62b11b-c0bf-4222-9609-4a1618164e17", + "attributes": {} + }, + { + "id": "84e0a67e-d225-4d23-8185-535cbb480135", + "name": "view-users", + "description": "${role_view-users}", + "composite": true, + "composites": { + "client": { + "realm-management": [ + "query-users", + "query-groups" + ] + } + }, + "clientRole": true, + "containerId": "4d62b11b-c0bf-4222-9609-4a1618164e17", + "attributes": {} + }, + { + "id": "76ab10aa-f229-4f4b-8b12-13891c5a2135", + "name": "manage-identity-providers", + "description": "${role_manage-identity-providers}", + "composite": false, + "clientRole": true, + "containerId": "4d62b11b-c0bf-4222-9609-4a1618164e17", + "attributes": {} + }, + { + "id": "9663db84-b079-4c75-a532-a8e1df918c0b", + "name": "query-groups", + "description": "${role_query-groups}", + "composite": false, + "clientRole": true, + "containerId": "4d62b11b-c0bf-4222-9609-4a1618164e17", + "attributes": {} + }, + { + "id": "db48d841-de70-4175-9cdb-f6faf004b764", + "name": "create-client", + "description": "${role_create-client}", + "composite": false, + "clientRole": true, + "containerId": "4d62b11b-c0bf-4222-9609-4a1618164e17", + "attributes": {} + }, + { + "id": "7c232202-d44f-4bfd-8258-53f4652cd65c", + "name": "manage-users", + "description": "${role_manage-users}", + "composite": false, + "clientRole": true, + "containerId": "4d62b11b-c0bf-4222-9609-4a1618164e17", + "attributes": {} + }, + { + "id": "2beb6923-3011-47b4-91de-f6808199d9c9", + "name": "view-events", + "description": "${role_view-events}", + "composite": false, + "clientRole": true, + "containerId": "4d62b11b-c0bf-4222-9609-4a1618164e17", + "attributes": {} + }, + { + "id": "7362c73e-30f3-480c-b341-4c15abbfdae5", + "name": "realm-admin", + "description": "${role_realm-admin}", + "composite": true, + "composites": { + "client": { + "realm-management": [ + "view-authorization", + "manage-realm", + "manage-authorization", + "query-clients", + "view-identity-providers", + "view-realm", + "query-users", + "view-users", + "manage-identity-providers", + "query-groups", + "create-client", + "manage-users", + "view-events", + "manage-clients", + "view-clients", + "impersonation", + "manage-events", + "query-realms" + ] + } + }, + "clientRole": true, + "containerId": "4d62b11b-c0bf-4222-9609-4a1618164e17", + "attributes": {} + }, + { + "id": "7196f111-6820-427d-84a9-e51b81fd1d01", + "name": "manage-clients", + "description": "${role_manage-clients}", + "composite": false, + "clientRole": true, + "containerId": "4d62b11b-c0bf-4222-9609-4a1618164e17", + "attributes": {} + }, + { + "id": "9acce3da-6db3-4e53-a792-4717780abddb", + "name": "view-clients", + "description": "${role_view-clients}", + "composite": true, + "composites": { + "client": { + "realm-management": [ + "query-clients" + ] + } + }, + "clientRole": true, + "containerId": "4d62b11b-c0bf-4222-9609-4a1618164e17", + "attributes": {} + }, + { + "id": "6d014c90-ab18-4859-b752-102c019546eb", + "name": "impersonation", + "description": "${role_impersonation}", + "composite": false, + "clientRole": true, + "containerId": "4d62b11b-c0bf-4222-9609-4a1618164e17", + "attributes": {} + }, + { + "id": "71dcc4d8-1ea5-4b73-a577-aef4c843f26e", + "name": "manage-events", + "description": "${role_manage-events}", + "composite": false, + "clientRole": true, + "containerId": "4d62b11b-c0bf-4222-9609-4a1618164e17", + "attributes": {} + }, + { + "id": "b46a5c20-08bc-413a-94de-e4de8a6e14db", + "name": "query-realms", + "description": "${role_query-realms}", + "composite": false, + "clientRole": true, + "containerId": "4d62b11b-c0bf-4222-9609-4a1618164e17", + "attributes": {} + } + ], + "workspace-client": [], + "security-admin-console": [], + "admin-cli": [], + "account-console": [], + "broker": [ + { + "id": "2040f71c-5b47-47a2-9d01-267d7471441f", + "name": "read-token", + "description": "${role_read-token}", + "composite": false, + "clientRole": true, + "containerId": "20258f05-33eb-456d-85bc-2d529d2d9c2a", + "attributes": {} + } + ], + "account": [ + { + "id": "a870197b-e263-43b7-9b2f-297d1d8e0465", + "name": "view-profile", + "description": "${role_view-profile}", + "composite": false, + "clientRole": true, + "containerId": "39aa048a-9e79-491a-a04b-5ec2d978a0e9", + "attributes": {} + }, + { + "id": "a4bf8f52-e90d-435b-a803-3d67e87d99f8", + "name": "delete-account", + "description": "${role_delete-account}", + "composite": false, + "clientRole": true, + "containerId": "39aa048a-9e79-491a-a04b-5ec2d978a0e9", + "attributes": {} + }, + { + "id": "a6b11825-988e-4c48-86cc-c2a78ec525bc", + "name": "manage-account-links", + "description": "${role_manage-account-links}", + "composite": false, + "clientRole": true, + "containerId": "39aa048a-9e79-491a-a04b-5ec2d978a0e9", + "attributes": {} + }, + { + "id": "39d76b2f-1bfb-457b-84ba-4921dbb9b74c", + "name": "manage-account", + "description": "${role_manage-account}", + "composite": true, + "composites": { + "client": { + "account": [ + "manage-account-links" + ] + } + }, + "clientRole": true, + "containerId": "39aa048a-9e79-491a-a04b-5ec2d978a0e9", + "attributes": {} + }, + { + "id": "e296abb6-58c1-4bd2-b6a5-595ac69a66a3", + "name": "view-consent", + "description": "${role_view-consent}", + "composite": false, + "clientRole": true, + "containerId": "39aa048a-9e79-491a-a04b-5ec2d978a0e9", + "attributes": {} + }, + { + "id": "0c0478c5-c826-496b-8988-ef2777ec6b5a", + "name": "manage-consent", + "description": "${role_manage-consent}", + "composite": true, + "composites": { + "client": { + "account": [ + "view-consent" + ] + } + }, + "clientRole": true, + "containerId": "39aa048a-9e79-491a-a04b-5ec2d978a0e9", + "attributes": {} + }, + { + "id": "489af11e-e398-4571-b561-7b85cead31be", + "name": "view-applications", + "description": "${role_view-applications}", + "composite": false, + "clientRole": true, + "containerId": "39aa048a-9e79-491a-a04b-5ec2d978a0e9", + "attributes": {} + } + ] + } + }, + "groups": [], + "defaultRoles": [ + "offline_access", + "uma_authorization" + ], + "requiredCredentials": [ + "password" + ], + "otpPolicyType": "totp", + "otpPolicyAlgorithm": "HmacSHA1", + "otpPolicyInitialCounter": 0, + "otpPolicyDigits": 6, + "otpPolicyLookAheadWindow": 1, + "otpPolicyPeriod": 30, + "otpSupportedApplications": [ + "FreeOTP", + "Google Authenticator" + ], + "webAuthnPolicyRpEntityName": "keycloak", + "webAuthnPolicySignatureAlgorithms": [ + "ES256" + ], + "webAuthnPolicyRpId": "", + "webAuthnPolicyAttestationConveyancePreference": "not specified", + "webAuthnPolicyAuthenticatorAttachment": "not specified", + "webAuthnPolicyRequireResidentKey": "not specified", + "webAuthnPolicyUserVerificationRequirement": "not specified", + "webAuthnPolicyCreateTimeout": 0, + "webAuthnPolicyAvoidSameAuthenticatorRegister": false, + "webAuthnPolicyAcceptableAaguids": [], + "webAuthnPolicyPasswordlessRpEntityName": "keycloak", + "webAuthnPolicyPasswordlessSignatureAlgorithms": [ + "ES256" + ], + "webAuthnPolicyPasswordlessRpId": "", + "webAuthnPolicyPasswordlessAttestationConveyancePreference": "not specified", + "webAuthnPolicyPasswordlessAuthenticatorAttachment": "not specified", + "webAuthnPolicyPasswordlessRequireResidentKey": "not specified", + "webAuthnPolicyPasswordlessUserVerificationRequirement": "not specified", + "webAuthnPolicyPasswordlessCreateTimeout": 0, + "webAuthnPolicyPasswordlessAvoidSameAuthenticatorRegister": false, + "webAuthnPolicyPasswordlessAcceptableAaguids": [], + "users": [ + { + "id": "e942ef63-eac6-47be-8035-bc0795791e09", + "createdTimestamp": 1624998671567, + "username": "service-account-workspace-client", + "enabled": true, + "totp": false, + "emailVerified": false, + "serviceAccountClientId": "workspace-client", + "disableableCredentialTypes": [], + "requiredActions": [], + "realmRoles": [ + "offline_access", + "uma_authorization" + ], + "clientRoles": { + "realm-management": [ + "view-users" + ], + "account": [ + "view-profile", + "manage-account" + ] + }, + "notBefore": 0, + "groups": [] + } + ], + "scopeMappings": [ + { + "clientScope": "offline_access", + "roles": [ + "offline_access" + ] + } + ], + "clientScopeMappings": { + "account": [ + { + "client": "account-console", + "roles": [ + "manage-account" + ] + } + ] + }, + "clients": [ + { + "id": "39aa048a-9e79-491a-a04b-5ec2d978a0e9", + "clientId": "account", + "name": "${client_account}", + "rootUrl": "${authBaseUrl}", + "baseUrl": "/realms/fairspace/account/", + "surrogateAuthRequired": false, + "enabled": true, + "alwaysDisplayInConsole": false, + "clientAuthenticatorType": "client-secret", + "secret": "**********", + "defaultRoles": [ + "view-profile", + "manage-account" + ], + "redirectUris": [ + "/realms/fairspace/account/*" + ], + "webOrigins": [], + "notBefore": 0, + "bearerOnly": false, + "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", + "role_list", + "profile", + "roles", + "email" + ], + "optionalClientScopes": [ + "address", + "phone", + "offline_access", + "microprofile-jwt" + ] + }, + { + "id": "a5b48d3d-e103-4775-86e9-2f60441fad32", + "clientId": "account-console", + "name": "${client_account-console}", + "rootUrl": "${authBaseUrl}", + "baseUrl": "/realms/fairspace/account/", + "surrogateAuthRequired": false, + "enabled": true, + "alwaysDisplayInConsole": false, + "clientAuthenticatorType": "client-secret", + "secret": "**********", + "redirectUris": [ + "/realms/fairspace/account/*" + ], + "webOrigins": [], + "notBefore": 0, + "bearerOnly": false, + "consentRequired": false, + "standardFlowEnabled": true, + "implicitFlowEnabled": false, + "directAccessGrantsEnabled": false, + "serviceAccountsEnabled": false, + "publicClient": true, + "frontchannelLogout": false, + "protocol": "openid-connect", + "attributes": { + "pkce.code.challenge.method": "S256" + }, + "authenticationFlowBindingOverrides": {}, + "fullScopeAllowed": false, + "nodeReRegistrationTimeout": 0, + "protocolMappers": [ + { + "id": "e5f26864-d177-4b99-9117-1e6d68b0c231", + "name": "audience resolve", + "protocol": "openid-connect", + "protocolMapper": "oidc-audience-resolve-mapper", + "consentRequired": false, + "config": {} + } + ], + "defaultClientScopes": [ + "web-origins", + "role_list", + "profile", + "roles", + "email" + ], + "optionalClientScopes": [ + "address", + "phone", + "offline_access", + "microprofile-jwt" + ] + }, + { + "id": "f00ff3ca-d026-418e-bdcd-a461433dca1f", + "clientId": "admin-cli", + "name": "${client_admin-cli}", + "surrogateAuthRequired": false, + "enabled": true, + "alwaysDisplayInConsole": false, + "clientAuthenticatorType": "client-secret", + "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", + "role_list", + "profile", + "roles", + "email" + ], + "optionalClientScopes": [ + "address", + "phone", + "offline_access", + "microprofile-jwt" + ] + }, + { + "id": "20258f05-33eb-456d-85bc-2d529d2d9c2a", + "clientId": "broker", + "name": "${client_broker}", + "surrogateAuthRequired": false, + "enabled": true, + "alwaysDisplayInConsole": false, + "clientAuthenticatorType": "client-secret", + "secret": "**********", + "redirectUris": [], + "webOrigins": [], + "notBefore": 0, + "bearerOnly": false, + "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", + "role_list", + "profile", + "roles", + "email" + ], + "optionalClientScopes": [ + "address", + "phone", + "offline_access", + "microprofile-jwt" + ] + }, + { + "id": "4d62b11b-c0bf-4222-9609-4a1618164e17", + "clientId": "realm-management", + "name": "${client_realm-management}", + "surrogateAuthRequired": false, + "enabled": true, + "alwaysDisplayInConsole": false, + "clientAuthenticatorType": "client-secret", + "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", + "role_list", + "profile", + "roles", + "email" + ], + "optionalClientScopes": [ + "address", + "phone", + "offline_access", + "microprofile-jwt" + ] + }, + { + "id": "015cfb96-f8c4-4c4c-8381-2008f2b681fc", + "clientId": "security-admin-console", + "name": "${client_security-admin-console}", + "rootUrl": "${authAdminUrl}", + "baseUrl": "/admin/fairspace/console/", + "surrogateAuthRequired": false, + "enabled": true, + "alwaysDisplayInConsole": false, + "clientAuthenticatorType": "client-secret", + "secret": "**********", + "redirectUris": [ + "/admin/fairspace/console/*" + ], + "webOrigins": [ + "+" + ], + "notBefore": 0, + "bearerOnly": false, + "consentRequired": false, + "standardFlowEnabled": true, + "implicitFlowEnabled": false, + "directAccessGrantsEnabled": false, + "serviceAccountsEnabled": false, + "publicClient": true, + "frontchannelLogout": false, + "protocol": "openid-connect", + "attributes": { + "pkce.code.challenge.method": "S256" + }, + "authenticationFlowBindingOverrides": {}, + "fullScopeAllowed": false, + "nodeReRegistrationTimeout": 0, + "protocolMappers": [ + { + "id": "917f9d1d-9525-4689-a891-fa57f23d7ad9", + "name": "locale", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "locale", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "locale", + "jsonType.label": "String" + } + } + ], + "defaultClientScopes": [ + "web-origins", + "role_list", + "profile", + "roles", + "email" + ], + "optionalClientScopes": [ + "address", + "phone", + "offline_access", + "microprofile-jwt" + ] + }, + { + "id": "e5f40d59-f15d-4f2c-90b0-5ed636dd3b6c", + "clientId": "workspace-client", + "rootUrl": "http://fairspace.local", + "adminUrl": "http://fairspace.local", + "surrogateAuthRequired": false, + "enabled": true, + "alwaysDisplayInConsole": false, + "clientAuthenticatorType": "client-secret", + "secret": "**********", + "redirectUris": [ + "http://fairspace.local/*", + "http://jupyterhub.local/*" + ], + "webOrigins": [ + "http://jupyterhub.local", + "http://fairspace.local" + ], + "notBefore": 0, + "bearerOnly": false, + "consentRequired": false, + "standardFlowEnabled": true, + "implicitFlowEnabled": false, + "directAccessGrantsEnabled": true, + "serviceAccountsEnabled": true, + "publicClient": false, + "frontchannelLogout": false, + "protocol": "openid-connect", + "attributes": { + "saml.assertion.signature": "false", + "saml.force.post.binding": "false", + "saml.multivalued.roles": "false", + "saml.encrypt": "false", + "backchannel.logout.revoke.offline.tokens": "false", + "saml.server.signature": "false", + "saml.server.signature.keyinfo.ext": "false", + "exclude.session.state.from.auth.response": "false", + "backchannel.logout.session.required": "true", + "client_credentials.use_refresh_token": "false", + "saml_force_name_id_format": "false", + "saml.client.signature": "false", + "tls.client.certificate.bound.access.tokens": "false", + "saml.authnstatement": "false", + "display.on.consent.screen": "false", + "saml.onetimeuse.condition": "false" + }, + "authenticationFlowBindingOverrides": {}, + "fullScopeAllowed": true, + "nodeReRegistrationTimeout": -1, + "protocolMappers": [ + { + "id": "1ae9e1b5-e075-445b-a8ac-68321f51af63", + "name": "Client ID", + "protocol": "openid-connect", + "protocolMapper": "oidc-usersessionmodel-note-mapper", + "consentRequired": false, + "config": { + "user.session.note": "clientId", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "clientId", + "jsonType.label": "String" + } + }, + { + "id": "087d8cda-ff2e-4f8a-92ac-824e8852d67e", + "name": "Client Host", + "protocol": "openid-connect", + "protocolMapper": "oidc-usersessionmodel-note-mapper", + "consentRequired": false, + "config": { + "user.session.note": "clientHost", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "clientHost", + "jsonType.label": "String" + } + }, + { + "id": "9eaf02ef-e3c0-4c9e-a32c-008668ad3491", + "name": "Client IP Address", + "protocol": "openid-connect", + "protocolMapper": "oidc-usersessionmodel-note-mapper", + "consentRequired": false, + "config": { + "user.session.note": "clientAddress", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "clientAddress", + "jsonType.label": "String" + } + } + ], + "defaultClientScopes": [ + "web-origins", + "role_list", + "profile", + "roles", + "email" + ], + "optionalClientScopes": [ + "address", + "phone", + "offline_access", + "microprofile-jwt" + ] + } + ], + "clientScopes": [ + { + "id": "b37a824d-3fa5-4580-a4e8-56fad81b8bba", + "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": "2f2efc45-d7c7-489f-81a9-ce0832d514a3", + "name": "groups", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-realm-role-mapper", + "consentRequired": false, + "config": { + "multivalued": "true", + "user.attribute": "foo", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "groups", + "jsonType.label": "String" + } + }, + { + "id": "cc7f30a7-666f-4620-ae14-fa5b0454841a", + "name": "upn", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-property-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "username", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "upn", + "jsonType.label": "String" + } + } + ] + }, + { + "id": "09856bd5-a03a-451a-81dd-8af31ccc0fe5", + "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": "3faa6cce-3cfa-479c-bb4f-570d665587f4", + "name": "allowed web origins", + "protocol": "openid-connect", + "protocolMapper": "oidc-allowed-origins-mapper", + "consentRequired": false, + "config": {} + } + ] + }, + { + "id": "b4d9fea6-9156-47eb-a1b9-d7caa46f291d", + "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": "b955e71c-cd41-4d9c-9c5b-6d5cbf7040b1", + "name": "audience resolve", + "protocol": "openid-connect", + "protocolMapper": "oidc-audience-resolve-mapper", + "consentRequired": false, + "config": {} + }, + { + "id": "a7c1556c-fca0-4cc6-b42b-a2501834a0a8", + "name": "client roles", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-client-role-mapper", + "consentRequired": false, + "config": { + "multivalued": "true", + "user.attribute": "foo", + "access.token.claim": "true", + "claim.name": "resource_access.${client_id}.roles", + "jsonType.label": "String" + } + }, + { + "id": "079fe51e-0edd-431a-9eca-a9245907ebcc", + "name": "realm roles", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-realm-role-mapper", + "consentRequired": false, + "config": { + "multivalued": "true", + "user.attribute": "foo", + "access.token.claim": "true", + "claim.name": "realm_access.roles", + "jsonType.label": "String" + } + } + ] + }, + { + "id": "ccb10001-bc3f-4ff3-83b2-8f95d4f43c1e", + "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": "bc6d5422-8590-4801-af4a-6d38dada5dff", + "name": "phone number verified", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "phoneNumberVerified", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "phone_number_verified", + "jsonType.label": "boolean" + } + }, + { + "id": "2e1cab48-071d-445c-949c-ec272bf7f479", + "name": "phone number", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "phoneNumber", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "phone_number", + "jsonType.label": "String" + } + } + ] + }, + { + "id": "496cd2e5-b5f8-41af-922a-4a5ae5fac0a1", + "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": "adfb14b6-fbb3-41e9-8911-3580f7809d49", + "name": "address", + "protocol": "openid-connect", + "protocolMapper": "oidc-address-mapper", + "consentRequired": false, + "config": { + "user.attribute.formatted": "formatted", + "user.attribute.country": "country", + "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": "427931e1-64d1-4d97-ba4a-30fe0789d4ff", + "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": "24d22f72-f141-4af1-8c28-887b21da42d1", + "name": "email", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-property-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "email", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "email", + "jsonType.label": "String" + } + }, + { + "id": "47d5845e-5523-4693-aec1-cb1324aaa012", + "name": "email verified", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-property-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "emailVerified", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "email_verified", + "jsonType.label": "boolean" + } + } + ] + }, + { + "id": "d384c60c-c279-4f04-bd4f-2e956f0a33f2", + "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": "ca6f8439-3cda-41be-8e31-fb8be46f6ff5", + "name": "locale", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "locale", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "locale", + "jsonType.label": "String" + } + }, + { + "id": "88a41373-4b19-49ac-b898-e404d210f5d3", + "name": "picture", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "picture", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "picture", + "jsonType.label": "String" + } + }, + { + "id": "9c6e7aa6-fd4a-4ba1-ba8c-620ac28736ea", + "name": "middle name", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "middleName", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "middle_name", + "jsonType.label": "String" + } + }, + { + "id": "d7fecf45-08a8-42a0-92c9-6e076964f0d4", + "name": "given name", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-property-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "firstName", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "given_name", + "jsonType.label": "String" + } + }, + { + "id": "dbe27079-9608-49ae-a2ab-20c0053f5f47", + "name": "full name", + "protocol": "openid-connect", + "protocolMapper": "oidc-full-name-mapper", + "consentRequired": false, + "config": { + "id.token.claim": "true", + "access.token.claim": "true", + "userinfo.token.claim": "true" + } + }, + { + "id": "817fa5d2-0be5-41e8-a5c2-aa99bcc143d5", + "name": "birthdate", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "birthdate", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "birthdate", + "jsonType.label": "String" + } + }, + { + "id": "213e4b4f-a32f-4477-9ada-2f4431d375f4", + "name": "username", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-property-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "username", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "preferred_username", + "jsonType.label": "String" + } + }, + { + "id": "7cae1913-2793-442c-a01f-9dbb54457380", + "name": "gender", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "gender", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "gender", + "jsonType.label": "String" + } + }, + { + "id": "6cefaa7d-c162-42bb-a984-fdf01b478918", + "name": "zoneinfo", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "zoneinfo", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "zoneinfo", + "jsonType.label": "String" + } + }, + { + "id": "dab28443-ce63-408f-a0b3-c2535ace5341", + "name": "website", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "website", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "website", + "jsonType.label": "String" + } + }, + { + "id": "1988455a-ddb1-418b-bf40-054049f5c687", + "name": "profile", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "profile", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "profile", + "jsonType.label": "String" + } + }, + { + "id": "94cf1c4a-9c8a-4239-80e8-d320e02edefd", + "name": "updated at", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "updatedAt", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "updated_at", + "jsonType.label": "String" + } + }, + { + "id": "0a9084a5-59d3-4910-9ed6-e2a45b4ee873", + "name": "family name", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-property-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "lastName", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "family_name", + "jsonType.label": "String" + } + }, + { + "id": "c9fea91e-76e3-478d-a847-a0a0f2a76588", + "name": "nickname", + "protocol": "openid-connect", + "protocolMapper": "oidc-usermodel-attribute-mapper", + "consentRequired": false, + "config": { + "userinfo.token.claim": "true", + "user.attribute": "nickname", + "id.token.claim": "true", + "access.token.claim": "true", + "claim.name": "nickname", + "jsonType.label": "String" + } + } + ] + }, + { + "id": "0b36f941-f50e-44bb-822c-db24ecdd4b53", + "name": "role_list", + "description": "SAML role list", + "protocol": "saml", + "attributes": { + "consent.screen.text": "${samlRoleListScopeConsentText}", + "display.on.consent.screen": "true" + }, + "protocolMappers": [ + { + "id": "4c084295-6626-4a55-b3c5-3ac0f00b0db3", + "name": "role list", + "protocol": "saml", + "protocolMapper": "saml-role-list-mapper", + "consentRequired": false, + "config": { + "single": "false", + "attribute.nameformat": "Basic", + "attribute.name": "Role" + } + } + ] + }, + { + "id": "9e18aa1d-16c5-412a-8d78-358e2a4050ea", + "name": "offline_access", + "description": "OpenID Connect built-in scope: offline_access", + "protocol": "openid-connect", + "attributes": { + "consent.screen.text": "${offlineAccessScopeConsentText}", + "display.on.consent.screen": "true" + } + } + ], + "defaultDefaultClientScopes": [ + "role_list", + "profile", + "email", + "roles", + "web-origins" + ], + "defaultOptionalClientScopes": [ + "offline_access", + "address", + "phone", + "microprofile-jwt" + ], + "browserSecurityHeaders": { + "contentSecurityPolicyReportOnly": "", + "xContentTypeOptions": "nosniff", + "xRobotsTag": "none", + "xFrameOptions": "SAMEORIGIN", + "contentSecurityPolicy": "frame-src 'self'; frame-ancestors 'self'; object-src 'none';", + "xXSSProtection": "1; mode=block", + "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": "6ce81c3d-9e15-4f68-920c-562940eb1a18", + "name": "Allowed Client Scopes", + "providerId": "allowed-client-templates", + "subType": "authenticated", + "subComponents": {}, + "config": { + "allow-default-scopes": [ + "true" + ] + } + }, + { + "id": "e9767563-42ba-4860-a62d-e83c6554a32f", + "name": "Allowed Client Scopes", + "providerId": "allowed-client-templates", + "subType": "anonymous", + "subComponents": {}, + "config": { + "allow-default-scopes": [ + "true" + ] + } + }, + { + "id": "b73880e2-f99d-4aac-9cb9-4bb21760c84a", + "name": "Full Scope Disabled", + "providerId": "scope", + "subType": "anonymous", + "subComponents": {}, + "config": {} + }, + { + "id": "dd426019-a852-4408-bfcb-ceb81c63932f", + "name": "Allowed Protocol Mapper Types", + "providerId": "allowed-protocol-mappers", + "subType": "authenticated", + "subComponents": {}, + "config": { + "allowed-protocol-mapper-types": [ + "saml-role-list-mapper", + "oidc-address-mapper", + "saml-user-attribute-mapper", + "oidc-usermodel-property-mapper", + "saml-user-property-mapper", + "oidc-sha256-pairwise-sub-mapper", + "oidc-full-name-mapper", + "oidc-usermodel-attribute-mapper" + ] + } + }, + { + "id": "057d28c3-a6ed-4f53-8249-be7254e69767", + "name": "Allowed Protocol Mapper Types", + "providerId": "allowed-protocol-mappers", + "subType": "anonymous", + "subComponents": {}, + "config": { + "allowed-protocol-mapper-types": [ + "oidc-full-name-mapper", + "saml-user-property-mapper", + "oidc-address-mapper", + "saml-role-list-mapper", + "oidc-usermodel-attribute-mapper", + "oidc-usermodel-property-mapper", + "saml-user-attribute-mapper", + "oidc-sha256-pairwise-sub-mapper" + ] + } + }, + { + "id": "3d7b7d21-3f73-4a62-ba8f-cb5147517a0b", + "name": "Max Clients Limit", + "providerId": "max-clients", + "subType": "anonymous", + "subComponents": {}, + "config": { + "max-clients": [ + "200" + ] + } + }, + { + "id": "1bbe115d-79f8-4328-ba00-33dd7360c69a", + "name": "Trusted Hosts", + "providerId": "trusted-hosts", + "subType": "anonymous", + "subComponents": {}, + "config": { + "host-sending-registration-request-must-match": [ + "true" + ], + "client-uris-must-match": [ + "true" + ] + } + }, + { + "id": "85dab423-9da6-4f80-b9a2-654669673634", + "name": "Consent Required", + "providerId": "consent-required", + "subType": "anonymous", + "subComponents": {}, + "config": {} + } + ], + "org.keycloak.keys.KeyProvider": [ + { + "id": "e45fca1d-cc4a-4e16-8ed0-6cf5e7f07913", + "name": "aes-generated", + "providerId": "aes-generated", + "subComponents": {}, + "config": { + "priority": [ + "100" + ] + } + }, + { + "id": "ac513874-0bb3-407d-9c17-cf62724dc3c1", + "name": "rsa-generated", + "providerId": "rsa-generated", + "subComponents": {}, + "config": { + "priority": [ + "100" + ] + } + }, + { + "id": "336420b4-b3c8-4b30-b3a2-a3828e284729", + "name": "hmac-generated", + "providerId": "hmac-generated", + "subComponents": {}, + "config": { + "priority": [ + "100" + ], + "algorithm": [ + "HS256" + ] + } + } + ] + }, + "internationalizationEnabled": false, + "supportedLocales": [], + "authenticationFlows": [ + { + "id": "e773ce96-6d55-4c27-baae-e33a4c5ef5bb", + "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", + "requirement": "ALTERNATIVE", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "requirement": "ALTERNATIVE", + "priority": 20, + "flowAlias": "Verify Existing Account by Re-authentication", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "0a4af3e4-a98f-4cd8-bd3a-41517ff259ef", + "alias": "Authentication Options", + "description": "Authentication options.", + "providerId": "basic-flow", + "topLevel": false, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "basic-auth", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "basic-auth-otp", + "requirement": "DISABLED", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "auth-spnego", + "requirement": "DISABLED", + "priority": 30, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + }, + { + "id": "1c9c93d9-a189-487c-9f9e-36e3fa29a8e2", + "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", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "auth-otp-form", + "requirement": "REQUIRED", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + }, + { + "id": "7146ef44-6fb0-4085-b016-9651443ae75f", + "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", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "direct-grant-validate-otp", + "requirement": "REQUIRED", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + }, + { + "id": "32bef7b6-a225-44c0-9180-8eecc1aa2b1f", + "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", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "auth-otp-form", + "requirement": "REQUIRED", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + }, + { + "id": "bea5a8b0-c591-4185-8219-026cbaad9ec6", + "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", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "requirement": "REQUIRED", + "priority": 20, + "flowAlias": "Account verification options", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "171a9126-3e9c-4534-b415-df9d19d4171c", + "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", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "reset-otp", + "requirement": "REQUIRED", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + }, + { + "id": "5c172cc3-3245-4f09-b3d2-d75ae950e1d5", + "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", + "requirement": "ALTERNATIVE", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "requirement": "ALTERNATIVE", + "priority": 20, + "flowAlias": "Handle Existing Account", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "fafe0d0d-9d02-47b9-b64f-0edcd1d6f477", + "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", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "requirement": "CONDITIONAL", + "priority": 20, + "flowAlias": "First broker login - Conditional OTP", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "eac43f95-480b-441e-ae7f-05e28c503418", + "alias": "browser", + "description": "browser based authentication", + "providerId": "basic-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "auth-cookie", + "requirement": "ALTERNATIVE", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "auth-spnego", + "requirement": "DISABLED", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "identity-provider-redirector", + "requirement": "ALTERNATIVE", + "priority": 25, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "requirement": "ALTERNATIVE", + "priority": 30, + "flowAlias": "forms", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "8d9a5c2b-e387-4b4a-bc0a-a1fdd1bb0307", + "alias": "clients", + "description": "Base authentication for clients", + "providerId": "client-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "client-secret", + "requirement": "ALTERNATIVE", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "client-jwt", + "requirement": "ALTERNATIVE", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "client-secret-jwt", + "requirement": "ALTERNATIVE", + "priority": 30, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "client-x509", + "requirement": "ALTERNATIVE", + "priority": 40, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + }, + { + "id": "01e3bdf7-37e9-465a-9ddd-926bbd4d1f4b", + "alias": "direct grant", + "description": "OpenID Connect Resource Owner Grant", + "providerId": "basic-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "direct-grant-validate-username", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "direct-grant-validate-password", + "requirement": "REQUIRED", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "requirement": "CONDITIONAL", + "priority": 30, + "flowAlias": "Direct Grant - Conditional OTP", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "e45f4fe7-a391-4b39-a627-821bcccd3f19", + "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", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + }, + { + "id": "20626e63-8c3f-4f98-9fd1-4527e0cf3ab1", + "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", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "requirement": "REQUIRED", + "priority": 20, + "flowAlias": "User creation or linking", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "98d2b305-1ed4-412e-bc5f-f748a1f575c6", + "alias": "forms", + "description": "Username, password, otp and other auth forms.", + "providerId": "basic-flow", + "topLevel": false, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "auth-username-password-form", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "requirement": "CONDITIONAL", + "priority": 20, + "flowAlias": "Browser - Conditional OTP", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "c78998bd-0587-4ba0-a1b9-9a7dec2c5a47", + "alias": "http challenge", + "description": "An authentication flow based on challenge-response HTTP Authentication Schemes", + "providerId": "basic-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "no-cookie-redirect", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "requirement": "REQUIRED", + "priority": 20, + "flowAlias": "Authentication Options", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "a974d140-fd17-44bd-8731-d41714c16675", + "alias": "registration", + "description": "registration flow", + "providerId": "basic-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "registration-page-form", + "requirement": "REQUIRED", + "priority": 10, + "flowAlias": "registration form", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "d1c46049-7b01-4807-9301-b81a390be66a", + "alias": "registration form", + "description": "registration form", + "providerId": "form-flow", + "topLevel": false, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "registration-user-creation", + "requirement": "REQUIRED", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "registration-profile-action", + "requirement": "REQUIRED", + "priority": 40, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "registration-password-action", + "requirement": "REQUIRED", + "priority": 50, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "registration-recaptcha-action", + "requirement": "DISABLED", + "priority": 60, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + }, + { + "id": "92f2f2f0-b0a4-4aa6-a026-b2e4d2a01866", + "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", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "reset-credential-email", + "requirement": "REQUIRED", + "priority": 20, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "authenticator": "reset-password", + "requirement": "REQUIRED", + "priority": 30, + "userSetupAllowed": false, + "autheticatorFlow": false + }, + { + "requirement": "CONDITIONAL", + "priority": 40, + "flowAlias": "Reset - Conditional OTP", + "userSetupAllowed": false, + "autheticatorFlow": true + } + ] + }, + { + "id": "e2f8dd46-b714-4bed-8018-c94b84029ad1", + "alias": "saml ecp", + "description": "SAML ECP Profile Authentication Flow", + "providerId": "basic-flow", + "topLevel": true, + "builtIn": true, + "authenticationExecutions": [ + { + "authenticator": "http-basic-authenticator", + "requirement": "REQUIRED", + "priority": 10, + "userSetupAllowed": false, + "autheticatorFlow": false + } + ] + } + ], + "authenticatorConfig": [ + { + "id": "f15f8402-5c28-4414-833a-24627f15e270", + "alias": "create unique user config", + "config": { + "require.password.update.after.registration": "false" + } + }, + { + "id": "781fefee-1571-4977-9840-a89535459da9", + "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": "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", + "attributes": { + "clientOfflineSessionMaxLifespan": "0", + "clientSessionIdleTimeout": "0", + "clientSessionMaxLifespan": "0", + "clientOfflineSessionIdleTimeout": "0" + }, + "keycloakVersion": "12.0.4", + "userManagedAccessAllowed": false +} \ No newline at end of file diff --git a/.travis/ci-values.yaml b/local-development/local-values.yaml similarity index 63% rename from .travis/ci-values.yaml rename to local-development/local-values.yaml index 32dfb7d..69cf28c 100644 --- a/.travis/ci-values.yaml +++ b/local-development/local-values.yaml @@ -1,19 +1,18 @@ hyperspace: - name: ci + name: hyperspace-local ingress: - domain: keycloak.ci.fairway.app + domain: keycloak.local tls: - certificate: - force: true + enabled: false # Set passwords to prevent having a new password at every upgrade keycloak: postgresql: - postgresPassword: "9FGwLKpEu$4w/knG" + postgresPassword: "keycloak" extraEnv: | - name: KEYCLOAK_USER value: keycloak - name: KEYCLOAK_PASSWORD - value: keycloak-ci-123 + value: keycloak - name: PROXY_ADDRESS_FORWARDING value: "true" diff --git a/local-development/screenshots/Add realm button.png b/local-development/screenshots/Add realm button.png new file mode 100644 index 0000000..e1bf228 Binary files /dev/null and b/local-development/screenshots/Add realm button.png differ diff --git a/local-development/screenshots/Add realm page.png b/local-development/screenshots/Add realm page.png new file mode 100644 index 0000000..92c276d Binary files /dev/null and b/local-development/screenshots/Add realm page.png differ diff --git a/local-development/screenshots/Realm created.png b/local-development/screenshots/Realm created.png new file mode 100644 index 0000000..3a2439a Binary files /dev/null and b/local-development/screenshots/Realm created.png differ