Commit Graph

16 Commits

Author SHA1 Message Date
Josh Meranda aea1b7c94d
[main] Validate auditlog (#960)
* add AuditPolicy to codegen

* go generate

* add validation checks and tests

* use external dependencies
2025-06-30 11:43:20 -04:00
Jonathan Crowther 2618ee01f1
Add new User validation webhook (#786)
* Add new User validation

* Fix linter errors
2025-03-10 12:01:31 -04:00
Peter Matseykanets c61e597ef5
Validate LDAP/AD authconfigs (#682)
https://github.com/rancher/rancher/issues/48071
2025-02-24 13:37:28 -05:00
Sakala Venkata Krishna Rohit 40e8eae329
Add validation for ClusterRepo (#470)
* Add clusterrepo validations

* Add docs

* unit tests
2024-08-12 14:03:54 -04:00
Raul Cabello Martin af2d8bd5d2
Fleet RBAC - InheritedFleetWorkspacePermissions validation (#348)
- Validate the user have enough permission to create/update the rules defined in InheritedFleetWorkspacePermissions.ResourceRules
- Validate the user have enough permission to create/update the rules that are generated based on the InheritedFleetWorkspacePermissions.WorkspaceVerbs

---------

Co-authored-by: Michael Bolot <michael.bolot@suse.com>
2024-06-24 09:49:31 +02:00
Peter Matseykanets b3bccd2707
[v0.5] s4: Fixes 227 (#404)
* Validate user retention userattribute fields and settings (#90)
* [v0.4.s4] Don't allow empty lastLogin user attribute (#97)
2024-06-18 07:26:38 -04:00
Jonathan Crowther b18c38740a
Add webhook checks for NamespacedRules (#309)
* Add role and rolebinding webhook validation. Add NamespacedRules escalation checks for GlobalRoles

* Update rancher/pkg/apis

* Fix linting issue

* Log error and add test for it
2024-01-15 17:17:15 -05:00
Colleen Murphy 16d548f8b9 Add validation and mutation for Projects
New validations:
- prohibit deleting the system project
- check that quota fields are consistent with one another and sufficient
  for existing quota usage

New mutations:
- adds creator-role-bindings annotation
2023-08-16 12:13:21 -07:00
Jacob Lindgren 0a8256b1d0 Add Validation on NodeDriver update/delete to prevent machine deletion 2023-06-30 12:12:00 -05:00
Harrison Affel 96af75c7e3 go generate 2022-12-21 14:18:21 -05:00
Chad Roberts 5495fda809
Add webhook handler for namespaces to govern PSA label editing 2022-12-19 15:39:51 -05:00
Kevin Joiner 5f4f390a87 Restructered webhook registration.
Webhook request routing is now handled by K8s.
2022-12-15 12:05:58 -05:00
Kevin Joiner dcd0990569 Simplify object decoding from request.
Object decoding was perfroming excessive casting and
had unnecessary dependencies on wrangler.
2022-11-30 08:24:17 -05:00
Donnie Adams 6bf29f224b Run go generate 2022-01-05 13:37:57 -07:00
Ricardo Weir 8de04965f8 Add feature type 2021-08-25 09:22:41 -07:00
Donnie Adams 42c30d033c Add generation for getting objects from requests
In order to validate objects, the new and old objects, if they exist,
should be pull from the webhook request. This process is identical for
all objects except that the return types would be different. This is a
candidate for code generation, and this generation is added.
2021-07-27 11:06:52 -07:00