Move credential details to vendor configuration - #3085
Conversation
|
Skipping CI for Draft Pull Request. |
📝 WalkthroughWalkthroughCredential 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. ChangesVendor-configured secret details
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
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@frontend/src/data/vendors/dns/google-clouddns.js`:
- Around line 10-13: The Google Cloud DNS valueFrom definition must support both
serviceaccount.json credentials and raw project_id credentials. Update the
relevant resolver configuration or implementation so each ordered alternative
uses the correct parsing and path behavior, rather than applying JSON parsing to
the raw value; retain serviceaccount.json as the primary option and add coverage
for raw project_id resolution.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 456adfba-e669-41cf-b5b8-c6dfd105a9b9
⛔ Files ignored due to path filters (1)
frontend/__tests__/composables/__snapshots__/credential.helper.spec.js.snapis excluded by!**/*.snap
📒 Files selected for processing (18)
frontend/__tests__/composables/credential.helper.spec.jsfrontend/__tests__/composables/useCloudProviderBinding.spec.jsfrontend/__tests__/composables/useDnsProviderCredential.spec.jsfrontend/src/composables/credential/helper.jsfrontend/src/data/vendors/dns/aws-route53.jsfrontend/src/data/vendors/dns/azure-dns.jsfrontend/src/data/vendors/dns/google-clouddns.jsfrontend/src/data/vendors/dns/infoblox.jsfrontend/src/data/vendors/dns/openstack-designate.jsfrontend/src/data/vendors/dns/powerdns.jsfrontend/src/data/vendors/dns/rfc2136.jsfrontend/src/data/vendors/infra/alicloud.jsfrontend/src/data/vendors/infra/aws.jsfrontend/src/data/vendors/infra/azure.jsfrontend/src/data/vendors/infra/gcp.jsfrontend/src/data/vendors/infra/metal.jsfrontend/src/data/vendors/infra/openstack.jsfrontend/src/data/vendors/infra/vsphere.js
🚧 Files skipped from review as they are similar to previous changes (15)
- frontend/src/data/vendors/infra/vsphere.js
- frontend/src/data/vendors/dns/powerdns.js
- frontend/src/data/vendors/infra/alicloud.js
- frontend/src/data/vendors/dns/openstack-designate.js
- frontend/src/data/vendors/infra/openstack.js
- frontend/src/data/vendors/dns/aws-route53.js
- frontend/src/data/vendors/dns/infoblox.js
- frontend/src/data/vendors/infra/aws.js
- frontend/src/data/vendors/dns/rfc2136.js
- frontend/src/data/vendors/dns/azure-dns.js
- frontend/src/data/vendors/infra/gcp.js
- frontend/tests/composables/useCloudProviderBinding.spec.js
- frontend/tests/composables/useDnsProviderCredential.spec.js
- frontend/src/data/vendors/infra/metal.js
- frontend/src/composables/credential/helper.js
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: petersutter The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
LGTM label has been added. DetailsGit tree hash: 9b32a199deafa1485798a78f98e6bec64c065c41 |
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:
frontend/src/data/vendorsinfraordnsdomainuseDnsProviderCredentialRelated 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.detailsconfiguration is read-only display metadata; it is not used when creating or updating Secrets.Validation:
make verifyRelease note:
Summary by CodeRabbit
New Features
Bug Fixes
Tests