Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Provider Credentials #2195

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open

Refactor Provider Credentials #2195

wants to merge 21 commits into from

Conversation

grolu
Copy link
Contributor

@grolu grolu commented Nov 21, 2024

This PR refactors the backend /cloudprovidersecrets API

  • Removed old endpoint that returned custom dashboard secret resource
  • Added new /cloudprovidercredentials endpoint that returns list of credentials (sets) that contain related SecretBinding, Secret (if own) and resolved Quota resources
  • Renamed secret store to credential store

This PR is also a preparation to support new CredentialsBinding resource

  • Started renaming secret to credential (store)
  • Work with SecretBinding as the leading resource, access referenced secret only when we need to access the actual secret data
  • In a follow-up PR we can then also read CredentialsBindings in the backend and return with the list. The dashboard can then work with CredentialsBindings and SecretBindings in the frontend as they are more or less interchangeable. Only the reference to the Secret / WorkloadIdentity data is different so we need to add some kind of abstraction / transformation there.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:
Tests need to be adapted

Release note:


@gardener-robot gardener-robot added needs/review Needs review size/xl Size of pull request is huge (see gardener-robot robot/bots/size.py) needs/second-opinion Needs second review by someone else labels Nov 21, 2024
@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Nov 21, 2024
@gardener-robot-ci-2 gardener-robot-ci-2 added needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Nov 21, 2024
@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Nov 21, 2024
@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Nov 21, 2024
@gardener-robot-ci-2 gardener-robot-ci-2 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Nov 21, 2024
Highlight secret row instead of open secret dialog
@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Nov 21, 2024
@gardener-robot-ci-1 gardener-robot-ci-1 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Nov 21, 2024
show secret data in edit mode
@gardener-robot-ci-3 gardener-robot-ci-3 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Nov 22, 2024
@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Nov 22, 2024
backend/lib/services/cloudProviderCredentials.js Outdated Show resolved Hide resolved
frontend/src/store/credential.js Outdated Show resolved Hide resolved
frontend/src/store/credential.js Outdated Show resolved Hide resolved
frontend/src/store/credential.js Outdated Show resolved Hide resolved
frontend/src/store/credential.js Outdated Show resolved Hide resolved
frontend/src/utils/index.js Outdated Show resolved Hide resolved
backend/lib/services/cloudProviderCredentials.js Outdated Show resolved Hide resolved
@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Nov 26, 2024
@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Nov 26, 2024
@gardener-robot-ci-3 gardener-robot-ci-3 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Nov 27, 2024
@grolu grolu force-pushed the enh/refactor-secrets branch from dbef902 to 5b82bcd Compare November 27, 2024 11:24
@gardener-robot-ci-3 gardener-robot-ci-3 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Nov 27, 2024
@grolu grolu force-pushed the enh/refactor-secrets branch from d861174 to 2e1afb0 Compare December 2, 2024 12:42
@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Dec 2, 2024
@gardener-robot-ci-3 gardener-robot-ci-3 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Dec 2, 2024
@grolu grolu force-pushed the enh/refactor-secrets branch from 2e1afb0 to cee31b0 Compare December 2, 2024 16:43
@gardener-robot-ci-3 gardener-robot-ci-3 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Dec 2, 2024
frontend/src/components/GShootListRow.vue Outdated Show resolved Hide resolved
frontend/src/composables/useSecretDialogData.js Outdated Show resolved Hide resolved
frontend/src/composables/useSecretDialogData.js Outdated Show resolved Hide resolved
frontend/src/store/credential.js Outdated Show resolved Hide resolved
frontend/src/store/credential.js Outdated Show resolved Hide resolved
frontend/src/store/credential.js Outdated Show resolved Hide resolved
frontend/src/store/credential.js Show resolved Hide resolved
@@ -48,28 +48,39 @@ export function getConfiguration () {
return getResource('/api/config')
}

/* CloudProviders Secrets */
/* Credentials */
function invokeCloudProviderCredentialMethod (method, params) {
Copy link
Member

Choose a reason for hiding this comment

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

I think this method is sufficient

@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Dec 3, 2024
@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Dec 3, 2024
- Improved SecretDat composable
- Added tests for credential store
Copy link

gitguardian bot commented Dec 10, 2024

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
While these secrets were previously flagged, we no longer have a reference to the
specific commits where they were detected. Once a secret has been leaked into a git
repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Dec 10, 2024
Removed secretData composable in favour of credential context composable
@gardener-robot-ci-3 gardener-robot-ci-3 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Dec 18, 2024
@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Dec 18, 2024
@gardener-robot-ci-3 gardener-robot-ci-3 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Dec 18, 2024
@gardener-robot-ci-1 gardener-robot-ci-1 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Dec 18, 2024
@gardener-robot-ci-3 gardener-robot-ci-3 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Dec 18, 2024
@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Dec 18, 2024
- Renamed secretBindingNamespace variables to bindingNamespace (preparation for credentialsbinding)
- Removed $reset logic in case of CUD operations
- Added missing $reset before setting store credentials
@grolu grolu force-pushed the enh/refactor-secrets branch from 91a8b5a to 19e9497 Compare December 18, 2024 14:15
@gardener-robot-ci-3 gardener-robot-ci-3 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Dec 18, 2024
@gardener-robot-ci-1 gardener-robot-ci-1 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/review Needs review needs/second-opinion Needs second review by someone else size/xl Size of pull request is huge (see gardener-robot robot/bots/size.py)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants