コンテナ管理のセキュリティが全く新しく、Webアプリケーションでコンフィグレーションする際にいくつかの助けが必要です。コンテナがWebアプリケーションのセキュリティを管理する
Webアプリケーション内のjspへのアクセスを制限したいと考えています。これは私が私のweb.xmlでセキュリティを設定する方法です
<security-constraint>
<display-name>PrivilegedConstraint</display-name>
<web-resource-collection>
<web-resource-name>JSP Files</web-resource-name>
<description>All the jsp files in the web application</description>
<url-pattern>*.jsp</url-pattern>
</web-resource-collection>
<auth-constraint>
<description/>
<role-name>PrivilegedRole</role-name>
</auth-constraint>
<user-data-constraint>
<description/>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>BasicRealm</realm-name>
</login-config>
<security-role>
<description>This is a privileged role. Has access to everything in the web app</description>
<role-name>PrivilegedRole</role-name>
</security-role>
私の質問は以下のとおりです。
ログイン-config要素でレルム名の目的は何ですか? ユーザ名とパスワードを設定し、ユーザをロールにマッピングするにはどうすればよいですか?
ウェブアプリケーション内のJSPにアクセスしようとすると、ユーザー名とパスワードの入力が求められます。何を私はそこに与えるのですか?そして、このセキュリティメカニズムはどのように機能しますか?
私は完全にセキュリティに新しいので、誰かがセキュリティの設定の基本と実際の動作の仕組みを説明する素敵な記事を教えてくれると感謝します。