From 2c20028a7a583f11283be6ccca58e1261bde5ea6 Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Fri, 7 Jul 2017 10:44:45 -0400 Subject: [PATCH] Add approle role name to metadata --- 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 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,