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

Configurable Authorization #885

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

ehenry2
Copy link

@ehenry2 ehenry2 commented Oct 3, 2023

Which issue does this PR close?

Closes #835

Rationale for this change

In the current state, the flight sql do handshake method uses a hardcoded username and password for authorization. One of the essential features for production readiness is to improve the security posture by having configurable authorization. The goal of this PR is to add a simple abstraction (the "Authorizer" trait) that allows for implementations of a variety of commonly used authorization schemes (basic auth, jwt, ldap, etc.). I only implemented basic auth for now in a backwards-compatible way so I can get feedback on the approach.

What changes are included in this PR?

This PR adds a new trait "Authorizer" that has a simple validate method that is passed the value of the authorization metadata the client sends with the request. Implementations can be created for basic authentication, jwt, ldap, etc. I've made the validate function async so if implementations require http requests over the network, this is supported.

Are there any user-facing changes?

The PR is meant to be backwards compatible, defaulting to basic auth with same username/password.

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.

[feature] Access control to restrict the access to the data
1 participant