Skip to content

Move credential details to vendor configuration#3085

Open
grolu wants to merge 1 commit into
masterfrom
enh/vendor-secret-details
Open

Move credential details to vendor configuration#3085
grolu wants to merge 1 commit into
masterfrom
enh/vendor-secret-details

Conversation

@grolu

@grolu grolu commented Jul 17, 2026

Copy link
Copy Markdown
Member

What this PR does / why we need it:

This is the third preparatory refactor extracted from #2824 and follows the vendor registry extraction in #3075 and typed vendor lookups in #3082.

Credential detail rendering previously used a provider-name switch in credential/helper.js. That kept provider-specific display metadata in application code and required extending the switch for every supported vendor.

This change:

  • moves read-only credential-detail definitions into each infrastructure and DNS vendor module under frontend/src/data/vendors
  • replaces the provider switch with a configuration-driven detail resolver
  • supports the existing Azure, vSphere, and RFC2136 Secret-key aliases
  • safely resolves GCP project IDs from structured service-account data, including the existing Google Cloud DNS fallback
  • looks up vendor configuration through the explicit infra or dns domain
  • renames the DNS-only raw-credential composable to useDnsProviderCredential

Related PRs:

Which issue(s) this PR fixes:

None.

Special notes for your reviewer:

Please review this as the third preparatory refactor in the sequential split of #2824. The secret.details configuration is read-only display metadata; it is not used when creating or updating Secrets.

Validation:

  • make verify
  • focused credential-helper, infrastructure-binding, and DNS-credential composable tests
  • provider-by-provider snapshot coverage for credential detail output
  • GitGuardian pre-commit scan

Release note:

NONE

Summary by CodeRabbit

  • New Features

    • Added vendor-aware credential details for infrastructure and DNS credentials.
    • Displayed relevant fields such as access IDs, subscription IDs, projects, usernames, server information, and API URLs.
    • Added support for hidden credential values, including API keys and tokens.
    • Improved DNS credential selection, editing, deletion, and display flows.
  • Bug Fixes

    • Credential details now gracefully handle missing secrets, unsupported providers, and malformed configuration data.
  • Tests

    • Added coverage for provider-specific details and DNS credential behavior.

@gardener-prow

gardener-prow Bot commented Jul 17, 2026

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@gardener-prow gardener-prow Bot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 17, 2026
@gardener-prow

gardener-prow Bot commented Jul 17, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign klocke-io for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 514766fb-4415-4ba5-b2ca-44bcdb5d4f77

📥 Commits

Reviewing files that changed from the base of the PR and between e467be2 and e0badf5.

