2013-02-22 384 views
0

我有一個網絡服務,我希望每個人都可以訪問此服務。旁路彈簧安全

在web.xml

<filter> 
    <filter-name>springSecurityFilterChainRendering</filter-name> 
    <filter-class> 
     org.springframework.web.filter.DelegatingFilterProxy 
    </filter-class> 
</filter> 
    <filter-mapping> 
      <filter-name>springSecurityFilterChainRemoting</filter-name> 
      <url-pattern>/cxf/*</url-pattern> 
    </filter-mapping> 

濾鏡鏈remoting.xml

 <bean id="springSecurityFilterChainRemoting" class="org.springframework.security.util.FilterChainProxy"> 
    <security:filter-chain-map path-type="ant"> 
     <!-- Remoting: stateful WebServices; 
      httpSessionContextIntegrationFilter creates SecurityContext 
      and populates it with information obtained from the HttpSession. 
      contextFilter supplies context with 
      the current project for the current HTTP user session; 
      securityFilter authenticates the user. --> 

     <security:filter-chain pattern="/cxf/KioskService/**" 
      filters="none"/> 

     <security:filter-chain pattern="/cxf/**" 
      filters="httpSessionContextIntegrationFilter, contextFilter,securityFilter"/> 

    </security:filter-chain-map> 
</bean> 

我怎麼能做到這一點繞過這些過濾器,每個人都消費這種服務。服務名稱KioskService

回答

1

更改web.xml中過濾器映射定義來自:

<url-pattern>/cxf/*</url-pattern> 

攔截只是要在安全的URL。

+0

如果我這樣做,網絡服務不起作用 – 2013-02-23 14:51:03