Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6735761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:03:03+00:00 2026-05-26T11:03:03+00:00

My application uses Spring Security for handling authentication. So far I was using simple

  • 0

My application uses Spring Security for handling authentication. So far I was using simple authenticaton provider based on jdbc-user-service which was both performing authentication and loading authorities and it all worked fine:

<authentication-manager alias="authenticationManager">
    <authentication-provider>
        <password-encoder hash="sha" />
        <jdbc-user-service data-source-ref="dataSource"
            authorities-by-username-query="select t1.login, t2.USERROLES from USER as t1, USERROLES as t2 where t1.ID=t2.User_ID and t1.login= ?"
            users-by-username-query="select login,password,enabled from USER where login = ?" />
    </authentication-provider>
</authentication-manager>

Now I got a new specification:

  1. Authorities should be loaded from database just as before
  2. Authentication should be done using LDAP

I properly configured LDAP authentication in a test application and it works just fine. Now I have to put it together. How could I make my jdbc auth-provider to not perform authentication but only load authorities and enable the next auth-manager in order (LDAP auth-manager in my case) to do real authenticaton?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T11:03:03+00:00Added an answer on May 26, 2026 at 11:03 am

    You need to implement your own authentication provider, but of course you can reuse the DaoAuthenticationProvider and LDAP authentication provider.

    BTW: the authorization part of the Ldap authentication provider is done in LdapAuthoritiesPopulator.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an existing grails application that uses spring-security plugin for authentication. I would
I have a grails application that uses spring-security-core and spring-security-ldap, with authentication against Active
I'm using spring-security and jQuery in my application. Main page uses loading content dynamically
In my application which uses spring security I want to define two different areas
I have a Spring application that uses JAX-WS to consume another web service. Everything
I am writing an application that uses GWT, some Spring MVC and Spring Security.
I have application, which uses Spring, Hibernate and Spring Security. My goal is to
I have an application that uses Spring Security to control access to pages, to
I'm developing a Grails (Version 1.3.3) Web-Application using the Grails Spring-Security Plugin, Spring-Security-Core-1.0.1 (which,
I have the following situation: my application's authorization mechanism is implemented using Spring security.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.