2015-02-18 8 views
0

Я использую расширение SAML Spring Security для аутентификации и ниже работает очень хорошо, без каких-либо проблем.Изменение шаблона входа в систему НЕ работает

<!-- Secured pages with SAML as entry point --> 
<security:http entry-point-ref="samlEntryPoint"> 
    <security:custom-filter position="CONCURRENT_SESSION_FILTER" ref="concurrentSessionFilter"/> 
    <security:custom-filter before="CONCURRENT_SESSION_FILTER" ref="logoutFilter"/>      
    <security:custom-filter after="BASIC_AUTH_FILTER" ref="samlFilter"/> 
    <!-- Below Adds an AnonymousAuthenticationFilter to the stack --> 
    <security:anonymous username="roleAnonymous"/>  
    <security:intercept-url pattern="/logon/targeturl" 
     access="ROLE_CUSTOMER,ROLE_ADMIN" /> 
    <security:intercept-url pattern="/logon/**" 
     access="IS_AUTHENTICATED_ANONYMOUSLY" /> 
    <security:intercept-url pattern="/userServlet/unprotected/**" 
     access="IS_AUTHENTICATED_ANONYMOUSLY" /> 
    <security:intercept-url pattern="/csr/**" 
     access="ROLE_ADMIN" /> 
    <security:intercept-url pattern="/**" 
     access="ROLE_CUSTOMER,ROLE_ADMIN" /> 
</security:http> 


<!-- Filters for processing of SAML messages --> 
<bean id="samlFilter" class="org.springframework.security.web.FilterChainProxy"> 
    <security:filter-chain-map request-matcher="ant"> 
     <security:filter-chain pattern="/logon/saml/login/**" filters="samlEntryPoint"/> 
     <security:filter-chain pattern="/logon/saml/logout/**" filters="samlLogoutFilter"/>    
     <security:filter-chain pattern="/logon/saml/SSO/**" filters="uobSamlWebSSOProcessingFilter"/> 
     <security:filter-chain pattern="/logon/saml/metadata/**" filters="metadataDisplayFilter"/> 
     <security:filter-chain pattern="/logon/saml/SSOHoK/**" filters="samlWebSSOHoKProcessingFilter"/> 
     <security:filter-chain pattern="/logon/saml/SingleLogout/**" filters="samlLogoutProcessingFilter"/>    
    </security:filter-chain-map> 
</bean> 

Но когда я изменить URL'ы для обработки SAML, как указано ниже, это не работает ... любая идея, что я делаю неправильно? Потребность в том, что я хочу удалить/logon/из всех URL-адресов обработки SAML.

<!-- Secured pages with SAML as entry point --> 
<security:http entry-point-ref="samlEntryPoint"> 
    <security:custom-filter position="CONCURRENT_SESSION_FILTER" ref="concurrentSessionFilter"/> 
    <security:custom-filter before="CONCURRENT_SESSION_FILTER" ref="logoutFilter"/>      
    <security:custom-filter after="BASIC_AUTH_FILTER" ref="samlFilter"/> 
    <!-- Below Adds an AnonymousAuthenticationFilter to the stack --> 
    <security:anonymous username="roleAnonymous"/>  
    <security:intercept-url pattern="/logon/targeturl" 
     access="ROLE_CUSTOMER,ROLE_ADMIN" /> 
    <security:intercept-url pattern="/logon/**" 
     access="IS_AUTHENTICATED_ANONYMOUSLY" /> 
    <security:intercept-url pattern="/saml/**" 
     access="IS_AUTHENTICATED_ANONYMOUSLY" />    
    <security:intercept-url pattern="/userServlet/unprotected/**" 
     access="IS_AUTHENTICATED_ANONYMOUSLY" /> 
    <security:intercept-url pattern="/csr/**" 
     access="ROLE_ADMIN" /> 
    <security:intercept-url pattern="/**" 
     access="ROLE_CUSTOMER,ROLE_ADMIN" /> 
</security:http> 


<!-- Filters for processing of SAML messages --> 
<bean id="samlFilter" class="org.springframework.security.web.FilterChainProxy"> 
    <security:filter-chain-map request-matcher="ant"> 
     <security:filter-chain pattern="/saml/login/**" filters="samlEntryPoint"/> 
     <security:filter-chain pattern="/saml/logout/**" filters="samlLogoutFilter"/>    
     <security:filter-chain pattern="/saml/SSO/**" filters="uobSamlWebSSOProcessingFilter"/> 
     <security:filter-chain pattern="/saml/metadata/**" filters="metadataDisplayFilter"/> 
     <security:filter-chain pattern="/saml/SSOHoK/**" filters="samlWebSSOHoKProcessingFilter"/> 
     <security:filter-chain pattern="/saml/SingleLogout/**" filters="samlLogoutProcessingFilter"/>    
    </security:filter-chain-map> 
</bean>  

ответ

0

При изменении URL-адреса вам может потребоваться обменять новые метаданные с помощью IDP.

Чтобы получить больше информации о том, что происходит, вы можете установить LogLevel для отслеживания для следующих пакетов:

  • org.springframework.security.saml
  • org.opensaml
  • орг. springframework.security.web.authentication

Удачи вам!

:)

Смежные вопросы