Skip to content

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

feat: fixed access list broken in ui

=71701060a95a
diff --git a/backend/src/ee/routes/v1/secret-router.ts b/backend/src/ee/routes/v1/secret-router.ts
index a964eb1b85..b9eeb7729c 100644
--- a/backend/src/ee/routes/v1/secret-router.ts
+++ b/backend/src/ee/routes/v1/secret-router.ts
@@ -34,7 +34,7 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
secretName: z.string().trim().describe(RAW_SECRETS.GET_ACCESS_LIST.secretName)
}),
querystring: z.object({
- workspaceId: z.string().trim().describe(RAW_SECRETS.GET_ACCESS_LIST.workspaceId),
+ projectId: z.string().trim().describe(RAW_SECRETS.GET_ACCESS_LIST.projectId),
environment: z.string().trim().describe(RAW_SECRETS.GET_ACCESS_LIST.environment),
secretPath: z
.string()
@@ -54,7 +54,7 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
onRequest: verifyAuth([AuthMode.JWT]),
handler: async (req) => {
const { secretName } = req.params;
- const { secretPath, environment, workspaceId: projectId } = req.query;
+ const { secretPath, environment, projectId } = req.query;
return server.services.secret.getSecretAccessList({
actorId: req.permission.id,
diff --git a/backend/src/lib/api-docs/constants.ts b/backend/src/lib/api-docs/constants.ts
index 7a15ea1c81..2ac8f996e2 100644
--- a/backend/src/lib/api-docs/constants.ts
+++ b/backend/src/lib/api-docs/constants.ts
@@ -1049,7 +1049,7 @@ export const RAW_SECRETS = {
},
GET_ACCESS_LIST: {
secretName: "The name of the secret to get the access list for.",
- workspaceId: "The ID of the project where the secret is located.",
+ projectId: "The ID of the project where the secret is located.",
environment: "The slug of the environment where the the secret is located.",
secretPath: "The folder path where the secret is located."
}
diff --git a/backend/src/services/secret-v2-bridge/secret-v2-bridge-fns.ts b/backend/src/services/secret-v2-bridge/secret-v2-bridge-fns.ts
index 6dba0150fc..afcc53c188 100644
--- a/backend/src/services/secret-v2-bridge/secret-v2-bridge-fns.ts
+++ b/backend/src/services/secret-v2-bridge/secret-v2-bridge-fns.ts
@@ -782,7 +782,7 @@ export const expandSecretReferencesFactory = ({
};
export const reshapeBridgeSecret = (
- workspaceId: string,
+ projectId: string,
environment: string,
secretPath: string,
secret: Omit<TSecretsV2, "encryptedValue" | "encryptedComment"> & {
@@ -809,7 +809,8 @@ export const reshapeBridgeSecret = (
) => ({
secretKey: secret.key,
secretPath,
- workspace: workspaceId,
+ workspace: projectId,
+ projectId: projectId,
environment,
secretComment: secret.comment || "",
version: secret.version,
diff --git a/backend/src/services/webhook/webhook-fns.ts b/backend/src/services/webhook/webhook-fns.ts
index d7e07ae283..98c84cd868 100644
--- a/backend/src/services/webhook/webhook-fns.ts
+++ b/backend/src/services/webhook/webhook-fns.ts
@@ -94,6 +94,7 @@ export const getWebhookPayload = (event: TWebhookPayloads) => {
event: event.type,
project: {
workspaceId: projectId,
+ projectId,
projectName,
environment,
secretPath
@@ -147,6 +148,7 @@ export const getWebhookPayload = (event: TWebhookPayloads) => {
event: event.type,
project: {
workspaceId: projectId,
+ projectId: projectId,
projectName,
environment,
secretPath,
diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretListView/SecretDetailSidebar.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretListView/SecretDetailSidebar.tsx
index 67404f8789..d423264b51 100644
--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretListView/SecretDetailSidebar.tsx
+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/SecretListView/SecretDetailSidebar.tsx
@@ -47,7 +47,8 @@ import {
ProjectPermissionActions,
ProjectPermissionSub,
useProject,
- useProjectPermission
+ useProjectPermission,
+ useSubscription
} from "@app/context";
import { ProjectPermissionSecretActions } from "@app/context/ProjectPermissionContext/types";
import { getProjectBaseURL } from "@app/helpers/project";
@@ -252,11 +253,12 @@ export const SecretDetailSidebar = ({
secretId: secret?.id
});
+ const { subscription } = useSubscription();
const { data: secretAccessList, isPending } = useGetSecretAccessList({
projectId: currentProject.id,
environment,
secretPath,
- secretKey
+ secretKey: subscription?.secretAccessInsights ? secretKey : ""
});
const handleTagSelect = (tag: WsTag) => {