-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Do not list Quota API's to accounts with Quota disabled #7599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
framework/config/src/main/java/org/apache/cloudstack/framework/config/PluginAccessConfigs.java
Show resolved
Hide resolved
DaanHoogland
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm, but can you extract the new blocks in ApiDiscoveryServiceImpl , please?
also there is a license header missing
...ins/api/discovery/src/main/java/org/apache/cloudstack/discovery/ApiDiscoveryServiceImpl.java
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## main #7599 +/- ##
=============================================
+ Coverage 12.97% 29.05% +16.07%
- Complexity 8978 30906 +21928
=============================================
Files 2716 5189 +2473
Lines 256309 365814 +109505
Branches 39968 53493 +13525
=============================================
+ Hits 33268 106293 +73025
- Misses 218880 244954 +26074
- Partials 4161 14567 +10406
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 3654 files with indirect coverage changes 📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today! |
|
@blueorangutan package |
|
@JoaoJandre 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 6726 |
|
@blueorangutan test |
|
@DaanHoogland a [SF] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-7375)
|
DaanHoogland
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm
|
@blueorangutan package |
|
@shwstppr 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 7271 |
|
@blueorangutan test |
|
@DaanHoogland a [SF] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
...ins/api/discovery/src/main/java/org/apache/cloudstack/discovery/ApiDiscoveryServiceImpl.java
Outdated
Show resolved
Hide resolved
...ins/api/discovery/src/main/java/org/apache/cloudstack/discovery/ApiDiscoveryServiceImpl.java
Outdated
Show resolved
Hide resolved
...ins/api/discovery/src/main/java/org/apache/cloudstack/discovery/ApiDiscoveryServiceImpl.java
Outdated
Show resolved
Hide resolved
|
[SF] Trillian test result (tid-7877)
|
|
@JoaoJandre , can you look at @GutoVeronezi 's comments/suggestions? |
|
@blueorangutan package |
|
@JoaoJandre a [SL] 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 7729 |
|
@blueorangutan test |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-8314)
|
|
@kishankavala @GutoVeronezi can you approve? |
@DaanHoogland cc: @JoaoJandre |
make functional sense @GutoVeronezi , let me know what/when... moving this out of 4.19 for now |
@DaanHoogland @GutoVeronezi Looking at it this way, I believe that this PR is not really relevant anymore. As this functionality can be achieved using different roles to block the wanted APIs. I'll be closing the PR. |
Description
Currently, even if an account has the Quota plugin disabled, they may still list and use the Quota APIs. This PR fixes this behavior, making the
quota.account.enabledbe respected when listing APIs and calling APIs.Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
A new role was created and granted permission to call all Quota APIs, then a new account was created from that role.
With the plugin enabled for this account, all Quota APIs were called and worked as expected. Then the plugin was disabled for the account and all the APIs were called again, all the calls got a permission denied error, except the
quotaIsEnableAPI, which continued to work (as expected).Finally, still with quota disabled for the account, a sync was done using CloudMonkey to verify that the quota APIs would not be discovered, and only
quotaIsEnablewas discovered for that account (as expected).