-
Notifications
You must be signed in to change notification settings - Fork 10
Add support for DSQL iam authentication #919
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
base: main
Are you sure you want to change the base?
Conversation
docs/using-the-python-driver/using-plugins/UsingTheDSQLIamAuthenticationPlugin.md
Show resolved
Hide resolved
docs/using-the-python-driver/using-plugins/UsingTheDSQLIamAuthenticationPlugin.md
Outdated
Show resolved
Hide resolved
|
||
## Prerequisites | ||
> [!WARNING]\ | ||
> To preserve compatibility with customers using the community driver, IAM Authentication requires the AWS SDK for Python; [Boto3](https://pypi.org/project/boto3/). Boto3 is a runtime dependency and must be resolved. It can be installed via pip like so: `pip install boto3`. |
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.
> To preserve compatibility with customers using the community driver, IAM Authentication requires the AWS SDK for Python; [Boto3](https://pypi.org/project/boto3/). Boto3 is a runtime dependency and must be resolved. It can be installed via pip like so: `pip install boto3`. | |
> To preserve compatibility with customers using the community driver, IAM Authentication requires the AWS SDK for Python, [Boto3](https://pypi.org/project/boto3/). Boto3 is a runtime dependency and must be resolved. It can be installed via pip like so: `pip install boto3`. |
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.
Currently this is the same in the related file:
docs/using-the-python-driver/using-plugins/UsingTheIamAuthenticationPlugin.md
I wonder if the ';' should be changed to ':' rather than ','. It looks like we're not listing several things in this sentence but rather specifying the name of the AWS SDK for Python.
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.
Yeah I think ':' or ',' would make more sense
docs/using-the-python-driver/using-plugins/UsingTheDSQLIamAuthenticationPlugin.md
Outdated
Show resolved
Hide resolved
tests/unit/test_iam_dsql_plugin.py
Outdated
|
||
actual_token = _token_cache.get(f"{_PG_REGION}:{_PG_HOST_INFO.url}:1234:admin") | ||
assert _GENERATED_TOKEN == actual_token.token | ||
assert actual_token.is_expired() is False |
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.
nit, same suggestion for the other lines with this pattern in the file:
assert actual_token.is_expired() is False | |
assert not actual_token.is_expired() |
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.
Updated all the occurrences.
|
||
client.close() | ||
|
||
logger.debug("IamAuthUtils.GeneratedNewAuthToken", token) |
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.
Same with this, we should remove it. Ik it was here before but not a good idea to display it as it's part of the credentials.
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.
changed to
logger.debug("TokenUtils.GeneratedNewAuthTokenLength", len(token) if token else 0)
Summary
Add support for DSQL iam authentication
Description
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.