[5.4.10][ZSTAC-86350] <fix>[identity]: restrict APIQueryAccountMsg to admin-only in RBAC#4418
[5.4.10][ZSTAC-86350] <fix>[identity]: restrict APIQueryAccountMsg to admin-only in RBAC#4418MatheMatrix wants to merge 1 commit into
Conversation
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 32 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
Warning
|
Resolves: ZSTAC-86350 Change-Id: I024ae51da6e5784fb336d8fbd5a4aeab44500565
a553552 to
e6d3189
Compare
Root Cause
RBACInfo.javadefines identity APIs withnormalAPIs("org.zstack.header.identity.**"). On 5.4.10,APIQueryAccountMsgwas not listed inadminOnlyAPIs, so low-privilege IAM users could get this account query API through the wildcard normal permission.Solution
Backport the ZSTAC-83960 / MR !9533 fix to 5.4.10:
APIQueryAccountMsg.classto the identityadminOnlyAPIslist.TestAPIQueryAccountMsgRBACCaseto guard the RBAC classification.Testing
APIQueryAccountMsg.classmissing from theadminOnlyAPIsblock, exit code 1.APIQueryAccountMsg.classpresent in theadminOnlyAPIsblock, exit code 0.git diff --checkmvn -f test/pom.xml -Dtest=org.zstack.test.unittest.identity.TestAPIQueryAccountMsgRBACCase test -DfailIfNoTests=falseblocked locally: missingorg.zstack:*:5.4.0artifacts in local Maven repository.mvn compile -pl header -am -Dmaven.test.skip=trueblocked locally: JDK17 lacks JAXB classes required by this 5.4.10 branch (javax.xml.bind.annotation.adapters.XmlAdapter).Jira
Resolves: ZSTAC-86350
Ref: ZSTAC-83960, ZSTAC-86027
sync from gitlab !10380