-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Return HTTP OK on token drop for oauth2 authentication #10929
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
Conversation
HttpTokenPoller waits 4 seconds for token drop to be acknowledged. With this small change CLI/JDBC returns token almost immediately upon resolution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why it was waiting?
@kokosing because HttpTokenPoller waits for the ACK (HTTP OK) on HTTP DELETE on token endpoint with a timeout of 4s. And didn't return Response http status that was HTTP OK (I guess that it was NO CONTENT) |
Can we make HttpTokenPoller to wait for 2xx? Are there any other places likes that? |
@kokosing done |
eaf2048
to
816cebc
Compare
client/trino-client/src/main/java/io/trino/client/auth/external/HttpTokenPoller.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
% 1 minor comment.
client/trino-client/src/main/java/io/trino/client/auth/external/HttpTokenPoller.java
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/server/security/oauth2/OAuth2TokenExchangeResource.java
Show resolved
Hide resolved
Ping @kokosing |
HttpTokenPoller waits 4 seconds for token drop to be acknowledged (checks for HTTP OK). With this small change CLI/JDBC returns token almost immediately upon resolution.