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

gCloud KMS secrets backend #159

Merged
merged 2 commits into from
Nov 12, 2018
Merged

gCloud KMS secrets backend #159

merged 2 commits into from
Nov 12, 2018

Conversation

adrianchifor
Copy link
Member

@adrianchifor adrianchifor commented Nov 2, 2018

Adds support for Google Cloud KMS secrets backend. To use it, we need to first create a keyring and key on KMS, then configure it in a target or class in the inventory:

parameters:
  kapitan:
    secrets:
      gkms:
        key: 'projects/<project>/locations/<location>/keyRings/<keyRing>/cryptoKeys/<key>'

and then use it, like in our example:

...
  mysql:
    password: ?{gkms:mysql/password|randomstr|base64}

which on compile, will generate a random b64-encoded string encrypted with the key at parameters.kapitan.secrets.gkms.key and save it in secrets/mysql/password.

By default, it will use gcloud default credentials, but can be configured to use a service account by setting the GOOGLE_APPLICATION_CREDENTIALS environment variable.

kapitan/cli.py Show resolved Hide resolved
kapitan/refs/secrets/gpg.py Show resolved Hide resolved
kapitan/cli.py Outdated Show resolved Hide resolved
@adrianchifor adrianchifor merged commit 2a72a93 into master Nov 12, 2018
@adrianchifor adrianchifor deleted the kms branch November 12, 2018 15:30
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