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

SEC-1586: RemoteAuthenticationException is not catch by spring security filter #1825

Closed
spring-projects-issues opened this issue Oct 4, 2010 · 8 comments
Labels
status: invalid An issue that we don't feel is valid type: enhancement A general enhancement type: jira An issue that was migrated from JIRA

Comments

@spring-projects-issues
Copy link

Ludovic Praud (Migrated from SEC-1586) said:

When using remote authentication over RMI, I use RemoteAuthenticationManagerImpl class which translate AuthenticationException into RemoteAuthenticationException. When the exception come back to client layer, spring security filter does not catch it because it is not of AuthenticationException type. This is not very useful because I'd expect spring security filter to handle this transparently. But right known I need to translate this exception myself. It would be cool to provide such translation on the client side implementation of RemoteAuthenticationProvider.

@spring-projects-issues
Copy link
Author

Per Holmberg said:

As a work-around, you can create and use this bean class:

public class FixedRemoteAuthenticationProvider extends RemoteAuthenticationProvider {
    public Authentication authenticate(Authentication auth) {
        try {
            return super.authenticate(auth);
        } catch (RemoteAuthenticationException rae) {
            throw new AuthenticationException(rae.getMessage(), rae) { };
        }
    }
}

@spring-projects-issues spring-projects-issues added Open type: enhancement A general enhancement type: jira An issue that was migrated from JIRA labels Feb 5, 2016
@rwinch rwinch removed the Open label May 3, 2019
@rwinch rwinch added status: first-timers-only An issue that can only be worked on by brand new contributors status: ideal-for-contribution An issue that we actively are looking for someone to help us with and removed status: first-timers-only An issue that can only be worked on by brand new contributors labels May 24, 2021
@rwinch
Copy link
Member

rwinch commented May 24, 2021

This issue is ideal for contributions. The solution would modify RemoteAuthenticationProvider to have a boolean property named wrapRemoteAuthenticationException with a default value of false. If it was true, the RemoteAuthenticationException would be wrapped in an AuthenticationException. The solution should also include tests.

@dkodippily
Copy link
Contributor

dkodippily commented Jul 20, 2021

@rwinch can I work on this ?

@holmis83
Copy link

Since serialization-based remoting is deprecated, maybe this should be deprecated too?
(To favour REST/OAuth2 type of authentication, which I changed to.)

@jzheaux
Copy link
Contributor

jzheaux commented Aug 20, 2021

@holmis83 thanks for bringing this up. To be clear, are you referring to spring-projects/spring-framework#25379 or something else?

@holmis83
Copy link

@holmis83 thanks for bringing this up. To be clear, are you referring to spring-projects/spring-framework#25379 or something else?

@jzheaux Yes, RemoteAuthenticationManager is (was?) typically used in conjunction with httpinvoker package, which was deprecated with the above issue.

@SeifMostafa
Copy link

@rwinch I think it's deprecated by closed #10384 , If not can you clarify and provide guide lines to work on it - if possible - ?

@rwinch
Copy link
Member

rwinch commented Jun 2, 2022

@SeifMostafa You are right. What's more is that for 6.x RMI support was removed. See gh-10366

@rwinch rwinch closed this as completed Jun 2, 2022
@rwinch rwinch added status: invalid An issue that we don't feel is valid and removed status: ideal-for-contribution An issue that we actively are looking for someone to help us with labels Jun 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: invalid An issue that we don't feel is valid type: enhancement A general enhancement type: jira An issue that was migrated from JIRA
Projects
None yet
6 participants