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

Conversation

uduncanu
Copy link
Contributor

Authenticating using an IAM role currently gives this error:

AttributeError: 'datetime.datetime' object has no attribute 'split'

That's due to us passing a datetime object through instead of what should be a string containing the session token.

Switching to using the SessionToken value instead makes it complete as expected.

@ross
Copy link
Contributor

ross commented Mar 28, 2024

Interesting. Surprised this worked in the past. Maybe AWS changed the SessionToken's value/behavior and it used to be the same as the expiration.

Anyway, been thinking about looking at what and AWS secrets handler would look like which could deal with all these sorts of things in an more centralized/focused way rather than having to include code/support in all of the providers & sources for it. If/when that happens this stuff may get deprecated in favor of that route.

/cc octodns/octodns#1140 for the secrets handler functionality

@ross
Copy link
Contributor

ross commented Mar 28, 2024

Looks like a unit test is failing now. Probably needs a tweak to the mock/setup. ./script/coverage should run everything locally. May require a one-time ./script/bootstrap first.

@sssss15
Copy link

sssss15 commented Apr 10, 2024

Hi All,
I am also getting this error while adding role_arn inside route53 provider,
Is there any workaround for this.

@ross ross merged commit c17d686 into octodns:main Apr 11, 2024
7 checks passed
@ross
Copy link
Contributor

ross commented Apr 11, 2024

/cc #88

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants