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

KMS Choice and Documentation #20

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

ambsw-technology
Copy link

In this PR (built on #19 for simple merging):

  • Added a Secret YAML tag class that supported custom KMS keys. I later added a SecureString class (and !SecureString tag) as a more memorable syntax for adding secrets (all backwards compatible with SecureTag).
  • Converted all of the CLI commands to git equivalents. The only alias I left was for plan as I rarely use git in the CLI so status is not as obvious (to me) as clone, pull, and push.
  • I updated the README to reflect all of the new changes. I thought it was important to warn people of the risks around paths (as discussed in Replace -p with ENV Variable #15) and strongly recommend measures to protect themselves.
  • One of the recommended measures was to keep a local backup of the Parameter Store, but it's not a good idea to leave unencrypted secrets lying around so I added the SSM_NO_DECRYPT option.
    • Restoring encrypted parameters is not trivial, but should be rare enough that the added effort is offset by the ability to (securely) prevent data loss.

This will probably be my last PR for some time (unless I discover a bug or someone needs a behavior tweaked). I dove into this project so we could use it to migrate YAML configs to Parameter Store and continue to maintain those configs on parameter store. At this point, the project does enough of what we need to get back to the migration itself.

…, and better encapsulate behaviors (among other things to simplify testing)
…lified/standardized the interface (i.e. `configure`, `merge`, `plan`, and `__init__`)
…nd line flags to ENV variables (fixes runtheops#15), (2) a way to generate YAML files for branches of the SSM tree (closes runtheops#11), (3) the ability to ignore SecureString keys if they are not necessary (closes runtheops#13), (4) support for the SSM StringList type and more timely type coercion so e.g. YAML integers and SSM strings match, and (5) the introduction of metadata in the YAML files to permit compatibility checking (more general fix for runtheops#15 with support for new features)
…` class to simplify inserts (both backwards-compatible to the `SecureTag`. For safer backups, an `AWS_NO_DECRYPT` (i.e. kwarg `no_decrypt`) was added. README was updated and the CLI commands were fully converted to `git` style names.
@ambsw-technology
Copy link
Author

P.S. If you merge this PR, you'll get all of the improvements at once. I left them in separate and sequenced PRs so you'd have an easier time reviewing the change in the context of my PR comments.

If anyone wants to use the improved code before it gets merged (and hopefully updated on pip), they can point their requirements to the master branch of the ambsw/ssm-diff repo.

@ghost
Copy link

ghost commented Dec 16, 2019

Any update on this PR?

@ambsw-technology
Copy link
Author

Doesn't look like there's any action on this repo anymore. You can add my fork to your project directly... or we can work on getting it up onto pypi (under a new name obviously).

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.

2 participants