diff --git a/builtin/credential/approle/path_login.go b/builtin/credential/approle/path_login.go index d40530e9efd5..9b902a42ff70 100644 --- a/builtin/credential/approle/path_login.go +++ b/builtin/credential/approle/path_login.go @@ -38,6 +38,9 @@ func (b *backend) pathLoginUpdate(req *logical.Request, data *framework.FieldDat return logical.ErrorResponse(fmt.Sprintf("failed to validate SecretID: %s", err)), nil } + // Always include the role name, for later filtering + metadata["role_name"] = roleName + auth := &logical.Auth{ NumUses: role.TokenNumUses, Period: role.Period,