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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T05:05:05+00:00 2026-06-14T05:05:05+00:00

I installed the Spring Security core plug-in 1.2.7.3 on Grails 2.1.1 , ran the

  • 0

I installed the Spring Security core plug-in 1.2.7.3 on Grails 2.1.1, ran the s2-quickstart command, and then initialized the initial user and roles in the bootstrap.groovy, but I still cannot login. Text of the relevant piece of BootStrap.groovy follows:

    if (SecRole.count == 0) {
        def fUserRole = SecRole.findByAuthority('ROLE_FlowUser') ?: new SecRole(authority: 'ROLE_FlowUser').save(failOnError: true, flush: true)
        def fAdminRole = SecRole.findByAuthority('ROLE_FlowAdmin') ?: new SecRole(authority: 'ROLE_FlowAdmin').save(failOnError: true, flush: true)

        def bf = SecUser.findByUsername('bill') ?: new SecUser(
                username: 'bill',
                password: 'eagle',
                firstName: 'bill',
                lastName: 'fly',
                email: 'bill.fly@baylorhealth.edu',
                accountExpired: false,
                accountLocked: false,
                passwordExpired: false,
                enabled: true
        ).save(failOnError: true, flush: true)

        if (!bf.authorities.contains(fAdminRole)) {
            SecUserSecRole.create bf, fAdminRole, true
        }
        if (!bf.authorities.contains(fUserRole)) {
            SecUserSecRole.create bf, fUserRole, true
        }
    }

I am not encrypting the password in bootstrap, as seems to be the answer to most of the questions of this type. All four records are getting written to the database tables, but of course, I cannot tell if the password is encrypted correctly. My initial controller has the following annotation ahead of the class statement:

@Secured(['IS_AUTHENTICATED_FULLY'])

Also, I added the following to the config.groovy:

// Added by the Spring Security Core plugin:

grails.plugins.springsecurity.userLookup.userDomainClassName = 'cocktail.SecUser'
grails.plugins.springsecurity.userLookup.authorityJoinClassName = 'cocktail.SecUserSecRole'
grails.plugins.springsecurity.authority.className = 'cocktail.SecRole'
grails.plugins.springsecurity.password.algorithm = 'SHA-256'
  • 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-14T05:05:06+00:00Added an answer on June 14, 2026 at 5:05 am

    Your password may be encoded two times (problem may occure if you are using multi datasources).

    Try this :

    class User {
        ...
        transient bEncoded = false
        ...
        protected void encodePassword() {
            if (!bEncoded ) { 
                password = springSecurityService.encodePassword(password); 
                bEncoded = true; 
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have installed spring-security-core in a grails project, but for some reason, IDEA didn't
I installed the Grails Spring Security Core plugin. As it works right now, a
I have installed spring security plug in to grails project.i have made my default
Grails 1.3.5 and have selenium-rc, easyb, and spring-security-core plugins installed. Everything seems to work
I'm having trouble using Spring Security successfully in my Grails application. I installed the
I'm using Grails Spring Security Core plugin and I need to perform a few
I've installed Spring Security plugin to my Grails application, saw login which works fine,
I have just started using grails and installed the spring-security and spring-security-ui plugins. I
I just installed springsecurity core and spring security openId plugins. I am able to
I have windows 7 and Grails-2.0.4. Trying to install plugin spring-security-core. I've tried from

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.