From a5b09493abb14d857001d913090031df86c90a0f Mon Sep 17 00:00:00 2001 From: Dhia Ayachi Date: Fri, 1 Oct 2021 12:00:43 -0400 Subject: [PATCH] fix token list by auth method (#11196) * add tests to OIDC authmethod and fix entMeta when retrieving auth-methods * fix oss compilation error --- agent/consul/state/acl.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/agent/consul/state/acl.go b/agent/consul/state/acl.go index fb19377a30..a0ddc1cea2 100644 --- a/agent/consul/state/acl.go +++ b/agent/consul/state/acl.go @@ -528,7 +528,9 @@ func aclTokenSetTxn(tx WriteTxn, idx uint64, token *structs.ACLToken, opts ACLTo } if token.AuthMethod != "" && !opts.FromReplication { - method, err := getAuthMethodWithTxn(tx, nil, token.AuthMethod, token.ACLAuthMethodEnterpriseMeta.ToEnterpriseMeta()) + methodMeta := token.ACLAuthMethodEnterpriseMeta.ToEnterpriseMeta() + methodMeta.Merge(&token.EnterpriseMeta) + method, err := getAuthMethodWithTxn(tx, nil, token.AuthMethod, methodMeta) if err != nil { return err } else if method == nil {