私は私のウェブサイトで2パスしている+ SSL + Tomcatの6.0.26Tomcat 6でSSLから非SSLに戻す方法は?
をJSF 2つの+ JAASを使用しています:
/顔//SSL
/顔を使用する* /保護保護されていない/ * SSLを使用していません。
私は私のweb.xmlにこれを入れている:
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/faces/login.jsp</form-login-page>
<form-error-page>/faces/error.jsp</form-error-page>
</form-login-config>
</login-config>
<security-constraint>
<web-resource-collection>
<web-resource-name>Secure Resource</web-resource-name>
<description/>
<url-pattern>/faces/unprotected/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
<http-method>HEAD</http-method>
<http-method>PUT</http-method>
<http-method>OPTIONS</http-method>
<http-method>TRACE</http-method>
<http-method>DELETE</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>C</role-name>
</auth-constraint>
</security-constraint>
<security-constraint>
<web-resource-collection>
<web-resource-name>Secure Resource</web-resource-name>
<description />
<url-pattern>/faces/protected/*</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
<http-method>HEAD</http-method>
<http-method>PUT</http-method>
<http-method>OPTIONS</http-method>
<http-method>TRACE</http-method>
<http-method>DELETE</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>C</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
<security-role>
<description> Role Client </description>
<role-name>C</role-name>
</security-role>
、これが私のserver.xmlです:私は保護されたパスに入力したときに
<Connector port="8080" protocol="HTTP/1.1"
maxThreads="400"
maxKeepAliveRequests="1"
acceptCount="100"
connectionTimeout="3000"
redirectPort="8443"
compression="on"
compressionMinSize="2048"
noCompressionUserAgents="gozilla, traviata"
compressableMimeType="text/javascript,text/css,text/html, text/xml,text/plain,application/x-javascript,application/javascript,application/xhtml+xml" />
<Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol" SSLEnabled="true"
maxThreads="400" scheme="https" secure="true"
clientAuth="optional" sslProtocol="TLS"
SSLCertificateFile="path/to/crt"
SSLCertificateKeyFile="path/to/pem"/>
、それはHTTPSに切り替わります(ポート8443)、私がpath/faces/unprotected/somthingに入ると、HTTPSを使用したままです。
保護されていないパスに入ると、SSL以外の通信に戻ります(そうでなければ、ブラウザに正確なアドレスを設定すると再びログインする必要があります)。
設定に何が問題がありますか?
私はこのようなことをする方法がありますか?
2回目の認証を求めずにページを呼び出すことはできますか?
それを単純に再インストールすると、簡単な解決策になります –
何を再インストールしますか? – mohamida