IBM WebSphere にデプロイされた JAX-RS Web サービスがあり、(他のサーバーから委任された) 要求を受信したときにこの WS を保護したいと考えています。したがって、基本認証を使用し、ユーザー名とパスワードを BasicAuthSecurityHandler オブジェクトに設定して、リクエストを他のサーバーに委任します。他のサーバーがリクエストを受信すると、グローバル セキュリティの下で WAS のフェデレーション リポジトリを使用して認証を行います。
デプロイメント記述子でをコメントアウトするauth-constraint
と、認証が行われません。認証のみを行い、認可は行いません。Jax-WS メソッドでアノテーションを使用してみ@PermitAll
ましたが、Jax-WS メソッドが実行される前にも承認が行われています。認証をスキップして認証を行う方法はありますか?
ユーザーに関連付けられたルールがないため、承認をスキップしたいと考えています。
<security-constraint id="SecurityConstraint_1">
<display-name>RESTSecurity</display-name>
<web-resource-collection id="WebResourceCollection_1">
<web-resource-name>DelegateReqComApp</web-resource-name>
<description>
Protection area for Rest resource /addresses
</description>
<url-pattern>/rest/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<!-- Authorization Constraint commented out -->
<auth-constraint id="AuthConstraint_1">
<description>
Used to guard resources under this url-pattern
</description>
<role-name>iapawas012</role-name>
</auth-constraint>
</security-constraint>