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

Already on GitHub? Sign in to your account

SEC-1162: Incorrect warning created when using <authentication-manager alias="foo"/> to give AuthenticationManager an id to reference #1410

spring-issuemaster opened this Issue May 6, 2009 · 4 comments


None yet
1 participant

Kent Larsson (Migrated from SEC-1162) said:

When using Spring Security using makes it possible to reference the AuthenticationManager used with the id foo. However this is not noticed by Spring IDE which adds a warning of the form: Referenced bean 'foo' not found

It should be noted that the code works when it's run. See Spring Forum thread for more details.

Kent Larsson said:

I didn't know which Component this issue relates to, please change it into the proper one.

Christian Dupuis said:

Luke, this is a problem in AuthenticationManagerBeanDefinitionParser not using the Tooling API to register the authenticationManager bean and the alias.

Luke Taylor said:


I've made an attempt at fixing this issue by registering a BeanComponentDefintion for the AuthenticationManager, but I've had some problems.

Firstly, I couldn't get the AuthenticationManager bean instance to appear in Spring IDE unless I explicitly declare a "source" object. Could you confirm whether Spring IDE will show beans which do not have a source property? The AuthenticationManager is registered internally by the namespace, so it doesn't really make sense for it to be attached to a specific HTML element.

I managed to get the alias to appear (and the error to go away) by using the method:

    pc.getReaderContext().fireAliasRegistered(BeanIds.AUTHENTICATION_MANAGER, alias, pc.extractSource(element));

after registering the alias using

    pc.getRegistry().registerAlias(BeanIds.AUTHENTICATION_MANAGER, alias);

Is that the correct approach? The alias just appears as a little bean icon with a square round it and the alias name next to it. There is no indication of what it actually aliases. The warning in the XML editor only goes away when the AuthenticationMananger bean is visible, so I would like to find a better solution for that, other than giving it a source object.

Luke Taylor said:

I spoke with Christian some time ago and this is the correct expected. With a Spring IDE build using the latest namespace code, the alias now appears and there are no errors.

@spring-issuemaster spring-issuemaster added this to the 3.0.0 M2 milestone Feb 5, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment