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

  • SEARCH
  • Home
  • 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 8249983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T23:43:45+00:00 2026-06-07T23:43:45+00:00

I am reading the doc Spring 3.1 security documentation extensively, but I can’t find

  • 0

I am reading the doc Spring 3.1 security documentation extensively, but I can’t find answers to all my questions.

In a spring web application, based on form login (user + pwd), I want to salt user passwords with SHA-256, using a random salt for each user. This means I have to save the salt and the hashed password in my database for each user. No issue so far.

  1. It seems clear that I have to implement my own UserDetailsService to fetch my user information’s from my database and configure it in my spring-security.xml.

  2. It seems like I will have to add an extra getSalt() method on top of my implementation of UserDetails to make it available when checking the login provided by the user against the stored hashed password.

Then the situation becomes unclear. I should intercept login requests. From section 6.4.3, it seems like Spring will map the user submitted credentials to an Authentication object and submit it to an AuthenticationManager.

My questions are:

i) What implementation of Authentication will Spring submit to the AuthenticationManager? How do I retrieve the name and password?

ii) It seems like I would have to implement my own AuthenticationManager. At each call of authenticate(...), I would fetch the login name and password, fetch UserDetails from the database. Then, hash the provided pwd with the corresponding salt and compare with the database hashed item. Correct?

iii) The AuthenticationManager API also has a supports(...) method. How should it be implemented?

iv) How should Authentication and AuthenticationManager be configured?

  • 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-06-07T23:43:47+00:00Added an answer on June 7, 2026 at 11:43 pm

    I must not be reading your question properly, but Spring Security offers salted passwords out of the box:

    http://static.springsource.org/spring-security/site/docs/3.1.x/reference/core-services.html#d0e3021

    If an 8-bit salt is insufficient, you are able to inject your own SaltSource into the DaoAuthenticationProvider. The manual actually strongly recommends this.

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

Sidebar

Related Questions

Sorry to ask this, but with previouse reading, re-reading of doc and all the
I've been reading over the perl doc, but I can't quite get my head
so i was reading the intent-filters paragraph from the doc, but i can't really
I was reading the doc, but I am still not too sure. Its says
I've finished reading the spring doc and the PetClinic sample project. Just like to
I've been reading about this on StackOverflow and facebook doc, yet I dont seem
I was just reading a little bit on them from http://www.cplusplus.com/doc/tutorial/namespaces/ and it seems
I have been reading a lot of django articles, including the official doc. Occasionally,
Reading the docs, I'd expect $(#wrap2).remove(.error) to remove all .error elements from #wrap2 .
Reading across difference lineage of CPU created by intel , many questions aroused in

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.