From ba4b639445600f81df5be2b1bad5fcd61fbcebac Mon Sep 17 00:00:00 2001 From: Vault Automation Date: Wed, 10 Sep 2025 06:57:18 -0600 Subject: [PATCH] CE backport: Rename token_auth_metadata to alias_metadata (#9237) Co-authored-by: Steven Clark --- builtin/credential/aws/path_role_test.go | 2 +- builtin/credential/ldap/backend_test.go | 2 +- sdk/helper/tokenutil/tokenutil.go | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/builtin/credential/aws/path_role_test.go b/builtin/credential/aws/path_role_test.go index 7797b14854..9df6f9959e 100644 --- a/builtin/credential/aws/path_role_test.go +++ b/builtin/credential/aws/path_role_test.go @@ -636,7 +636,7 @@ func TestAwsEc2_RoleCrud(t *testing.T) { } if constants.IsEnterprise { - expected["token_auth_metadata"] = map[string]string{} + expected["alias_metadata"] = map[string]string{} } if resp.Data["role_id"] == nil { diff --git a/builtin/credential/ldap/backend_test.go b/builtin/credential/ldap/backend_test.go index dd78d1da74..d88135504b 100644 --- a/builtin/credential/ldap/backend_test.go +++ b/builtin/credential/ldap/backend_test.go @@ -1496,7 +1496,7 @@ func TestLdapAuthBackend_ConfigUpgrade(t *testing.T) { }, } if constants.IsEnterprise { - exp.TokenParams.TokenAuthMetadata = make(map[string]string) + exp.TokenParams.AliasMetadata = make(map[string]string) } configEntry, err := b.Config(ctx, configReq) diff --git a/sdk/helper/tokenutil/tokenutil.go b/sdk/helper/tokenutil/tokenutil.go index b4ede5fcc6..6050923c2b 100644 --- a/sdk/helper/tokenutil/tokenutil.go +++ b/sdk/helper/tokenutil/tokenutil.go @@ -48,8 +48,8 @@ type TokenParams struct { // The TTL to user for the token TokenTTL time.Duration `json:"token_ttl" mapstructure:"token_ttl"` - // The metadata to attach to the authentication information. - TokenAuthMetadata map[string]string `json:"token_auth_metadata" mapstructure:"token_auth_metadata"` + // The metadata to attach to the alias. + AliasMetadata map[string]string `json:"alias_metadata" mapstructure:"alias_metadata"` } // AddTokenFields adds fields to an existing role. It panics if it would