LoginSignup
0
0

More than 5 years have passed since last update.

Securing OpenAM 実践Ⅳ

Posted at

Set the OpenAM advanced property openam.auth.soap.rest.generic.authentication.exception to true. This causes OpenAM to return the same exception both when the user does not exist, and also when the password is not valid.

ユーザ名が存在していない場合でも、パスワードが誤っている場合でも同じ例外を返すようにするため、拡張プロパティで「openam.auth.soap.rest.generic.authentication.exception」を「true」に設定せよとのこと。

調べてみるとREST APIおよびSOAP APIで認証を行ったときにデフォルトだと
ユーザ名が適切な場合(パスワードが誤っている場合)とユーザ名が不適切な場合とでエラーメッセージが異なるらしいです。

デフォルトの状態で、存在するユーザ名と存在しないユーザ名でREST APIを実行してみたが、両方とも以下のエラーとなり、違いはありませんでした。。。

{"code":401,"reason":"Unauthorized","message":"認証に失敗しました。"}

OpenAMのドキュメント(https://backstage.forgerock.com/docs/openam/13/dev-guide#rest-api-auth)を見てみると、こんなエラーになることが記載されている。

$ curl \
--request POST \
--header "Content-Type: application/json" \
--header "X-OpenAM-Username: demo" \
--header "X-OpenAM-Password: badpassword" \
https://openam.example.com:8443/openam/json/authenticate
{
"code":401,
"reason":"Unauthorized",
"message":"Invalid Password!!",
"failureUrl": "http://www.example.com/401.html"
}

うーん、とりあえず設定はしておくけど、どういったときに効果を発揮するのかは知っておきたいな。英語の読解力がないだけかも。また気が向いたら、調べます。。。

Remove the demo user account. For example, if you configure the embedded OpenDJ directory server as a configuration and CTS store, the default demo user account gets created during the installation process. You should remove the user using the OpenAM console under Realms > Top Level Realm > Subjects > User.

demoユーザは消しましょうとのこと。

0
0
1

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