0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

できるスキーム Keycloakインストール編

Last updated at Posted at 2022-09-04

前回はAzure上のUbuntuのKeycloak9.0でOAuth2.0を試しました。
https://qiita.com/namikitakeo/items/0c283b2e5da55670c542

今回はSCIM2.0をつかうためにAzure上のUbuntuにKeycloak18.0をインストールしてみます。
https://github.com/Captain-P-Goldfish/scim-for-keycloak

テスト環境は以下の通りです。

# uname -a
Linux ubuntu18 5.0.0-1020-azure #21~18.04.1-Ubuntu SMP Fri Sep 13 14:10:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

# java -version
openjdk version "17.0.4" 2022-07-19
OpenJDK Runtime Environment (build 17.0.4+8-Ubuntu-118.04)
OpenJDK 64-Bit Server VM (build 17.0.4+8-Ubuntu-118.04, mixed mode, sharing)

まずはKeycloakをダウンロードして解凍します。

# cd /opt
# wget https://github.com/keycloak/keycloak/releases/download/18.0.0/keycloak-18.0.0.tar.gz
# tar zxvf keycloak-18.0.0.tar.gz
# cd keycloak-18.0.0
# wget https://github.com/Captain-P-Goldfish/scim-for-keycloak/releases/download/kc-18-b1/scim-for-keycloak-kc-18-b1.jar
# mv ./scim-for-keycloak-kc-18-b1.jar providers/
# ./bin/kc.sh build
# ./bin/kc.sh show-config

つぎに管理ユーザー(admin)を設定して起動します。

# export KEYCLOAK_ADMIN=admin
# export KEYCLOAK_ADMIN_PASSWORD=********
# ./bin/kc.sh start --proxy=edge --hostname=ubuntu18.japaneast.cloudapp.azure.com

SSL設定とProxy設定をApacheで行います。

apache2.conf
(省略)
ProxyPreserveHost On
ProxyRequests Off
RequestHeader add X-forwarded-proto https
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
(省略)

次回

できるスキーム Keycloak活用編
https://qiita.com/namikitakeo/items/60f1ee79f51b13fbf7c0

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?