SEC-1032: x509 namespace configuration does not work in OSGi #1283

Closed
spring-issuemaster opened this Issue Nov 11, 2008 · 2 comments

1 participant

@spring-issuemaster

Saravanan Bellan (Migrated from SEC-1032) said:

We have two bundles,

1. security-config
2. UI

The security-config creates the authentication manager and exports the _authenticationManager as a
The UI code imports the authentication manager using and sets up the ..

Since the authManager is a osgi service, it is wrapped up in a osgi service proxy bean.

The following piece of code in ConfigUtils.java,

[code]
if(parserContext.getRegistry().containsBeanDefinition(BeanIds.AUTHENTICATION_MANAGER)) {
return parserContext.getRegistry().getBeanDefinition(BeanIds.AUTHENTICATION_MANAGER);
}
[/code]

retrieves the authManager and returns the BeanDefinition where the definition is for the proxy.

[code]
authManager.getPropertyValues().getPropertyValue(“providers”).getValue();
[/code]
and tries to retreive the providers property which is not available in the proxy and fails with ‘NullPointerException’.

Using spring security with regular format works fine.

@spring-issuemaster

Luke Taylor said:

I don’t really see any way round this – the namespace relies on the GUI authentication mechanism elements being able to modify the list of providers being maintained by the ProviderManager. If you choose to split the AuthenticationManager and the web security contexts into separate bundles then, as you say, all that is visible is the service interface, so that won’t work. I think if you want to do that you’ll just have to fall back to conventional bean syntax where necessary.

@spring-issuemaster

Luke Taylor said:

Closing as “won’t fix”. If someone can come up with a suitable workaround/patch then please submit anew issue.

@spring-issuemaster spring-issuemaster added this to the 3.0.0 M1 milestone Feb 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment