-
Notifications
You must be signed in to change notification settings - Fork 24
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
WIF support for GCP secrets engine #210
Conversation
@@ -1,7 +1,7 @@ | |||
// Copyright (c) HashiCorp, Inc. | |||
// SPDX-License-Identifier: MPL-2.0 | |||
|
|||
//go:generate go run internal/generate_resources.go | |||
//go:generate go run github.com/hashicorp/vault-plugin-secrets-gcp/plugin/iamutil/internal/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't look like this ever worked 🤔 Upon upgrading to Go 1.21+, the inclusion of the toolchain directive seems to have uncovered this issue. The incorrect path was breaking tests once the Go version was upgraded, and after meeting with @tomhjp, we decided that using the full path to the underlying directory is the better way to generate and import these resources.
The build failures are expected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
This PR adds plugin WIF support to the GCP secrets engine. This adds the following new fields to the config endpoint to enable configuring Workload Identity Federation:
identity_token_audience
identity_token_ttl
service_account_email
The PR also adds tests to ensure that these fields can be set/read to the config and that providing mutually exclusive fields results in an error both against CE and Enterprise editions.
The PR also adds the
PluginIdentityTokenSupplier
Credential Provider that fetches a plugin identity token from Vault and passes it to an external account Token Source for a valid federated credential exchange. The full functionality of this feature is linked to this PR on thego-gcp-common
: hashicorp/go-gcp-common#14, and will be available when those updates are merged and pulled into this repository.