概要
Gluu社というOSSパッケージを開発している会社がパブリッシュしているSSO製品を導入してみました。
参考にしたのは下記、GluuServerのドキュメントページです。
【URL】
https://gluu.org/docs/ce/installation-guide/install/
私は以下の環境でインストールを行いました。
【環境情報】
(1)基盤
AWS EC2
T2.microインスタンス
T2.lergeインスタンス__(※T2.microじゃ全然動作しませんでした…)__
(2)OS
CentOS Linux release 7.6.1810 (Core)
インストールタイプ:Minimal
(3)ディスク構成
/(ルート) 8.0GB
※その他、パーティションはなし
前提作業/注意事項
【前提作業】
1.Selinuxは「permissive」に設定しておくこと
2.wgetを導入しておくこと
【注意事項】
1.セットアップ用のスクリプト「setup.py」は1回実行で必ずインストールを完了させること
非常に残念ながら、1回しかこのスクリプトを利用できない仕様となっているそうです(なぜなのか??)
2.一通り、インストール作業が終わったら、jettyサーバーを起動→ログインしないといけない
インストール手順
1.基本設定
1-1.ホスト名の設定
hostnamectl set-hostname <myhostname>
1-2.selinuxの無効化
cp -p /etc/selinux/config /etc/selinux/config.org
vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=Disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
※公式サイトには「permissive」で良いと記載があったのですが、怖いので「Dissabled」にしました。
1-3.epelリポジトリの追加
yum install -y epel-release
1-4.wgetパッケージの追加
yum install -y wget
1-5.Gluuリポジトリなどインストールに必要なファイル一式をダウンロード
wget https://repo.gluu.org/centos/Gluu-centos7.repo -O /etc/yum.repos.d/Gluu.repo
wget https://repo.gluu.org/centos/RPM-GPG-KEY-GLUU -O /etc/pki/rpm-gpg/RPM-GPG-KEY-GLUU
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-GLUU
yum clean all
yum install gluu-server-3.1.6
※きっと、上記のバージョンは常に更新されていくのでしょうね…(記事作成時点、2019/4/26)
1-6.セットアップウィザードの実行
「setup.py」というスクリプトを実行して、セットアップを進めます。
cd /opt/gluu-server-3.1.6/install/community-edition-setup
./setup.py
Installing Gluu Server...
Detected OS : centos
Detected init: systemd
Detected Apache: 2.4
Installing Gluu Server...
For more info see:
/install/community-edition-setup/setup.log
/install/community-edition-setup/setup_error.log
** All clear text passwords contained in /install/community-edition-setup/setup.properties.last.
Do you acknowledge that use of the Gluu Server is under the MIT license? [N|y] : y <yを選択>
Enter IP Address [xxxx] :<IPアドレスを入力>
Enter hostname [xxxx] : <サーバー名を入力>
Enter your city or locality : <都市名を入力(Gluuの管理UIにアクセスするためのHTTPS 証明書で利用)>
Enter your state or province two letter code : <都道府県名を入力(同上)>
Enter two letter Country Code : <国名を入力(同上)>
Enter Organization Name : <組織名を入力(同上)>
Enter email address for support at your organization : <メールアドレスを入力する>
Enter maximum RAM for applications in MB [3072] : <Enterを押下>
Optional: enter password for oxTrust and LDAP superuser [xxxx] : <パスワードを入力する>
Install oxAuth OAuth2 Authorization Server? [Yes] : <Enterを押下>
Install oxTrust Admin UI? [Yes] : Install oxTrust Admin UI? [Yes] : <Enterを押下>
Install LDAP Server? [Yes] : <Enterを押下 ※自前のLDAPサーバーを利用する場合、Noを入力>
Install Apache HTTPD Server [Yes] : <Enterを押下>
Install Shibboleth SAML IDP? [No] : <※インストールする場合はyes>
Install oxAuth RP? [No] : <※インストールする場合はyes>
Install Passport? [No] : <※インストールする場合はyes>
hostname myhostname
orgName myorganizationname
os centos
city Chiyoda-ku
state TK
countryCode JP
support email myemailaddress
Applications max ram 3072
Admin Pass <mypassword>
Install oxAuth True
Install oxTrust True
Install LDAP True
Install Apache 2 web server True
Install Shibboleth SAML IDP True ※yesを選択した場合、true
Install oxAuth RP True ※yesを選択した場合、true
Install Passport True ※yesを選択した場合、true
ここまででインストール作業自体は完了です。
ここから先はサーバーの起動になります。