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