2011-11-10 20 views
0

にはどうすればTomcatのホームディレクトリの下に、特定のWebアプリケーションの認証を追加します。TomcatのWebアプリケーションの認証

私はtomcat_users.xmlとweb.xmlを編集する必要がありますが、web.xml/webname/WEB-INFまたはTOMCAT_HOME/confにあるweb.xmlは正確に編集する必要があることを理解していますか?ファイルにはどのような内容が必要ですか? SSLプロトコルを活用する

答えて

0

タグがセキュリティ要件を示すタグが含まれるように、DD web.xmlファイルを変更する必要があります。

<security-constraint> 

<display-name>Example Security Constraint</display-name> 

<web-resource-collection> 

<web-resource-name>Secure Area</web-resource-name> 

<url-pattern>/secure/*</url-pattern> 

<http-method>GET</http-method> 

<http-method>POST</http-method> 

</web-resource-collection> 

<auth-constraint> 

<role-name>manager</role-name> 

<auth-constraint> 

<user-data-constraint> 

<transport-guarantee>CONFIDENTIAL</transport-guarantee> 

</user-data-constraint> 

</security-constraint> 

このタグの有効な値は、INTEGRALとCONFIDENTIALです。前者は、データが途中で変化しないことが保証されていることを必要とし、以降のデータは輸送中の不正な第三者によって読まれていないことが保証されている必要があります。機密保持はINTEGRALを意味します。

また、Webデプロイメント・プランに以下の設定変更を必要とし、フォームベースの認証を、キックスタートする必要があります。

<login-config> 

<auth-method>FORM</auth-method> 

<form-login-config> 

<form-login-page>/login.jsp</form-login-page> 

<form-error-page>/error.jsp</form-error-page> 

</form-login-config> 

</login-config> 

またはthisリンクかもしれU

のに役立ちます
関連する問題