簡體   English   中英

Spring Security https身份驗證

[英]Spring security https authentication

我正在使用Spring Security 3.2.5和Tomcat7。當我嘗試輸入需要身份驗證的頁面(通過https在遠程服務器上)時,我沒有重定向到默認的spring security登錄表單。

我的security.xml:

<security:intercept-url pattern="/**"
            access="isAuthenticated()" requires-channel="https"/>

        <security:port-mappings>
            <!-- Default ports -->
            <security:port-mapping http="8080" https="443" />
        </security:port-mappings>

我得到的錯誤:

Google Chrome's connection attempt to X.X.XXX.42 was rejected. The website may be down, or your network may not be properly configured.ERR_CONNECTION_REFUSED

我試圖按照本教程進行操作: 鏈接

塊引用

您說(在注釋中)可以使用HTTPS 直接訪問登錄頁面,但是在負載均衡器中嘗試登錄時,您遇到了錯誤。

我相信您不僅需要配置tomcat以與HTTPS一起使用,還必須配置負載平衡器。 如果您使用F5, 此鏈接可能會有所幫助。

(作為附帶說明,此問題的標記應從“ spring security”更改為“ load balancer”等。)

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM