Features/generic authentication authorization#221
Open
robinskil wants to merge 4 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a significant refactor of the authentication system across both HTTP (Axum) and Flight SQL transports, centralizing authentication logic in the core runtime and enabling role-based access control. The key changes include removing hardcoded admin credential checks, delegating authentication and identity resolution to the runtime's
AuthProvider, and updating middleware and service layers to work with richAuthIdentityobjects rather than simple booleans.Authentication Refactor and Role-Based Access:
AuthProvider, allowing for more flexible and secure role-based access control. This affects both HTTP (Axum) and Flight SQL authentication flows.AuthIdentityin request extensions, and to enforce super-user checks for admin routes using the runtime's authentication provider.API and Interface Changes:
setup_client_routerandsetup_admin_routerto accept the runtime as an argument, ensuring middleware has access to authentication state. Updated router setup accordingly.Flight SQL Service Updates:
Authenticatorto use the runtime for authentication, returning richAuthIdentityobjects in the authorization context. All SQL execution now receives the full identity rather than a boolean flag.