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

add optional profile parameter #17

Merged
merged 4 commits into from Feb 29, 2020
Merged

add optional profile parameter #17

merged 4 commits into from Feb 29, 2020

Conversation

vagelim
Copy link
Contributor

@vagelim vagelim commented Feb 28, 2020

What does this do?

Adds an optional parameter (-p,--profile) to allow the user to pass in an alternative profile.

Why did you do this?

The current configuration limits confidential to the default profile. For users with multiple profiles, they may wish to use confidential with something beyond the default profile.

How did you test this change?

Ran with a known working profile, with a known non-working profile, with a profile that doesn't exist, and lastly, with no profile specified at all.

etc

I had thought of catching the exception raised when a profile is specified but could not be found (botocore.exceptions.ProfileNotFound) but found the error message to be descriptive enough on its own.

ex:

botocore.exceptions.ProfileNotFound: The config profile (candidco) could not be found

candid-elliott
candid-elliott previously approved these changes Feb 28, 2020
@@ -12,8 +12,8 @@


class SecretsManager:
def __init__(self, secrets_file=None, secrets_file_default=None, region_name=None):
session = boto3.session.Session()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside, but I had thought of moving the region parameter to the session instantiation but didn't want to change too much.

dvf
dvf previously approved these changes Feb 28, 2020
@vagelim vagelim dismissed stale reviews from dvf and candid-elliott via 400f65b February 28, 2020 21:19
dvf
dvf previously approved these changes Feb 28, 2020
@@ -1,4 +1,4 @@
from confidential.secrets_manager import SecretsManager

__all__ = ["SecretsManager"]
__version__ = "1.0.0"
__version__ = "1.1.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We initially were using this to store the version, but the version is now stored by Poetry in pyproject.toml. So we move this, and you'll need to bump the version in pyproject.toml.

Copy link
Contributor Author

@vagelim vagelim Feb 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in c64ea5d and 7e07220

this is the wrong place to increment version
@vagelim vagelim merged commit b650d3e into master Feb 29, 2020
@vagelim vagelim deleted the feature/add-profile-param branch February 29, 2020 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants