Skip to content

SEC-1493: Add support for erasing credentials after authentication #1733

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

Closed
spring-projects-issues opened this issue Jun 1, 2010 · 3 comments
Labels
in: core An issue in spring-security-core type: enhancement A general enhancement type: jira An issue that was migrated from JIRA
Milestone

Comments

@spring-projects-issues
Copy link

Luke Taylor (Migrated from SEC-1493) said:

It should be possible to configure the AuthenticationManager to erase sensitive data (credentials) contained in Authentication objects and implementations of UserDetails. By making these implement a known interface (e.g. CredentialsContainer), the AuthenticationManager could invoke an "eraseCredentials" method to remove credentials data which is not required after authentication. This should be the default behaviour in 3.1 and optional in 3.0.3.

Users should be aware that this could cause problems with situations where a user cache is used. It will also not work if the user's credentials are required to be automatically propagated with RMI, for example.

@spring-projects-issues
Copy link
Author

Luke Taylor said:

Implemented as described above. User, AbstractAuthenticationToken and UsernamePasswordAuthenticationToken now implement CredentialsContainer and ProviderManager checks the returned Authentication object to see if it supoprts the interface. The namespace also has an erase-credentials attribute, which sets the "eraseCredentialsAfterAuthentication" property on the ProviderManager. Support is disabled by default on the 3.0.x branch and enabled on master (for 3.1).

@spring-projects-issues
Copy link
Author

Mark Liu said:

Hi Luke, I just tried using 3.1.1 snapshot. Disabling the attribute in the namespace config authentication-manager does not appear to propagate to the child providermanager. So the credential is still eventually erased. currently I have just one auth provider. Thanks.

@spring-projects-issues
Copy link
Author

This issue relates to #2238
This issue supersedes #1616

@rwinch rwinch added the type: enhancement A general enhancement label May 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core An issue in spring-security-core type: enhancement A general enhancement type: jira An issue that was migrated from JIRA
Projects
None yet
Development

No branches or pull requests

2 participants