Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

requested changes

Daniel Hougaard7c87cd26deb3
diff --git a/backend/src/server/routes/v1/index.ts b/backend/src/server/routes/v1/index.ts
index 1ded2d6864..86208ada25 100644
--- a/backend/src/server/routes/v1/index.ts
+++ b/backend/src/server/routes/v1/index.ts
@@ -252,7 +252,7 @@ export const registerV1Routes = async (server: FastifyZodProvider) => {
await secretSharingRouter.register(registerSecretSharingRouter);
await secretSharingRouter.register(registerSecretRequestsRouter, { prefix: "/requests" });
},
- { prefix: "/secret-sharing" }
+ { prefix: "/shared-secrets" }
);
await server.register(registerUserEngagementRouter, { prefix: "/user-engagement" });
diff --git a/docs/api-reference/endpoints/secret-sharing/shared-secrets/access.mdx b/docs/api-reference/endpoints/secret-sharing/shared-secrets/access.mdx
deleted file mode 100644
index a4a211a28f..0000000000
--- a/docs/api-reference/endpoints/secret-sharing/shared-secrets/access.mdx
+++ /dev/null
@@ -1,4 +0,0 @@
----
-title: "Access"
-openapi: "POST /api/v1/secret-sharing/{id}/access"
----
\ No newline at end of file
diff --git a/docs/api-reference/endpoints/secret-sharing/shared-secrets/create.mdx b/docs/api-reference/endpoints/secret-sharing/shared-secrets/create.mdx
deleted file mode 100644
index ddfb97bd8b..0000000000
--- a/docs/api-reference/endpoints/secret-sharing/shared-secrets/create.mdx
+++ /dev/null
@@ -1,4 +0,0 @@
----
-title: "Create"
-openapi: "POST /api/v1/secret-sharing"
----
\ No newline at end of file
diff --git a/docs/api-reference/endpoints/secret-sharing/shared-secrets/delete.mdx b/docs/api-reference/endpoints/secret-sharing/shared-secrets/delete.mdx
deleted file mode 100644
index 71b6a8cfa1..0000000000
--- a/docs/api-reference/endpoints/secret-sharing/shared-secrets/delete.mdx
+++ /dev/null
@@ -1,4 +0,0 @@
----
-title: "Delete by ID"
-openapi: "DELETE /api/v1/secret-sharing/{id}"
----
\ No newline at end of file
diff --git a/docs/api-reference/endpoints/secret-sharing/shared-secrets/get-by-id.mdx b/docs/api-reference/endpoints/secret-sharing/shared-secrets/get-by-id.mdx
deleted file mode 100644
index 87b821b82c..0000000000
--- a/docs/api-reference/endpoints/secret-sharing/shared-secrets/get-by-id.mdx
+++ /dev/null
@@ -1,4 +0,0 @@
----
-title: "Get by ID"
-openapi: "GET /api/v1/secret-sharing/{id}"
----
\ No newline at end of file
diff --git a/docs/api-reference/endpoints/secret-sharing/shared-secrets/list.mdx b/docs/api-reference/endpoints/secret-sharing/shared-secrets/list.mdx
deleted file mode 100644
index 9067c47d25..0000000000
--- a/docs/api-reference/endpoints/secret-sharing/shared-secrets/list.mdx
+++ /dev/null
@@ -1,4 +0,0 @@
----
-title: "List"
-openapi: "GET /api/v1/secret-sharing"
----
\ No newline at end of file
diff --git a/docs/api-reference/endpoints/shared-secrets/access.mdx b/docs/api-reference/endpoints/shared-secrets/access.mdx
new file mode 100644
index 0000000000..6fe7049509
--- /dev/null
+++ b/docs/api-reference/endpoints/shared-secrets/access.mdx
@@ -0,0 +1,4 @@
+---
+title: "Access"
+openapi: "POST /api/v1/shared-secrets/{id}/access"
+---
\ No newline at end of file
diff --git a/docs/api-reference/endpoints/shared-secrets/create.mdx b/docs/api-reference/endpoints/shared-secrets/create.mdx
new file mode 100644
index 0000000000..c8a0f6641b
--- /dev/null
+++ b/docs/api-reference/endpoints/shared-secrets/create.mdx
@@ -0,0 +1,4 @@
+---
+title: "Create"
+openapi: "POST /api/v1/shared-secrets"
+---
\ No newline at end of file
diff --git a/docs/api-reference/endpoints/shared-secrets/delete.mdx b/docs/api-reference/endpoints/shared-secrets/delete.mdx
new file mode 100644
index 0000000000..5386f90b6f
--- /dev/null
+++ b/docs/api-reference/endpoints/shared-secrets/delete.mdx
@@ -0,0 +1,4 @@
+---
+title: "Delete by ID"
+openapi: "DELETE /api/v1/shared-secrets/{id}"
+---
\ No newline at end of file
diff --git a/docs/api-reference/endpoints/shared-secrets/get-by-id.mdx b/docs/api-reference/endpoints/shared-secrets/get-by-id.mdx
new file mode 100644
index 0000000000..15ce72b9f0
--- /dev/null
+++ b/docs/api-reference/endpoints/shared-secrets/get-by-id.mdx
@@ -0,0 +1,4 @@
+---
+title: "Get by ID"
+openapi: "GET /api/v1/shared-secrets/{id}"
+---
\ No newline at end of file
diff --git a/docs/api-reference/endpoints/shared-secrets/list.mdx b/docs/api-reference/endpoints/shared-secrets/list.mdx
new file mode 100644
index 0000000000..9031050d29
--- /dev/null
+++ b/docs/api-reference/endpoints/shared-secrets/list.mdx
@@ -0,0 +1,4 @@
+---
+title: "List"
+openapi: "GET /api/v1/shared-secrets"
+---
\ No newline at end of file
diff --git a/docs/docs.json b/docs/docs.json
index 6f80bea417..b9add98176 100644
--- a/docs/docs.json
+++ b/docs/docs.json
@@ -2956,11 +2956,11 @@
{
"group": "Shared Secrets",
"pages": [
- "api-reference/endpoints/secret-sharing/shared-secrets/list",
- "api-reference/endpoints/secret-sharing/shared-secrets/get-by-id",
- "api-reference/endpoints/secret-sharing/shared-secrets/create",
- "api-reference/endpoints/secret-sharing/shared-secrets/delete",
- "api-reference/endpoints/secret-sharing/shared-secrets/access"
+ "api-reference/endpoints/shared-secrets/list",
+ "api-reference/endpoints/shared-secrets/get-by-id",
+ "api-reference/endpoints/shared-secrets/create",
+ "api-reference/endpoints/shared-secrets/delete",
+ "api-reference/endpoints/shared-secrets/access"
]
}
]
diff --git a/frontend/src/hooks/api/secretSharing/mutations.ts b/frontend/src/hooks/api/secretSharing/mutations.ts
index c48d624556..a37cc08ee4 100644
--- a/frontend/src/hooks/api/secretSharing/mutations.ts
+++ b/frontend/src/hooks/api/secretSharing/mutations.ts
@@ -22,7 +22,7 @@ export const useCreateSharedSecret = () => {
return useMutation({
mutationFn: async (inputData: TCreateSharedSecretRequest) => {
const { data } = await apiRequest.post<TCreatedSharedSecret>(
- "/api/v1/secret-sharing",
+ "/api/v1/shared-secrets",
inputData
);
return data;
@@ -36,7 +36,7 @@ export const useAccessSharedSecret = () => {
return useMutation({
mutationFn: async ({ sharedSecretId, password }: TAccessSharedSecretRequest) => {
const { data } = await apiRequest.post<TAccessSharedSecretResponse>(
- `/api/v1/secret-sharing/${sharedSecretId}/access`,
+ `/api/v1/shared-secrets/${sharedSecretId}/access`,
{
...(password && { password })
}
@@ -51,7 +51,7 @@ export const useCreatePublicSharedSecret = () => {
return useMutation({
mutationFn: async (inputData: TCreateSharedSecretRequest) => {
const { data } = await apiRequest.post<TCreatedSharedSecret>(
- "/api/v1/secret-sharing/public",
+ "/api/v1/shared-secrets/public",
inputData
);
return data;
@@ -66,7 +66,7 @@ export const useCreateSecretRequest = () => {
return useMutation({
mutationFn: async (inputData: TCreateSecretRequestRequestDTO) => {
const { data } = await apiRequest.post<TCreatedSharedSecret>(
- "/api/v1/secret-sharing/requests",
+ "/api/v1/shared-secrets/requests",
inputData
);
return data;
@@ -80,7 +80,7 @@ export const useSetSecretRequestValue = () => {
return useMutation({
mutationFn: async (inputData: TSetSecretRequestValueRequest) => {
const { data } = await apiRequest.post<TSharedSecret>(
- `/api/v1/secret-sharing/requests/${inputData.id}/set-value`,
+ `/api/v1/shared-secrets/requests/${inputData.id}/set-value`,
inputData
);
return data;
@@ -92,7 +92,7 @@ export const useRevealSecretRequestValue = () => {
return useMutation({
mutationFn: async (inputData: TRevealSecretRequestValueRequest) => {
const { data } = await apiRequest.post<TRevealedSecretRequest>(
- `/api/v1/secret-sharing/requests/${inputData.id}/reveal-value`,
+ `/api/v1/shared-secrets/requests/${inputData.id}/reveal-value`,
inputData
);
return data.secretRequest;
@@ -104,7 +104,7 @@ export const useDeleteSharedSecret = () => {
return useMutation<TSharedSecret, { message: string }, { sharedSecretId: string }>({
mutationFn: async ({ sharedSecretId }: TDeleteSharedSecretRequestDTO) => {
const { data } = await apiRequest.delete<TSharedSecret>(
- `/api/v1/secret-sharing/${sharedSecretId}`
+ `/api/v1/shared-secrets/${sharedSecretId}`
);
return data;
},
@@ -118,7 +118,7 @@ export const useDeleteSecretRequest = () => {
return useMutation<TSharedSecret, unknown, TDeleteSecretRequestDTO>({
mutationFn: async ({ secretRequestId }: TDeleteSecretRequestDTO) => {
const { data } = await apiRequest.delete<TSharedSecret>(
- `/api/v1/secret-sharing/requests/${secretRequestId}`
+ `/api/v1/shared-secrets/requests/${secretRequestId}`
);
return data;
@@ -140,7 +140,7 @@ export const useUploadBrandingAsset = () => {
const formData = new FormData();
formData.append("file", file);
const { data } = await apiRequest.post<{ message: string }>(
- `/api/v1/secret-sharing/branding/${assetType}`,
+ `/api/v1/shared-secrets/branding/${assetType}`,
formData,
{
headers: {
@@ -165,7 +165,7 @@ export const useDeleteBrandingAsset = () => {
>({
mutationFn: async ({ assetType }) => {
const { data } = await apiRequest.delete<{ message: string }>(
- `/api/v1/secret-sharing/branding/${assetType}`
+ `/api/v1/shared-secrets/branding/${assetType}`
);
return data;
},
diff --git a/frontend/src/hooks/api/secretSharing/queries.ts b/frontend/src/hooks/api/secretSharing/queries.ts
index bbe96da9a0..3003dacc4f 100644
--- a/frontend/src/hooks/api/secretSharing/queries.ts
+++ b/frontend/src/hooks/api/secretSharing/queries.ts
@@ -38,7 +38,7 @@ export const useGetSharedSecrets = ({
});
const { data } = await apiRequest.get<{ secrets: TSharedSecret[]; totalCount: number }>(
- "/api/v1/secret-sharing",
+ "/api/v1/shared-secrets",
{
params
}
@@ -59,7 +59,7 @@ export const useGetSecretRequests = ({
queryKey: secretSharingKeys.specificSecretRequests({ offset, limit }),
queryFn: async () => {
const { data } = await apiRequest.get<{ secrets: TSharedSecret[]; totalCount: number }>(
- "/api/v1/secret-sharing/requests",
+ "/api/v1/shared-secrets/requests",
{
params: {
offset: String(offset),
@@ -76,7 +76,7 @@ export const useGetSharedSecretById = ({ sharedSecretId }: { sharedSecretId: str
queryKey: secretSharingKeys.getSharedSecretDetails(sharedSecretId),
queryFn: async () => {
const { data } = await apiRequest.get<TSharedSecretPublicDetails>(
- `/api/v1/secret-sharing/${sharedSecretId}`
+ `/api/v1/shared-secrets/${sharedSecretId}`
);
return data;
},
@@ -89,7 +89,7 @@ export const useGetSecretRequestById = ({ secretRequestId }: { secretRequestId:
queryKey: secretSharingKeys.getSecretRequestById({ id: secretRequestId }),
queryFn: async () => {
const { data } = await apiRequest.get<TGetSecretRequestByIdResponse>(
- `/api/v1/secret-sharing/requests/${secretRequestId}`
+ `/api/v1/shared-secrets/requests/${secretRequestId}`
);
return data;
@@ -101,7 +101,7 @@ export const useGetBrandingConfig = () => {
return useQuery({
queryKey: secretSharingKeys.brandingAssets(),
queryFn: async () => {
- const { data } = await apiRequest.get<TBrandingConfig>("/api/v1/secret-sharing/branding");
+ const { data } = await apiRequest.get<TBrandingConfig>("/api/v1/shared-secrets/branding");
return data;
}
});
@@ -111,7 +111,7 @@ export const useGetSharedSecretBranding = ({ sharedSecretId }: { sharedSecretId:
return useQuery({
queryKey: secretSharingKeys.sharedSecretBranding(sharedSecretId),
queryFn: async () => {
- const { data } = await apiRequest.get<TBrandingConfig>("/api/v1/secret-sharing/branding", {
+ const { data } = await apiRequest.get<TBrandingConfig>("/api/v1/shared-secrets/branding", {
params: { sharedSecretId }
});
return data;
diff --git a/frontend/src/pages/organization/SecretSharingPage/components/SecretSharingSettings/SecretSharingBrandingSection.tsx b/frontend/src/pages/organization/SecretSharingPage/components/SecretSharingSettings/SecretSharingBrandingSection.tsx
index 3b7f3fdc0d..a17dfbbcda 100644
--- a/frontend/src/pages/organization/SecretSharingPage/components/SecretSharingSettings/SecretSharingBrandingSection.tsx
+++ b/frontend/src/pages/organization/SecretSharingPage/components/SecretSharingSettings/SecretSharingBrandingSection.tsx
@@ -64,7 +64,7 @@ const fetchAssetAsDataUrl = async (
assetType: "brand-logo" | "brand-favicon"
): Promise<string | null> => {
try {
- const response = await apiRequest.get(`/api/v1/secret-sharing/branding/${assetType}`, {
+ const response = await apiRequest.get(`/api/v1/shared-secrets/branding/${assetType}`, {
responseType: "blob"
});
const blob = response.data as Blob;
diff --git a/frontend/src/pages/public/ViewSecretRequestByIDPage/ViewSecretRequestByIDPage.tsx b/frontend/src/pages/public/ViewSecretRequestByIDPage/ViewSecretRequestByIDPage.tsx
index 5afaf152e5..e63ccb765b 100644
--- a/frontend/src/pages/public/ViewSecretRequestByIDPage/ViewSecretRequestByIDPage.tsx
+++ b/frontend/src/pages/public/ViewSecretRequestByIDPage/ViewSecretRequestByIDPage.tsx
@@ -92,10 +92,10 @@ export const ViewSecretRequestByIDPage = () => {
const hasCustomBranding = !!brandingConfig;
const logoUrl = brandingConfig?.hasLogo
- ? `/api/v1/secret-sharing/requests/${id}/branding/brand-logo`
+ ? `/api/v1/shared-secrets/requests/${id}/branding/brand-logo`
: DEFAULT_LOGO_URL;
const faviconUrl = brandingConfig?.hasFavicon
- ? `/api/v1/secret-sharing/requests/${id}/branding/brand-favicon`
+ ? `/api/v1/shared-secrets/requests/${id}/branding/brand-favicon`
: DEFAULT_FAVICON_URL;
const brandingTheme = useMemo(() => {
diff --git a/frontend/src/pages/public/ViewSharedSecretByIDPage/ViewSharedSecretByIDPage.tsx b/frontend/src/pages/public/ViewSharedSecretByIDPage/ViewSharedSecretByIDPage.tsx
index 1d8c1cbdd8..1fb0d7200a 100644
--- a/frontend/src/pages/public/ViewSharedSecretByIDPage/ViewSharedSecretByIDPage.tsx
+++ b/frontend/src/pages/public/ViewSharedSecretByIDPage/ViewSharedSecretByIDPage.tsx
@@ -133,10 +133,10 @@ export const ViewSharedSecretByIDPage = () => {
const hasCustomBranding = !!brandingConfig;
const logoUrl = brandingConfig?.hasLogo
- ? `/api/v1/secret-sharing/public/${id}/branding/brand-logo`
+ ? `/api/v1/shared-secrets/public/${id}/branding/brand-logo`
: DEFAULT_LOGO_URL;
const faviconUrl = brandingConfig?.hasFavicon
- ? `/api/v1/secret-sharing/public/${id}/branding/brand-favicon`
+ ? `/api/v1/shared-secrets/public/${id}/branding/brand-favicon`
: DEFAULT_FAVICON_URL;
const brandingTheme = useMemo((): BrandingTheme | undefined => {