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

Infrastructure for generic JWT authentication #6821

Closed
augi opened this issue Mar 12, 2020 · 2 comments
Closed

Infrastructure for generic JWT authentication #6821

augi opened this issue Mar 12, 2020 · 2 comments
Milestone

Comments

@augi
Copy link

augi commented Mar 12, 2020

Is your feature request related to a problem?

The problem I see is that it is described in documentation how to implement JWT authentication for a custom (non-Google) server so everyone has to repeat the same code that is shown in the documentation and it could lead to invalid implementations.

Describe the solution you'd like

It would be great if the grpc-java project offered an infrastructure (like set of interfaces/classes) that would drive gRPC users to the right implementation of JWT implementation, for both client and server.

#5915 introduces a new example on JWT but I still believe that a set of interfaces/classes to use is a better way.

Describe alternatives you've considered

Keep all as is.

Additional context

I'm author of the grpc-java-jwt library that contains two modules:

  • core with the basic infrastructure for any JWT-based authentication
    • depends on io.grpc:grpc-core and org.slf4j:slf4j-api only.
  • keycloak with implementation for Keycloak.

It would be great if grpc-core contained basically the same as the core.

If you show me where I should place the new code, I could prepare a new PR, if you want.

@voidzcy
Copy link
Contributor

voidzcy commented Mar 12, 2020

In general, we would prefer application layer authentication to be implemented with custom interceptors than builtin APIs in gRPC, as we think this is something built on top of gRPC. That's also one of the purposes of having interceptors in our design. A lot of similar things can be done with custom interceptors such as connection timeout or any client-server sharing scoped data. Majority logics in these implementations are considered to be custom. Also, in general those custom interceptors are relatively easy to implement by users themselves and put as a thin layer on top of gRPC. Examples give good enough information for users to do things they want. We would try to merge #5915 soon.

@voidzcy voidzcy added this to the Unscheduled milestone Mar 12, 2020
@voidzcy
Copy link
Contributor

voidzcy commented Mar 18, 2020

#5915 is merged. Closing.

@voidzcy voidzcy closed this as completed Mar 18, 2020
@ejona86 ejona86 modified the milestones: Unscheduled, 1.29 Mar 26, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jun 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants