I am trying to implement SSO in many web applications using CAS and Spring Security. Expected case:
CAS - http: // localhost: 8080 / cass / apa protected content - http: //localhost:8081/cas-client1/secure/index.html
APB protected content - http: //localhost:8081/cas-client2/secure/index.html
1) When a user is access cas-client 1, the CAS login form will be prompted and the authentication will be triggered. .
2) The same user access case-client 2, the previous log-in should be recognized and no entry form will be given.
However, I failed to apply Step 2. The user is still prompted. Therefore, double login required whether my spring security configuration has a wrong setting:
& lt; Security: http entry-point-riff = "casAuthenticationEntryPoint" auto-config = "true" & gt; & Lt; Security: Block-url pattern = "/ secure / **" access = "ROLE_USER" /> & Lt; Security: custom-filter status = "CAS_FILTER" riff = "case attestation filter" /> & Lt; / Security: http & gt; & Lt; Bean id = "casAuthenticationEntryPoint" class = "org.springframework.security.cas.web.CasAuthenticationEntryPoint" & gt; & Lt; Property name = "login url" value = "http: // localhost: 8080 / cass / login" /> & Lt; Property Name = "Service Properties" ref = "Service Properties" /> & Lt; / Bean & gt; & Lt; Bean id = "serviceproperties" category = "org.springframework.security.cas.ServiceProperties" & gt; & Lt ;! - http: // localhost: 8081 / cas-client2 for app2 - & gt; & Lt; Property name = "service" value = "http: // localhost: 8081 / cas-client1 / j_spring_cas_squari_check" /> & Lt; / Bean & gt; & Lt; Security: Authentication Manager Last Name = "Authentication Manager" & gt; & Lt; Security: Authentication Provider Ref = "Case Attribution Provider" / & gt; & Lt; / Security: Authentication Manager & gt; & Lt; Bean id = "Case attestation filter" class = "org.springframework.security.cas.web.CasAuthenticationFilter" & gt; & Lt; Property Name = "Authentication Manager" Riff = "Authentication Manager" / & gt; & Lt; Property Name = "Authentication Fellherhands" & gt; & Lt; Bean class = "org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler" & gt; & Lt; Property Name = "DefaultFileer URL" value = "/ caffeel.jsp" /> & Lt; / Bean & gt; & Lt; / Property & gt; & Lt; / Bean & gt; & Lt; Bean id = "How artificial affair" class = "org.springframework.security.cas.authentication.CasAuthenticationProvider" & gt; & Lt; Property Name = "userDetailsService" ref = "userService" /> & Lt; Property Name = "Service Properties" ref = "Service Properties" /> & Lt; Property Name = "Ticket Fareer" & gt; & Lt; Bean class = "org.jasig.cas.client.validation.Cas20ServiceTicketValidator" & gt; & Lt; Constructor-Arg index = "0" value = "http: // localhost: 8080 / case" /> & Lt; / Bean & gt; & Lt; / Property & gt; & Lt; Property name = "key" value = "an_id_for_this_auth_provider_only" /> & Lt; / Bean & gt; & Lt; Security: User-Service ID = "User Service" & gt; & Lt; Security: Username = "Wilson" password = "Wilson" officers = "ROLE_USER" /> & Lt; / Security: User service & gt;
The problem is resolved in the end. My CAS is using HTTP and therefore there is a need to set false cookies to false.
TicketGrintTypeTkitter.Axm
p: cookieSecure = "false"
Comments
Post a Comment