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 6673123
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:35:26+00:00 2026-05-26T03:35:26+00:00

I am trying to do salted password hashing in my Grails + Spring Security

  • 0

I am trying to do salted password hashing in my Grails + Spring Security application. I have used the tutorials on the Grails site, and also ones I found randomly on the Internet.

At the moment, I have everything set up according to this tutorial. However I run into a problem when deploying the application with the following bean declaration in resources.groovy:

saltSource(cq.MySaltSource) {
    userPropertyToUse = CH.config.grails.plugins.springsecurity.dao.reflectionSaltSourceProperty
}

It complains that it cannot find CH.

After digging around, I found a post on nabble stating the following:

Also – don’t use ConfigurationHolder (CH) since it’s deprecated in 2.0. You can pass in a reference to the grailsApplication bean and get the config from there:

saltSource(MySaltSource) {
  grailsApplication = ref('grailsApplication')
}

and then in your class add

def grailsApplication

and get the property via

String userPropertyToUse  grailsApplication.config.grails.plugins.springsecurity.dao.reflectionSaltSourceProperty 

The part that I do not follow is the last statement about “…and get the property via…”. The line of code he gives there seems malformed to me.

If anyone can shed some light here, or provide a different approach to using salted passwords with Grails and Spring Security, I would appreciate it. Note that it needs to be unique salts per user, not system-wide or a single salt, or a salt derived from username.

Thanks


UPDATE

So I got it working with the first tutorial (forgot the import statement at the top of resources.groovy. But I would still like to use the second way (to stay compatible with the future version).


UPDATE 2

I have written a complete tutorial on this if anyone browsing here is interested:

Setting up a Grails web application using Spring Security and salted passwords.

  • 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-26T03:35:27+00:00Added an answer on May 26, 2026 at 3:35 am

    In resources.groovy where you’re defining the saltSource bean the GrailsApplication is available as the application variable, so you can change the bean declaration to

    saltSource(cq.MySaltSource) {
       userPropertyToUse = application.config.grails.plugins.springsecurity.dao.reflectionSaltSourceProperty
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to familiarize myself with the embedded field, but also have limited resources
I have a web application that handles employees work sheets. They have username/password combinations
Trying to get comfortable with jQuery and I have encountered some sample code that
Trying to make a MySQL-based application support MS SQL, I ran into the following
Trying to create a QtRuby application, I get the following error: /usr/lib64/ruby/site_ruby/1.8/Qt/qtruby4.rb:2144: [BUG] Segmentation
I am trying to implement Salted Challenge Response Authentication Mechanism ( RFC 5802 )
Trying to deploy application using ClickOnce to a webserver running sharepoint. I can publish
I am trying to generate a unique token for every user on my site.
I'm trying to create authentication where all passwords are hashed and salted. First, for
Trying to set RowHeight like this(in code): dgvTruckAvail.RowTemplate.Height = 48; Doesnt' work. I also

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.