Skip to content

feat: implement GroupMembership admission webhook to enforce existence and uniqueness constraints - #771

Open
JoseSzycho wants to merge 1 commit into
mainfrom
fix/duplicated-groupmembership
Open

JoseSzycho wants to merge 1 commit into
mainfrom
fix/duplicated-groupmembership

Conversation

@JoseSzycho

@JoseSzycho JoseSzycho commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Description

Summary

This PR introduces a validating admission webhook for GroupMembership (iam.miloapis.com/v1alpha1) and an end-to-end Chainsaw test suite to enforce relational integrity, uniqueness, and immutability constraints.


Motivation & Background

A GroupMembership resource models an association between a cluster-scoped User and a namespaced Group. Previously, there were no admission checks verifying whether the target User or Group existed, whether a duplicate membership had already been created in the namespace, or whether an existing membership was modified after creation.

This webhook addresses these gaps by validating invariants at admission time and rejecting invalid create and update requests with descriptive field.ErrorList errors.

Related to:

@JoseSzycho
JoseSzycho requested review from drewr, mattdjenkinson and scotwells and removed request for scotwells September 3, 2026 13:36
@JoseSzycho
JoseSzycho enabled auto-merge September 3, 2026 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant