Skip to content

PLUGINAPI-203 Add supportsScopedOrganizationTokens flag to WebService#306

Merged
aurelien-poscia-sonarsource merged 1 commit into
masterfrom
feature/ap/SC-53831-support-scoped-organization-tokens-flag
Jul 24, 2026
Merged

PLUGINAPI-203 Add supportsScopedOrganizationTokens flag to WebService#306
aurelien-poscia-sonarsource merged 1 commit into
masterfrom
feature/ap/SC-53831-support-scoped-organization-tokens-flag

Conversation

@aurelien-poscia-sonarsource

@aurelien-poscia-sonarsource aurelien-poscia-sonarsource commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a new per-action boolean flag supportsScopedOrganizationTokens to WebService.NewAction/Action (org.sonar.api.server.ws), following the existing internal/post pattern (mutable field + fluent setter on NewAction, immutable field + getter on Action).
  • This flag lets SonarQube Cloud declare, in its Web API documentation, which actions accept authentication via a Scoped Organization Token (SOT). It's infrastructure only — no WS action is annotated with it yet.
  • Extends WebServiceTest's MetricWs fixture to cover both the default (false) and an explicit true override.

Tracked in PLUGINAPI-203. SonarQube Cloud's GET api/webservices/list serialization (SC-53832) depends on this being released, since sonarcloud-core pins sonar-plugin-api at a released version rather than a local build.

Test plan

  • ./gradlew :plugin-api:test --tests "org.sonar.api.server.ws.WebServiceTest" passes

@aurelien-poscia-sonarsource
aurelien-poscia-sonarsource requested a review from a team as a code owner July 24, 2026 09:33
@hashicorp-vault-sonar-prod

hashicorp-vault-sonar-prod Bot commented Jul 24, 2026

Copy link
Copy Markdown

SC-53831

Adds a new per-action boolean flag to NewAction/Action, following the
existing internal/post pattern, so SonarQube Cloud can declare which
WS actions accept authentication via a scoped organization token.
@aurelien-poscia-sonarsource
aurelien-poscia-sonarsource force-pushed the feature/ap/SC-53831-support-scoped-organization-tokens-flag branch from 8ba38f3 to 57d8ed0 Compare July 24, 2026 09:38
@aurelien-poscia-sonarsource aurelien-poscia-sonarsource changed the title SC-53831 Add supportsScopedOrganizationTokens flag to WebService PLUGINAPI-203 Add supportsScopedOrganizationTokens flag to WebService Jul 24, 2026
@sonarqube-next

Copy link
Copy Markdown

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks good to me but I would suggest renaming the getter for the new flag as it already has an active form.

Comment thread plugin-api/src/main/java/org/sonar/api/server/ws/WebService.java
@aurelien-poscia-sonarsource
aurelien-poscia-sonarsource merged commit f44cc73 into master Jul 24, 2026
9 checks passed
@aurelien-poscia-sonarsource
aurelien-poscia-sonarsource deleted the feature/ap/SC-53831-support-scoped-organization-tokens-flag branch July 24, 2026 14:28
@gitar-bot

gitar-bot Bot commented Jul 24, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Adds the supportsScopedOrganizationTokens boolean flag and fluent setter to WebService actions for SOT authentication documentation. No issues found.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants