vault: update identity name to start with vault_ (#18591)

* vault: update identity name to start with `vault_`

In the original proposal, workload identities used to derive Vault
tokens were expected to be called just `vault`. But in order to support
multiple Vault clusters it is necessary to associate identities with
specific Vault cluster configuration.

This commit implements a new proposal to have Vault identities named as
`vault_<cluster>`.
This commit is contained in:
Luiz Aoqui
2023-09-27 15:53:28 -03:00
committed by GitHub
parent ef7bccbd40
commit 868aba57bb
26 changed files with 124 additions and 85 deletions

View File

@@ -14,6 +14,7 @@ import (
"github.com/hashicorp/nomad/helper/testlog"
"github.com/hashicorp/nomad/helper/useragent"
"github.com/hashicorp/nomad/helper/uuid"
"github.com/hashicorp/nomad/nomad/structs"
"github.com/hashicorp/nomad/nomad/structs/config"
vapi "github.com/hashicorp/vault/api"
testing "github.com/mitchellh/go-testing-interface"
@@ -72,7 +73,7 @@ func NewTestVaultFromPath(t testing.T, binary string) *TestVault {
RootToken: token,
Client: client,
Config: &config.VaultConfig{
Name: "default",
Name: structs.VaultDefaultCluster,
Enabled: &enable,
Token: token,
Addr: http,