feat: Added changes to support workspace with konnect flow#1892
Conversation
|
CI is failing because, no other entity is present other than routes for Konnect Workspaces.This will be fixed once changes are deployed from KoKo side. Changes are inProgress from KoKo side, I didn't got any specific ETA. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1892 +/- ##
==========================================
- Coverage 33.04% 32.58% -0.47%
==========================================
Files 77 77
Lines 6812 6903 +91
==========================================
- Hits 2251 2249 -2
- Misses 4381 4474 +93
Partials 180 180 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
| GitGuardian id | GitGuardian status | Secret | Commit | Filename | |
|---|---|---|---|---|---|
| 27577943 | Triggered | Generic High Entropy Secret | 561788b | tests/integration/testdata/dump/009-skip-defaults/konnect/credentials.expected.yaml | View secret |
| 27577964 | Triggered | Generic Password | 561788b | tests/integration/testdata/dump/009-skip-defaults/enterprise/3.4/credentials.expected.yaml | View secret |
| 27577964 | Triggered | Generic Password | 561788b | tests/integration/testdata/dump/009-skip-defaults/konnect/credentials.expected.yaml | View secret |
| 27577943 | Triggered | Generic High Entropy Secret | 561788b | tests/integration/testdata/dump/009-skip-defaults/enterprise/3.4/credentials.expected.yaml | View secret |
| 27577956 | Triggered | Generic Password | d31b8ce | tests/integration/testdata/sync/047-basic-auth-skip-hash/expected-dump.yaml | View secret |
🛠 Guidelines to remediate hardcoded secrets
- Understand the implications of revoking this secret by investigating where it is used in your code.
- Replace and store your secrets safely. Learn here the best practices.
- Revoke and rotate these secrets.
- If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.
To avoid such incidents in the future consider
- following these best practices for managing and storing secrets including API keys and other credentials
- install secret detection on pre-commit to catch secret before it leaves your machine and ease remediation.
🦉 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.
https://konghq.atlassian.net/browse/KOKO-3141
#1859
Supporting PRs:
Kong/go-kong#602
Kong/go-database-reconciler#376
Summary:
This PR introduces workspace support for Konnect as part of the referenced Jira task. The changes extend existing commands to support workspaces when operating in Konnect mode. Added changes in sync, diff, reset, apply, dump and validate command.
The overall flow is similar to the existing Kong workspace implementation, but Konnect uses different workspace API endpoints, which required additional handling.
In Konnect/Kong, all entities are attached to the default workspace by default but Konnect endpoint is bit different then what we have in Kong . Therefore, when the user explicitly specifies the default workspace, the system should follow the existing normal Konnect flow, without triggering workspace-specific logic.
Testing:
Verified that Konnect workspace behavior aligns with Kong workspaces, ensuring consistent behavior across both flows.
I have added all the integration tests below for the review reference.
Integration tests For Konnect Workspaces:
Dump Command
Reset Command
Sync Command
Diff Command
Apply Command
Validate Command