はじめに
今年半ばに、IBM Security Verify/IBM Application Gatewayで利用できるサンプルアプリのURLが変更になりました。
何度か調べ直していたので、個人的なメモを兼ねてご紹介させて頂きます。
1. IBM Security Verifyで利用できるアプリケーションサンプルについて
SAMLプロトコルを利用した認証を試すためのサンプルアプリケーションです。
https://samlapp.12murzlqn27z.us-east.codeengine.appdomain.cloud/
設定方法です。
①IBM Security Verifyでカスタムアプリケーションを作成
サインオンタブ 右側のガイドに記載されているIBM Security Verify側の設定をメモする。
項目 | 設定値 |
---|---|
ログイン URL | https://"tenant".verify.ibm.com/saml/sps/saml20ip/saml20/login |
ログアウト URL | https://"tenant".verify.ibm.com/idaas/mtfim/sps/idaas/logout |
署名証明書 | -----BEGIN CERTIFICATE-----~~~-----END CERTIFICATE----- |
②サンプルアプリケーションにアクセスして、Setupボタンをクリック
③サンプルアプリケーションを設定/保存する
手順①で取得したIBM Security Verifyの設定を入力して次へをクリック
④サンプルアプリケーションの設定をメモして、保存
表示されてる値をメモしておく、または、Metadataをダウンロードしておく
項目 | 設定値 |
---|---|
Provider ID | samlapp-codeengine |
Assertion Consumer Service URL (ACS) | https://samlapp.12murzlqn27z.us-east.codeengine.appdomain.cloud/assert |
Single Sign-On (SSO) URL | https://samlapp.12murzlqn27z.us-east.codeengine.appdomain.cloud/login?uuid=xxxxx |
⑤IBM Security Verify側にアプリケーションの設定を反映して保存する。
⑥サンプルアプリケーションの動作確認を行います。
login Nowをクリックします。
IBM Security Verifyのログイン画面でログインします。
View Profileをクリックすると、IBM Security Verifyから連携されたユーザー情報が参照できます。
同じアプリケーションを他の環境で動かしたい場合は、IBM Securityの以下のリソースを利用できます。
https://github.com/IBM-Security/CI-SAML-Sample
2. IBM Application Gatewayで利用できるサンプルアプリケーションについて
IBM Application Gatewayのバックエンドに配置されるアプリケーションのサンプルです。
https://iag-demo.11n9wdjw1dcu.au-syd.codeengine.appdomain.cloud/
コンテナ環境を稼働されるためのconfig.yamlのサンプルです。
version: "23.04"
server:
local_applications:
cred_viewer:
path_segment: "cred-viewer"
enable_html: true
resource_servers:
- path: "/static"
connection_type: "ssl"
sni: iag-demo.11n9wdjw1dcu.au-syd.codeengine.appdomain.cloud
servers:
- host: iag-demo.11n9wdjw1dcu.au-syd.codeengine.appdomain.cloud
port: 443
ssl:
certificate:
- "@11n9wdjw1dcu-au-syd-codeengine-appdomain-cloud.pem"
- "@11n9wdjw1dcu-au-syd-codeengine-appdomain-cloud1.pem"
- "@11n9wdjw1dcu-au-syd-codeengine-appdomain-cloud2.pem"
identity:
oidc:
discovery_endpoint: "https://<tenant>.verify.ibm.com/oidc/endpoint/default/.well-known/openid-configuration"
client_id: <client_id>
client_secret: <client_secret>
URL変更前は、SNIを指定しなくても動作しましたが、新しい環境ではSNIの指定が必要です。
設定がない場合は、コンテナのコンソールに、DPWIV1228Wエラーが表示されます。
DPWIV1228W IAG could not establish a secure connection to the server, iag-demo.11n9wdjw1dcu.au-syd.codeengine.appdomain.cloud, for the /static junction (Function call: gsk_secure_soc_init; failed error: 0x1a4 GSK_ERROR_SOCKET_CLOSED).
3. 最後に
今回は、IBM Security Verify/IBM Application Gatewayで利用するサンプルアプリケーションをご紹介しました。