Skip to content

Add GCP Service-Account Auth UI for Vertex AI Endpoints - #1409

Open
hisanhunais wants to merge 2 commits into
wso2:mainfrom
hisanhunais:agent-platform-api
Open

Add GCP Service-Account Auth UI for Vertex AI Endpoints#1409
hisanhunais wants to merge 2 commits into
wso2:mainfrom
hisanhunais:agent-platform-api

Conversation

@hisanhunais

Copy link
Copy Markdown
Contributor

Purpose

  • Add GCP service-account auth UI for Vertex AI endpoints

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@hisanhunais, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 29 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: b07ffd04-605c-46ed-8089-b83dcd04d9a7

📥 Commits

Reviewing files that changed from the base of the PR and between 1ab5ddd and 9da7f5a.

📒 Files selected for processing (2)
  • portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Endpoints/AIEndpoints/AddEditAIEndpoint.jsx
  • portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Endpoints/AIEndpoints/EndpointCard.jsx
📝 Walkthrough

Walkthrough

The PR adds GCP Vertex AI service-account authentication to provider and endpoint forms. It supports JSON key upload, validation, persistence, existing-key restoration, explanatory text, and warnings for endpoints without required security settings.

Changes

GCP Vertex AI authentication

Layer / File(s) Summary
Provider authentication source
portals/admin/.../AddEditAiServiceProvider.jsx
The provider form exposes GCP authentication and displays Vertex AI service-account guidance.
Endpoint service-account configuration
portals/publisher/.../AddEditAIEndpoint.jsx
The endpoint form detects GCP authentication, restores existing keys, validates required credentials, uploads JSON keys, and saves valid keys to the active environment.
Endpoint security warning
portals/publisher/.../EndpointCard.jsx
The endpoint card warns when GCP authentication is enabled without endpoint security settings and links to endpoint configuration.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant PublisherForm
  participant FileReader
  participant ActiveEnvironment
  participant EndpointCard
  PublisherForm->>FileReader: Read selected JSON service-account key
  FileReader-->>PublisherForm: Return key content or read error
  PublisherForm->>ActiveEnvironment: Save valid key to endpoint security
  EndpointCard->>ActiveEnvironment: Check endpoint security settings
  ActiveEnvironment-->>EndpointCard: Return security configuration
  EndpointCard-->>PublisherForm: Link to endpoint configuration when settings are missing
Loading

Possibly related PRs

  • wso2/apim-apps#1397: Both PRs modify AddEditAIEndpoint.jsx for provider-specific authentication configuration and persistence.

Suggested reviewers: tharikagithub, chira99

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the addition of GCP service-account authentication UI for Vertex AI endpoints.
Description check ✅ Passed The description directly states that the pull request adds GCP service-account authentication UI for Vertex AI endpoints.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Endpoints/AIEndpoints/AddEditAIEndpoint.jsx`:
- Around line 817-835: The upload validation in the AI endpoint file must verify
the parsed JSON is a standard GCP service-account key, not merely syntactically
valid JSON. Update the validation before setServiceAccountKey and
saveEndpointSecurityConfig to require type, project_id, private_key, and
client_email; reject missing fields through the existing invalid-key Alert path.

In
`@portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Endpoints/AIEndpoints/EndpointCard.jsx`:
- Around line 174-176: Update the GCP warning condition in EndpointCard to
inspect the endpoint’s security configuration rather than only endpointSecurity
presence: show the warning unless the security type is GCP and serviceAccountKey
is non-null. Preserve an empty-string serviceAccountKey as a configured value
when determining whether to suppress the warning.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 3c0a32fb-4a1a-44a7-a601-93461259d14b

📥 Commits

Reviewing files that changed from the base of the PR and between 935e773 and 1ab5ddd.

📒 Files selected for processing (3)
  • portals/admin/src/main/webapp/source/src/app/components/AiServiceProviders/AddEditAiServiceProvider.jsx
  • portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Endpoints/AIEndpoints/AddEditAIEndpoint.jsx
  • portals/publisher/src/main/webapp/source/src/app/components/Apis/Details/Endpoints/AIEndpoints/EndpointCard.jsx

@sonarqubecloud

sonarqubecloud Bot commented Aug 3, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
6.7% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

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.

1 participant