Skip to content

Conversation

@bhavishyaone
Copy link
Contributor

Pull Request Template

Description:

  • I've been working on closing the gap between our gRPC and HTTP services (Issue POC : Identify Gaps between gRPC and HTTP services in GoFr #2576).
  • This PR brings Authentication to gRPC. I added interceptors for Basic Auth, API Keys, and OAuth so they match what we already have for HTTP.
  • I also tweaked the gRPC logger to handle standard OpenTelemetry tracing headers. It tries to use the standard OTEL way first, which makes it much easier to integrate with other tools.

Breaking Changes (if applicable):

  • Nope, no breaking changes.
  • The tracing update is backward compatible—if it doesn't find the standard headers, it falls back to our custom ones.

Additional Information:

  • I put all the new auth logic in pkg/gofr/grpc/middleware.
  • Added a bunch of tests in auth_test.go to cover the new interceptors.

Checklist:

  • I have formatted my code using goimport and golangci-lint.
  • All new code is covered by unit tests.
  • This PR does not decrease the overall code coverage.
  • I have reviewed the code comments and documentation for clarity.

Thank you for your contribution!

@coolwednesday
Copy link
Member

@bhavishyaone, Could you please fix the tests and address the linting issues as well?

For linting, make sure to install golangci-lint locally so you can run it on the modules before pushing your changes.

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.

2 participants