3 つのビルトインレルムに加えて、ユーザーデータを、リレーショナルデータベースなどのほかの何らかの方法で格納するカスタムレルムも作成できます。カスタムレルムの作成は、このマニュアルの対象外です。詳細については、『Oracle GlassFish Server 3.1 Application Development Guide』の第 4 章「Securing Applications」を参照してください。
カスタムレルムは、管理目的で、Java Authentication and Authorization Service (JAAS) から派生した LoginModule と呼ばれるクラスによって実装されます。
myCustomRealm など、カスタムレルムには一意の名前を使用します。
realmName { fully-qualified-LoginModule-classname required; };
次に例を示します。
myCustomRealm { com.foo.bar.security.customrealm.simpleCustomLoginModule required; };
domain-dir/logs/server.log を確認して、サーバーがレルムをロードしたことを確かめてください。サーバーはレルムの init メソッドを呼び出します。
参照
Copyright © 2005, 2011, Oracle and/or its affiliates. All rights reserved. 著作権について