Closed cslocum closed 4 years ago
In general, each auth function has two parts:
1. Tell the native tool (docker, kubectl/helm, etc) _how_ to get credentials (via ecr-login or aws). Let's call this setting the credential helper 2. Telling the credential helper how to actually authenticate.
Roles and user accounts are two ways to do (2), while (1) is common to both approaches. We should make this clear enough in the code.
I understand what you are talking about here (I think). But I am unclear on whether you would like changes to the code itself, or just abundant comments.
In general, I try to have only one yield in a context manager. Otherwise it can get hard to reason about where the with statement is actually executing. Do you think it's possible to move the conditionals around to make that the case?
Did I do this correctly?
Can this be merged? I've got further development work that builds on these changes.
Moved to #82
Add support for using AWS roles, while preserving the user account functionality.
See https://github.com/yuvipanda/hubploy/issues/70 for a lengthier description.