Skip to content

Conversation

@andoniaf
Copy link
Member

@andoniaf andoniaf commented Jan 9, 2026

Summary

  • Fix OCI update credentials form failing silently due to missing provider UID
  • The update credentials flow was missing the providerUid prop required for OCI form validation
  • The OCI tenancy field is a hidden field auto-populated from provider UID, but was empty causing validation to fail

Changes

  • Fetch provider data in update-credentials/page.tsx to get the UID (matching existing behavior in add-credentials/page.tsx)
  • Pass providerUid prop to UpdateViaCredentialsForm, UpdateViaRoleForm, and UpdateViaServiceAccountForm

Test plan

  • Navigate to update credentials for an OCI provider
  • Fill in the credential fields
  • Verify the "Next" button works and progresses to the next step

Checklist

UI

  • All issue/task requirements work as expected on the UI
  • Screenshots/Video of the functionality flow (if applicable) - Mobile (X < 640px)
  • Screenshots/Video of the functionality flow (if applicable) - Table (640px > X < 1024px)
  • Screenshots/Video of the functionality flow (if applicable) - Desktop (X > 1024px)
  • Ensure new entries are added to CHANGELOG.md, if applicable.

API

  • Verify if API specs need to be regenerated.
  • Check if version updates are required (e.g., specs, Poetry, etc.).
  • Ensure new entries are added to CHANGELOG.md, if applicable.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

The update credentials flow was missing the provider UID that is required
for OCI form validation. The OCI tenancy field is a hidden field that gets
auto-populated from the provider UID, but it was empty in the update flow
causing form validation to fail silently.

Changes:
- Fetch provider data in update-credentials page to get the UID
- Pass providerUid prop to UpdateViaCredentialsForm
- Pass providerUid prop to UpdateViaRoleForm
- Pass providerUid prop to UpdateViaServiceAccountForm
@andoniaf andoniaf requested a review from a team as a code owner January 9, 2026 09:43
@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

⚠️ Changes detected in the following folders without a corresponding update to the CHANGELOG.md:

  • api

Please add an entry to the corresponding CHANGELOG.md file to maintain a clear history of changes.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

Conflict Markers Resolved

All conflict markers have been successfully resolved in this pull request.

@andoniaf andoniaf changed the title fix(ui): pass provider UID to update credentials forms fix(oci): pass provider UID to update credentials forms Jan 9, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

🔒 Container Security Scan

Image: prowler-ui:e8b7c49
Last scan: 2026-01-15 09:17:04 UTC

✅ No Vulnerabilities Detected

The container image passed all security checks. No known CVEs were found.

📋 Resources:

@jfagoagas jfagoagas added the backport-to-v5.16 Backport PR to the v5.16 branch label Jan 9, 2026
Copy link
Contributor

@alejandrobailo alejandrobailo left a comment

Choose a reason for hiding this comment

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

Thanks @andoniaf , few things to improve

Before Merge:

1. Add error handling for getProvider failure (critical)
2. Add E2E test for OCI update flow with UID validation
3. Consider validation for missing/invalid providerId

Nice to Have:
- Extract FormData creation pattern to helper if used elsewhere

Address PR review comments:
- Add error handling for getProvider failure (redirect to /providers)
- Add validation for missing providerId (redirect to /providers)
- Add E2E test for OCI update credentials flow (@PROVIDER-E2E-013)
- Add page object methods for update credentials interactions
- Document new test case in providers.md
Fix E2E test failure where clickProviderRowActions was matching 2
elements (copy button and dropdown trigger). Use aria-haspopup="true"
attribute to specifically target the dropdown trigger button.
HeroUI uses aria-haspopup="menu" not aria-haspopup="true" for dropdown
triggers. Fix the selector in clickProviderRowActions to match correctly.
- Use row.locator("button").last() for dropdown trigger selector
- Add stabilization wait and force click for dropdown menu items
- Add verifyOCIUpdateCredentialsPageLoaded for update flow (Tenancy OCID hidden)
- Add verifyTestConnectionPageLoaded for update flow navigation
- Fix clickNext to exclude Next.js dev tools button with exact match
@andoniaf
Copy link
Member Author

Thanks @andoniaf , few things to improve

Before Merge:

1. Add error handling for getProvider failure (critical)
2. Add E2E test for OCI update flow with UID validation
3. Consider validation for missing/invalid providerId

Nice to Have: - Extract FormData creation pattern to helper if used elsewhere

Thanks @alejandrobailo, "Before Merge" all done:

  1. Error handling for getProvider failure ✅
    - Added redirect to /providers when getProvider returns errors (following the pattern from test-connection/page.tsx)
  2. E2E test for OCI update flow with UID validation ✅
    - Added @PROVIDER-E2E-013 test that:
    • Navigates to providers page
    • Finds existing OCI provider
    • Opens update credentials flow
    • Verifies form loads correctly (provider UID populated)
    • Submits updated credentials
    • Verifies navigation to test-connection page
  3. Validation for missing/invalid providerId ✅
    - Added redirect to /providers when providerId is missing (required for update flow)

Copy link
Contributor

@alejandrobailo alejandrobailo left a comment

Choose a reason for hiding this comment

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

Thanks, nice work!

@andoniaf andoniaf merged commit 28978f6 into master Jan 15, 2026
36 of 38 checks passed
@andoniaf andoniaf deleted the PROWLER-659/fix-oci-update-credentials-missing-uid branch January 15, 2026 10:29
@prowler-bot prowler-bot added the was-backported The PR was successfully backported to the target branch label Jan 15, 2026
@prowler-bot
Copy link
Collaborator

💚 All backports created successfully

Status Branch Result
v5.16

Questions ?

Please refer to the Backport tool documentation and see the Github Action logs for details

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

Labels

backport-to-v5.16 Backport PR to the v5.16 branch component/ui was-backported The PR was successfully backported to the target branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants