From c24f56d91c99d0b44ef8da8a3dcba7ba547945f9 Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Thu, 13 Jul 2017 19:07:15 -0400 Subject: [PATCH] Add approle role name to metadata (#2985) --- builtin/credential/approle/path_login.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/builtin/credential/approle/path_login.go b/builtin/credential/approle/path_login.go index d40530e9ef..9b902a42ff 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,