added changelog

add-bind-type-policy
Ronald Ekambi 1 year ago
parent 0e7571aa5f
commit fdc8bda9ff

@ -0,0 +1,3 @@
```release-note:feature
acl: add policy bindtype to binding rules.
```

@ -45,7 +45,7 @@ type Bindings struct {
Roles []structs.ACLTokenRoleLink Roles []structs.ACLTokenRoleLink
ServiceIdentities []*structs.ACLServiceIdentity ServiceIdentities []*structs.ACLServiceIdentity
NodeIdentities []*structs.ACLNodeIdentity NodeIdentities []*structs.ACLNodeIdentity
Policies []structs.ACLTokenPolicyLink Policies []structs.ACLTokenPolicyLink
TemplatedPolicies structs.ACLTemplatedPolicies TemplatedPolicies structs.ACLTemplatedPolicies
EnterpriseMeta acl.EnterpriseMeta EnterpriseMeta acl.EnterpriseMeta
} }
@ -135,7 +135,7 @@ func (b *Binder) Bind(authMethod *structs.ACLAuthMethod, verifiedIdentity *authm
if policy != nil { if policy != nil {
bindings.Policies = append(bindings.Policies, structs.ACLTokenPolicyLink{ bindings.Policies = append(bindings.Policies, structs.ACLTokenPolicyLink{
ID: policy.ID, ID: policy.ID,
Name: policy.Name, 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) return fmt.Errorf("failed to validate bindType %q: %w", bindType, err)
} }
default: default:
return fmt.Errorf("Invalid Binding Rule: unknown BindType %q", bindType) return fmt.Errorf("invalid Binding Rule: unknown BindType %q", bindType)
} }
return nil return nil

Loading…
Cancel
Save