Questions tagged [grails-spring-security]

35 questions
1
vote
2 answers

How to make Grails's Spring Security Core render a different page depending on the reason why access was denied

I'm running a Grails Application using Spring Security Core Plugin. When an already logged in user tries to access a page without without access to it, the same action configured as 403 in UrlMappings.groovy is always called. I've been struggling to…
ylima
  • 410
  • 5
  • 17
1
vote
2 answers

Grails 3.2.0.M2 spring security exception on application startup

I have added the following on build.gradle to add spring security dependecy to my project compile 'org.grails.plugins:spring-security-core:3.1.1' But when I start my app I get the following exception ERROR org.springframework.boot.SpringApplication…
Sap
  • 5,197
  • 8
  • 59
  • 101
0
votes
1 answer

How can I customize exception mappings of default AuthenticationEventPublisher in Grails Spring Security Plugin

Background: In my project, I needed to have two factor authentication (by sending OTP to registered email) which I implemented by extending DaoAuthenticationProvider. In order to identify reason of why OTP authentication has failed, my custom…
0
votes
1 answer

Grails 3 Spring Security UI Plugin Add Custom Fields to Registration Form

Grails/Spring Security newbie here, I'm working w a legacy system and am in need of some proper answers from authoritative sources. Working with Grails 3 and version 3.1.2 of the Spring Security UI plugin, I'm just trying to add new fields like…
ZvKa
  • 138
  • 2
  • 3
  • 21
0
votes
1 answer

how to get default saved request uri in grails spring security core 4?

In grails 2.2 we could get the saved uri to redirect before login as follows. The redirect url would be saved in session[WebAttributes.SAVED_REQUEST]. def auth = { def config = SpringSecurityUtils.securityConfig def redirectURL …
0
votes
1 answer

How do I keep the spring-security-core login screen when using the spring-security-ui plugin

I am migrating a grails app from 2.3.4 to 3.3.9. I created a new app and am bringing in the code piece by piece. I have the "org.grails.plugins:spring-security-core:3.2.3" dependency and "org.grails.plugins:spring-security-ui:3.1.2" because I want…
John
  • 27
  • 1
  • 9
0
votes
1 answer

Grails - Spring security ldap active directory authentication - bad credentials error

I'm trying to implement security to REST API's using grails-sporing-security-rest and grails-spring-security-ldap plugins. The flow should be like this, once authentication provider is implemented it will authenticate the user using the…
0
votes
0 answers

Executing Multi-Tenant Aware Queries in Bootstrap.groovy

While trying to save some data to the datastore belonging to a specific tenant in BootStrap.groovy I am getting the following error. org.grails.datastore.mapping.multitenancy.exceptions.TenantNotFoundException: Tenant could not be resolved outside…
Satish
  • 31
  • 1
  • 7
0
votes
1 answer

Get username on failed login on Grails 2.5.5 w/ Spring Security

I need to capture the username on failed login attempts to do analysis to detect attacks and users that might have issues logging in my app. On a filter for all controllers and actions, I create a log using a domain class ActivityLog where all the…
Pablo Pazos
  • 3,080
  • 29
  • 42
0
votes
1 answer

Grails Security 3.1.2 login of user with role ROLE_ADMIN shows ROLE_NO_ROLES as authorities

I'm testing Grails 3.2.9 with Sec plugin 3.1.2. Created a user with role ROLE_ADMIN in bootstrap, and added permissions on interceptUrlMap for a test controller "note". After a successful login with that user, I see on the logs my admin has…
Pablo Pazos
  • 3,080
  • 29
  • 42
0
votes
1 answer

Grails Spring Security Rest 400 BAD REQUEST ERROR

I have been trying to authenticate the grails spring security rest url /api/login using curl in windows. But unable to do so. I've always ended up with 400 BAD REQUEST ERROR. These are my configuration BuildConfig.groovy compile…
Kenshin
  • 1,030
  • 2
  • 12
  • 41
0
votes
1 answer

grails-spring-security-rest OAuth OAuthException: Response body is incorrect

The plugin throws the following error when trying to sign in with facebook. error:500, message:org.scribe.exceptions.OAuthException: Response body is incorrect. Can't extract a token from this:…
0
votes
1 answer

How can I store the hierarchic Authority Class in the Person Class?

my question is: (How?) can I store my "authority" for my user in the user class in Grails with the Spring Security Plugin? I've given the following SQL structure: User table: ... varchar(255): username ... int(2) rank: (refers to Rank table) Rank…
user7715234
0
votes
1 answer

Null authentication when error handling 403

I'm running now Grails 3.1.15 with org.grails.plugins:spring-security-core:3.1.1. When I return a status code 403 my ErrorController should generate an appropriate error page (this is mapped in UrlMappings). It requires a…
Kuba
  • 854
  • 1
  • 8
  • 19
0
votes
1 answer

Grails upgrade to 3.2 broke springsecurity with config type requestmap

After upgrading Grails from 3.1.8 to 3.2.4 the application was stuck in a redirection loop, always tried to redirect to /login/auth. Typical behaviour for missing requestmap entries. I have tried to upgrade hibernate4 as well, as described in the…
hitty5
  • 1,653
  • 12
  • 25