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

added authentication propagating listener #233

Closed
wants to merge 1 commit into from

Conversation

markbanierink
Copy link

Added a listener that is registered after the ContextualizedServerCallListener. This lister propagates the Authentication from the grpc context to the spring security context. This way all spring security features can be used in all services.

@codecov
Copy link

codecov bot commented Jul 18, 2021

Codecov Report

Merging #233 (b29dc60) into master (da062e1) will decrease coverage by 0.13%.
The diff coverage is 89.47%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #233      +/-   ##
============================================
- Coverage     90.31%   90.17%   -0.14%     
- Complexity      210      211       +1     
============================================
  Files            38       38              
  Lines           888      906      +18     
  Branches         41       41              
============================================
+ Hits            802      817      +15     
- Misses           68       70       +2     
- Partials         18       19       +1     
Impacted Files Coverage Δ
.../springboot/grpc/security/SecurityInterceptor.java 93.54% <89.47%> (-1.91%) ⬇️
...grpc/autoconfigure/consul/GrpcConsulRegistrar.java 90.69% <0.00%> (-2.33%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update da062e1...b29dc60. Read the comment docs.

Copy link

@ST-DDT ST-DDT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would probably store the authentication in a field instead of getting it from the context, but thats only a matter of preference.

@jvmlet
Copy link
Collaborator

jvmlet commented Jul 18, 2021

Thanks @markbanierink, will review this PR first thing after I'm back to office (~28.07)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants