Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CAS configuration once loaded overrides the other application configuration #27

Open
EshaanKumar opened this issue Oct 19, 2018 · 1 comment

Comments

@EshaanKumar
Copy link

EshaanKumar commented Oct 19, 2018

The code in SpringSecurityCasGrailsPlugin - loads "DefaultCasSecurityConfig"

`SpringSecurityUtils.loadSecondaryConfig 'DefaultCasSecurityConfig'
		// have to get again after overlaying DefaultCasSecurityConfig
		conf = SpringSecurityUtils.securityConfig

		if (!conf.cas.active) {
			return
		}`

And in "DefaultCasSecurityConfig" there are default CAS configuration which are now loaded whenever the Plugin is included irrespective the active flag is true of false.

In similar line there is SAML plugin SpringSecuritySamlGrailsPlugin. The above mentioned code is commented.

Code in the CAS plugin need to be commented too. This will ensure that default CAS configuration wouldn't be loaded by default whenever this plugin is included.

@SleepingForester
Copy link

Load secondary config method user merge config. Here it is description about it:
/**
* Merge two configs together. The order is important if secondary is not null then
* start with that and merge the main config on top of that. This lets the secondary
* config act as default values but let user-supplied values in the main config override them.
*
* @param currentConfig the main config, starting from Config.groovy
* @param secondary new default values
* @return the merged configs
*/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants