LoginSignup
0
0

More than 5 years have passed since last update.

Securing OpenAM 実践Ⅴ

Last updated at Posted at 2017-04-01

Forgerock Access Management 5 (OpenAM 14?)のドキュメントが公開されているように見えるけど... とりあえず投稿。

goto・gotoOnFailパラメータのバリデーション設定を行う

Set the list of Valid goto URL Resources. By default, OpenAM redirects the user to the URL specified in the goto and gotoOnFail query string parameters supplied to the authentication interface in the login URL.

To increase security against possible phishing attacks through open redirect, you can specify a list of valid URL resources against which OpenAM validates these URLs. OpenAM only redirects a user if the goto and gotoOnFail URL matches any of the resources specified in this setting. If no setting is present, it is assumed that the goto or gotoOnFail URL is valid.

To set the Valid goto URL Resources, use the OpenAM console, and navigate to Realms > Realm Name > Services. Click Add, select Validation Service, and then add one or more valid goto URLs.

When setting valid goto URLs, you can use the "" wildcard, where "" matches all characters except "?". For more specific patterns, use resource names with wildcards as described in the procedure, Configuring Valid goto URL Resources .

gotoパラメータとgotoOnFailパラメータはそれぞれOpenAMの認証成功後・失敗後にリダイレクトするURLを指定するパラメータとのこと。
ドキュメントの以下の箇所にパラメータの説明が記載されています。

https://backstage.forgerock.com/docs/openam/13/admin-guide#authn-from-browser-parameters

PolicyAgentをインストールしたシステムにアクセスし、OpenAMに認証が要求されるとき、以下のようにgotoパラメータが付いたURLになっていました。PolicyAgentからOpenAMにリダイレクトされる際に登場するパラメータらしい。

http://openam.auth.com/openam/XUI/#login/&goto=http%3A%2F%2Fpolicyagent.auth.com%3A

ここで認証に成功すれば、
http://policyagent.auth.com
にリダイレクトされることになります。gotoもしくはgotoOnFailのパラメータを付け、OpenAMで認証させた後、フィッシングサイトなどに誘導することができるので、gotoおよびgotoOnFailのパラメータのURLのバリデーションを行いましょうということらしい。

[REALM]-[レルム名]-[Services]-[Validation Service]を追加します。

add_validation_service.jpg

以下の画面でgotoパラメータに設定する有効なURLを指定することができます。ワイルドカードも使用できるので、対象システムのURLを設定しておけばよさそうですね。

validation_service.jpg

ドキュメントの以下にも設定方法の記載がありました。

https://backstage.forgerock.com/docs/openam/13/admin-guide#configure-valid-goto-url-resources

ここで個人的に以下の2つの疑問がありました。

Q1.設定画面には「Valid goto URL Resources」と記載されているけどgotoOnFailにも有効な設定なのか?

⇒やはり「goto」と記載されているだけあって、gotoOnFailパラメータのときには効果が見られませんでした。gotoOnFailパラメータのバリデーションはどこでできるのかもう少し調べるか...

Q2.gotoおよびgotoOnFailのパラメータが有効なURLでなかった場合、どのような動作になるのか?

⇒認証したユーザ自身のOpenAMプロファイル編集画面にリダイレクトされました。

PolicyAgentをインストールしているシステムのURLは設定しておいた方がよさそうですね。

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