Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

CCDB encryption key rotation #298

Merged
merged 7 commits into from
Jan 17, 2020
Merged

Conversation

f0rmiga
Copy link
Member

@f0rmiga f0rmiga commented Jan 6, 2020

Description

Adds the rotate-cc-database-key errand with a mechanism for rotating the CCDB encryption key.

Resolves #203.

Motivation and Context

CF allows rotating the CCDB encryption key. This PR introduces a mechanism for doing it with kubecf using Helm.

How Has This Been Tested?

  1. Deployed kubecf with:
ccdb:
  encryption:
    rotation:
      # Key labels must be < 256 characters long.
      key_labels:
      - encryption_key_0
      current_key_label: encryption_key_0
  1. Ran smoke-tests.
  2. Updated kubecf with:
ccdb:
  encryption:
    rotation:
      # Key labels must be < 256 characters long.
      key_labels:
      - encryption_key_0
      - encryption_key_1
      current_key_label: encryption_key_1
  1. Checked the new encryption key was correctly generated and interpolated in the new desired manifest created by cf-operator.
  2. Ran the rotate-cc-database-key errand as instructed in the documentation introduced in this very same PR.
  3. Checked the output of the errand saying that the old values encrypted with the previous encryption key where updated.
  4. Ran smoke-tests again.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code has security implications.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@f0rmiga f0rmiga added this to the 0.2.0 milestone Jan 6, 2020
Copy link
Contributor

@mook-as mook-as left a comment

Choose a reason for hiding this comment

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

Generally fine, just some fairly trivial comments.

mook-as
mook-as previously approved these changes Jan 17, 2020
Copy link
Contributor

@mook-as mook-as left a comment

Choose a reason for hiding this comment

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

Thanks for the changes!

@f0rmiga f0rmiga merged commit f289b93 into master Jan 17, 2020
@f0rmiga f0rmiga deleted the f0rmiga/rotate-cc-database-key branch January 17, 2020 23:26
bikramnehra pushed a commit that referenced this pull request Apr 21, 2020
bikramnehra pushed a commit that referenced this pull request Apr 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate rotate-cc-database-key errand
2 participants