Skip to content
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

Fix role authentication to use the session token correctly #86

Merged
merged 2 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* Add `append_to_names` tag append parameter to sources
* Add `DS` record type support
* Updated role authentication to use the correct session token value

## v0.0.6 - 2023-10-16 - Long overdue

Expand Down
2 changes: 1 addition & 1 deletion octodns_route53/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def client(
# client with the new auth
access_key_id = credentials['Credentials']['AccessKeyId']
secret_access_key = credentials['Credentials']['SecretAccessKey']
session_token = credentials['Credentials']['Expiration']
session_token = credentials['Credentials']['SessionToken']

use_fallback_auth = (
access_key_id is None
Expand Down
3 changes: 2 additions & 1 deletion tests/test_octodns_provider_route53.py
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,7 @@ def test_populate_with_role_acquisition(self, client_mock):
'AccessKeyId': 42,
'SecretAccessKey': 43,
'Expiration': 44,
'SessionToken': 45,
}
}
]
Expand Down Expand Up @@ -896,7 +897,7 @@ def test_populate_with_role_acquisition(self, client_mock):
service_name='route53',
aws_access_key_id=42,
aws_secret_access_key=43,
aws_session_token=44,
aws_session_token=45,
config=None,
),
]
Expand Down
Loading