acl: small OSS refactors to help ensure that auth methods with namespace rules work with partitions (#11323)

This commit is contained in:
R.B. Boyer 2021-10-14 15:38:05 -05:00 committed by GitHub
parent 07425b149c
commit 55dd52cb17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 5 deletions

3
.changelog/11323.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:bug
acl: **(Enterprise only)** ensure that auth methods with namespace rules work with partitions
```

View File

@ -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
}

View File

@ -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