-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: add support for auto IAM authentication to Connector
#191
Conversation
Integration tests passing ✅ Just need to setup mock metadata server for unit tests |
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.
Looking very good. Making sure we have the timeout right is probably the most important one.
|
||
# validate metadata exchange response | ||
if resp.response_code != connectorspb.MetadataExchangeResponse.OK: | ||
raise ValueError("Metadata Exchange request has failed!") |
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.
Let's add the error message from the response in here.
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.
let me know how this looks now, can't mimic the same as Go or Java as the Java and Go proto libraries at helper methods like GetResponseCode
which I don't have here in PYthon
Connector
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.
Non-blocking nits. If we don't add the extra unit tests in this PR, let's do it as a follow-up PR.
Nice work.
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.
LGTM
Perform new metadata exchange for connection through the
Connector
class and add support for automatic IAM authentication throughenable_iam_authn
flag.Related to #152
NOTE: Still need to add support for auto iam authentication to
AsyncConnector
class to add support for asyncpg, follow-up PR incoming.