CKS: check access when get kubernetescluster config#7854
Conversation
Codecov Report
@@ Coverage Diff @@
## 4.18 #7854 +/- ##
============================================
- Coverage 13.02% 13.02% -0.01%
Complexity 9032 9032
============================================
Files 2720 2720
Lines 257080 257082 +2
Branches 40088 40088
============================================
Hits 33476 33476
- Misses 219400 219402 +2
Partials 4204 4204
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
@blueorangutan package |
|
@weizhouapache a [SF] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6752 |
|
@blueorangutan test rocky8 kvm-rocky8 |
|
@weizhouapache a [SF] Trillian-Jenkins test job (rocky8 mgmt + kvm-rocky8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-7388)
|
|
@kiranchavala |
kiranchavala
left a comment
There was a problem hiding this comment.
LGTM, Manually tested the scenario and its working fine
1. Create an account of role type user (Let's say Account 1 > User1)
2. Login as user 1 > Launch a k8s cluster
3. Execute API call with user 1 API key and secret key
https://cloudstack.apache.org/api/apidocs-4.18/apis/getKubernetesClusterConfig.html
get Kubernetes clusters access infomation
Able to get the output of the API call (including the Kubernetes cluster config)
4. Create an account of role type user ( Lets say Account 2> User2)
5. Execute API call with user 2 API key and secret key and k8s cluster's ID get from User1
https://cloudstack.apache.org/api/apidocs-4.18/apis/getKubernetesClusterConfig.html
Get Kubernetes clusters access infomation
Not Able to get the output of the API call (including the Kubernetes cluster config)
(cmk) > get kubernetesclusterconfig id=63017ee0-b9eb-4650-9209-a16eb9dd2dba
Error: (HTTP 530, error code 9999) Account [{"accountName":"kiran","id":5,"uuid":"214277d9-08c2-4384-a7ff-1ffee34e2d97"}] does not have permission to operate with resource
thanks @kiranchavala for the testing merging |
Description
This PR fixes #7618
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?