branch-4.0: [fix](auth)Fix arrow flight client ip auth #63506#63591
Merged
Conversation
## Changes In Doris 4.1.0, Arrow Flight SQL authentication may fail for users created with a specific host/IP. Example input: ```sql CREATE USER 'read_user'@'192.0.2.10' IDENTIFIED BY '12345'; GRANT SELECT_PRIV ON *.* TO 'read_user'@'192.0.2.10'; ``` Then connect through Arrow Flight SQL with the same username and password, for example by ADBC/Python or Arrow Flight JDBC. Actual wrong output: ``` UNAUTHENTICATED: [FlightSQL] Unable to authenticate user read_user, exception: errCode = 2, detailMessage = Access denied for user 'read_user@0.0.0.0' (using password: YES) ``` Expected output: ``` The user should be authenticated as the real remote client identity, for example: read_user@192.0.2.10 and the connection should succeed when the password and privileges match that user@host. ``` Root cause: Arrow Flight SQL previously used hardcoded remote IP 0.0.0.0 during username/password authentication. As a result, Doris matched the wrong user@host entry instead of using the actual client IP from the gRPC connection. This PR fixes Arrow Flight SQL authentication to use the real gRPC peer IP when validating credentials.
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
|
run buildall |
yiguolei
approved these changes
May 25, 2026
Contributor
|
skip buildall |
Contributor
Author
|
PR approved by at least one committer and no changes requested. |
Contributor
Author
|
PR approved by anyone and no changes requested. |
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.
Cherry-picked from #63506