SEC-778: exceptionMappings configuration in default namespace #1037

Closed
spring-issuemaster opened this Issue Apr 16, 2008 · 7 comments

1 participant

@spring-issuemaster

Neil Anderson (Migrated from SEC-778) said:

Would it be possible to update the namespace based configuration to allow exception mappings to be created for the default authentication processing filter created via the form-login. This would be useful when cutting down the XML required to configure spring security.

Regards
Neil

@spring-issuemaster

Luke Taylor said:

To be reviewed for 2.1

@spring-issuemaster

Neil Anderson said:

I hit this issue again and was wondering if there is something that can be done in the short term. Not being able to set exceptionMappings on the AuthenticationProcessingFilter via the namespace based configuration is a pain. The result is verbose XML has to be produced to do the mapping.

An update that would resolve the problem would be to allow something like the following XML by updating the security schema. The FormLoginBeanDefinitionParser could then be updated to produce the exceptionMappings list.

Regards
Neil

@spring-issuemaster

Neil Anderson said:

The attachment contains a proposed solution to the issue where you can not configure the ‘exceptionMappings’ on the AuthenticationProcessingFilter class via the namespace based configuration. The change does not effect any existing namespace configuration and is backwards compatible. The update will allow the following configuration within the http security element:

The update is based on the current 2.0.4 snapshot from svn and is valid as of the 24th of July 2008.

I would appreciate it if you would take a look at this and check the code in for the 2.0.4 release if you are happy with the code.

Regards
Neil Anderson

@spring-issuemaster

Luke Taylor said:

This thread is also related to this issue:

http://forum.springframework.org/showthread.php?t=54723

My comment from there explains why we don’t want define exception mappings explicitly for form-login:

“Exception mappings may be something that we should look at but we intend to revisit the whole subject of redirection/forwarding within the framework for the next major version and it should be considered as part of that. For example, a strategy might be introduced to encapsulate the navigation behaviour when an exception occurs – similar to TargetUrlResolver (which will also probably be changed). This would be more flexible than the existing exception-mapping approach. So I agree that this kind of functionality would be useful within the namspace but it may not be right to implement it in the way you’ve suggested. The concept of an authentication failure isn’t specific to form-based logins, so it may be that the strategy should be set within the block itself and be applied to other authentication mechanisms.”

This concept also applies to other filters such as OpenID and will be considered as part of our overall strategy for handling destination URLs.

@spring-issuemaster

Luke Taylor said:

Making SEC-745 the parent issue URL-navigation behaviour.

@spring-issuemaster

Luke Taylor said:

Superseded by SEC-745 (and subtasks).

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

This issue duplicates #1005

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