Version 5.0.0 of plugin - Cannot set configuration override in application.yml or application.groovy
boardbloke opened this issue · 5 comments
Expected Behavior
I have set some spring-security-core overrides in application.yml thus:
grails:
plugin:
springsecurity:
userLookup:
userDomainClassName: test.User
usernamePropertyName: username
passwordPropertyName: passwd
enabledPropertyName: enabled
accountExpiredPropertyName: accountExpired
accountLockedPropertyName: accountLocked
passwordExpiredPropertyName: passwordExpired
authoritiesPropertyName: authorities
authorityJoinClassName: test.UserRole
But they are not being picked up. The code in ReflectionUtils.getSecurityConfig appears to be the problem. Its doing:
grailsConfig.getProperty('grails.plugin.springsecurity', ConfigObject.class)
and that is returning null
If I debug and evaluate the following instead, it works:
grailsConfig.grails.plugin.springsecurity
As does:
grailsConfig.getProperty('grails.plugin.springsecurity', org.grails.config.NavigableMap.class)
Actual Behaviour
No response
Steps To Reproduce
Create grails app with 5.0.0 version of spring security plugin
Add the overrides to the application.yml
Start app and debug into ReflectionUtils.getSecurityConfig()
Environment Information
No response
Example Application
No response
Version
5.1.2
Noticed the same earlier when attempting to use version 5 of the plugin with the spring security rest plugin. None of my overrides in application.groovy where picked up either.
I think this bug is related to grails/grails-core#12415 and evaluating
grailsConfig.getProperty('grails.plugin.springsecurity', Map.class)
instead of grailsConfig.getProperty('grails.plugin.springsecurity', ConfigObject.class)
in a debugger shows the correct values as opposed to null as you discovered.
Same here! Unfortunately the plugin (version 5.0.0) seems to be unusable.
@puneetbehl any chance to get a hotfix release with a bugfix?
@puneetbehl thoughts or feedback on the ETA?
This should be resolved with Grails 5.1.4
@puneetbehl thank you very much! I can confirm this issue is resolved with Grails 5.1.4