Results 1 to 3 of 3

Thread: Multiple Authentication for Web and Webservices with LDAP

  1. #1
    Join Date
    May 2011
    Posts
    7

    Default 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 at 09:36 PM.

  2. #2
    Join Date
    Sep 2004
    Location
    Manchester, NH
    Posts
    1,236

    Default

    Yes, this is possible in Spring Security 3.1, which now supports multiple <http> configuration elements. Is upgrading an option for you?
    Peter Mularien | Blog
    Author, Spring Security 3 (Book) - Packt Publishing, Available in print and eBook form
    SCJP 5, Oracle DBA
    Any postings are my own opinion, and should not be attributed to my employer or clients.


  3. #3
    Join Date
    May 2011
    Posts
    7

    Default

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

    Thanks,
    Logu

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •