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

keyring: support external KMS for key encryption key (KEK) #23580

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

tgross
Copy link
Member

@tgross tgross commented Jul 12, 2024

In Nomad 1.4.0, we shipped support for encrypted Variables and signed Workload Identities, but the key material is protected only by a AEAD encrypting the KEK. Add support for Vault transit encryption and external KMS from major cloud providers. The servers call out to the external service to decrypt each key in the on-disk keystore.

Ref: https://hashicorp.atlassian.net/browse/NET-10334
Fixes: #14852


Notes for reviewers:

@tgross tgross added this to the 1.8.x milestone Jul 12, 2024
@tgross tgross added the backport/1.8.x backport to 1.8.x release line label Jul 12, 2024
tgross added a commit that referenced this pull request Jul 16, 2024
In #23580 we're implementing support for encrypting Nomad's key material with
external KMS providers or Vault Transit. This changeset breaks out the
documentation from that PR to keep the review manageable and present it to a
wider set of reviewers.

Ref: https://hashicorp.atlassian.net/browse/NET-10334
Ref: #14852
Ref: #23580
tgross added a commit that referenced this pull request Jul 16, 2024
In #23580 we're implementing support for encrypting Nomad's key material with
external KMS providers or Vault Transit. This changeset breaks out the E2E
infrastructure and testing from that PR to keep the review manageable.

Ref: https://hashicorp.atlassian.net/browse/NET-10334
Ref: #14852
Ref: #23580
tgross added a commit that referenced this pull request Jul 16, 2024
In #23580 we're implementing support for encrypting Nomad's key material with
external KMS providers or Vault Transit. This changeset breaks out the
documentation from that PR to keep the review manageable and present it to a
wider set of reviewers.

Ref: https://hashicorp.atlassian.net/browse/NET-10334
Ref: #14852
Ref: #23580
tgross added a commit that referenced this pull request Jul 17, 2024
In #23580 we're implementing support for encrypting Nomad's key material with
external KMS providers or Vault Transit. This changeset breaks out the E2E
infrastructure and testing from that PR to keep the review manageable.

Ref: https://hashicorp.atlassian.net/browse/NET-10334
Ref: #14852
Ref: #23580
tgross added a commit that referenced this pull request Jul 17, 2024
In #23580 we're implementing support for encrypting Nomad's key material with
external KMS providers or Vault Transit. This changeset breaks out the
documentation from that PR to keep the review manageable and present it to a
wider set of reviewers.

Ref: https://hashicorp.atlassian.net/browse/NET-10334
Ref: #14852
Ref: #23580
tgross added a commit that referenced this pull request Jul 17, 2024
In #23580 we're implementing support for encrypting Nomad's key material with
external KMS providers or Vault Transit. This changeset breaks out the
documentation from that PR to keep the review manageable and present it to a
wider set of reviewers.

Ref: https://hashicorp.atlassian.net/browse/NET-10334
Ref: #14852
Ref: #23580
tgross added a commit that referenced this pull request Jul 17, 2024
In #23580 we're implementing support for encrypting Nomad's key material with
external KMS providers or Vault Transit. This changeset breaks out the E2E
infrastructure and testing from that PR to keep the review manageable.

Ref: https://hashicorp.atlassian.net/browse/NET-10334
Ref: #14852
Ref: #23580
In Nomad 1.4.0, we shipped support for encrypted Variables and signed Workload
Identities, but the key material is protected only by a AEAD encrypting the
KEK. Add support for Vault transit encryption and external KMS from major cloud
providers. The servers call out to the external service to decrypt each key in
the on-disk keystore.

Ref: https://hashicorp.atlassian.net/browse/NET-10334
Fixes: #14852
tgross added a commit that referenced this pull request Jul 17, 2024
In #23580 we're implementing support for encrypting Nomad's key material with
external KMS providers or Vault Transit. This changeset breaks out the E2E
infrastructure and testing from that PR to keep the review manageable.

