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
[Java][FlightSQL] In authentication, how does flight server get the IP/Hostname of ADBC client #38911
Comments
I hope for help, thanks~ |
We currently accomplish this with a gRPC
We can then access it anywhere using:
|
Oh sorry, I just realized you're talking about the IP/Host of the client, not the one they requested. However, you could follow a similar pattern to add w/e info you want from the call. You can get the caller IP: https://stackoverflow.com/questions/36124618/how-to-get-client-ip-from-request-metadata-with-grpc-java |
Thanks! @aiguofer, I'll try it. |
Describe the usage question you have. Please include as many useful details as possible.
Now I implement
CallHeaderAuthenticator
in Java, and OverrideAuthResult authenticate(CallHeaders incomingHeaders)
.Then,
BasicCallHeaderAuthenticator
can decode username and password fromincomingHeaders
. I implementsBasicCallHeaderAuthenticator.CredentialValidator
and OverrideAuthResult validate(String username, String password)
to complete authentication of username and password.But in my database(Apache Doris), the client's IP will also participate in authentication, so is there a way to get the ADBC client's IP in Flight Server?
Thanks for your help.
Component(s)
FlightRPC
The text was updated successfully, but these errors were encountered: