From cc2abb79baa5989821ede371a19464fa691ec000 Mon Sep 17 00:00:00 2001 From: "R.B. Boyer" <4903+rboyer@users.noreply.github.com> Date: Thu, 14 Oct 2021 15:38:05 -0500 Subject: [PATCH] acl: small OSS refactors to help ensure that auth methods with namespace rules work with partitions (#11323) --- .changelog/11323.txt | 3 +++ agent/consul/acl_endpoint_oss.go | 2 +- agent/structs/acl_oss.go | 4 ---- 3 files changed, 4 insertions(+), 5 deletions(-) create mode 100644 .changelog/11323.txt diff --git a/.changelog/11323.txt b/.changelog/11323.txt new file mode 100644 index 0000000000..c6e7c34ded --- /dev/null +++ b/.changelog/11323.txt @@ -0,0 +1,3 @@ +```release-note:bug +acl: **(Enterprise only)** ensure that auth methods with namespace rules work with partitions +``` diff --git a/agent/consul/acl_endpoint_oss.go b/agent/consul/acl_endpoint_oss.go index a8defcf133..61788f1836 100644 --- a/agent/consul/acl_endpoint_oss.go +++ b/agent/consul/acl_endpoint_oss.go @@ -19,5 +19,5 @@ func computeTargetEnterpriseMeta( method *structs.ACLAuthMethod, verifiedIdentity *authmethod.Identity, ) (*structs.EnterpriseMeta, error) { - return method.TargetEnterpriseMeta(verifiedIdentity.EnterpriseMeta), nil + return &structs.EnterpriseMeta{}, nil } diff --git a/agent/structs/acl_oss.go b/agent/structs/acl_oss.go index e0b69b0577..d122010330 100644 --- a/agent/structs/acl_oss.go +++ b/agent/structs/acl_oss.go @@ -70,10 +70,6 @@ func (p *ACLPolicy) EnterprisePolicyMeta() *acl.EnterprisePolicyMeta { return nil } -func (m *ACLAuthMethod) TargetEnterpriseMeta(_ *EnterpriseMeta) *EnterpriseMeta { - return &m.EnterpriseMeta -} - func (t *ACLToken) NodeIdentityList() []*ACLNodeIdentity { if len(t.NodeIdentities) == 0 { return nil