Ref: https://hashicorp.atlassian.net/browse/NET-10334
Ref: #14852
Ref: #23580
tgross added a commit that referenced this pull request Jul 17, 2024
In #23580 we're implementing support for encrypting Nomad's key material with
external KMS providers or Vault Transit. This changeset breaks out the
documentation from that PR to keep the review manageable and present it to a
wider set of reviewers.

Ref: https://hashicorp.atlassian.net/browse/NET-10334
Ref: #14852
Ref: #23580
tgross added a commit that referenced this pull request Jul 17, 2024
In #23580 we're implementing support for encrypting Nomad's key material with
external KMS providers or Vault Transit. This changeset breaks out the
documentation from that PR to keep the review manageable and present it to a
wider set of reviewers.

Ref: https://hashicorp.atlassian.net/browse/NET-10334
Ref: #14852
Ref: #23580
tgross added a commit that referenced this pull request Jul 17, 2024
In #23580 we're implementing support for encrypting Nomad's key material with
external KMS providers or Vault Transit. This changeset breaks out the E2E
infrastructure and testing from that PR to keep the review manageable.

Ref: https://hashicorp.atlassian.net/browse/NET-10334
Ref: #14852
Ref: #23580
@tgross tgross marked this pull request as ready for review July 17, 2024 19:44
Copy link
Member

@schmichael schmichael left a comment

Choose a reason for hiding this comment

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

Looks great! Very excited to see this land.

Comment on lines +103 to +105
// fallbackVaultConfig allows the transit provider to fallback to using the
// default Vault cluster's configuration block, instead of repeating those
// fields
Copy link
Member

Choose a reason for hiding this comment

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

Oh this is a really nice detail.

Copy link
Contributor

@dduzgun-security dduzgun-security left a comment

Choose a reason for hiding this comment

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

This is really awesome! 👍 Should we also add some tests for the gcp and azure external kms just in case we ever face different behaviours than the aws kms one?

@tgross
Copy link
Member Author

tgross commented Jul 18, 2024

Should we also add some tests for the gcp and azure external kms just in case we ever face different behaviours than the aws kms one?

It's a good question. Unfortunately we only have an E2E environment for AWS (see #23601) for those tests. But fortunately the wrapper library's API is nicely designed such that the caller really doesn't have to care about the specifics, so then the wrapper library's own tests gives us the coverage we need to feel confident about shipping this.

@tgross tgross merged commit c970d22 into main Jul 18, 2024
19 checks passed
@tgross tgross deleted the keyring-external-kms branch July 18, 2024 13:42
@tgross tgross modified the milestones: 1.8.x, 1.8.3 Jul 18, 2024
tgross added a commit that referenced this pull request Jul 18, 2024
In Nomad 1.4.0, we shipped support for encrypted Variables and signed Workload
Identities, but the key material is protected only by a AEAD encrypting the
KEK. Add support for Vault transit encryption and external KMS from major cloud
providers. The servers call out to the external service to decrypt each key in
the on-disk keystore.

Ref: https://hashicorp.atlassian.net/browse/NET-10334
Fixes: #14852
tgross added a commit that referenced this pull request Jul 19, 2024
In #23580 we're implementing support for encrypting Nomad's key material with
external KMS providers or Vault Transit. This changeset breaks out the E2E
infrastructure and testing from that PR to keep the review manageable.

Ref: https://hashicorp.atlassian.net/browse/NET-10334
Ref: #14852
Ref: #23580
tgross added a commit that referenced this pull request Jul 19, 2024
In #23580 we're implementing support for encrypting Nomad's key material with
external KMS providers or Vault Transit. This changeset breaks out the
documentation from that PR to keep the review manageable and present it to a
wider set of reviewers.

Ref: https://hashicorp.atlassian.net/browse/NET-10334
Ref: #14852
Ref: #23580
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

External key wrapping for keyring
3 participants