⛔ Files ignored due to path filters (1)
  • frontend/__tests__/composables/__snapshots__/credential.helper.spec.js.snap is excluded by !**/*.snap
📒 Files selected for processing (37)
  • frontend/__tests__/composables/credential.helper.spec.js
  • frontend/__tests__/composables/useCloudProviderBinding.spec.js
  • frontend/__tests__/composables/useDnsProviderCredential.spec.js
  • frontend/src/components/Credentials/GBindingName.vue
  • frontend/src/components/Credentials/GBindingRowInfra.vue
  • frontend/src/components/Credentials/GCredentialDetailsItemContent.vue
  • frontend/src/components/Credentials/GCredentialName.vue
  • frontend/src/components/Credentials/GCredentialRowActions.vue
  • frontend/src/components/Credentials/GCredentialRowDns.vue
  • frontend/src/components/Credentials/GSecretDialog.vue
  • frontend/src/components/Credentials/GSecretDialogDelete.vue
  • frontend/src/components/Credentials/GSelectCredential.vue
  • frontend/src/components/ShootDetails/GShootInfrastructureCard.vue
  • frontend/src/components/ShootDns/GDnsProvider.vue
  • frontend/src/composables/credential/helper.js
  • frontend/src/composables/credential/useCloudProviderBinding.js
  • frontend/src/composables/credential/useDnsProviderCredential.js
  • frontend/src/data/vendors/dns/alicloud-dns.js
  • frontend/src/data/vendors/dns/aws-route53.js
  • frontend/src/data/vendors/dns/azure-dns.js
  • frontend/src/data/vendors/dns/azure-private-dns.js
  • frontend/src/data/vendors/dns/cloudflare.js
  • frontend/src/data/vendors/dns/google-clouddns.js
  • frontend/src/data/vendors/dns/infoblox.js
  • frontend/src/data/vendors/dns/netlify.js
  • frontend/src/data/vendors/dns/openstack-designate.js
  • frontend/src/data/vendors/dns/powerdns.js
  • frontend/src/data/vendors/dns/rfc2136.js
  • frontend/src/data/vendors/infra/alicloud.js
  • frontend/src/data/vendors/infra/aws.js
  • frontend/src/data/vendors/infra/azure.js
  • frontend/src/data/vendors/infra/gcp.js
  • frontend/src/data/vendors/infra/hcloud.js
  • frontend/src/data/vendors/infra/metal.js
  • frontend/src/data/vendors/infra/openstack.js
  • frontend/src/data/vendors/infra/vsphere.js
  • frontend/src/views/GCredentials.vue

📝 Walkthrough

Walkthrough

Credential secret details are now declared in infrastructure and DNS vendor configurations. Shared resolution supports alternate keys, Base64 decoding, JSON parsing, nested paths, and hidden fields. Credential composables and components pass vendor-specific configurations into the resolver, with expanded tests.

Changes

Vendor-configured secret details

Layer / File(s) Summary
Vendor metadata and secret detail resolver
frontend/src/composables/credential/helper.js, frontend/src/data/vendors/dns/*, frontend/src/data/vendors/infra/*
Vendor definitions now declare secret detail fields, and secretDetails resolves values from those declarations.
Provider configuration integration
frontend/src/composables/credential/useCloudProviderBinding.js, frontend/src/composables/credential/useDnsProviderCredential.js
Infrastructure and DNS composables obtain providerConfig through configStore.vendorDetails before resolving secret details.
Credential component wiring
frontend/src/components/Credentials/*, frontend/src/components/ShootDetails/*, frontend/src/components/ShootDns/*, frontend/src/views/GCredentials.vue
Credential detail components receive explicit vendor types, while DNS credential paths use useDnsProviderCredential.
Credential detail validation
frontend/__tests__/composables/*
Tests cover configured detail mappings, missing configurations, undefined secrets, DNS credential behavior, and invalid GCP service-account JSON.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant CredentialView
  participant CredentialComposable
  participant ConfigStore
  participant SecretDetails
  CredentialView->>CredentialComposable: resolve credential details
  CredentialComposable->>ConfigStore: vendorDetails({ type, name })
  ConfigStore-->>CredentialComposable: return providerConfig
  CredentialComposable->>SecretDetails: resolve secret with providerConfig
  SecretDetails-->>CredentialView: return labeled values
Loading

Possibly related PRs

Suggested labels: area/quality

Suggested reviewers: holgerkoser, klocke-io

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: moving credential details into vendor configuration.
Description check ✅ Passed The description covers the PR purpose, refs, special notes, and release note, but leaves the categorization section unfilled.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch enh/vendor-secret-details

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.

@gardener-prow gardener-prow Bot added do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jul 17, 2026
@grolu
grolu marked this pull request as ready for review July 17, 2026 14:55
@grolu
grolu requested a review from a team as a code owner July 17, 2026 14:55
@gardener-prow gardener-prow Bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 17, 2026
@grolu grolu added kind/enhancement Enhancement, improvement, extension do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Jul 17, 2026
@gardener-prow gardener-prow Bot removed do-not-merge/needs-kind Indicates a PR lacks a `kind/foo` label and requires one. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. labels Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes Indicates the PR's author has signed the cla-assistant.io CLA. kind/enhancement Enhancement, improvement, extension size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant