Commit Graph

16 Commits

Author SHA1 Message Date
Max Sokolovsky 92c069c2d3 Add validator and mutator tests 2023-07-10 16:17:56 -04:00
Jacob Lindgren 0a8256b1d0 Add Validation on NodeDriver update/delete to prevent machine deletion 2023-06-30 12:12:00 -05:00
Michael Bolot a6c9cc2978 Adding docs for some resources 2023-06-07 12:36:53 -05:00
Michael Bolot 9c124a4e10 Adding docs generation and example docs files
Adds logic to auto-generate a documentation directory and provides two
docs files
2023-06-06 13:48:54 -05:00
Jiaqi Luo 8b5a1f2262 [code gen] add PodSecurityAdmissionConfigurationTemplate 2023-01-03 15:49:47 -07:00
Harrison Affel f4612a1cac add validation for PodSecurityAdmissionConfigurationTemplates 2022-12-21 14:18:08 -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
Michael Bolot 2619688858 Basic boilerplate for some role resolvers 2022-09-19 14:09:20 -04:00
Donnie Adams ac258dcf15 Add mutation/validation webhooks for rke-machine-configs
In order to provide RBAC access to rke-machine-configs created by a user, a
creatorID annotation is added as a mutation webhook on create. In addition, a
validation webhook is added, similar to the provisioning cluster objects, so
that the creatorID annotation can only be updated in certain situations.
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
Darren Shepherd 0e8491720f Restructure code 2020-11-09 22:03:39 -07:00
Dan Ramich 44bf156c63 Refactor to match current auth 2020-09-29 20:50:00 -06:00
Dan Ramich 3d719a033a Add validation for rancher rbac objects
Problem:
Adding the role restricted-admin in rancher requires validation of
objects through diferent means to validate the user doing the action

Solution:
Add webhook validation to GRBs PRTBs and CRTBs.
GRBs: Validation is done to ensure the GRB being created by the user will
not cause escalated privileges so the user creating the GRB must have at
minimum the permissions they are attempting to grant through the GRB

PRTBs and CRTBs: The same check is done for both. First validation is
only done on the local cluster. Then a subject access review is done for
the requester checking that they have '**' access in the local cluster.
2020-09-25 11:31:29 -06:00