Skip to content

Conversation

ST-DDT
Copy link
Collaborator

@ST-DDT ST-DDT commented Nov 13, 2021

This PR improves the authentication process in the following fashion:

  • Improve javadocs with references to related spring security web counterparts
  • It adds overwriteable hook methods to the authentication process
  • Add the SECURITY_CONTEXT_KEY that now stores the entire security context instead of just the authentication, the security context is able to store more than just the authentication and can be used to replace the authentication during a call (e.g. for impersonation by admins or changing the roles of the user on the fly)
  • Add the SecurityContext to the grpc Context
  • Deprecate AUTHENTICATION_CONTEXT_KEY in favor of SECURITY_CONTEXT_KEY

@ST-DDT ST-DDT added the enhancement A feature request or improvement label Nov 13, 2021
@ST-DDT ST-DDT added this to the 2.13.0 milestone Nov 13, 2021
@ST-DDT ST-DDT requested a review from yidongnan November 13, 2021 20:04
@ST-DDT ST-DDT self-assigned this Nov 13, 2021
- Add overwritable hook methods
  - onSuccessfulAuthentication(...)
  - onUnsuccessfulAuthentication(...)
- Restore the full SecurityContext instead of just the Authentication
  - This allows storing additional information in the context,
  - and additional features such as changes to the currently active
authentication (Login As X)
@ST-DDT ST-DDT force-pushed the feature/security-api-refactor branch from ba4f2f4 to 72c249f Compare November 17, 2021 22:53
@yidongnan yidongnan merged commit 3ab8d44 into master Nov 22, 2021
@yidongnan yidongnan deleted the feature/security-api-refactor branch November 22, 2021 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A feature request or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants