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

auth: support OIDC authentication provider and token authentication #496

Merged
merged 8 commits into from
Jun 26, 2024

Conversation

mattisonchao
Copy link
Member

@mattisonchao mattisonchao commented Jun 24, 2024

Motivation

We should support some general authentication methods for the Oxia server for security concerns.

Modification

  • Support basic OIDC authentication provider on the server
  • Support basic token authentication on the client
  • Support integration test for OIDC with the token.

Next

  • Performance will be affected Since we use GRPC per call authentication. We might do a cache for the token to improve the performance.
  • For next improvement. We can customise a transport layer authentication. But we already have mTLS. We can evaluate it in the future.

if _, ok := p.allowedAudiences[audience]; ok {
audienceAllowed = true
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Do you think it's necessary to check the permissions/scope field to verify the permissions?

Copy link
Member Author

Choose a reason for hiding this comment

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

we don't support authorization yet. We can consider it when we support authorization. :)

const (
MetadataAuthorizationKey = "authorization"
TokenPrefix = "Bearer "
)
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should accept the header of authorizaiton/Authorizaiton and Bearer/bearer

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay, make sense. let me add it later. :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry, the authorizaiton and Bearer should be standard. We can support leveraging case insensitivity in other PRs

Copy link
Collaborator

@merlimat merlimat left a comment

Choose a reason for hiding this comment

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

Nice work! 👍

@merlimat merlimat merged commit a9ca6ac into main Jun 26, 2024
7 checks passed
@merlimat merlimat deleted the auth/oidc branch June 26, 2024 16:41
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.

3 participants