From fdc8bda9ff7436497c5cf177123e3333b51cc2b0 Mon Sep 17 00:00:00 2001 From: Ronald Ekambi Date: Fri, 17 Nov 2023 12:48:26 -0500 Subject: [PATCH] added changelog --- .changelog/19499.txt | 3 +++ agent/consul/auth/binder.go | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 .changelog/19499.txt diff --git a/.changelog/19499.txt b/.changelog/19499.txt new file mode 100644 index 0000000000..83849637d4 --- /dev/null +++ b/.changelog/19499.txt @@ -0,0 +1,3 @@ +```release-note:feature +acl: add policy bindtype to binding rules. +``` \ No newline at end of file diff --git a/agent/consul/auth/binder.go b/agent/consul/auth/binder.go index b8841f5192..620afe6c95 100644 --- a/agent/consul/auth/binder.go +++ b/agent/consul/auth/binder.go @@ -45,7 +45,7 @@ type Bindings struct { Roles []structs.ACLTokenRoleLink ServiceIdentities []*structs.ACLServiceIdentity NodeIdentities []*structs.ACLNodeIdentity - Policies []structs.ACLTokenPolicyLink + Policies []structs.ACLTokenPolicyLink TemplatedPolicies structs.ACLTemplatedPolicies EnterpriseMeta acl.EnterpriseMeta } @@ -135,7 +135,7 @@ func (b *Binder) Bind(authMethod *structs.ACLAuthMethod, verifiedIdentity *authm if policy != nil { bindings.Policies = append(bindings.Policies, structs.ACLTokenPolicyLink{ - ID: policy.ID, + ID: policy.ID, Name: policy.Name, }) } @@ -204,7 +204,7 @@ func IsValidBindingRule(bindType, bindName string, bindVars *structs.ACLTemplate return fmt.Errorf("failed to validate bindType %q: %w", bindType, err) } default: - return fmt.Errorf("Invalid Binding Rule: unknown BindType %q", bindType) + return fmt.Errorf("invalid Binding Rule: unknown BindType %q", bindType) } return nil