Giter Club home page Giter Club logo

kasten-key-rotation's Introduction

Kasten K10 Key Rotation

Scripts for automating key rotation in Kasten K10.

Vault

See the Kasten docs on how to setup encryption using Vault in Kasten and the Vault docs on key rotation in the Transit Secret Engine.

Make sure the Kasten Vault token has a policy that allows access to the Vault key. See: vault-kasten-policy-example.hcl

If you want to rotate the Vault key used in Kasten, you have to follow a three step process:

  1. Create a new version of the key in Vault (i.e. trigger the /rotate API)
  2. Create a new Passkey to force Kasten to re-encrypt the master key
  3. Bump the min decryption version in Vault.

The old Passkey can then be deleted.

If you have a Passkey yaml file, the following script will automatically do the above:

However:

  1. Make sure kubectl is set to the right context
  2. Make sure vault is connected to your instance
./rotate-vault-key.sh passkey-vault-example.yaml

You can also use VAULT_CMD to override the Vault command. For example if you are running vault in Kubernetes:

export VAULT_CMD="kubectl --context vault-cluster-context -n vault exec -i vault-0 -- vault"
./rotate-vault-key.sh passkey-vault-example.yaml

KMS

See the Kasten docs on how to setup encryption using KMS in Kasten and the AWS docs on manual key rotation.

Make sure the Kasten has access to the KMS key. See:

If you want to rotate the KMS key used in Kasten, you have to follow a three step process:

  1. Create a new key in KMS
  2. Create a new Passkey with the new KMS key
  3. Delete the KMS key and update the alias

The old Passkey can then be deleted.

If you have a Passkey yaml file, the following script will automatically do the above:

However:

  1. Make sure kubectl is set to the right context
  2. Make sure aws is configured to use the right account/region
./rotate-kms-key.sh passkey-kms-example.yaml

kasten-key-rotation's People

Contributors

moritzkn avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.