3

Glassfish 3で「クライアント証明書認証」を構成する必要があります。多くのシナリオを試しましたが、構成できませんでした。要件は次のとおりです。.cerファイルをインポートしたユーザーだけがアプリケーションにアクセスできます。

したがって、ブラウザーにアップロードされた(クライアントがアプリケーションにアクセスしようとしている).cerファイルを検証する必要があるように構成する必要があります。

証明書ファイルが検証されたら、ログイン画面(form-login)を表示する必要があります。さらに、ユーザーのユーザー名/パスワードを検証します。

(applicationCOntext-security.xmlファイルで)いくつかの構成を試しましたが、無駄でした。

クライアントが認証(最初に実行)とフォームログイン(次に実行)の両方を認証するようにSpringセキュリティを構成する方法を誰かに教えてもらえますか?

4

1 に答える 1

2

Spring does not do SSL its Glassfish that is setting up the SSL connection. By the time the request has arrived in Spring security all spring security knows is that the request came in over a secure channel but does not know how the secure channel was configured.

To setup client certificate authentication you need to configure glassfish to require a client side certificate to setup the SSL connection and to refuse the connection if the client does not provide a valid certificate.

This way you will get the behavior you want if the client does not present a valid certificate to glassfish glassfish never routes the call to spring.

I do know how to setup client side ssl authentication with glass fish so I can't help you with exact details, but google should know the answer.

于 2012-06-26T10:52:59.107 に答える