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: E2E testing for KMS/rotation #23601

Merged
merged 4 commits into from
Jul 19, 2024
Merged

keyring: E2E testing for KMS/rotation #23601

merged 4 commits into from
Jul 19, 2024

Conversation

tgross
Copy link
Member

@tgross tgross commented Jul 16, 2024

In #23580 we're implementing support for encrypting Nomad's key material with external KMS providers or Vault Transit. In #23577 we're implementing support for prepublishing keys. This changeset updates the E2E infrastructure to use an external KMS and adds tests for rotation.

Ref: https://hashicorp.atlassian.net/browse/NET-10398
Ref: https://hashicorp.atlassian.net/browse/NET-10280
Ref: https://hashicorp.atlassian.net/browse/NET-10334
Ref: #14852
Ref: #23580


Note to reviewers: this PR requires #23580 and #23577 to be merged before we can merge this. Test run against a build that includes both PRs:

$ go test -v -count=1 ./keyring
=== RUN   TestKeyringRotation
--- PASS: TestKeyringRotation (0.62s)
PASS
ok      github.com/hashicorp/nomad/e2e/keyring  0.632s

@tgross tgross added theme/keyring backport/1.8.x backport to 1.8.x release line labels Jul 16, 2024
@tgross tgross added this to the 1.8.x milestone Jul 16, 2024
@tgross tgross force-pushed the e2e-keyring-external-kms branch 2 times, most recently from 62910f6 to e93d439 Compare July 17, 2024 17:37
@tgross tgross changed the title keyring: infrastructure for E2E testing of external KMS keyring: infrastructure for E2E testing of KMS/rotation Jul 17, 2024
@tgross tgross changed the base branch from keyring-external-kms to main July 17, 2024 19:32
@tgross tgross changed the title keyring: infrastructure for E2E testing of KMS/rotation keyring: E2E testing for KMS/rotation 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 18, 2024 15:39
Copy link
Member

@gulducat gulducat left a comment

Choose a reason for hiding this comment

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

lgtm! I mostly have little test message suggestions for failure legibility, and a couple questions.

e2e/keyring/keyring_test.go Show resolved Hide resolved
e2e/keyring/keyring_test.go Outdated Show resolved Hide resolved
e2e/keyring/keyring_test.go Outdated Show resolved Hide resolved
e2e/keyring/keyring_test.go Outdated Show resolved Hide resolved
e2e/keyring/keyring_test.go Show resolved Hide resolved

func getJWKS(t *testing.T) *jose.JSONWebKeySet {
t.Helper()
out, err := e2eutil.Commandf("nomad operator api /.well-known/jwks.json")
Copy link
Member

Choose a reason for hiding this comment

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

tangent: intriguing that our api package doesn't have a method for this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I considered adding that here but I wanted to see if there was a reason that @schmichael didn't implement it first.

e2e/terraform/variables.tf Show resolved Hide resolved
e2e/keyring/keyring_test.go Show resolved Hide resolved
Co-authored-by: Daniel Bennett <dbennett@hashicorp.com>
@tgross tgross merged commit a29f9b6 into main Jul 19, 2024
19 checks passed
@tgross tgross deleted the e2e-keyring-external-kms branch July 19, 2024 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/1.8.x backport to 1.8.x release line theme/e2e theme/keyring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants