-
Notifications
You must be signed in to change notification settings - Fork 537
chore: update endpoint to rotate secret key #7122
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
chore: update endpoint to rotate secret key #7122
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
WalkthroughThe changes update the secret key rotation functionality to require both Changes
Sequence Diagram(s)sequenceDiagram
participant UI_Component as UI Component (e.g., SecretKeySection)
participant API_Client as rotateSecretKeyClient
participant API_Server as API Server
UI_Component->>API_Client: rotateSecretKeyClient({ teamId, projectId })
API_Client->>API_Server: POST /v1/teams/{teamId}/projects/{projectId}/rotate-secret-key
API_Server-->>API_Client: Response (new secret key)
API_Client-->>UI_Component: Promise resolves with result
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (6)
🚧 Files skipped from review as they are similar to previous changes (6)
⏰ Context from checks skipped due to timeout of 90000ms (7)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7122 +/- ##
=======================================
Coverage 55.58% 55.58%
=======================================
Files 902 902
Lines 58162 58162
Branches 4086 4086
=======================================
Hits 32329 32329
Misses 25731 25731
Partials 102 102
🚀 New features to boost your workflow:
|
size-limit report 📦
|
...shboard/src/app/(app)/team/[team_slug]/[project_slug]/components/ProjectFTUX/ProjectFTUX.tsx
Outdated
Show resolved
Hide resolved
...rd/src/app/(app)/team/[team_slug]/[project_slug]/components/ProjectFTUX/SecretKeySection.tsx
Outdated
Show resolved
Hide resolved
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/nebula/nebula-ftux.tsx
Outdated
Show resolved
Hide resolved
apps/dashboard/src/app/(app)/team/[team_slug]/[project_slug]/nebula/page.tsx
Outdated
Show resolved
Hide resolved
b400065
to
63cadf4
Compare
Merge activity
|
## [Dashboard] Fix: Update Secret Key Rotation API Endpoint ## Notes for the reviewer This PR updates the secret key rotation functionality to use the new team-based API endpoint structure. The `rotateSecretKeyClient` function now requires both `teamId` and `projectId` parameters, and the API endpoint has been updated to follow the `/v1/teams/{teamId}/projects/{projectId}/rotate-secret-key` pattern. ## How to test Test the secret key rotation functionality in: 1. Project FTUX 2. Nebula FTUX 3. Project General Settings page Verify that the secret key can be successfully rotated in all these locations. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Updated secret key rotation to require both team and project identifiers for enhanced security and context. - Modified components to include team ID alongside project data, improving integration and user experience in project-related sections. <!-- end of auto-generated comment: release notes by coderabbit.ai --> <!-- start pr-codex --> --- ## PR-Codex overview This PR focuses on updating the handling of project and team identifiers in the `NebulaFTUX` and related components, enhancing the functionality for rotating secret keys by including the `teamId` alongside the `projectId`. ### Detailed summary - Added `teamId` prop to the `NebulaFTUX` component. - Passed `teamId` from `NebulaFTUX` to `SecretKeySection`. - Updated `rotateSecretKeyClient` to accept an object with `teamId` and `projectId`. - Modified the API call in `rotateSecretKeyClient` to use the new parameters. - Updated the `SecretKeySection` to handle the new `teamId` prop. > ✨ Ask PR-Codex anything about this PR by commenting with `/codex {your question}` <!-- end pr-codex -->
c256b5a
to
1ad109f
Compare
[Dashboard] Fix: Update Secret Key Rotation API Endpoint
Notes for the reviewer
This PR updates the secret key rotation functionality to use the new team-based API endpoint structure. The
rotateSecretKeyClient
function now requires bothteamId
andprojectId
parameters, and the API endpoint has been updated to follow the/v1/teams/{teamId}/projects/{projectId}/rotate-secret-key
pattern.How to test
Test the secret key rotation functionality in:
Verify that the secret key can be successfully rotated in all these locations.
Summary by CodeRabbit
PR-Codex overview
This PR focuses on enhancing the handling of project and team identifiers in the
NebulaFTUX
,ProjectFTUX
, andSecretKeySection
components, as well as updating therotateSecretKeyClient
function to accept bothteamId
andprojectId
for better API interaction.Detailed summary
teamId
prop toNebulaFTUX
andProjectFTUX
.NebulaFTUX
to passteamId
toSecretKeySection
.rotateSecretKeyClient
to accept an object withteamId
andprojectId
.rotateSecretKeyClient
to use the new parameters.SecretKeySection
to acceptteamId
and pass it torotateSecretKeyClient
.