1
0

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 3 years have passed since last update.

【IBM Application Gateway】フェイルオーバー動作について

Last updated at Posted at 2022-03-31

はじめに

IBM Security Verify にバンドルされている IBM Application GatewayをOpenshiftにデプロイして、フェイルオーバー動作について確認してみました。

フェイルオーバーの設定は大きく3つあります。

①IDプロバイダーからのシングルサインオン
Application Gatewayのセッションがなくなった場合に、IDプロバイダーにアクセス/IDプロバイダーのセッションが残っている場合は、新しくApplication Gatewayのセッションをを確立するパターン。

qiita(1).png

②JWEフェイルオーバーCookieの利用
フェイルオーバーCookieを利用して、IDプロバイダーにアクセスすることなくフェイルオーバーするパターン。

qiita(2).png

③Redisサーバーを使用した分散セッション
Redisサーバーにセッション情報を保存し、このセッション情報を他のIAGインスタンスで使用するパターン。

①IDプロバイダーからのシングルサインオンのパターン

デフォルトはこちらの動作です。

動作確認で利用したyamlファイルの一部です。
server/failoverは指定なしで動作確認しました。
https://docs.verify.ibm.com/gateway/docs/yaml-server-failover

また、identity:で、Application GatewayのIDプロバイダーとして、Security Verifyを指定しました。

demo-sso.yaml
server:
  ssl:
    front_end:
      certificate: "@secret_files/iag.certkey.pem"
  local_applications:
    cred_viewer:
      path_segment: "cred-viewer"
      enable_html: true
~~割愛~~
identity:
  oidc:
    discovery_endpoint: https://<tenant>.verify.ibm.com/oidc/endpoint/default/.well-known/openid-configuration
    client_id: <OIDC_CLIENT_ID>
    client_secret: <S_OIDC_CLIENT_SECRET>
~~割愛~~

Application GatewayのPodを再作成した場合、トレースログの通り一度 IDプロバイダーとして設定したSecurity Verifyにアクセスしていました。

qiita(3).png

②JWEフェイルオーバーCookieの利用

動作確認で利用したyamlファイルの一部です。
server/failoverを設定し、jwtというCookie名にしました。
https://docs.verify.ibm.com/gateway/docs/yaml-server-failover

demo-sso.yaml
server:
  failover:
    key: "@oct-512-bit.bin"
    cookie_name: jwt
    domain_cookie: false

  ssl:
    front_end:
      certificate: "@secret_files/iag.certkey.pem"
  local_applications:
    cred_viewer:
      path_segment: "cred-viewer"
      enable_html: true
~~割愛~~
identity:
  oidc:
    discovery_endpoint: https://<tenant>.verify.ibm.com/oidc/endpoint/default/.well-known/openid-configuration
    client_id: <OIDC_CLIENT_ID>
    client_secret: <S_OIDC_CLIENT_SECRET>
~~割愛~~

Application Gatewayにアクセスすると、Cookieにjwtが表示されました。
qiita(4).png

Podを再作成した後に、アプリケーションにアクセスすると、IDプロバイダーとして設定したSecurity Verifyへのアクセスは発生しませんでした。
qiita(5).png

最後に

IBM Applicatio Gatewayのフェイルオーバーについて確認しました。
Redisサーバーを使用した分散セッションは試せたらご紹介します。

4/5追記
【IBM Application Gateway】Redisサーバーを使用したセッション保持について

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?