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 tests for streaming calls #148

Merged
merged 3 commits into from
Dec 3, 2018
Merged

Added tests for streaming calls #148

merged 3 commits into from
Dec 3, 2018

Conversation

ST-DDT
Copy link
Collaborator

@ST-DDT ST-DDT commented Nov 28, 2018

Features

  • Added AnonymousAuthenticationReader to allow some calls to skip authentication, when using AuthorizationCheckingServerInterceptor.
  • Added some convenience methods to AccessPredicate
  • Added tests for streaming calls
  • Fixed missing AccessDeniedException -> AuthenticationException transformations

TBD

  • I noticed that the permitAll access setting does not allow unauthenticated users to access the methods, if anonymous authentication is not enabled. Should I add/change it to an explicit permitAll?

@ST-DDT ST-DDT added the enhancement A feature request or improvement label Nov 28, 2018
@yidongnan
Copy link
Collaborator

I think you can add/change it to an explicit permitAll or explain it clearly in the readme, otherwise some issues may appear.

Now, null is treated as public access instead of resetting the
previously set values and using the default.
@ST-DDT
Copy link
Collaborator Author

ST-DDT commented Dec 3, 2018

I checked the current spring-provided structure and AFAICT it is not possible to add an explicit "permitAll". Thus, I changed the logic a bit to use null as public access. However, I'm not sure whether null is a good value to disable security. As an alternative I thought about adding a setPublic(MethodDescriptor) method to ManualGrpcSecurityMetadataSource. What do you think?

@ST-DDT
Copy link
Collaborator Author

ST-DDT commented Dec 3, 2018

I guess I'll use a constant for now.

@yidongnan
Copy link
Collaborator

yidongnan commented Dec 3, 2018

LGTM. I think the way to use constants is acceptable.

@yidongnan yidongnan merged commit 13b4176 into grpc-ecosystem:master Dec 3, 2018
@ST-DDT ST-DDT deleted the streaming-security-test branch December 3, 2018 15:39
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