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

JSON Cache for AssumeRoleProvider not truncating files #1684

Closed
jamesls opened this issue Dec 17, 2015 · 0 comments
Closed

JSON Cache for AssumeRoleProvider not truncating files #1684

jamesls opened this issue Dec 17, 2015 · 0 comments
Assignees
Labels
bug This issue is a bug. credential-provider

Comments

@jamesls
Copy link
Member

jamesls commented Dec 17, 2015

When we open a file for writing, if we're reusing the same file (same cache key) we don't truncate the file before writing. If the second JSON response is smaller it will result in extra data at the end of the JSON document.

This will trigger a json parsing error, which raises a KeyError, which causes the cred provider to retrieve a new set of temporary credentials because it thinks the file is not in the cache.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. credential-provider
Projects
None yet
Development

No branches or pull requests

1 participant