diff --git a/deli/counter/http/mounts/root/routes/iam/v1/validation_models/policy.py b/deli/counter/http/mounts/root/routes/iam/v1/validation_models/policy.py index 8a657c2..2d2263e 100644 --- a/deli/counter/http/mounts/root/routes/iam/v1/validation_models/policy.py +++ b/deli/counter/http/mounts/root/routes/iam/v1/validation_models/policy.py @@ -62,7 +62,14 @@ def validate_member(self, value, context=None): class PolicyBinding(Model): role = KubeName(required=True) - members = ListType(BindingMemberType) + members = ListType(BindingMemberType, required=True) + + def validate_members(self, data, value): + for member in value: + if value.count(member) > 1: + raise ValidationError(member + " appears multiple times in the binding") + + return value class ResponsePolicy(Model):