Announcement Announcement Module
Collapse
No announcement yet.
Multiple Authentication for Web and Webservices with LDAP Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Multiple Authentication for Web and Webservices with LDAP

    Hi,

    I been working on spring security since two days. I wanted to authenticate my web access /**/admin/*.jsp* to LdapServer1 and /**/services/**ServiceImpl (all webservices) into another LdapServer2.

    <security:intercept-url pattern="/**/admin/index.jsp*" filter="myfilter1"/>
    <security:intercept-url pattern="/**/services/**" filter="myfilter2"/>

    Actually i'm not getting any proper source, where pattern 1 goes to first authentication provider, and patten 2 goes to authentication provider 2.

    Following url has some info, but its not working for me.
    http://blog.springsource.com/2010/03...ity-namespace/



    Here my security definition:

    <bean id="filterChainProxy" class="org.springframework.security.web.FilterChai nProxy">
    <security:filter-chain-map path-type="ant">
    <security:filter-chain pattern="/images/*" filters="none"/>
    <security:filter-chain pattern="/**/admin/index.jsp*" filters="basicAuthenticationFilter"/>
    </security:filter-chain-map>
    </bean>

    <bean id="basicAuthenticationFilter"
    class="org.springframework.security.web.authentica tion.www.BasicAuthenticationFilter">
    <property name="authenticationManager" ref="authenticationManager"/>
    <property name="authenticationEntryPoint" ref="authenticationEntryPoint"/>
    </bean>

    <bean id="authenticationEntryPoint"
    class="org.springframework.security.web.authentica tion.www.BasicAuthenticationEntryPoint">
    <property name="realmName" value="test"/>
    </bean>


    <security:authentication-manager alias="authenticationManager">
    <security:authentication-provider >
    <security:user-service>
    <security:user name="logu" password="test" authorities="ROLE_USER" />
    </security:user-service>
    </security:authentication-provider>
    </security:authentication-manager>

    web.xml

    <filter>
    <filter-name>springSecurityFilterChain</filter-name>
    <filter-class>oorg.springframework.security.web.FilterChai nProxy</filter-class>
    </filter>


    I was getting nullpointer exception in FilterchainProxy. is there anyway i can define multiple http entries for calling Authentication provider?

    Thanks in advance.
    -Logu
    Last edited by logu96; May 11th, 2011, 10:36 PM.

  • #2
    Yes, this is possible in Spring Security 3.1, which now supports multiple <http> configuration elements. Is upgrading an option for you?

    Comment


    • #3
      Im planning to use 3.0.5, i think it does not support multiple <http> entries.

      Thanks,
      Logu

      Comment

      Working...
      X