bhouse-nexthop opened a new pull request, #14748:
URL: https://github.com/apache/cloudstack/pull/14748

   ### Description
   
   CKS creates `Project Kubernetes Service Role` once and never updates it. On 
an upgraded install the role lacks the APIs added to the allowlist since (e.g. 
the volume and snapshot APIs the CloudStack CSI driver uses), while a fresh 
install has them.
   
   On management server start this PR adds the missing ones:
   
   | case | behaviour |
   |---|---|
   | allowlisted API with no rule on the role | added as `ALLOW`, in front of 
the `*` rule |
   | API that already has a rule (any permission, any case) | left as is, so an 
explicit `DENY` keeps it out |
   | rules an admin added | kept, order kept |
   | role whose description is not the one CKS sets | not touched, WARN logged |
   | dynamic role checker disabled | nothing done |
   | any failure | whole sync rolled back (one transaction), WARN logged, 
startup goes on |
   
   Related: #14690 adds the Kubernetes provider APIs to the allowlist, but only 
new roles get them. With this PR, existing roles pick up whatever the current 
list is, including those.
   
   Fixes #14747
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [x] Bug fix (non-breaking change which fixes an issue)
   - [ ] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   - [ ] Build/CI
   - [ ] Test (unit or integration test code)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Bug Severity
   
   - [ ] BLOCKER
   - [ ] Critical
   - [x] Major
   - [ ] Minor
   - [ ] Trivial
   
   ### How Has This Been Tested?
   
   Unit tests in `KubernetesClusterManagerImplTest`:
   
   | test | checks |
   |---|---|
   | `...AddsMissingApisBeforeDenyAll` | missing APIs added between existing 
rules and `*`; existing rule not re-added |
   | `...NothingMissing` | no writes when the role is complete |
   | `...NoDenyAllRule` | case-insensitive match; no reorder without a `*` rule 
|
   | `...SkipsRoleNotCreatedByCks` | foreign description skipped |
   | `...SkipsWhenRolesDisabled` | dynamic roles off skipped |
   
   `mvn -pl plugins/integrations/kubernetes-service test`: 83 tests, 0 failures.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to