-
-
- Scheduled maintenance on January 27th {" "}
-
- We've planned a database upgrade and need to pause certain functionality for
- approximately 3 hours on Saturday, January 27th, 10am EST. During these hours, read
- operations will continue to function normally but no resources will be editable. No
- action is required on your end — your applications can continue to fetch secrets.
-
-
-
closeUpdate()}
- aria-label="close"
- className="flex h-full items-start text-mineshaft-100 duration-200 hover:text-red-400"
- >
-
-
-
Date: Sat, 27 Jan 2024 17:11:40 -0500
Subject: [PATCH 013/178] remove unused imports
---
frontend/src/pages/org/[id]/overview/index.tsx | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/frontend/src/pages/org/[id]/overview/index.tsx b/frontend/src/pages/org/[id]/overview/index.tsx
index bb4a3e4ea..43d36d06b 100644
--- a/frontend/src/pages/org/[id]/overview/index.tsx
+++ b/frontend/src/pages/org/[id]/overview/index.tsx
@@ -24,8 +24,6 @@ import {
faPlug,
faPlus,
faUserPlus,
- faWarning,
- faXmark
} from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { yupResolver } from "@hookform/resolvers/yup";
@@ -58,7 +56,6 @@ import {
fetchOrgUsers,
useAddUserToWs,
useCreateWorkspace,
- useGetUserAction,
useRegisterUserAction,
useUploadWsKey
} from "@app/hooks/api";
@@ -480,13 +477,6 @@ const OrganizationPage = withPermission(
const { createNotification } = useNotificationContext();
const addWsUser = useAddUserToWs();
- const { data: updateClosed } = useGetUserAction("jan_2024_db_update_closed");
-
- const registerUserAction = useRegisterUserAction();
- const closeUpdate = async () => {
- await registerUserAction.mutateAsync("jan_2024_db_update_closed");
- };
-
const { popUp, handlePopUpOpen, handlePopUpClose, handlePopUpToggle } = usePopUp([
"addNewWs",
"upgradePlan"
From b8a6f5dc5404005ec0ed1d150d38a24b3002bb02 Mon Sep 17 00:00:00 2001
From: Maidul Islam
Date: Sat, 27 Jan 2024 18:15:12 -0500
Subject: [PATCH 014/178] add email templates and disposable_emails.text to
build
---
backend/package.json | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backend/package.json b/backend/package.json
index eb31b647d..22311f7ae 100644
--- a/backend/package.json
+++ b/backend/package.json
@@ -7,7 +7,7 @@
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "tsx watch --clear-screen=false ./src/main.ts | pino-pretty --colorize --colorizeObjects --singleLine",
"dev:docker": "nodemon",
- "build": "rimraf dist && tsup",
+ "build": "rimraf dist && tsup && cp -R ./src/lib/validator/disposable_emails.txt ./dist && cp -R ./src/services/smtp/templates ./dist",
"start": "node dist/main.mjs",
"type:check": "tsc --noEmit",
"lint:fix": "eslint --fix --ext js,ts ./src",
From 6ecd289e6ceb650459f0d17400b4ec64cc527b3f Mon Sep 17 00:00:00 2001
From: Maidul Islam
Date: Sat, 27 Jan 2024 18:38:57 -0500
Subject: [PATCH 015/178] update rate limits
---
backend/src/server/config/rateLimiter.ts | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/backend/src/server/config/rateLimiter.ts b/backend/src/server/config/rateLimiter.ts
index 031ef1fb5..297977e4f 100644
--- a/backend/src/server/config/rateLimiter.ts
+++ b/backend/src/server/config/rateLimiter.ts
@@ -11,7 +11,7 @@ export const globalRateLimiterCfg = (): RateLimitPluginOptions => {
return {
timeWindow: 60 * 1000,
- max: 400,
+ max: 650,
redis,
allowList: (req) => req.url === "/healthcheck" || req.url === "/api/status",
keyGenerator: (req) => req.realIp
@@ -20,12 +20,12 @@ export const globalRateLimiterCfg = (): RateLimitPluginOptions => {
export const authRateLimit: RateLimitOptions = {
timeWindow: 60 * 1000,
- max: 300,
+ max: 650,
keyGenerator: (req) => req.realIp
};
export const passwordRateLimit: RateLimitOptions = {
timeWindow: 60 * 1000,
- max: 300,
+ max: 650,
keyGenerator: (req) => req.realIp
};
From 1980f802fa06887c70f975b393f78adf91f604de Mon Sep 17 00:00:00 2001
From: Maidul Islam
Date: Sat, 27 Jan 2024 19:05:17 -0500
Subject: [PATCH 016/178] update rate limits
---
backend/src/server/config/rateLimiter.ts | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/backend/src/server/config/rateLimiter.ts b/backend/src/server/config/rateLimiter.ts
index 297977e4f..7982cff63 100644
--- a/backend/src/server/config/rateLimiter.ts
+++ b/backend/src/server/config/rateLimiter.ts
@@ -11,7 +11,7 @@ export const globalRateLimiterCfg = (): RateLimitPluginOptions => {
return {
timeWindow: 60 * 1000,
- max: 650,
+ max: 600,
redis,
allowList: (req) => req.url === "/healthcheck" || req.url === "/api/status",
keyGenerator: (req) => req.realIp
@@ -20,12 +20,12 @@ export const globalRateLimiterCfg = (): RateLimitPluginOptions => {
export const authRateLimit: RateLimitOptions = {
timeWindow: 60 * 1000,
- max: 650,
+ max: 600,
keyGenerator: (req) => req.realIp
};
export const passwordRateLimit: RateLimitOptions = {
timeWindow: 60 * 1000,
- max: 650,
+ max: 600,
keyGenerator: (req) => req.realIp
};
From bbf2634e731e8372467c36db32215a57c0c64353 Mon Sep 17 00:00:00 2001
From: Maidul Islam
Date: Sat, 27 Jan 2024 20:20:02 -0500
Subject: [PATCH 017/178] prepend sso with site url
---
backend/src/server/routes/v1/sso-router.ts | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/backend/src/server/routes/v1/sso-router.ts b/backend/src/server/routes/v1/sso-router.ts
index dfd1e9150..f3d5288b0 100644
--- a/backend/src/server/routes/v1/sso-router.ts
+++ b/backend/src/server/routes/v1/sso-router.ts
@@ -29,7 +29,7 @@ export const registerSsoRouter = async (server: FastifyZodProvider) => {
passReqToCallback: true,
clientID: appCfg.CLIENT_ID_GOOGLE_LOGIN as string,
clientSecret: appCfg.CLIENT_SECRET_GOOGLE_LOGIN as string,
- callbackURL: "/api/v1/sso/google",
+ callbackURL: `${appCfg.SITE_URL}/api/v1/sso/google`,
scope: ["profile", " email"]
},
async (req, _accessToken, _refreshToken, profile, cb) => {
@@ -71,7 +71,7 @@ export const registerSsoRouter = async (server: FastifyZodProvider) => {
passReqToCallback: true,
clientID: appCfg.CLIENT_ID_GITHUB_LOGIN as string,
clientSecret: appCfg.CLIENT_SECRET_GITHUB_LOGIN as string,
- callbackURL: "/api/v1/sso/github",
+ callbackURL: `${appCfg.SITE_URL}/api/v1/sso/github`,
scope: ["user:email"]
},
async (req, accessToken, _refreshToken, profile, cb) => {
@@ -110,7 +110,7 @@ export const registerSsoRouter = async (server: FastifyZodProvider) => {
passReqToCallback: true,
clientID: appCfg.CLIENT_ID_GITLAB_LOGIN,
clientSecret: appCfg.CLIENT_SECRET_GITLAB_LOGIN,
- callbackURL: "/api/v1/sso/gitlab",
+ callbackURL: `${appCfg.SITE_URL}/api/v1/sso/gitlab`,
baseURL: appCfg.CLIENT_GITLAB_LOGIN_URL
},
async (req: any, _accessToken: string, _refreshToken: string, profile: any, cb: any) => {
From f010a3a932da8fdbee5610c9b56e144f92b6f822 Mon Sep 17 00:00:00 2001
From: Akhil Mohan
Date: Sun, 28 Jan 2024 23:13:31 +0530
Subject: [PATCH 018/178] feat: changed blind index banner for everyone
---
.../secret-blind-index-service.ts | 5 +----
.../permissions/ProjectPermissionCan.tsx | 2 +-
.../ProjectPermissionContext.tsx | 6 +++++-
.../withProjectPermission.tsx | 8 ++++----
frontend/src/hooks/api/roles/queries.tsx | 13 ++++++++-----
frontend/src/hooks/api/users/types.ts | 9 +++++++++
.../CloudIntegrationSection.tsx | 4 ++--
.../SecretApprovalPolicyList.tsx | 2 +-
.../components/SecretApprovalPolicyRow.tsx | 2 +-
.../src/views/SecretMainPage/SecretMainPage.tsx | 2 +-
.../SecretListView/SecretDetaiSidebar.tsx | 2 +-
.../components/SecretListView/SecretItem.tsx | 2 +-
.../ProjectIndexSecretsSection.tsx | 16 +++++++++++++---
.../SecretRotationPage/SecretRotationPage.tsx | 2 +-
.../EnvironmentSection/EnvironmentSection.tsx | 4 ++--
.../SecretTagsSection/SecretTagsSection.tsx | 17 +++++++++++------
16 files changed, 62 insertions(+), 34 deletions(-)
diff --git a/backend/src/services/secret-blind-index/secret-blind-index-service.ts b/backend/src/services/secret-blind-index/secret-blind-index-service.ts
index 215e54992..0c18ddedc 100644
--- a/backend/src/services/secret-blind-index/secret-blind-index-service.ts
+++ b/backend/src/services/secret-blind-index/secret-blind-index-service.ts
@@ -29,10 +29,7 @@ export const secretBlindIndexServiceFactory = ({
projectId,
actorId
}: TGetProjectBlindIndexStatusDTO) => {
- const { membership } = await permissionService.getProjectPermission(actor, actorId, projectId);
- if (membership?.role !== ProjectMembershipRole.Admin) {
- throw new UnauthorizedError({ message: "User must be admin" });
- }
+ await permissionService.getProjectPermission(actor, actorId, projectId);
const secretCount = await secretBlindIndexDAL.countOfSecretsWithNullSecretBlindIndex(projectId);
return Number(secretCount);
diff --git a/frontend/src/components/permissions/ProjectPermissionCan.tsx b/frontend/src/components/permissions/ProjectPermissionCan.tsx
index aa64c33d7..f1af141f2 100644
--- a/frontend/src/components/permissions/ProjectPermissionCan.tsx
+++ b/frontend/src/components/permissions/ProjectPermissionCan.tsx
@@ -25,7 +25,7 @@ export const ProjectPermissionCan: FunctionComponent = ({
allowedLabel,
...props
}) => {
- const permission = useProjectPermission();
+ const { permission } = useProjectPermission();
return (
{(isAllowed, ability) => {
diff --git a/frontend/src/context/ProjectPermissionContext/ProjectPermissionContext.tsx b/frontend/src/context/ProjectPermissionContext/ProjectPermissionContext.tsx
index cb6ef9b97..a7023a867 100644
--- a/frontend/src/context/ProjectPermissionContext/ProjectPermissionContext.tsx
+++ b/frontend/src/context/ProjectPermissionContext/ProjectPermissionContext.tsx
@@ -1,6 +1,7 @@
import { createContext, ReactNode, useContext } from "react";
import { useGetUserProjectPermissions } from "@app/hooks/api";
+import { TProjectMembership } from "@app/hooks/api/users/types";
import { useWorkspace } from "../WorkspaceContext";
import { TProjectPermission } from "./types";
@@ -9,7 +10,10 @@ type Props = {
children: ReactNode;
};
-const ProjectPermissionContext = createContext(null);
+const ProjectPermissionContext = createContext(null);
export const ProjectPermissionProvider = ({ children }: Props): JSX.Element => {
const { currentWorkspace, isLoading: isWsLoading } = useWorkspace();
diff --git a/frontend/src/hoc/withProjectPermission/withProjectPermission.tsx b/frontend/src/hoc/withProjectPermission/withProjectPermission.tsx
index 911703973..103ff61b7 100644
--- a/frontend/src/hoc/withProjectPermission/withProjectPermission.tsx
+++ b/frontend/src/hoc/withProjectPermission/withProjectPermission.tsx
@@ -21,7 +21,7 @@ export const withProjectPermission = ["abilities"]>
) => {
const HOC = (hocProps: T) => {
- const permission = useProjectPermission();
+ const { permission } = useProjectPermission();
// akhilmhdh: Set as any due to casl/react ts type bug
// REASON: casl due to its type checking can't seem to union even if union intersection is applied
@@ -29,13 +29,13 @@ export const withProjectPermission =
@@ -43,7 +43,7 @@ export const withProjectPermission =
-
Permission Denied
+
Permission Denied
You do not have permission to this page.
Kindly contact your organization
administrator
diff --git a/frontend/src/hooks/api/roles/queries.tsx b/frontend/src/hooks/api/roles/queries.tsx
index 38d020491..8647353cb 100644
--- a/frontend/src/hooks/api/roles/queries.tsx
+++ b/frontend/src/hooks/api/roles/queries.tsx
@@ -8,7 +8,7 @@ import { apiRequest } from "@app/config/request";
import { OrgPermissionSet } from "@app/context/OrgPermissionContext/types";
import { ProjectPermissionSet } from "@app/context/ProjectPermissionContext/types";
-import { OrgUser } from "../users/types";
+import { OrgUser, TProjectMembership } from "../users/types";
import {
TGetUserOrgPermissionsDTO,
TGetUserProjectPermissionDTO,
@@ -104,10 +104,13 @@ export const useGetUserOrgPermissions = ({ orgId }: TGetUserOrgPermissionsDTO) =
const getUserProjectPermissions = async ({ workspaceId }: TGetUserProjectPermissionDTO) => {
const { data } = await apiRequest.get<{
- data: { permissions: PackRule
>>[] };
+ data: {
+ permissions: PackRule>>[];
+ membership: TProjectMembership;
+ };
}>(`/api/v1/workspace/${workspaceId}/permissions`, {});
- return data.data.permissions;
+ return data.data;
};
export const useGetUserProjectPermissions = ({ workspaceId }: TGetUserProjectPermissionDTO) =>
@@ -116,8 +119,8 @@ export const useGetUserProjectPermissions = ({ workspaceId }: TGetUserProjectPer
queryFn: () => getUserProjectPermissions({ workspaceId }),
enabled: Boolean(workspaceId),
select: (data) => {
- const rule = unpackRules>>(data);
+ const rule = unpackRules>>(data.permissions);
const ability = createMongoAbility(rule, { conditionsMatcher });
- return ability;
+ return { permission: ability, membership: data.membership };
}
});
diff --git a/frontend/src/hooks/api/users/types.ts b/frontend/src/hooks/api/users/types.ts
index 47c733885..ebddefb14 100644
--- a/frontend/src/hooks/api/users/types.ts
+++ b/frontend/src/hooks/api/users/types.ts
@@ -52,6 +52,15 @@ export type OrgUser = {
roleId: string;
};
+export type TProjectMembership = {
+ id: string;
+ role: string;
+ createdAt: string;
+ updatedAt: string;
+ projectId: string;
+ roleId: string;
+};
+
export type TWorkspaceUser = OrgUser;
export type AddUserToWsDTO = {
diff --git a/frontend/src/views/IntegrationsPage/components/CloudIntegrationSection/CloudIntegrationSection.tsx b/frontend/src/views/IntegrationsPage/components/CloudIntegrationSection/CloudIntegrationSection.tsx
index b0abc2603..a1b9787dd 100644
--- a/frontend/src/views/IntegrationsPage/components/CloudIntegrationSection/CloudIntegrationSection.tsx
+++ b/frontend/src/views/IntegrationsPage/components/CloudIntegrationSection/CloudIntegrationSection.tsx
@@ -30,7 +30,7 @@ export const CloudIntegrationSection = ({
const { popUp, handlePopUpOpen, handlePopUpClose, handlePopUpToggle } = usePopUp([
"deleteConfirmation"
] as const);
- const permission = useProjectPermission();
+ const { permission } = useProjectPermission();
const { createNotification } = useNotificationContext();
const isEmpty = !isLoading && !cloudIntegrations?.length;
@@ -43,7 +43,7 @@ export const CloudIntegrationSection = ({
{t("integrations.cloud-integrations")}
{t("integrations.click-to-start")}
-
+
{isLoading &&
Array.from({ length: 12 }).map((_, index) => (
diff --git a/frontend/src/views/SecretApprovalPage/components/SecretApprovalPolicyList/SecretApprovalPolicyList.tsx b/frontend/src/views/SecretApprovalPage/components/SecretApprovalPolicyList/SecretApprovalPolicyList.tsx
index 27f649bdd..11927a2b1 100644
--- a/frontend/src/views/SecretApprovalPage/components/SecretApprovalPolicyList/SecretApprovalPolicyList.tsx
+++ b/frontend/src/views/SecretApprovalPage/components/SecretApprovalPolicyList/SecretApprovalPolicyList.tsx
@@ -44,7 +44,7 @@ export const SecretApprovalPolicyList = ({ workspaceId }: Props) => {
"deletePolicy",
"upgradePlan"
] as const);
- const permission = useProjectPermission();
+ const { permission } = useProjectPermission();
const { subscription } = useSubscription();
const { createNotification } = useNotificationContext();
diff --git a/frontend/src/views/SecretApprovalPage/components/SecretApprovalPolicyList/components/SecretApprovalPolicyRow.tsx b/frontend/src/views/SecretApprovalPage/components/SecretApprovalPolicyList/components/SecretApprovalPolicyRow.tsx
index 072156b61..c256af1c7 100644
--- a/frontend/src/views/SecretApprovalPage/components/SecretApprovalPolicyList/components/SecretApprovalPolicyRow.tsx
+++ b/frontend/src/views/SecretApprovalPage/components/SecretApprovalPolicyList/components/SecretApprovalPolicyRow.tsx
@@ -36,7 +36,7 @@ export const SecretApprovalPolicyRow = ({
}: Props) => {
const [selectedApprovers, setSelectedApprovers] = useState
([]);
const { mutate: updateSecretApprovalPolicy, isLoading } = useUpdateSecretApprovalPolicy();
- const permission = useProjectPermission();
+ const { permission } = useProjectPermission();
return (
diff --git a/frontend/src/views/SecretMainPage/SecretMainPage.tsx b/frontend/src/views/SecretMainPage/SecretMainPage.tsx
index d3c1a5b93..f538a4c0a 100644
--- a/frontend/src/views/SecretMainPage/SecretMainPage.tsx
+++ b/frontend/src/views/SecretMainPage/SecretMainPage.tsx
@@ -48,7 +48,7 @@ export const SecretMainPage = () => {
const { t } = useTranslation();
const { currentWorkspace } = useWorkspace();
const router = useRouter();
- const permission = useProjectPermission();
+ const { permission } = useProjectPermission();
const [isVisible, setIsVisible] = useState(false);
const [sortDir, setSortDir] = useState(SortDir.ASC);
diff --git a/frontend/src/views/SecretMainPage/components/SecretListView/SecretDetaiSidebar.tsx b/frontend/src/views/SecretMainPage/components/SecretListView/SecretDetaiSidebar.tsx
index a86a6b096..1130c9d14 100644
--- a/frontend/src/views/SecretMainPage/components/SecretListView/SecretDetaiSidebar.tsx
+++ b/frontend/src/views/SecretMainPage/components/SecretListView/SecretDetaiSidebar.tsx
@@ -81,7 +81,7 @@ export const SecretDetailSidebar = ({
resolver: zodResolver(formSchema),
values: secret
});
- const permission = useProjectPermission();
+ const { permission } = useProjectPermission();
const cannotEditSecret = permission.cannot(
ProjectPermissionActions.Edit,
subject(ProjectPermissionSub.Secrets, { environment, secretPath })
diff --git a/frontend/src/views/SecretMainPage/components/SecretListView/SecretItem.tsx b/frontend/src/views/SecretMainPage/components/SecretListView/SecretItem.tsx
index aec0573ef..ecd35abf8 100644
--- a/frontend/src/views/SecretMainPage/components/SecretListView/SecretItem.tsx
+++ b/frontend/src/views/SecretMainPage/components/SecretListView/SecretItem.tsx
@@ -85,7 +85,7 @@ export const SecretItem = memo(
secretPath
}: Props) => {
const { currentWorkspace } = useWorkspace();
- const permission = useProjectPermission();
+ const { permission } = useProjectPermission();
const isReadOnly =
permission.can(
ProjectPermissionActions.Read,
diff --git a/frontend/src/views/SecretOverviewPage/components/ProjectIndexSecretsSection/ProjectIndexSecretsSection.tsx b/frontend/src/views/SecretOverviewPage/components/ProjectIndexSecretsSection/ProjectIndexSecretsSection.tsx
index 2210171b0..bbc2fb49a 100644
--- a/frontend/src/views/SecretOverviewPage/components/ProjectIndexSecretsSection/ProjectIndexSecretsSection.tsx
+++ b/frontend/src/views/SecretOverviewPage/components/ProjectIndexSecretsSection/ProjectIndexSecretsSection.tsx
@@ -4,9 +4,15 @@ import {
decryptSymmetric
} from "@app/components/utilities/cryptography/crypto";
import { Button, Spinner } from "@app/components/v2";
-import { ProjectPermissionActions, ProjectPermissionSub, useWorkspace } from "@app/context";
+import {
+ ProjectPermissionActions,
+ ProjectPermissionSub,
+ useProjectPermission,
+ useWorkspace
+} from "@app/context";
import { useToggle } from "@app/hooks";
import { useGetWorkspaceIndexStatus, useNameWorkspaceSecrets } from "@app/hooks/api";
+import { ProjectMembershipRole } from "@app/hooks/api/roles/types";
import { UserWsKeyPair } from "@app/hooks/api/types";
import { fetchWorkspaceSecrets } from "@app/hooks/api/workspace/queries";
@@ -18,6 +24,7 @@ type Props = {
export const ProjectIndexSecretsSection = ({ decryptFileKey }: Props) => {
const { currentWorkspace } = useWorkspace();
+ const { membership } = useProjectPermission();
const { data: isBlindIndexed, isLoading: isBlindIndexedLoading } = useGetWorkspaceIndexStatus(
currentWorkspace?.id ?? ""
);
@@ -78,13 +85,16 @@ export const ProjectIndexSecretsSection = ({ decryptFileKey }: Props) => {
Your project was created before the introduction of blind indexing. To continue accessing
secrets by name through the SDK, public API and web dashboard, please enable blind indexing.{" "}
- This is a one time process.
+
+ This is a one time process.{" "}
+ {membership.role !== ProjectMembershipRole.Admin && "Admin only operation"}
+
{(isAllowed) => (
{
const { currentWorkspace } = useWorkspace();
const { t } = useTranslation();
- const permission = useProjectPermission();
+ const { permission } = useProjectPermission();
const { createNotification } = useNotificationContext();
const { popUp, handlePopUpOpen, handlePopUpToggle, handlePopUpClose } = usePopUp([
"createRotation",
diff --git a/frontend/src/views/Settings/ProjectSettingsPage/components/EnvironmentSection/EnvironmentSection.tsx b/frontend/src/views/Settings/ProjectSettingsPage/components/EnvironmentSection/EnvironmentSection.tsx
index bd155a2f0..20f163f45 100644
--- a/frontend/src/views/Settings/ProjectSettingsPage/components/EnvironmentSection/EnvironmentSection.tsx
+++ b/frontend/src/views/Settings/ProjectSettingsPage/components/EnvironmentSection/EnvironmentSection.tsx
@@ -22,7 +22,7 @@ export const EnvironmentSection = () => {
const { createNotification } = useNotificationContext();
const { subscription } = useSubscription();
const { currentWorkspace } = useWorkspace();
- const permision = useProjectPermission();
+ const { permission } = useProjectPermission();
const deleteWsEnvironment = useDeleteWsEnvironment();
@@ -94,7 +94,7 @@ export const EnvironmentSection = () => {
Choose which environments will show up in your dashboard like development, staging,
production
- {permision.can(ProjectPermissionActions.Read, ProjectPermissionSub.Environments) ? (
+ {permission.can(ProjectPermissionActions.Read, ProjectPermissionSub.Environments) ? (
) : (
diff --git a/frontend/src/views/Settings/ProjectSettingsPage/components/SecretTagsSection/SecretTagsSection.tsx b/frontend/src/views/Settings/ProjectSettingsPage/components/SecretTagsSection/SecretTagsSection.tsx
index 75d7ab347..414f1f6fe 100644
--- a/frontend/src/views/Settings/ProjectSettingsPage/components/SecretTagsSection/SecretTagsSection.tsx
+++ b/frontend/src/views/Settings/ProjectSettingsPage/components/SecretTagsSection/SecretTagsSection.tsx
@@ -4,7 +4,12 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { useNotificationContext } from "@app/components/context/Notifications/NotificationProvider";
import { PermissionDeniedBanner, ProjectPermissionCan } from "@app/components/permissions";
import { Button, DeleteActionModal } from "@app/components/v2";
-import { ProjectPermissionActions, ProjectPermissionSub, useProjectPermission, useWorkspace } from "@app/context";
+import {
+ ProjectPermissionActions,
+ ProjectPermissionSub,
+ useProjectPermission,
+ useWorkspace
+} from "@app/context";
import { usePopUp } from "@app/hooks";
import { useDeleteWsTag } from "@app/hooks/api";
@@ -20,14 +25,14 @@ export const SecretTagsSection = (): JSX.Element => {
"deleteTagConfirmation"
] as const);
const { currentWorkspace } = useWorkspace();
- const permission = useProjectPermission();
+ const { permission } = useProjectPermission();
const deleteWsTag = useDeleteWsTag();
const onDeleteApproved = async () => {
try {
await deleteWsTag.mutateAsync({
- projectId:currentWorkspace?.id || "",
+ projectId: currentWorkspace?.id || "",
tagID: (popUp?.deleteTagConfirmation?.data as DeleteModalData)?.id
});
@@ -47,8 +52,8 @@ export const SecretTagsSection = (): JSX.Element => {
};
return (
-
-
+
+
Secret Tags
{(isAllowed) => (
@@ -65,7 +70,7 @@ export const SecretTagsSection = (): JSX.Element => {
)}
-
+
Every secret can be assigned to one or more tags. Here you can add and remove tags for the
current project.
From 4e20735f986ff0381b7301c40ae279eee75b0ae1 Mon Sep 17 00:00:00 2001
From: Akhil Mohan
Date: Mon, 29 Jan 2024 00:21:42 +0530
Subject: [PATCH 019/178] feat: resolved trailing slash in secret paths
---
backend/src/ee/routes/v1/project-router.ts | 5 ++--
.../ee/routes/v1/secret-rotation-router.ts | 3 +-
backend/src/lib/fn/string.ts | 6 ++++
.../server/routes/v1/integration-router.ts | 6 ++--
.../server/routes/v1/secret-folder-router.ts | 17 ++++++-----
.../server/routes/v1/secret-import-router.ts | 19 +++++++-----
.../src/server/routes/v1/webhook-router.ts | 5 ++--
.../server/routes/v2/service-token-router.ts | 3 +-
backend/src/server/routes/v3/secret-router.ts | 29 ++++++++++---------
.../secret-folder/secret-folder-dal.ts | 26 +++++++++++++----
10 files changed, 75 insertions(+), 44 deletions(-)
diff --git a/backend/src/ee/routes/v1/project-router.ts b/backend/src/ee/routes/v1/project-router.ts
index 294150c83..3870123fd 100644
--- a/backend/src/ee/routes/v1/project-router.ts
+++ b/backend/src/ee/routes/v1/project-router.ts
@@ -2,6 +2,7 @@ import { z } from "zod";
import { AuditLogsSchema, SecretSnapshotsSchema } from "@app/db/schemas";
import { EventType, UserAgentType } from "@app/ee/services/audit-log/audit-log-types";
+import { removeTrailingSlash } from "@app/lib/fn";
import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
import { AuthMode } from "@app/services/auth/auth-type";
@@ -15,7 +16,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
}),
querystring: z.object({
environment: z.string().trim(),
- path: z.string().trim().default("/"),
+ path: z.string().trim().default("/").transform(removeTrailingSlash),
offset: z.coerce.number().default(0),
limit: z.coerce.number().default(20)
}),
@@ -46,7 +47,7 @@ export const registerProjectRouter = async (server: FastifyZodProvider) => {
}),
querystring: z.object({
environment: z.string().trim(),
- path: z.string().trim().default("/")
+ path: z.string().trim().default("/").transform(removeTrailingSlash)
}),
response: {
200: z.object({
diff --git a/backend/src/ee/routes/v1/secret-rotation-router.ts b/backend/src/ee/routes/v1/secret-rotation-router.ts
index 95eb0bc88..062c51980 100644
--- a/backend/src/ee/routes/v1/secret-rotation-router.ts
+++ b/backend/src/ee/routes/v1/secret-rotation-router.ts
@@ -1,6 +1,7 @@
import { z } from "zod";
import { SecretRotationOutputsSchema, SecretRotationsSchema, SecretsSchema } from "@app/db/schemas";
+import { removeTrailingSlash } from "@app/lib/fn";
import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
import { AuthMode } from "@app/services/auth/auth-type";
@@ -11,7 +12,7 @@ export const registerSecretRotationRouter = async (server: FastifyZodProvider) =
schema: {
body: z.object({
workspaceId: z.string().trim(),
- secretPath: z.string().trim(),
+ secretPath: z.string().trim().transform(removeTrailingSlash),
environment: z.string().trim(),
interval: z.number().min(1),
provider: z.string().trim(),
diff --git a/backend/src/lib/fn/string.ts b/backend/src/lib/fn/string.ts
index 27d84357d..2d7466c35 100644
--- a/backend/src/lib/fn/string.ts
+++ b/backend/src/lib/fn/string.ts
@@ -3,3 +3,9 @@ import path from "path";
// given two paths irrespective of ending with / or not
// this will return true if its equal
export const isSamePath = async (from: string, to: string) => !path.relative(from, to);
+
+export const removeTrailingSlash = (str: string) => {
+ if (str === "/") return str;
+
+ return str.endsWith("/") ? str.slice(0, -1) : str;
+};
diff --git a/backend/src/server/routes/v1/integration-router.ts b/backend/src/server/routes/v1/integration-router.ts
index 23d8ef8be..db73bf293 100644
--- a/backend/src/server/routes/v1/integration-router.ts
+++ b/backend/src/server/routes/v1/integration-router.ts
@@ -2,7 +2,7 @@ import { z } from "zod";
import { IntegrationsSchema } from "@app/db/schemas";
import { EventType } from "@app/ee/services/audit-log/audit-log-types";
-import { shake } from "@app/lib/fn";
+import { removeTrailingSlash, shake } from "@app/lib/fn";
import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
import { AuthMode } from "@app/services/auth/auth-type";
@@ -16,7 +16,7 @@ export const registerIntegrationRouter = async (server: FastifyZodProvider) => {
app: z.string().trim().optional(),
isActive: z.boolean(),
appId: z.string().trim().optional(),
- secretPath: z.string().trim().default("/"),
+ secretPath: z.string().trim().default("/").transform(removeTrailingSlash),
sourceEnvironment: z.string().trim(),
targetEnvironment: z.string().trim().optional(),
targetEnvironmentId: z.string().trim().optional(),
@@ -89,7 +89,7 @@ export const registerIntegrationRouter = async (server: FastifyZodProvider) => {
app: z.string().trim(),
appId: z.string().trim(),
isActive: z.boolean(),
- secretPath: z.string().trim().default("/"),
+ secretPath: z.string().trim().default("/").transform(removeTrailingSlash),
targetEnvironment: z.string().trim(),
owner: z.string().trim(),
environment: z.string().trim()
diff --git a/backend/src/server/routes/v1/secret-folder-router.ts b/backend/src/server/routes/v1/secret-folder-router.ts
index fd9798dac..c71767868 100644
--- a/backend/src/server/routes/v1/secret-folder-router.ts
+++ b/backend/src/server/routes/v1/secret-folder-router.ts
@@ -2,6 +2,7 @@ import { z } from "zod";
import { SecretFoldersSchema } from "@app/db/schemas";
import { EventType } from "@app/ee/services/audit-log/audit-log-types";
+import { removeTrailingSlash } from "@app/lib/fn";
import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
import { AuthMode } from "@app/services/auth/auth-type";
@@ -14,9 +15,9 @@ export const registerSecretFolderRouter = async (server: FastifyZodProvider) =>
workspaceId: z.string().trim(),
environment: z.string().trim(),
name: z.string().trim(),
- path: z.string().trim().default("/"),
+ path: z.string().trim().default("/").transform(removeTrailingSlash),
// backward compatiability with cli
- directory: z.string().trim().default("/")
+ directory: z.string().trim().default("/").transform(removeTrailingSlash)
}),
response: {
200: z.object({
@@ -68,9 +69,9 @@ export const registerSecretFolderRouter = async (server: FastifyZodProvider) =>
workspaceId: z.string().trim(),
environment: z.string().trim(),
name: z.string().trim(),
- path: z.string().trim().default("/"),
+ path: z.string().trim().default("/").transform(removeTrailingSlash),
// backward compatiability with cli
- directory: z.string().trim().default("/")
+ directory: z.string().trim().default("/").transform(removeTrailingSlash)
}),
response: {
200: z.object({
@@ -122,9 +123,9 @@ export const registerSecretFolderRouter = async (server: FastifyZodProvider) =>
body: z.object({
workspaceId: z.string().trim(),
environment: z.string().trim(),
- path: z.string().trim().default("/"),
+ path: z.string().trim().default("/").transform(removeTrailingSlash),
// keep this here as cli need directory
- directory: z.string().trim().default("/")
+ directory: z.string().trim().default("/").transform(removeTrailingSlash)
}),
response: {
200: z.object({
@@ -172,9 +173,9 @@ export const registerSecretFolderRouter = async (server: FastifyZodProvider) =>
querystring: z.object({
workspaceId: z.string().trim(),
environment: z.string().trim(),
- path: z.string().trim().default("/"),
+ path: z.string().trim().default("/").transform(removeTrailingSlash),
// backward compatiability with cli
- directory: z.string().trim().default("/")
+ directory: z.string().trim().default("/").transform(removeTrailingSlash)
}),
response: {
200: z.object({
diff --git a/backend/src/server/routes/v1/secret-import-router.ts b/backend/src/server/routes/v1/secret-import-router.ts
index 5f37c5f5e..f27f9e0c2 100644
--- a/backend/src/server/routes/v1/secret-import-router.ts
+++ b/backend/src/server/routes/v1/secret-import-router.ts
@@ -2,6 +2,7 @@ import { z } from "zod";
import { SecretImportsSchema, SecretsSchema } from "@app/db/schemas";
import { EventType } from "@app/ee/services/audit-log/audit-log-types";
+import { removeTrailingSlash } from "@app/lib/fn";
import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
import { AuthMode } from "@app/services/auth/auth-type";
@@ -13,10 +14,10 @@ export const registerSecretImportRouter = async (server: FastifyZodProvider) =>
body: z.object({
workspaceId: z.string().trim(),
environment: z.string().trim(),
- path: z.string().trim().default("/"),
+ path: z.string().trim().default("/").transform(removeTrailingSlash),
import: z.object({
environment: z.string().trim(),
- path: z.string().trim()
+ path: z.string().trim().transform(removeTrailingSlash)
})
}),
response: {
@@ -74,10 +75,14 @@ export const registerSecretImportRouter = async (server: FastifyZodProvider) =>
body: z.object({
workspaceId: z.string().trim(),
environment: z.string().trim(),
- path: z.string().trim().default("/"),
+ path: z.string().trim().default("/").transform(removeTrailingSlash),
import: z.object({
environment: z.string().trim().optional(),
- path: z.string().trim().optional(),
+ path: z
+ .string()
+ .trim()
+ .optional()
+ .transform((val) => (val ? removeTrailingSlash(val) : val)),
position: z.number().optional()
})
}),
@@ -137,7 +142,7 @@ export const registerSecretImportRouter = async (server: FastifyZodProvider) =>
body: z.object({
workspaceId: z.string().trim(),
environment: z.string().trim(),
- path: z.string().trim().default("/")
+ path: z.string().trim().default("/").transform(removeTrailingSlash)
}),
response: {
200: z.object({
@@ -191,7 +196,7 @@ export const registerSecretImportRouter = async (server: FastifyZodProvider) =>
querystring: z.object({
workspaceId: z.string().trim(),
environment: z.string().trim(),
- path: z.string().trim().default("/")
+ path: z.string().trim().default("/").transform(removeTrailingSlash)
}),
response: {
200: z.object({
@@ -243,7 +248,7 @@ export const registerSecretImportRouter = async (server: FastifyZodProvider) =>
querystring: z.object({
workspaceId: z.string().trim(),
environment: z.string().trim(),
- path: z.string().trim().default("/")
+ path: z.string().trim().default("/").transform(removeTrailingSlash)
}),
response: {
200: z.object({
diff --git a/backend/src/server/routes/v1/webhook-router.ts b/backend/src/server/routes/v1/webhook-router.ts
index 89564d9a3..558192f68 100644
--- a/backend/src/server/routes/v1/webhook-router.ts
+++ b/backend/src/server/routes/v1/webhook-router.ts
@@ -2,6 +2,7 @@ import { z } from "zod";
import { WebhooksSchema } from "@app/db/schemas";
import { EventType } from "@app/ee/services/audit-log/audit-log-types";
+import { removeTrailingSlash } from "@app/lib/fn";
import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
import { AuthMode } from "@app/services/auth/auth-type";
@@ -33,7 +34,7 @@ export const registerWebhookRouter = async (server: FastifyZodProvider) => {
environment: z.string().trim(),
webhookUrl: z.string().url().trim(),
webhookSecretKey: z.string().trim().optional(),
- secretPath: z.string().trim().default("/")
+ secretPath: z.string().trim().default("/").transform(removeTrailingSlash)
}),
response: {
200: z.object({
@@ -182,7 +183,7 @@ export const registerWebhookRouter = async (server: FastifyZodProvider) => {
querystring: z.object({
workspaceId: z.string().trim(),
environment: z.string().trim().optional(),
- secretPath: z.string().trim().optional()
+ secretPath: z.string().trim().optional().transform((val)=> val?removeTrailingSlash(val):val)
}),
response: {
200: z.object({
diff --git a/backend/src/server/routes/v2/service-token-router.ts b/backend/src/server/routes/v2/service-token-router.ts
index 950720c4d..31f5c22d6 100644
--- a/backend/src/server/routes/v2/service-token-router.ts
+++ b/backend/src/server/routes/v2/service-token-router.ts
@@ -2,6 +2,7 @@ import { z } from "zod";
import { ServiceTokensSchema } from "@app/db/schemas";
import { EventType } from "@app/ee/services/audit-log/audit-log-types";
+import { removeTrailingSlash } from "@app/lib/fn";
import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
import { AuthMode } from "@app/services/auth/auth-type";
@@ -42,7 +43,7 @@ export const registerServiceTokenRouter = async (server: FastifyZodProvider) =>
scopes: z
.object({
environment: z.string().trim(),
- secretPath: z.string().trim()
+ secretPath: z.string().trim().transform(removeTrailingSlash)
})
.array()
.min(1),
diff --git a/backend/src/server/routes/v3/secret-router.ts b/backend/src/server/routes/v3/secret-router.ts
index 04d187aef..cdb92fae6 100644
--- a/backend/src/server/routes/v3/secret-router.ts
+++ b/backend/src/server/routes/v3/secret-router.ts
@@ -12,6 +12,7 @@ import {
import { EventType } from "@app/ee/services/audit-log/audit-log-types";
import { CommitType } from "@app/ee/services/secret-approval-request/secret-approval-request-types";
import { BadRequestError } from "@app/lib/errors";
+import { removeTrailingSlash } from "@app/lib/fn";
import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
import { ActorType, AuthMode } from "@app/services/auth/auth-type";
import { PostHogEventTypes } from "@app/services/telemetry/telemetry-types";
@@ -39,7 +40,7 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
querystring: z.object({
workspaceId: z.string().trim().optional(),
environment: z.string().trim().optional(),
- secretPath: z.string().trim().default("/"),
+ secretPath: z.string().trim().default("/").transform(removeTrailingSlash),
include_imports: z
.enum(["true", "false"])
.default("false")
@@ -129,7 +130,7 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
querystring: z.object({
workspaceId: z.string().trim().optional(),
environment: z.string().trim().optional(),
- secretPath: z.string().trim().default("/"),
+ secretPath: z.string().trim().default("/").transform(removeTrailingSlash),
version: z.coerce.number().optional(),
type: z.nativeEnum(SecretType).default(SecretType.Shared),
include_imports: z
@@ -216,7 +217,7 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
body: z.object({
workspaceId: z.string().trim(),
environment: z.string().trim(),
- secretPath: z.string().trim().default("/"),
+ secretPath: z.string().trim().default("/").transform(removeTrailingSlash),
secretValue: z
.string()
.transform((val) => (val.at(-1) === "\n" ? `${val.trim()}\n` : val.trim())),
@@ -256,7 +257,7 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
event: {
type: EventType.CREATE_SECRET,
metadata: {
- environment: req.body.environment,
+ environment: req.body.environment,
secretPath: req.body.secretPath,
secretId: secret.id,
secretKey: req.params.secretName,
@@ -295,7 +296,7 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
secretValue: z
.string()
.transform((val) => (val.at(-1) === "\n" ? `${val.trim()}\n` : val.trim())),
- secretPath: z.string().trim().default("/"),
+ secretPath: z.string().trim().default("/").transform(removeTrailingSlash),
skipMultilineEncoding: z.boolean().optional(),
type: z.nativeEnum(SecretType).default(SecretType.Shared)
}),
@@ -365,7 +366,7 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
body: z.object({
workspaceId: z.string().trim(),
environment: z.string().trim(),
- secretPath: z.string().trim().default("/"),
+ secretPath: z.string().trim().default("/").transform(removeTrailingSlash),
type: z.nativeEnum(SecretType).default(SecretType.Shared)
}),
response: {
@@ -430,7 +431,7 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
querystring: z.object({
workspaceId: z.string().trim(),
environment: z.string().trim(),
- secretPath: z.string().trim().default("/"),
+ secretPath: z.string().trim().default("/").transform(removeTrailingSlash),
include_imports: z
.enum(["true", "false"])
.default("false")
@@ -518,7 +519,7 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
querystring: z.object({
workspaceId: z.string().trim(),
environment: z.string().trim(),
- secretPath: z.string().trim().default("/"),
+ secretPath: z.string().trim().default("/").transform(removeTrailingSlash),
type: z.nativeEnum(SecretType).default(SecretType.Shared),
version: z.coerce.number().optional(),
include_imports: z
@@ -590,7 +591,7 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
workspaceId: z.string().trim(),
environment: z.string().trim(),
type: z.nativeEnum(SecretType).default(SecretType.Shared),
- secretPath: z.string().trim().default("/"),
+ secretPath: z.string().trim().default("/").transform(removeTrailingSlash),
secretKeyCiphertext: z.string().trim(),
secretKeyIV: z.string().trim(),
secretKeyTag: z.string().trim(),
@@ -758,7 +759,7 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
environment: z.string().trim(),
secretId: z.string().trim().optional(),
type: z.nativeEnum(SecretType).default(SecretType.Shared),
- secretPath: z.string().trim().default("/"),
+ secretPath: z.string().trim().default("/").transform(removeTrailingSlash),
secretValueCiphertext: z.string().trim(),
secretValueIV: z.string().trim(),
secretValueTag: z.string().trim(),
@@ -935,7 +936,7 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
}),
body: z.object({
type: z.nativeEnum(SecretType).default(SecretType.Shared),
- secretPath: z.string().trim().default("/"),
+ secretPath: z.string().trim().default("/").transform(removeTrailingSlash),
secretId: z.string().trim().optional(),
workspaceId: z.string().trim(),
environment: z.string().trim()
@@ -1050,7 +1051,7 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
body: z.object({
workspaceId: z.string().trim(),
environment: z.string().trim(),
- secretPath: z.string().trim().default("/"),
+ secretPath: z.string().trim().default("/").transform(removeTrailingSlash),
secrets: z
.object({
secretName: z.string().trim(),
@@ -1176,7 +1177,7 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
body: z.object({
workspaceId: z.string().trim(),
environment: z.string().trim(),
- secretPath: z.string().trim().default("/"),
+ secretPath: z.string().trim().default("/").transform(removeTrailingSlash),
secrets: z
.object({
secretName: z.string().trim(),
@@ -1301,7 +1302,7 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
body: z.object({
workspaceId: z.string().trim(),
environment: z.string().trim(),
- secretPath: z.string().trim().default("/"),
+ secretPath: z.string().trim().default("/").transform(removeTrailingSlash),
secrets: z
.object({
secretName: z.string().trim(),
diff --git a/backend/src/services/secret-folder/secret-folder-dal.ts b/backend/src/services/secret-folder/secret-folder-dal.ts
index 6129cfa9d..3d25217cb 100644
--- a/backend/src/services/secret-folder/secret-folder-dal.ts
+++ b/backend/src/services/secret-folder/secret-folder-dal.ts
@@ -8,7 +8,7 @@ import {
TSecretFoldersUpdate
} from "@app/db/schemas";
import { BadRequestError, DatabaseError } from "@app/lib/errors";
-import { groupBy } from "@app/lib/fn";
+import { groupBy, removeTrailingSlash } from "@app/lib/fn";
import { ormify, selectAllTableCols } from "@app/lib/knex";
export const validateFolderName = (folderName: string) => {
@@ -238,10 +238,15 @@ export const secretFolderDALFactory = (db: TDbClient) => {
tx?: Knex
) => {
try {
- const folder = await sqlFindFolderByPathQuery(tx || db, projectId, environment, path)
+ const folder = await sqlFindFolderByPathQuery(
+ tx || db,
+ projectId,
+ environment,
+ removeTrailingSlash(path)
+ )
.orderBy("depth", "desc")
.first();
- if (folder && folder.path !== path) {
+ if (folder && folder.path !== removeTrailingSlash(path)) {
return;
}
if (!folder) return;
@@ -262,7 +267,12 @@ export const secretFolderDALFactory = (db: TDbClient) => {
tx?: Knex
) => {
try {
- const folder = await sqlFindFolderByPathQuery(tx || db, projectId, environment, path)
+ const folder = await sqlFindFolderByPathQuery(
+ tx || db,
+ projectId,
+ environment,
+ removeTrailingSlash(path)
+ )
.orderBy("depth", "desc")
.first();
if (!folder) return;
@@ -278,8 +288,12 @@ export const secretFolderDALFactory = (db: TDbClient) => {
tx?: Knex
) => {
try {
- const folders = await sqlFindMultipleFolderByEnvPathQuery(tx || db, query);
- return query.map(({ envId, secretPath }) =>
+ const formatedQuery = query.map(({ secretPath, envId }) => ({
+ envId,
+ secretPath: removeTrailingSlash(secretPath)
+ }));
+ const folders = await sqlFindMultipleFolderByEnvPathQuery(tx || db, formatedQuery);
+ return formatedQuery.map(({ envId, secretPath }) =>
folders.find(
({ path: targetPath, envId: targetEnvId }) =>
targetPath === secretPath && targetEnvId === envId
From d33ef9e4e18904928b303cd1aeb88392d03e9214 Mon Sep 17 00:00:00 2001
From: Maidul Islam
Date: Sun, 28 Jan 2024 13:52:56 -0500
Subject: [PATCH 020/178] jump cloud patch
---
.../saml-config/saml-config-service.ts | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/backend/src/ee/services/saml-config/saml-config-service.ts b/backend/src/ee/services/saml-config/saml-config-service.ts
index da8cb02b1..ad6a34a37 100644
--- a/backend/src/ee/services/saml-config/saml-config-service.ts
+++ b/backend/src/ee/services/saml-config/saml-config-service.ts
@@ -226,7 +226,24 @@ export const samlConfigServiceFactory = ({
ssoConfig = await samlConfigDAL.findOne({ orgId: dto.orgId });
if (!ssoConfig) return;
} else if (dto.type === "ssoId") {
- ssoConfig = await samlConfigDAL.findById(dto.id);
+ // TODO:
+ // We made this change because saml config ids were not moved over during the migration
+ // This will patch this issue.
+ // Remove in the future
+ const UUIDToMongoId: Record = {
+ "64c81ff7905fadcfead01e9a": "0978bcbe-8f94-4d95-8600-009787262613",
+ "652d4777c74d008c85c8bed5": "42044bf5-119e-443e-a51b-0308ac7e45ea",
+ "6527df39771217236f8721f6": "6311ec4b-d692-4422-b52a-337f719ae6b0",
+ "650374a561d12cd3d835aeb8": "6453516c-930d-4ff0-ad3b-496ba6eb80ca",
+ "655d67d10a0f4d307c8b1536": "73b9f1b1-f946-4f18-9a2d-310f157f7df5",
+ "64f23239a5d4ed17f1e544c4": "9256337f-e3da-43d7-8266-39c9276e8426",
+ "65348e49db355e6e4782571f": "b8a227c7-843e-410e-8982-b4976a599b69",
+ "657a219fc8a80c2eff97eb38": "fcab1573-ae7f-4fcf-9645-646207acf035"
+ };
+
+ const id = UUIDToMongoId[dto.id] ?? dto.id
+
+ ssoConfig = await samlConfigDAL.findById(id);
}
if (!ssoConfig) throw new BadRequestError({ message: "Failed to find organization SSO data" });
From a6ead9396c5e315afbc9de9120c7fac081488db5 Mon Sep 17 00:00:00 2001
From: Maidul Islam
Date: Sun, 28 Jan 2024 14:36:57 -0500
Subject: [PATCH 021/178] nit: small patch to request error status
---
backend/src/server/plugins/error-handler.ts | 6 +++---
.../ProjectIndexSecretsSection.tsx | 5 ++---
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/backend/src/server/plugins/error-handler.ts b/backend/src/server/plugins/error-handler.ts
index da3162ef8..cacc91885 100644
--- a/backend/src/server/plugins/error-handler.ts
+++ b/backend/src/server/plugins/error-handler.ts
@@ -15,15 +15,15 @@ export const fastifyErrHandler = fastifyPlugin(async (server: FastifyZodProvider
req.log.error(error);
if (error instanceof BadRequestError) {
res.status(400).send({ statusCode: 400, message: error.message, error: error.name });
- } else if (error instanceof UnauthorizedError || error instanceof ForbiddenRequestError) {
+ } else if (error instanceof UnauthorizedError) {
res.status(403).send({ statusCode: 403, message: error.message, error: error.name });
} else if (error instanceof DatabaseError || error instanceof InternalServerError) {
res.status(500).send({ statusCode: 500, message: "Something went wrong", error: error.name });
} else if (error instanceof ZodError) {
res.status(403).send({ statusCode: 403, error: "ValidationFailure", message: error.issues });
} else if (error instanceof ForbiddenError) {
- res.status(403).send({
- statusCode: 403,
+ res.status(401).send({
+ statusCode: 401,
error: "PermissionDenied",
message: `You are not allowed to ${error.action} on ${error.subjectType}`
});
diff --git a/frontend/src/views/SecretOverviewPage/components/ProjectIndexSecretsSection/ProjectIndexSecretsSection.tsx b/frontend/src/views/SecretOverviewPage/components/ProjectIndexSecretsSection/ProjectIndexSecretsSection.tsx
index bbc2fb49a..329153b1d 100644
--- a/frontend/src/views/SecretOverviewPage/components/ProjectIndexSecretsSection/ProjectIndexSecretsSection.tsx
+++ b/frontend/src/views/SecretOverviewPage/components/ProjectIndexSecretsSection/ProjectIndexSecretsSection.tsx
@@ -81,13 +81,12 @@ export const ProjectIndexSecretsSection = ({ decryptFileKey }: Props) => {
)}
-
Enable Blind Indices
+
Action Required
Your project was created before the introduction of blind indexing. To continue accessing
secrets by name through the SDK, public API and web dashboard, please enable blind indexing.{" "}
- This is a one time process.{" "}
- {membership.role !== ProjectMembershipRole.Admin && "Admin only operation"}
+ {membership.role !== ProjectMembershipRole.Admin && "This is an admin only operation."}
From dcb6f5891f19deca468b6cf353cadd33354337dd Mon Sep 17 00:00:00 2001
From: Maidul Islam
Date: Sun, 28 Jan 2024 15:32:37 -0500
Subject: [PATCH 022/178] add license service timeout
---
backend/src/ee/services/license/licence-fns.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backend/src/ee/services/license/licence-fns.ts b/backend/src/ee/services/license/licence-fns.ts
index 022b4fb9a..ca69b7d0e 100644
--- a/backend/src/ee/services/license/licence-fns.ts
+++ b/backend/src/ee/services/license/licence-fns.ts
@@ -39,7 +39,7 @@ export const setupLicenceRequestWithStore = (
let token: string;
const licenceReq = axios.create({
baseURL,
- // timeout: 60 * 1000,
+ timeout: 35 * 1000,
// signal: AbortSignal.timeout(60 * 1000)
});
From 55934642874c864e5982a88126921a3524c96d94 Mon Sep 17 00:00:00 2001
From: Tuan Dang
Date: Mon, 29 Jan 2024 09:20:39 +0700
Subject: [PATCH 023/178] Patch Vercel integration missing teamId not being
passed in from frontend
---
frontend/src/hooks/api/integrationAuth/types.ts | 1 +
frontend/src/pages/integrations/vercel/create.tsx | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/frontend/src/hooks/api/integrationAuth/types.ts b/frontend/src/hooks/api/integrationAuth/types.ts
index 6e0fc4a3d..2a5652673 100644
--- a/frontend/src/hooks/api/integrationAuth/types.ts
+++ b/frontend/src/hooks/api/integrationAuth/types.ts
@@ -7,6 +7,7 @@ export type IntegrationAuth = {
updatedAt: string;
algorithm: string;
keyEncoding: string;
+ teamId?: string;
};
export type App = {
diff --git a/frontend/src/pages/integrations/vercel/create.tsx b/frontend/src/pages/integrations/vercel/create.tsx
index 969317f34..6a18e2b1b 100644
--- a/frontend/src/pages/integrations/vercel/create.tsx
+++ b/frontend/src/pages/integrations/vercel/create.tsx
@@ -52,7 +52,8 @@ export default function VercelCreateIntegrationPage() {
const { data: integrationAuth } = useGetIntegrationAuthById((integrationAuthId as string) ?? "");
const { data: integrationAuthApps, isLoading: isIntegrationAuthAppsLoading } =
useGetIntegrationAuthApps({
- integrationAuthId: (integrationAuthId as string) ?? ""
+ integrationAuthId: (integrationAuthId as string) ?? "",
+ teamId: integrationAuth?.teamId as string
});
const { data: branches } = useGetIntegrationAuthVercelBranches({
From 703ff2c12bc1108807cced648edc71345d669b66 Mon Sep 17 00:00:00 2001
From: Akhil Mohan
Date: Mon, 29 Jan 2024 14:52:20 +0530
Subject: [PATCH 024/178] feat: added cloudwatch support and removed parsed
secret blindindex nullable
---
backend/package-lock.json | 1017 +++++++++++++----
backend/package.json | 1 +
backend/src/db/schemas/secret-versions.ts | 10 +-
backend/src/db/schemas/secrets.ts | 10 +-
.../secret-approval-request-service.ts | 14 +-
.../secret-rotation-queue.ts | 13 +-
backend/src/services/secret/secret-service.ts | 16 +-
7 files changed, 844 insertions(+), 237 deletions(-)
diff --git a/backend/package-lock.json b/backend/package-lock.json
index 040b4619f..6f8a6d33e 100644
--- a/backend/package-lock.json
+++ b/backend/package-lock.json
@@ -23,6 +23,7 @@
"@node-saml/passport-saml": "^4.0.4",
"@octokit/rest": "^20.0.2",
"@octokit/webhooks-types": "^7.3.1",
+ "@serdnam/pino-cloudwatch-transport": "^1.0.4",
"@sindresorhus/slugify": "^2.2.1",
"@ucast/mongo2js": "^1.3.4",
"ajv": "^8.12.0",
@@ -200,6 +201,477 @@
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
},
+ "node_modules/@aws-sdk/client-cloudwatch-logs": {
+ "version": "3.501.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/client-cloudwatch-logs/-/client-cloudwatch-logs-3.501.0.tgz",
+ "integrity": "sha512-Lad4FHqTut9ZM8VKW48cnd8OBYekkVbYxWb6uWnf05NA9JMuy/zRBD4MGpv3MjhhRe4iX159G1406yK39N2GDg==",
+ "dependencies": {
+ "@aws-crypto/sha256-browser": "3.0.0",
+ "@aws-crypto/sha256-js": "3.0.0",
+ "@aws-sdk/client-sts": "3.501.0",
+ "@aws-sdk/core": "3.496.0",
+ "@aws-sdk/credential-provider-node": "3.501.0",
+ "@aws-sdk/middleware-host-header": "3.496.0",
+ "@aws-sdk/middleware-logger": "3.496.0",
+ "@aws-sdk/middleware-recursion-detection": "3.496.0",
+ "@aws-sdk/middleware-signing": "3.496.0",
+ "@aws-sdk/middleware-user-agent": "3.496.0",
+ "@aws-sdk/region-config-resolver": "3.496.0",
+ "@aws-sdk/types": "3.496.0",
+ "@aws-sdk/util-endpoints": "3.496.0",
+ "@aws-sdk/util-user-agent-browser": "3.496.0",
+ "@aws-sdk/util-user-agent-node": "3.496.0",
+ "@smithy/config-resolver": "^2.1.1",
+ "@smithy/core": "^1.3.1",
+ "@smithy/eventstream-serde-browser": "^2.1.1",
+ "@smithy/eventstream-serde-config-resolver": "^2.1.1",
+ "@smithy/eventstream-serde-node": "^2.1.1",
+ "@smithy/fetch-http-handler": "^2.4.1",
+ "@smithy/hash-node": "^2.1.1",
+ "@smithy/invalid-dependency": "^2.1.1",
+ "@smithy/middleware-content-length": "^2.1.1",
+ "@smithy/middleware-endpoint": "^2.4.1",
+ "@smithy/middleware-retry": "^2.1.1",
+ "@smithy/middleware-serde": "^2.1.1",
+ "@smithy/middleware-stack": "^2.1.1",
+ "@smithy/node-config-provider": "^2.2.1",
+ "@smithy/node-http-handler": "^2.3.1",
+ "@smithy/protocol-http": "^3.1.1",
+ "@smithy/smithy-client": "^2.3.1",
+ "@smithy/types": "^2.9.1",
+ "@smithy/url-parser": "^2.1.1",
+ "@smithy/util-base64": "^2.1.1",
+ "@smithy/util-body-length-browser": "^2.1.1",
+ "@smithy/util-body-length-node": "^2.2.1",
+ "@smithy/util-defaults-mode-browser": "^2.1.1",
+ "@smithy/util-defaults-mode-node": "^2.1.1",
+ "@smithy/util-endpoints": "^1.1.1",
+ "@smithy/util-retry": "^2.1.1",
+ "@smithy/util-utf8": "^2.1.1",
+ "tslib": "^2.5.0",
+ "uuid": "^8.3.2"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/client-cloudwatch-logs/node_modules/@aws-sdk/client-sso": {
+ "version": "3.496.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.496.0.tgz",
+ "integrity": "sha512-fuaMuxKg7CMUsP9l3kxYWCOxFsBjdA0xj5nlikaDm1661/gB4KkAiGqRY8LsQkpNXvXU8Nj+f7oCFADFyGYzyw==",
+ "dependencies": {
+ "@aws-crypto/sha256-browser": "3.0.0",
+ "@aws-crypto/sha256-js": "3.0.0",
+ "@aws-sdk/core": "3.496.0",
+ "@aws-sdk/middleware-host-header": "3.496.0",
+ "@aws-sdk/middleware-logger": "3.496.0",
+ "@aws-sdk/middleware-recursion-detection": "3.496.0",
+ "@aws-sdk/middleware-user-agent": "3.496.0",
+ "@aws-sdk/region-config-resolver": "3.496.0",
+ "@aws-sdk/types": "3.496.0",
+ "@aws-sdk/util-endpoints": "3.496.0",
+ "@aws-sdk/util-user-agent-browser": "3.496.0",
+ "@aws-sdk/util-user-agent-node": "3.496.0",
+ "@smithy/config-resolver": "^2.1.1",
+ "@smithy/core": "^1.3.1",
+ "@smithy/fetch-http-handler": "^2.4.1",
+ "@smithy/hash-node": "^2.1.1",
+ "@smithy/invalid-dependency": "^2.1.1",
+ "@smithy/middleware-content-length": "^2.1.1",
+ "@smithy/middleware-endpoint": "^2.4.1",
+ "@smithy/middleware-retry": "^2.1.1",
+ "@smithy/middleware-serde": "^2.1.1",
+ "@smithy/middleware-stack": "^2.1.1",
+ "@smithy/node-config-provider": "^2.2.1",
+ "@smithy/node-http-handler": "^2.3.1",
+ "@smithy/protocol-http": "^3.1.1",
+ "@smithy/smithy-client": "^2.3.1",
+ "@smithy/types": "^2.9.1",
+ "@smithy/url-parser": "^2.1.1",
+ "@smithy/util-base64": "^2.1.1",
+ "@smithy/util-body-length-browser": "^2.1.1",
+ "@smithy/util-body-length-node": "^2.2.1",
+ "@smithy/util-defaults-mode-browser": "^2.1.1",
+ "@smithy/util-defaults-mode-node": "^2.1.1",
+ "@smithy/util-endpoints": "^1.1.1",
+ "@smithy/util-retry": "^2.1.1",
+ "@smithy/util-utf8": "^2.1.1",
+ "tslib": "^2.5.0"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/client-cloudwatch-logs/node_modules/@aws-sdk/client-sts": {
+ "version": "3.501.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/client-sts/-/client-sts-3.501.0.tgz",
+ "integrity": "sha512-Uwc/xuxsA46dZS5s+4U703LBNDrGpWF7RB4XYEEMD21BLfGuqntxLLQux8xxKt3Pcur0CsXNja5jXt3uLnE5MA==",
+ "dependencies": {
+ "@aws-crypto/sha256-browser": "3.0.0",
+ "@aws-crypto/sha256-js": "3.0.0",
+ "@aws-sdk/core": "3.496.0",
+ "@aws-sdk/credential-provider-node": "3.501.0",
+ "@aws-sdk/middleware-host-header": "3.496.0",
+ "@aws-sdk/middleware-logger": "3.496.0",
+ "@aws-sdk/middleware-recursion-detection": "3.496.0",
+ "@aws-sdk/middleware-user-agent": "3.496.0",
+ "@aws-sdk/region-config-resolver": "3.496.0",
+ "@aws-sdk/types": "3.496.0",
+ "@aws-sdk/util-endpoints": "3.496.0",
+ "@aws-sdk/util-user-agent-browser": "3.496.0",
+ "@aws-sdk/util-user-agent-node": "3.496.0",
+ "@smithy/config-resolver": "^2.1.1",
+ "@smithy/core": "^1.3.1",
+ "@smithy/fetch-http-handler": "^2.4.1",
+ "@smithy/hash-node": "^2.1.1",
+ "@smithy/invalid-dependency": "^2.1.1",
+ "@smithy/middleware-content-length": "^2.1.1",
+ "@smithy/middleware-endpoint": "^2.4.1",
+ "@smithy/middleware-retry": "^2.1.1",
+ "@smithy/middleware-serde": "^2.1.1",
+ "@smithy/middleware-stack": "^2.1.1",
+ "@smithy/node-config-provider": "^2.2.1",
+ "@smithy/node-http-handler": "^2.3.1",
+ "@smithy/protocol-http": "^3.1.1",
+ "@smithy/smithy-client": "^2.3.1",
+ "@smithy/types": "^2.9.1",
+ "@smithy/url-parser": "^2.1.1",
+ "@smithy/util-base64": "^2.1.1",
+ "@smithy/util-body-length-browser": "^2.1.1",
+ "@smithy/util-body-length-node": "^2.2.1",
+ "@smithy/util-defaults-mode-browser": "^2.1.1",
+ "@smithy/util-defaults-mode-node": "^2.1.1",
+ "@smithy/util-endpoints": "^1.1.1",
+ "@smithy/util-middleware": "^2.1.1",
+ "@smithy/util-retry": "^2.1.1",
+ "@smithy/util-utf8": "^2.1.1",
+ "fast-xml-parser": "4.2.5",
+ "tslib": "^2.5.0"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/client-cloudwatch-logs/node_modules/@aws-sdk/core": {
+ "version": "3.496.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.496.0.tgz",
+ "integrity": "sha512-yT+ug7Cw/3eJi7x2es0+46x12+cIJm5Xv+GPWsrTFD1TKgqO/VPEgfDtHFagDNbFmjNQA65Ygc/kEdIX9ICX/A==",
+ "dependencies": {
+ "@smithy/core": "^1.3.1",
+ "@smithy/protocol-http": "^3.1.1",
+ "@smithy/signature-v4": "^2.1.1",
+ "@smithy/smithy-client": "^2.3.1",
+ "@smithy/types": "^2.9.1",
+ "tslib": "^2.5.0"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/client-cloudwatch-logs/node_modules/@aws-sdk/credential-provider-env": {
+ "version": "3.496.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.496.0.tgz",
+ "integrity": "sha512-lukQMJ8SWWP5RqkRNOHi/H+WMhRvSWa3Fc5Jf/VP6xHiPLfF1XafcvthtV91e0VwPCiseI+HqChrcGq8pvnxHw==",
+ "dependencies": {
+ "@aws-sdk/types": "3.496.0",
+ "@smithy/property-provider": "^2.1.1",
+ "@smithy/types": "^2.9.1",
+ "tslib": "^2.5.0"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/client-cloudwatch-logs/node_modules/@aws-sdk/credential-provider-ini": {
+ "version": "3.501.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.501.0.tgz",
+ "integrity": "sha512-6UXnwLtYIr298ljveumCVXsH+x7csGscK5ylY+veRFy514NqyloRdJt8JY26hhh5SF9MYnkW+JyWSJ2Ls3tOjQ==",
+ "dependencies": {
+ "@aws-sdk/credential-provider-env": "3.496.0",
+ "@aws-sdk/credential-provider-process": "3.496.0",
+ "@aws-sdk/credential-provider-sso": "3.501.0",
+ "@aws-sdk/credential-provider-web-identity": "3.496.0",
+ "@aws-sdk/types": "3.496.0",
+ "@smithy/credential-provider-imds": "^2.2.1",
+ "@smithy/property-provider": "^2.1.1",
+ "@smithy/shared-ini-file-loader": "^2.3.1",
+ "@smithy/types": "^2.9.1",
+ "tslib": "^2.5.0"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/client-cloudwatch-logs/node_modules/@aws-sdk/credential-provider-node": {
+ "version": "3.501.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.501.0.tgz",
+ "integrity": "sha512-NM62D8gYrQ1nyLYwW4k48B2/lMHDzHDcQccS1wJakr6bg5sdtG06CumwlVcY+LAa0o1xRnhHmh/yiwj/nN4avw==",
+ "dependencies": {
+ "@aws-sdk/credential-provider-env": "3.496.0",
+ "@aws-sdk/credential-provider-ini": "3.501.0",
+ "@aws-sdk/credential-provider-process": "3.496.0",
+ "@aws-sdk/credential-provider-sso": "3.501.0",
+ "@aws-sdk/credential-provider-web-identity": "3.496.0",
+ "@aws-sdk/types": "3.496.0",
+ "@smithy/credential-provider-imds": "^2.2.1",
+ "@smithy/property-provider": "^2.1.1",
+ "@smithy/shared-ini-file-loader": "^2.3.1",
+ "@smithy/types": "^2.9.1",
+ "tslib": "^2.5.0"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/client-cloudwatch-logs/node_modules/@aws-sdk/credential-provider-process": {
+ "version": "3.496.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.496.0.tgz",
+ "integrity": "sha512-/YZscCTGOKVmGr916Th4XF8Sz6JDtZ/n2loHG9exok9iy/qIbACsTRNLP9zexPxhPoue/oZqecY5xbVljfY34A==",
+ "dependencies": {
+ "@aws-sdk/types": "3.496.0",
+ "@smithy/property-provider": "^2.1.1",
+ "@smithy/shared-ini-file-loader": "^2.3.1",
+ "@smithy/types": "^2.9.1",
+ "tslib": "^2.5.0"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/client-cloudwatch-logs/node_modules/@aws-sdk/credential-provider-sso": {
+ "version": "3.501.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.501.0.tgz",
+ "integrity": "sha512-y90dlvvZ55PwecODFdMx0NiNlJJfm7X6S61PKdLNCMRcu1YK+eWn0CmPHGHobBUQ4SEYhnFLcHSsf+VMim6BtQ==",
+ "dependencies": {
+ "@aws-sdk/client-sso": "3.496.0",
+ "@aws-sdk/token-providers": "3.501.0",
+ "@aws-sdk/types": "3.496.0",
+ "@smithy/property-provider": "^2.1.1",
+ "@smithy/shared-ini-file-loader": "^2.3.1",
+ "@smithy/types": "^2.9.1",
+ "tslib": "^2.5.0"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/client-cloudwatch-logs/node_modules/@aws-sdk/credential-provider-web-identity": {
+ "version": "3.496.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.496.0.tgz",
+ "integrity": "sha512-IbP+qLlvJSpNPj+zW6TtFuLRTK5Tf0hW+2pom4vFyi5YSH4pn8UOC136UdewX8vhXGS9BJQ5zBDMasIyl5VeGQ==",
+ "dependencies": {
+ "@aws-sdk/types": "3.496.0",
+ "@smithy/property-provider": "^2.1.1",
+ "@smithy/types": "^2.9.1",
+ "tslib": "^2.5.0"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/client-cloudwatch-logs/node_modules/@aws-sdk/middleware-host-header": {
+ "version": "3.496.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.496.0.tgz",
+ "integrity": "sha512-jUdPpSJeqCYXf6hSjfwsfHway7peIV8Vz51w/BN91bF4vB/bYwAC5o9/iJiK/EoByp5asxA8fg9wFOyGjzdbLg==",
+ "dependencies": {
+ "@aws-sdk/types": "3.496.0",
+ "@smithy/protocol-http": "^3.1.1",
+ "@smithy/types": "^2.9.1",
+ "tslib": "^2.5.0"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/client-cloudwatch-logs/node_modules/@aws-sdk/middleware-logger": {
+ "version": "3.496.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.496.0.tgz",
+ "integrity": "sha512-EwMVSY6iBMeGbVnvwdaFl/ClMS/YWtxCAo+bcEtgk8ltRuo7qgbJem8Km/fvWC1vdWvIbe4ArdJ8iGzq62ffAw==",
+ "dependencies": {
+ "@aws-sdk/types": "3.496.0",
+ "@smithy/types": "^2.9.1",
+ "tslib": "^2.5.0"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/client-cloudwatch-logs/node_modules/@aws-sdk/middleware-recursion-detection": {
+ "version": "3.496.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.496.0.tgz",
+ "integrity": "sha512-+IuOcFsfqg2WAnaEzH6KhVbicqCxtOq9w3DH2jwTpddRlCx2Kqf6wCzg8luhHRGyjBZdsbIS+OXwyMevoppawA==",
+ "dependencies": {
+ "@aws-sdk/types": "3.496.0",
+ "@smithy/protocol-http": "^3.1.1",
+ "@smithy/types": "^2.9.1",
+ "tslib": "^2.5.0"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/client-cloudwatch-logs/node_modules/@aws-sdk/middleware-signing": {
+ "version": "3.496.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-signing/-/middleware-signing-3.496.0.tgz",
+ "integrity": "sha512-Oq73Brs4IConvWnRlh8jM1V7LHoTw9SVQklu/QW2FPlNrB3B8fuTdWHHYIWv7ybw1bykXoCY99v865Mmq/Or/g==",
+ "dependencies": {
+ "@aws-sdk/types": "3.496.0",
+ "@smithy/property-provider": "^2.1.1",
+ "@smithy/protocol-http": "^3.1.1",
+ "@smithy/signature-v4": "^2.1.1",
+ "@smithy/types": "^2.9.1",
+ "@smithy/util-middleware": "^2.1.1",
+ "tslib": "^2.5.0"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/client-cloudwatch-logs/node_modules/@aws-sdk/middleware-user-agent": {
+ "version": "3.496.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.496.0.tgz",
+ "integrity": "sha512-+iMtRxFk0GmFWNUF4ilxylOQd9PZdR4ZC9jkcPIh1PZlvKtpCyFywKlk5RRZKklSoJ/CttcqwhMvOXTNbWm/0w==",
+ "dependencies": {
+ "@aws-sdk/types": "3.496.0",
+ "@aws-sdk/util-endpoints": "3.496.0",
+ "@smithy/protocol-http": "^3.1.1",
+ "@smithy/types": "^2.9.1",
+ "tslib": "^2.5.0"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/client-cloudwatch-logs/node_modules/@aws-sdk/region-config-resolver": {
+ "version": "3.496.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.496.0.tgz",
+ "integrity": "sha512-URrNVOPHPgEDm6QFu6lDC2cUFs+Jx23mA3jEwCvoKlXiEY/ZoWjH8wlX3OMUlLrF1qoUTuD03jjrJzF6zoCgug==",
+ "dependencies": {
+ "@aws-sdk/types": "3.496.0",
+ "@smithy/node-config-provider": "^2.2.1",
+ "@smithy/types": "^2.9.1",
+ "@smithy/util-config-provider": "^2.2.1",
+ "@smithy/util-middleware": "^2.1.1",
+ "tslib": "^2.5.0"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/client-cloudwatch-logs/node_modules/@aws-sdk/token-providers": {
+ "version": "3.501.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.501.0.tgz",
+ "integrity": "sha512-MvLPhNxlStmQqVm2crGLUqYWvK/AbMmI9j4FbEfJ15oG/I+730zjSJQEy2MvdiqbJRDPZ/tRCL89bUedOrmi0g==",
+ "dependencies": {
+ "@aws-crypto/sha256-browser": "3.0.0",
+ "@aws-crypto/sha256-js": "3.0.0",
+ "@aws-sdk/middleware-host-header": "3.496.0",
+ "@aws-sdk/middleware-logger": "3.496.0",
+ "@aws-sdk/middleware-recursion-detection": "3.496.0",
+ "@aws-sdk/middleware-user-agent": "3.496.0",
+ "@aws-sdk/region-config-resolver": "3.496.0",
+ "@aws-sdk/types": "3.496.0",
+ "@aws-sdk/util-endpoints": "3.496.0",
+ "@aws-sdk/util-user-agent-browser": "3.496.0",
+ "@aws-sdk/util-user-agent-node": "3.496.0",
+ "@smithy/config-resolver": "^2.1.1",
+ "@smithy/fetch-http-handler": "^2.4.1",
+ "@smithy/hash-node": "^2.1.1",
+ "@smithy/invalid-dependency": "^2.1.1",
+ "@smithy/middleware-content-length": "^2.1.1",
+ "@smithy/middleware-endpoint": "^2.4.1",
+ "@smithy/middleware-retry": "^2.1.1",
+ "@smithy/middleware-serde": "^2.1.1",
+ "@smithy/middleware-stack": "^2.1.1",
+ "@smithy/node-config-provider": "^2.2.1",
+ "@smithy/node-http-handler": "^2.3.1",
+ "@smithy/property-provider": "^2.1.1",
+ "@smithy/protocol-http": "^3.1.1",
+ "@smithy/shared-ini-file-loader": "^2.3.1",
+ "@smithy/smithy-client": "^2.3.1",
+ "@smithy/types": "^2.9.1",
+ "@smithy/url-parser": "^2.1.1",
+ "@smithy/util-base64": "^2.1.1",
+ "@smithy/util-body-length-browser": "^2.1.1",
+ "@smithy/util-body-length-node": "^2.2.1",
+ "@smithy/util-defaults-mode-browser": "^2.1.1",
+ "@smithy/util-defaults-mode-node": "^2.1.1",
+ "@smithy/util-endpoints": "^1.1.1",
+ "@smithy/util-retry": "^2.1.1",
+ "@smithy/util-utf8": "^2.1.1",
+ "tslib": "^2.5.0"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/client-cloudwatch-logs/node_modules/@aws-sdk/types": {
+ "version": "3.496.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.496.0.tgz",
+ "integrity": "sha512-umkGadK4QuNQaMoDICMm7NKRI/mYSXiyPjcn3d53BhsuArYU/52CebGQKdt4At7SwwsiVJZw9RNBHyN5Mm0HVw==",
+ "dependencies": {
+ "@smithy/types": "^2.9.1",
+ "tslib": "^2.5.0"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/client-cloudwatch-logs/node_modules/@aws-sdk/util-endpoints": {
+ "version": "3.496.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.496.0.tgz",
+ "integrity": "sha512-1QzOiWHi383ZwqSi/R2KgKCd7M+6DxkxI5acqLPm8mvDRDP2jRjrnVaC0g9/tlttWousGEemDUWStwrD2mVYSw==",
+ "dependencies": {
+ "@aws-sdk/types": "3.496.0",
+ "@smithy/types": "^2.9.1",
+ "@smithy/util-endpoints": "^1.1.1",
+ "tslib": "^2.5.0"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@aws-sdk/client-cloudwatch-logs/node_modules/@aws-sdk/util-user-agent-browser": {
+ "version": "3.496.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.496.0.tgz",
+ "integrity": "sha512-4j2spN+h0I0qfSMsGvJXTfQBu1e18rPdekKvzsGJxhaAE1tNgUfUT4nbvc5uVn0sNjZmirskmJ3kfbzVOrqIFg==",
+ "dependencies": {
+ "@aws-sdk/types": "3.496.0",
+ "@smithy/types": "^2.9.1",
+ "bowser": "^2.11.0",
+ "tslib": "^2.5.0"
+ }
+ },
+ "node_modules/@aws-sdk/client-cloudwatch-logs/node_modules/@aws-sdk/util-user-agent-node": {
+ "version": "3.496.0",
+ "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.496.0.tgz",
+ "integrity": "sha512-h0Ax0jlDc7UIo3KoSI4C4tVLBFoiAdx3+DhTVfgLS7x93d41dMlziPoBX2RgdcFn37qnzw6AQKTVTMwDbRCGpg==",
+ "dependencies": {
+ "@aws-sdk/types": "3.496.0",
+ "@smithy/node-config-provider": "^2.2.1",
+ "@smithy/types": "^2.9.1",
+ "tslib": "^2.5.0"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ },
+ "peerDependencies": {
+ "aws-crt": ">=1.0.0"
+ },
+ "peerDependenciesMeta": {
+ "aws-crt": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@aws-sdk/client-cloudwatch-logs/node_modules/uuid": {
+ "version": "8.3.2",
+ "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
+ "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
+ "bin": {
+ "uuid": "dist/bin/uuid"
+ }
+ },
"node_modules/@aws-sdk/client-secrets-manager": {
"version": "3.485.0",
"resolved": "https://registry.npmjs.org/@aws-sdk/client-secrets-manager/-/client-secrets-manager-3.485.0.tgz",
@@ -2748,6 +3220,28 @@
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
},
+ "node_modules/@serdnam/pino-cloudwatch-transport": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/@serdnam/pino-cloudwatch-transport/-/pino-cloudwatch-transport-1.0.4.tgz",
+ "integrity": "sha512-0wtILlFlO/qTFANM1oEMZLKa9REo+mluHN0VTDaOMh15H9Puc+qU4z4jAoZqggFz9Fw9EGG4c+UHpMduZ1EzeQ==",
+ "dependencies": {
+ "@aws-sdk/client-cloudwatch-logs": "^3.52.0",
+ "p-throttle": "^5.0.0",
+ "pino-abstract-transport": "^0.5.0"
+ },
+ "engines": {
+ "node": ">=16.0.0"
+ }
+ },
+ "node_modules/@serdnam/pino-cloudwatch-transport/node_modules/pino-abstract-transport": {
+ "version": "0.5.0",
+ "resolved": "https://registry.npmjs.org/pino-abstract-transport/-/pino-abstract-transport-0.5.0.tgz",
+ "integrity": "sha512-+KAgmVeqXYbTtU2FScx1XS3kNyfZ5TrXY07V96QnUSFqo2gAqlvmaxH67Lj7SWazqsMabf+58ctdTcBgnOLUOQ==",
+ "dependencies": {
+ "duplexify": "^4.1.2",
+ "split2": "^4.0.0"
+ }
+ },
"node_modules/@sinclair/typebox": {
"version": "0.27.8",
"resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz",
@@ -2806,11 +3300,11 @@
}
},
"node_modules/@smithy/abort-controller": {
- "version": "2.0.16",
- "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.0.16.tgz",
- "integrity": "sha512-4foO7738k8kM9flMHu3VLabqu7nPgvIj8TB909S0CnKx0YZz/dcDH3pZ/4JHdatfxlZdKF1JWOYCw9+v3HVVsw==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-2.1.1.tgz",
+ "integrity": "sha512-1+qdrUqLhaALYL0iOcN43EP6yAXXQ2wWZ6taf4S2pNGowmOc5gx+iMQv+E42JizNJjB0+gEadOXeV1Bf7JWL1Q==",
"dependencies": {
- "@smithy/types": "^2.8.0",
+ "@smithy/types": "^2.9.1",
"tslib": "^2.5.0"
},
"engines": {
@@ -2818,14 +3312,14 @@
}
},
"node_modules/@smithy/config-resolver": {
- "version": "2.0.23",
- "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.0.23.tgz",
- "integrity": "sha512-XakUqgtP2YY8Mi+Nlif5BiqJgWdvfxJafSpOSQeCOMizu+PUhE4fBQSy6xFcR+eInrwVadaABNxoJyGUMn15ew==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-2.1.1.tgz",
+ "integrity": "sha512-lxfLDpZm+AWAHPFZps5JfDoO9Ux1764fOgvRUBpHIO8HWHcSN1dkgsago1qLRVgm1BZ8RCm8cgv99QvtaOWIhw==",
"dependencies": {
- "@smithy/node-config-provider": "^2.1.9",
- "@smithy/types": "^2.8.0",
- "@smithy/util-config-provider": "^2.1.0",
- "@smithy/util-middleware": "^2.0.9",
+ "@smithy/node-config-provider": "^2.2.1",
+ "@smithy/types": "^2.9.1",
+ "@smithy/util-config-provider": "^2.2.1",
+ "@smithy/util-middleware": "^2.1.1",
"tslib": "^2.5.0"
},
"engines": {
@@ -2833,17 +3327,17 @@
}
},
"node_modules/@smithy/core": {
- "version": "1.2.2",
- "resolved": "https://registry.npmjs.org/@smithy/core/-/core-1.2.2.tgz",
- "integrity": "sha512-uLjrskLT+mWb0emTR5QaiAIxVEU7ndpptDaVDrTwwhD+RjvHhjIiGQ3YL5jKk1a5VSDQUA2RGkXvJ6XKRcz6Dg==",
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/@smithy/core/-/core-1.3.1.tgz",
+ "integrity": "sha512-tf+NIu9FkOh312b6M9G4D68is4Xr7qptzaZGZUREELF8ysE1yLKphqt7nsomjKZVwW7WE5pDDex9idowNGRQ/Q==",
"dependencies": {
- "@smithy/middleware-endpoint": "^2.3.0",
- "@smithy/middleware-retry": "^2.0.26",
- "@smithy/middleware-serde": "^2.0.16",
- "@smithy/protocol-http": "^3.0.12",
- "@smithy/smithy-client": "^2.2.1",
- "@smithy/types": "^2.8.0",
- "@smithy/util-middleware": "^2.0.9",
+ "@smithy/middleware-endpoint": "^2.4.1",
+ "@smithy/middleware-retry": "^2.1.1",
+ "@smithy/middleware-serde": "^2.1.1",
+ "@smithy/protocol-http": "^3.1.1",
+ "@smithy/smithy-client": "^2.3.1",
+ "@smithy/types": "^2.9.1",
+ "@smithy/util-middleware": "^2.1.1",
"tslib": "^2.5.0"
},
"engines": {
@@ -2851,14 +3345,14 @@
}
},
"node_modules/@smithy/credential-provider-imds": {
- "version": "2.1.5",
- "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.1.5.tgz",
- "integrity": "sha512-VfvE6Wg1MUWwpTZFBnUD7zxvPhLY8jlHCzu6bCjlIYoWgXCDzZAML76IlZUEf45nib3rjehnFgg0s1rgsuN/bg==",
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-2.2.1.tgz",
+ "integrity": "sha512-7XHjZUxmZYnONheVQL7j5zvZXga+EWNgwEAP6OPZTi7l8J4JTeNh9aIOfE5fKHZ/ee2IeNOh54ZrSna+Vc6TFA==",
"dependencies": {
- "@smithy/node-config-provider": "^2.1.9",
- "@smithy/property-provider": "^2.0.17",
- "@smithy/types": "^2.8.0",
- "@smithy/url-parser": "^2.0.16",
+ "@smithy/node-config-provider": "^2.2.1",
+ "@smithy/property-provider": "^2.1.1",
+ "@smithy/types": "^2.9.1",
+ "@smithy/url-parser": "^2.1.1",
"tslib": "^2.5.0"
},
"engines": {
@@ -2866,36 +3360,87 @@
}
},
"node_modules/@smithy/eventstream-codec": {
- "version": "2.0.16",
- "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-2.0.16.tgz",
- "integrity": "sha512-umYh5pdCE9GHgiMAH49zu9wXWZKNHHdKPm/lK22WYISTjqu29SepmpWNmPiBLy/yUu4HFEGJHIFrDWhbDlApaw==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/eventstream-codec/-/eventstream-codec-2.1.1.tgz",
+ "integrity": "sha512-E8KYBxBIuU4c+zrpR22VsVrOPoEDzk35bQR3E+xm4k6Pa6JqzkDOdMyf9Atac5GPNKHJBdVaQ4JtjdWX2rl/nw==",
"dependencies": {
"@aws-crypto/crc32": "3.0.0",
- "@smithy/types": "^2.8.0",
- "@smithy/util-hex-encoding": "^2.0.0",
+ "@smithy/types": "^2.9.1",
+ "@smithy/util-hex-encoding": "^2.1.1",
"tslib": "^2.5.0"
}
},
- "node_modules/@smithy/fetch-http-handler": {
- "version": "2.3.2",
- "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.3.2.tgz",
- "integrity": "sha512-O9R/OlnAOTsnysuSDjt0v2q6DcSvCz5cCFC/CFAWWcLyBwJDeFyGTCTszgpQTb19+Fi8uRwZE5/3ziAQBFeDMQ==",
+ "node_modules/@smithy/eventstream-serde-browser": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-browser/-/eventstream-serde-browser-2.1.1.tgz",
+ "integrity": "sha512-JvEdCmGlZUay5VtlT8/kdR6FlvqTDUiJecMjXsBb0+k1H/qc9ME5n2XKPo8q/MZwEIA1GmGgYMokKGjVvMiDow==",
"dependencies": {
- "@smithy/protocol-http": "^3.0.12",
- "@smithy/querystring-builder": "^2.0.16",
- "@smithy/types": "^2.8.0",
- "@smithy/util-base64": "^2.0.1",
+ "@smithy/eventstream-serde-universal": "^2.1.1",
+ "@smithy/types": "^2.9.1",
+ "tslib": "^2.5.0"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@smithy/eventstream-serde-config-resolver": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-config-resolver/-/eventstream-serde-config-resolver-2.1.1.tgz",
+ "integrity": "sha512-EqNqXYp3+dk//NmW3NAgQr9bEQ7fsu/CcxQmTiq07JlaIcne/CBWpMZETyXm9w5LXkhduBsdXdlMscfDUDn2fA==",
+ "dependencies": {
+ "@smithy/types": "^2.9.1",
+ "tslib": "^2.5.0"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@smithy/eventstream-serde-node": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-node/-/eventstream-serde-node-2.1.1.tgz",
+ "integrity": "sha512-LF882q/aFidFNDX7uROAGxq3H0B7rjyPkV6QDn6/KDQ+CG7AFkRccjxRf1xqajq/Pe4bMGGr+VKAaoF6lELIQw==",
+ "dependencies": {
+ "@smithy/eventstream-serde-universal": "^2.1.1",
+ "@smithy/types": "^2.9.1",
+ "tslib": "^2.5.0"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@smithy/eventstream-serde-universal": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/eventstream-serde-universal/-/eventstream-serde-universal-2.1.1.tgz",
+ "integrity": "sha512-LR0mMT+XIYTxk4k2fIxEA1BPtW3685QlqufUEUAX1AJcfFfxNDKEvuCRZbO8ntJb10DrIFVJR9vb0MhDCi0sAQ==",
+ "dependencies": {
+ "@smithy/eventstream-codec": "^2.1.1",
+ "@smithy/types": "^2.9.1",
+ "tslib": "^2.5.0"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/@smithy/fetch-http-handler": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-2.4.1.tgz",
+ "integrity": "sha512-VYGLinPsFqH68lxfRhjQaSkjXM7JysUOJDTNjHBuN/ykyRb2f1gyavN9+VhhPTWCy32L4yZ2fdhpCs/nStEicg==",
+ "dependencies": {
+ "@smithy/protocol-http": "^3.1.1",
+ "@smithy/querystring-builder": "^2.1.1",
+ "@smithy/types": "^2.9.1",
+ "@smithy/util-base64": "^2.1.1",
"tslib": "^2.5.0"
}
},
"node_modules/@smithy/hash-node": {
- "version": "2.0.18",
- "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.0.18.tgz",
- "integrity": "sha512-gN2JFvAgnZCyDN9rJgcejfpK0uPPJrSortVVVVWsru9whS7eQey6+gj2eM5ln2i6rHNntIXzal1Fm9XOPuoaKA==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-2.1.1.tgz",
+ "integrity": "sha512-Qhoq0N8f2OtCnvUpCf+g1vSyhYQrZjhSwvJ9qvR8BUGOtTXiyv2x1OD2e6jVGmlpC4E4ax1USHoyGfV9JFsACg==",
"dependencies": {
- "@smithy/types": "^2.8.0",
- "@smithy/util-buffer-from": "^2.0.0",
- "@smithy/util-utf8": "^2.0.2",
+ "@smithy/types": "^2.9.1",
+ "@smithy/util-buffer-from": "^2.1.1",
+ "@smithy/util-utf8": "^2.1.1",
"tslib": "^2.5.0"
},
"engines": {
@@ -2903,18 +3448,18 @@
}
},
"node_modules/@smithy/invalid-dependency": {
- "version": "2.0.16",
- "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.0.16.tgz",
- "integrity": "sha512-apEHakT/kmpNo1VFHP4W/cjfeP9U0x5qvfsLJubgp7UM/gq4qYp0GbqdE7QhsjUaYvEnrftRqs7+YrtWreV0wA==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-2.1.1.tgz",
+ "integrity": "sha512-7WTgnKw+VPg8fxu2v9AlNOQ5yaz6RA54zOVB4f6vQuR0xFKd+RzlCpt0WidYTsye7F+FYDIaS/RnJW4pxjNInw==",
"dependencies": {
- "@smithy/types": "^2.8.0",
+ "@smithy/types": "^2.9.1",
"tslib": "^2.5.0"
}
},
"node_modules/@smithy/is-array-buffer": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.0.0.tgz",
- "integrity": "sha512-z3PjFjMyZNI98JFRJi/U0nGoLWMSJlDjAW4QUX2WNZLas5C0CmVV6LJ01JI0k90l7FvpmixjWxPFmENSClQ7ug==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/is-array-buffer/-/is-array-buffer-2.1.1.tgz",
+ "integrity": "sha512-xozSQrcUinPpNPNPds4S7z/FakDTh1MZWtRP/2vQtYB/u3HYrX2UXuZs+VhaKBd6Vc7g2XPr2ZtwGBNDN6fNKQ==",
"dependencies": {
"tslib": "^2.5.0"
},
@@ -2923,12 +3468,12 @@
}
},
"node_modules/@smithy/middleware-content-length": {
- "version": "2.0.18",
- "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-2.0.18.tgz",
- "integrity": "sha512-ZJ9uKPTfxYheTKSKYB+GCvcj+izw9WGzRLhjn8n254q0jWLojUzn7Vw0l4R/Gq7Wdpf/qmk/ptD+6CCXHNVCaw==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-2.1.1.tgz",
+ "integrity": "sha512-rSr9ezUl9qMgiJR0UVtVOGEZElMdGFyl8FzWEF5iEKTlcWxGr2wTqGfDwtH3LAB7h+FPkxqv4ZU4cpuCN9Kf/g==",
"dependencies": {
- "@smithy/protocol-http": "^3.0.12",
- "@smithy/types": "^2.8.0",
+ "@smithy/protocol-http": "^3.1.1",
+ "@smithy/types": "^2.9.1",
"tslib": "^2.5.0"
},
"engines": {
@@ -2936,16 +3481,16 @@
}
},
"node_modules/@smithy/middleware-endpoint": {
- "version": "2.3.0",
- "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.3.0.tgz",
- "integrity": "sha512-VsOAG2YQ8ykjSmKO+CIXdJBIWFo6AAvG6Iw95BakBTqk66/4BI7XyqLevoNSq/lZ6NgZv24sLmrcIN+fLDWBCg==",
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-2.4.1.tgz",
+ "integrity": "sha512-XPZTb1E2Oav60Ven3n2PFx+rX9EDsU/jSTA8VDamt7FXks67ekjPY/XrmmPDQaFJOTUHJNKjd8+kZxVO5Ael4Q==",
"dependencies": {
- "@smithy/middleware-serde": "^2.0.16",
- "@smithy/node-config-provider": "^2.1.9",
- "@smithy/shared-ini-file-loader": "^2.2.8",
- "@smithy/types": "^2.8.0",
- "@smithy/url-parser": "^2.0.16",
- "@smithy/util-middleware": "^2.0.9",
+ "@smithy/middleware-serde": "^2.1.1",
+ "@smithy/node-config-provider": "^2.2.1",
+ "@smithy/shared-ini-file-loader": "^2.3.1",
+ "@smithy/types": "^2.9.1",
+ "@smithy/url-parser": "^2.1.1",
+ "@smithy/util-middleware": "^2.1.1",
"tslib": "^2.5.0"
},
"engines": {
@@ -2953,17 +3498,17 @@
}
},
"node_modules/@smithy/middleware-retry": {
- "version": "2.0.26",
- "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.0.26.tgz",
- "integrity": "sha512-Qzpxo0U5jfNiq9iD38U3e2bheXwvTEX4eue9xruIvEgh+UKq6dKuGqcB66oBDV7TD/mfoJi9Q/VmaiqwWbEp7A==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-2.1.1.tgz",
+ "integrity": "sha512-eMIHOBTXro6JZ+WWzZWd/8fS8ht5nS5KDQjzhNMHNRcG5FkNTqcKpYhw7TETMYzbLfhO5FYghHy1vqDWM4FLDA==",
"dependencies": {
- "@smithy/node-config-provider": "^2.1.9",
- "@smithy/protocol-http": "^3.0.12",
- "@smithy/service-error-classification": "^2.0.9",
- "@smithy/smithy-client": "^2.2.1",
- "@smithy/types": "^2.8.0",
- "@smithy/util-middleware": "^2.0.9",
- "@smithy/util-retry": "^2.0.9",
+ "@smithy/node-config-provider": "^2.2.1",
+ "@smithy/protocol-http": "^3.1.1",
+ "@smithy/service-error-classification": "^2.1.1",
+ "@smithy/smithy-client": "^2.3.1",
+ "@smithy/types": "^2.9.1",
+ "@smithy/util-middleware": "^2.1.1",
+ "@smithy/util-retry": "^2.1.1",
"tslib": "^2.5.0",
"uuid": "^8.3.2"
},
@@ -2980,11 +3525,11 @@
}
},
"node_modules/@smithy/middleware-serde": {
- "version": "2.0.16",
- "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.0.16.tgz",
- "integrity": "sha512-5EAd4t30pcc4M8TSSGq7q/x5IKrxfXR5+SrU4bgxNy7RPHQo2PSWBUco9C+D9Tfqp/JZvprRpK42dnupZafk2g==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-2.1.1.tgz",
+ "integrity": "sha512-D8Gq0aQBeE1pxf3cjWVkRr2W54t+cdM2zx78tNrVhqrDykRA7asq8yVJij1u5NDtKzKqzBSPYh7iW0svUKg76g==",
"dependencies": {
- "@smithy/types": "^2.8.0",
+ "@smithy/types": "^2.9.1",
"tslib": "^2.5.0"
},
"engines": {
@@ -2992,11 +3537,11 @@
}
},
"node_modules/@smithy/middleware-stack": {
- "version": "2.0.10",
- "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.0.10.tgz",
- "integrity": "sha512-I2rbxctNq9FAPPEcuA1ntZxkTKOPQFy7YBPOaD/MLg1zCvzv21CoNxR0py6J8ZVC35l4qE4nhxB0f7TF5/+Ldw==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-2.1.1.tgz",
+ "integrity": "sha512-KPJhRlhsl8CjgGXK/DoDcrFGfAqoqvuwlbxy+uOO4g2Azn1dhH+GVfC3RAp+6PoL5PWPb+vt6Z23FP+Mr6qeCw==",
"dependencies": {
- "@smithy/types": "^2.8.0",
+ "@smithy/types": "^2.9.1",
"tslib": "^2.5.0"
},
"engines": {
@@ -3004,13 +3549,13 @@
}
},
"node_modules/@smithy/node-config-provider": {
- "version": "2.1.9",
- "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.1.9.tgz",
- "integrity": "sha512-tUyW/9xrRy+s7RXkmQhgYkAPMpTIF8izK4orhHjNFEKR3QZiOCbWB546Y8iB/Fpbm3O9+q0Af9rpywLKJOwtaQ==",
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-2.2.1.tgz",
+ "integrity": "sha512-epzK3x1xNxA9oJgHQ5nz+2j6DsJKdHfieb+YgJ7ATWxzNcB7Hc+Uya2TUck5MicOPhDV8HZImND7ZOecVr+OWg==",
"dependencies": {
- "@smithy/property-provider": "^2.0.17",
- "@smithy/shared-ini-file-loader": "^2.2.8",
- "@smithy/types": "^2.8.0",
+ "@smithy/property-provider": "^2.1.1",
+ "@smithy/shared-ini-file-loader": "^2.3.1",
+ "@smithy/types": "^2.9.1",
"tslib": "^2.5.0"
},
"engines": {
@@ -3018,14 +3563,14 @@
}
},
"node_modules/@smithy/node-http-handler": {
- "version": "2.2.2",
- "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.2.2.tgz",
- "integrity": "sha512-XO58TO/Eul/IBQKFKaaBtXJi0ItEQQCT+NI4IiKHCY/4KtqaUT6y/wC1EvDqlA9cP7Dyjdj7FdPs4DyynH3u7g==",
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-2.3.1.tgz",
+ "integrity": "sha512-gLA8qK2nL9J0Rk/WEZSvgin4AppvuCYRYg61dcUo/uKxvMZsMInL5I5ZdJTogOvdfVug3N2dgI5ffcUfS4S9PA==",
"dependencies": {
- "@smithy/abort-controller": "^2.0.16",
- "@smithy/protocol-http": "^3.0.12",
- "@smithy/querystring-builder": "^2.0.16",
- "@smithy/types": "^2.8.0",
+ "@smithy/abort-controller": "^2.1.1",
+ "@smithy/protocol-http": "^3.1.1",
+ "@smithy/querystring-builder": "^2.1.1",
+ "@smithy/types": "^2.9.1",
"tslib": "^2.5.0"
},
"engines": {
@@ -3033,11 +3578,11 @@
}
},
"node_modules/@smithy/property-provider": {
- "version": "2.0.17",
- "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.0.17.tgz",
- "integrity": "sha512-+VkeZbVu7qtQ2DjI48Qwaf9fPOr3gZIwxQpuLJgRRSkWsdSvmaTCxI3gzRFKePB63Ts9r4yjn4HkxSCSkdWmcQ==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-2.1.1.tgz",
+ "integrity": "sha512-FX7JhhD/o5HwSwg6GLK9zxrMUrGnb3PzNBrcthqHKBc3dH0UfgEAU24xnJ8F0uow5mj17UeBEOI6o3CF2k7Mhw==",
"dependencies": {
- "@smithy/types": "^2.8.0",
+ "@smithy/types": "^2.9.1",
"tslib": "^2.5.0"
},
"engines": {
@@ -3045,11 +3590,11 @@
}
},
"node_modules/@smithy/protocol-http": {
- "version": "3.0.12",
- "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.0.12.tgz",
- "integrity": "sha512-Xz4iaqLiaBfbQpB9Hgi3VcZYbP7xRDXYhd8XWChh4v94uw7qwmvlxdU5yxzfm6ACJM66phHrTbS5TVvj5uQ72w==",
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-3.1.1.tgz",
+ "integrity": "sha512-6ZRTSsaXuSL9++qEwH851hJjUA0OgXdQFCs+VDw4tGH256jQ3TjYY/i34N4vd24RV3nrjNsgd1yhb57uMoKbzQ==",
"dependencies": {
- "@smithy/types": "^2.8.0",
+ "@smithy/types": "^2.9.1",
"tslib": "^2.5.0"
},
"engines": {
@@ -3057,12 +3602,12 @@
}
},
"node_modules/@smithy/querystring-builder": {
- "version": "2.0.16",
- "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.0.16.tgz",
- "integrity": "sha512-Q/GsJT0C0mijXMRs7YhZLLCP5FcuC4797lYjKQkME5CZohnLC4bEhylAd2QcD3gbMKNjCw8+T2I27WKiV/wToA==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-2.1.1.tgz",
+ "integrity": "sha512-C/ko/CeEa8jdYE4gt6nHO5XDrlSJ3vdCG0ZAc6nD5ZIE7LBp0jCx4qoqp7eoutBu7VrGMXERSRoPqwi1WjCPbg==",
"dependencies": {
- "@smithy/types": "^2.8.0",
- "@smithy/util-uri-escape": "^2.0.0",
+ "@smithy/types": "^2.9.1",
+ "@smithy/util-uri-escape": "^2.1.1",
"tslib": "^2.5.0"
},
"engines": {
@@ -3070,11 +3615,11 @@
}
},
"node_modules/@smithy/querystring-parser": {
- "version": "2.0.16",
- "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.0.16.tgz",
- "integrity": "sha512-c4ueAuL6BDYKWpkubjrQthZKoC3L5kql5O++ovekNxiexRXTlLIVlCR4q3KziOktLIw66EU9SQljPXd/oN6Okg==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-2.1.1.tgz",
+ "integrity": "sha512-H4+6jKGVhG1W4CIxfBaSsbm98lOO88tpDWmZLgkJpt8Zkk/+uG0FmmqMuCAc3HNM2ZDV+JbErxr0l5BcuIf/XQ==",
"dependencies": {
- "@smithy/types": "^2.8.0",
+ "@smithy/types": "^2.9.1",
"tslib": "^2.5.0"
},
"engines": {
@@ -3082,22 +3627,22 @@
}
},
"node_modules/@smithy/service-error-classification": {
- "version": "2.0.9",
- "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.0.9.tgz",
- "integrity": "sha512-0K+8GvtwI7VkGmmInPydM2XZyBfIqLIbfR7mDQ+oPiz8mIinuHbV6sxOLdvX1Jv/myk7XTK9orgt3tuEpBu/zg==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-2.1.1.tgz",
+ "integrity": "sha512-txEdZxPUgM1PwGvDvHzqhXisrc5LlRWYCf2yyHfvITWioAKat7srQvpjMAvgzf0t6t7j8yHrryXU9xt7RZqFpw==",
"dependencies": {
- "@smithy/types": "^2.8.0"
+ "@smithy/types": "^2.9.1"
},
"engines": {
"node": ">=14.0.0"
}
},
"node_modules/@smithy/shared-ini-file-loader": {
- "version": "2.2.8",
- "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.2.8.tgz",
- "integrity": "sha512-E62byatbwSWrtq9RJ7xN40tqrRKDGrEL4EluyNpaIDvfvet06a/QC58oHw2FgVaEgkj0tXZPjZaKrhPfpoU0qw==",
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-2.3.1.tgz",
+ "integrity": "sha512-2E2kh24igmIznHLB6H05Na4OgIEilRu0oQpYXo3LCNRrawHAcfDKq9004zJs+sAMt2X5AbY87CUCJ7IpqpSgdw==",
"dependencies": {
- "@smithy/types": "^2.8.0",
+ "@smithy/types": "^2.9.1",
"tslib": "^2.5.0"
},
"engines": {
@@ -3105,17 +3650,17 @@
}
},
"node_modules/@smithy/signature-v4": {
- "version": "2.0.19",
- "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-2.0.19.tgz",
- "integrity": "sha512-nwc3JihdM+kcJjtORv/n7qRHN2Kfh7S2RJI2qr8pz9UcY5TD8rSCRGQ0g81HgyS3jZ5X9U/L4p014P3FonBPhg==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-2.1.1.tgz",
+ "integrity": "sha512-Hb7xub0NHuvvQD3YwDSdanBmYukoEkhqBjqoxo+bSdC0ryV9cTfgmNjuAQhTPYB6yeU7hTR+sPRiFMlxqv6kmg==",
"dependencies": {
- "@smithy/eventstream-codec": "^2.0.16",
- "@smithy/is-array-buffer": "^2.0.0",
- "@smithy/types": "^2.8.0",
- "@smithy/util-hex-encoding": "^2.0.0",
- "@smithy/util-middleware": "^2.0.9",
- "@smithy/util-uri-escape": "^2.0.0",
- "@smithy/util-utf8": "^2.0.2",
+ "@smithy/eventstream-codec": "^2.1.1",
+ "@smithy/is-array-buffer": "^2.1.1",
+ "@smithy/types": "^2.9.1",
+ "@smithy/util-hex-encoding": "^2.1.1",
+ "@smithy/util-middleware": "^2.1.1",
+ "@smithy/util-uri-escape": "^2.1.1",
+ "@smithy/util-utf8": "^2.1.1",
"tslib": "^2.5.0"
},
"engines": {
@@ -3123,15 +3668,15 @@
}
},
"node_modules/@smithy/smithy-client": {
- "version": "2.2.1",
- "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.2.1.tgz",
- "integrity": "sha512-SpD7FLK92XV2fon2hMotaNDa2w5VAy5/uVjP9WFmjGSgWM8pTPVkHcDl1yFs5Z8LYbij0FSz+DbCBK6i+uXXUA==",
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-2.3.1.tgz",
+ "integrity": "sha512-YsTdU8xVD64r2pLEwmltrNvZV6XIAC50LN6ivDopdt+YiF/jGH6PY9zUOu0CXD/d8GMB8gbhnpPsdrjAXHS9QA==",
"dependencies": {
- "@smithy/middleware-endpoint": "^2.3.0",
- "@smithy/middleware-stack": "^2.0.10",
- "@smithy/protocol-http": "^3.0.12",
- "@smithy/types": "^2.8.0",
- "@smithy/util-stream": "^2.0.24",
+ "@smithy/middleware-endpoint": "^2.4.1",
+ "@smithy/middleware-stack": "^2.1.1",
+ "@smithy/protocol-http": "^3.1.1",
+ "@smithy/types": "^2.9.1",
+ "@smithy/util-stream": "^2.1.1",
"tslib": "^2.5.0"
},
"engines": {
@@ -3139,9 +3684,9 @@
}
},
"node_modules/@smithy/types": {
- "version": "2.8.0",
- "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.8.0.tgz",
- "integrity": "sha512-h9sz24cFgt/W1Re22OlhQKmUZkNh244ApgRsUDYinqF8R+QgcsBIX344u2j61TPshsTz3CvL6HYU1DnQdsSrHA==",
+ "version": "2.9.1",
+ "resolved": "https://registry.npmjs.org/@smithy/types/-/types-2.9.1.tgz",
+ "integrity": "sha512-vjXlKNXyprDYDuJ7UW5iobdmyDm6g8dDG+BFUncAg/3XJaN45Gy5RWWWUVgrzIK7S4R1KWgIX5LeJcfvSI24bw==",
"dependencies": {
"tslib": "^2.5.0"
},
@@ -3150,21 +3695,21 @@
}
},
"node_modules/@smithy/url-parser": {
- "version": "2.0.16",
- "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.0.16.tgz",
- "integrity": "sha512-Wfz5WqAoRT91TjRy1JeLR0fXtkIXHGsMbgzKFTx7E68SrZ55TB8xoG+vm11Ru4gheFTMXjAjwAxv1jQdC+pAQA==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-2.1.1.tgz",
+ "integrity": "sha512-qC9Bv8f/vvFIEkHsiNrUKYNl8uKQnn4BdhXl7VzQRP774AwIjiSMMwkbT+L7Fk8W8rzYVifzJNYxv1HwvfBo3Q==",
"dependencies": {
- "@smithy/querystring-parser": "^2.0.16",
- "@smithy/types": "^2.8.0",
+ "@smithy/querystring-parser": "^2.1.1",
+ "@smithy/types": "^2.9.1",
"tslib": "^2.5.0"
}
},
"node_modules/@smithy/util-base64": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-2.0.1.tgz",
- "integrity": "sha512-DlI6XFYDMsIVN+GH9JtcRp3j02JEVuWIn/QOZisVzpIAprdsxGveFed0bjbMRCqmIFe8uetn5rxzNrBtIGrPIQ==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/util-base64/-/util-base64-2.1.1.tgz",
+ "integrity": "sha512-UfHVpY7qfF/MrgndI5PexSKVTxSZIdz9InghTFa49QOvuu9I52zLPLUHXvHpNuMb1iD2vmc6R+zbv/bdMipR/g==",
"dependencies": {
- "@smithy/util-buffer-from": "^2.0.0",
+ "@smithy/util-buffer-from": "^2.1.1",
"tslib": "^2.5.0"
},
"engines": {
@@ -3172,17 +3717,17 @@
}
},
"node_modules/@smithy/util-body-length-browser": {
- "version": "2.0.1",
- "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-2.0.1.tgz",
- "integrity": "sha512-NXYp3ttgUlwkaug4bjBzJ5+yIbUbUx8VsSLuHZROQpoik+gRkIBeEG9MPVYfvPNpuXb/puqodeeUXcKFe7BLOQ==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/util-body-length-browser/-/util-body-length-browser-2.1.1.tgz",
+ "integrity": "sha512-ekOGBLvs1VS2d1zM2ER4JEeBWAvIOUKeaFch29UjjJsxmZ/f0L3K3x0dEETgh3Q9bkZNHgT+rkdl/J/VUqSRag==",
"dependencies": {
"tslib": "^2.5.0"
}
},
"node_modules/@smithy/util-body-length-node": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-2.1.0.tgz",
- "integrity": "sha512-/li0/kj/y3fQ3vyzn36NTLGmUwAICb7Jbe/CsWCktW363gh1MOcpEcSO3mJ344Gv2dqz8YJCLQpb6hju/0qOWw==",
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/@smithy/util-body-length-node/-/util-body-length-node-2.2.1.tgz",
+ "integrity": "sha512-/ggJG+ta3IDtpNVq4ktmEUtOkH1LW64RHB5B0hcr5ZaWBmo96UX2cIOVbjCqqDickTXqBWZ4ZO0APuaPrD7Abg==",
"dependencies": {
"tslib": "^2.5.0"
},
@@ -3191,11 +3736,11 @@
}
},
"node_modules/@smithy/util-buffer-from": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.0.0.tgz",
- "integrity": "sha512-/YNnLoHsR+4W4Vf2wL5lGv0ksg8Bmk3GEGxn2vEQt52AQaPSCuaO5PM5VM7lP1K9qHRKHwrPGktqVoAHKWHxzw==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/util-buffer-from/-/util-buffer-from-2.1.1.tgz",
+ "integrity": "sha512-clhNjbyfqIv9Md2Mg6FffGVrJxw7bgK7s3Iax36xnfVj6cg0fUG7I4RH0XgXJF8bxi+saY5HR21g2UPKSxVCXg==",
"dependencies": {
- "@smithy/is-array-buffer": "^2.0.0",
+ "@smithy/is-array-buffer": "^2.1.1",
"tslib": "^2.5.0"
},
"engines": {
@@ -3203,9 +3748,9 @@
}
},
"node_modules/@smithy/util-config-provider": {
- "version": "2.1.0",
- "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-2.1.0.tgz",
- "integrity": "sha512-S6V0JvvhQgFSGLcJeT1CBsaTR03MM8qTuxMH9WPCCddlSo2W0V5jIHimHtIQALMLEDPGQ0ROSRr/dU0O+mxiQg==",
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/@smithy/util-config-provider/-/util-config-provider-2.2.1.tgz",
+ "integrity": "sha512-50VL/tx9oYYcjJn/qKqNy7sCtpD0+s8XEBamIFo4mFFTclKMNp+rsnymD796uybjiIquB7VCB/DeafduL0y2kw==",
"dependencies": {
"tslib": "^2.5.0"
},
@@ -3214,13 +3759,13 @@
}
},
"node_modules/@smithy/util-defaults-mode-browser": {
- "version": "2.0.24",
- "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.0.24.tgz",
- "integrity": "sha512-TsP5mBuLgO2C21+laNG2nHYZEyUdkbGURv2tHvSuQQxLz952MegX95uwdxOY2jR2H4GoKuVRfdJq7w4eIjGYeg==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-2.1.1.tgz",
+ "integrity": "sha512-lqLz/9aWRO6mosnXkArtRuQqqZBhNpgI65YDpww4rVQBuUT7qzKbDLG5AmnQTCiU4rOquaZO/Kt0J7q9Uic7MA==",
"dependencies": {
- "@smithy/property-provider": "^2.0.17",
- "@smithy/smithy-client": "^2.2.1",
- "@smithy/types": "^2.8.0",
+ "@smithy/property-provider": "^2.1.1",
+ "@smithy/smithy-client": "^2.3.1",
+ "@smithy/types": "^2.9.1",
"bowser": "^2.11.0",
"tslib": "^2.5.0"
},
@@ -3229,16 +3774,16 @@
}
},
"node_modules/@smithy/util-defaults-mode-node": {
- "version": "2.0.32",
- "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.0.32.tgz",
- "integrity": "sha512-d0S33dXA2cq1NyorVMroMrEtqKMr3MlyLITcfTBf9pXiigYiPMOtbSI7czHIfDbuVuM89Cg0urAgpt73QV9mPQ==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-2.1.1.tgz",
+ "integrity": "sha512-tYVrc+w+jSBfBd267KDnvSGOh4NMz+wVH7v4CClDbkdPfnjvImBZsOURncT5jsFwR9KCuDyPoSZq4Pa6+eCUrA==",
"dependencies": {
- "@smithy/config-resolver": "^2.0.23",
- "@smithy/credential-provider-imds": "^2.1.5",
- "@smithy/node-config-provider": "^2.1.9",
- "@smithy/property-provider": "^2.0.17",
- "@smithy/smithy-client": "^2.2.1",
- "@smithy/types": "^2.8.0",
+ "@smithy/config-resolver": "^2.1.1",
+ "@smithy/credential-provider-imds": "^2.2.1",
+ "@smithy/node-config-provider": "^2.2.1",
+ "@smithy/property-provider": "^2.1.1",
+ "@smithy/smithy-client": "^2.3.1",
+ "@smithy/types": "^2.9.1",
"tslib": "^2.5.0"
},
"engines": {
@@ -3246,12 +3791,12 @@
}
},
"node_modules/@smithy/util-endpoints": {
- "version": "1.0.8",
- "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-1.0.8.tgz",
- "integrity": "sha512-l8zVuyZZ61IzZBYp5NWvsAhbaAjYkt0xg9R4xUASkg5SEeTT2meHOJwJHctKMFUXe4QZbn9fR2MaBYjP2119+w==",
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-1.1.1.tgz",
+ "integrity": "sha512-sI4d9rjoaekSGEtq3xSb2nMjHMx8QXcz2cexnVyRWsy4yQ9z3kbDpX+7fN0jnbdOp0b3KSTZJZ2Yb92JWSanLw==",
"dependencies": {
- "@smithy/node-config-provider": "^2.1.9",
- "@smithy/types": "^2.8.0",
+ "@smithy/node-config-provider": "^2.2.1",
+ "@smithy/types": "^2.9.1",
"tslib": "^2.5.0"
},
"engines": {
@@ -3259,9 +3804,9 @@
}
},
"node_modules/@smithy/util-hex-encoding": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-2.0.0.tgz",
- "integrity": "sha512-c5xY+NUnFqG6d7HFh1IFfrm3mGl29lC+vF+geHv4ToiuJCBmIfzx6IeHLg+OgRdPFKDXIw6pvi+p3CsscaMcMA==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/util-hex-encoding/-/util-hex-encoding-2.1.1.tgz",
+ "integrity": "sha512-3UNdP2pkYUUBGEXzQI9ODTDK+Tcu1BlCyDBaRHwyxhA+8xLP8agEKQq4MGmpjqb4VQAjq9TwlCQX0kP6XDKYLg==",
"dependencies": {
"tslib": "^2.5.0"
},
@@ -3270,11 +3815,11 @@
}
},
"node_modules/@smithy/util-middleware": {
- "version": "2.0.9",
- "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.0.9.tgz",
- "integrity": "sha512-PnCnBJ07noMX1lMDTEefmxSlusWJUiLfrme++MfK5TD0xz8NYmakgoXy5zkF/16zKGmiwOeKAztWT/Vjk1KRIQ==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-2.1.1.tgz",
+ "integrity": "sha512-mKNrk8oz5zqkNcbcgAAepeJbmfUW6ogrT2Z2gDbIUzVzNAHKJQTYmH9jcy0jbWb+m7ubrvXKb6uMjkSgAqqsFA==",
"dependencies": {
- "@smithy/types": "^2.8.0",
+ "@smithy/types": "^2.9.1",
"tslib": "^2.5.0"
},
"engines": {
@@ -3282,12 +3827,12 @@
}
},
"node_modules/@smithy/util-retry": {
- "version": "2.0.9",
- "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-2.0.9.tgz",
- "integrity": "sha512-46BFWe9RqB6g7f4mxm3W3HlqknqQQmWHKlhoqSFZuGNuiDU5KqmpebMbvC3tjTlUkqn4xa2Z7s3Hwb0HNs5scw==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-2.1.1.tgz",
+ "integrity": "sha512-Mg+xxWPTeSPrthpC5WAamJ6PW4Kbo01Fm7lWM1jmGRvmrRdsd3192Gz2fBXAMURyXpaNxyZf6Hr/nQ4q70oVEA==",
"dependencies": {
- "@smithy/service-error-classification": "^2.0.9",
- "@smithy/types": "^2.8.0",
+ "@smithy/service-error-classification": "^2.1.1",
+ "@smithy/types": "^2.9.1",
"tslib": "^2.5.0"
},
"engines": {
@@ -3295,17 +3840,17 @@
}
},
"node_modules/@smithy/util-stream": {
- "version": "2.0.24",
- "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.0.24.tgz",
- "integrity": "sha512-hRpbcRrOxDriMVmbya+Mv77VZVupxRAsfxVDKS54XuiURhdiwCUXJP0X1iJhHinuUf6n8pBF0MkG9C8VooMnWw==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-2.1.1.tgz",
+ "integrity": "sha512-J7SMIpUYvU4DQN55KmBtvaMc7NM3CZ2iWICdcgaovtLzseVhAqFRYqloT3mh0esrFw+3VEK6nQFteFsTqZSECQ==",
"dependencies": {
- "@smithy/fetch-http-handler": "^2.3.2",
- "@smithy/node-http-handler": "^2.2.2",
- "@smithy/types": "^2.8.0",
- "@smithy/util-base64": "^2.0.1",
- "@smithy/util-buffer-from": "^2.0.0",
- "@smithy/util-hex-encoding": "^2.0.0",
- "@smithy/util-utf8": "^2.0.2",
+ "@smithy/fetch-http-handler": "^2.4.1",
+ "@smithy/node-http-handler": "^2.3.1",
+ "@smithy/types": "^2.9.1",
+ "@smithy/util-base64": "^2.1.1",
+ "@smithy/util-buffer-from": "^2.1.1",
+ "@smithy/util-hex-encoding": "^2.1.1",
+ "@smithy/util-utf8": "^2.1.1",
"tslib": "^2.5.0"
},
"engines": {
@@ -3313,9 +3858,9 @@
}
},
"node_modules/@smithy/util-uri-escape": {
- "version": "2.0.0",
- "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-2.0.0.tgz",
- "integrity": "sha512-ebkxsqinSdEooQduuk9CbKcI+wheijxEb3utGXkCoYQkJnwTnLbH1JXGimJtUkQwNQbsbuYwG2+aFVyZf5TLaw==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-2.1.1.tgz",
+ "integrity": "sha512-saVzI1h6iRBUVSqtnlOnc9ssU09ypo7n+shdQ8hBTZno/9rZ3AuRYvoHInV57VF7Qn7B+pFJG7qTzFiHxWlWBw==",
"dependencies": {
"tslib": "^2.5.0"
},
@@ -3324,11 +3869,11 @@
}
},
"node_modules/@smithy/util-utf8": {
- "version": "2.0.2",
- "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.0.2.tgz",
- "integrity": "sha512-qOiVORSPm6Ce4/Yu6hbSgNHABLP2VMv8QOC3tTDNHHlWY19pPyc++fBTbZPtx6egPXi4HQxKDnMxVxpbtX2GoA==",
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@smithy/util-utf8/-/util-utf8-2.1.1.tgz",
+ "integrity": "sha512-BqTpzYEcUMDwAKr7/mVRUtHDhs6ZoXDi9NypMvMfOr/+u1NW7JgqodPDECiiLboEm6bobcPcECxzjtQh865e9A==",
"dependencies": {
- "@smithy/util-buffer-from": "^2.0.0",
+ "@smithy/util-buffer-from": "^2.1.1",
"tslib": "^2.5.0"
},
"engines": {
@@ -5688,6 +6233,30 @@
"url": "https://github.com/motdotla/dotenv?sponsor=1"
}
},
+ "node_modules/duplexify": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.2.tgz",
+ "integrity": "sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw==",
+ "dependencies": {
+ "end-of-stream": "^1.4.1",
+ "inherits": "^2.0.3",
+ "readable-stream": "^3.1.1",
+ "stream-shift": "^1.0.0"
+ }
+ },
+ "node_modules/duplexify/node_modules/readable-stream": {
+ "version": "3.6.2",
+ "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
+ "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
+ "dependencies": {
+ "inherits": "^2.0.3",
+ "string_decoder": "^1.1.1",
+ "util-deprecate": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
"node_modules/eastasianwidth": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
@@ -9232,6 +9801,17 @@
"node": ">=6"
}
},
+ "node_modules/p-throttle": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/p-throttle/-/p-throttle-5.1.0.tgz",
+ "integrity": "sha512-+N+s2g01w1Zch4D0K3OpnPDqLOKmLcQ4BvIFq3JC0K29R28vUOjWpO+OJZBNt8X9i3pFCksZJZ0YXkUGjaFE6g==",
+ "engines": {
+ "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
"node_modules/p-try": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
@@ -11231,6 +11811,11 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/stream-shift": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.3.tgz",
+ "integrity": "sha512-76ORR0DO1o1hlKwTbi/DM3EXWGf3ZJYO8cXX5RJwnul2DEg2oyoZyjLNoQM8WsvZiFKCRfC1O0J7iCvie3RZmQ=="
+ },
"node_modules/string_decoder": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz",
diff --git a/backend/package.json b/backend/package.json
index 22311f7ae..d379d54a8 100644
--- a/backend/package.json
+++ b/backend/package.json
@@ -81,6 +81,7 @@
"@node-saml/passport-saml": "^4.0.4",
"@octokit/rest": "^20.0.2",
"@octokit/webhooks-types": "^7.3.1",
+ "@serdnam/pino-cloudwatch-transport": "^1.0.4",
"@sindresorhus/slugify": "^2.2.1",
"@ucast/mongo2js": "^1.3.4",
"ajv": "^8.12.0",
diff --git a/backend/src/db/schemas/secret-versions.ts b/backend/src/db/schemas/secret-versions.ts
index 3a04a8cd9..d1675e3d2 100644
--- a/backend/src/db/schemas/secret-versions.ts
+++ b/backend/src/db/schemas/secret-versions.ts
@@ -10,8 +10,8 @@ import { TImmutableDBKeys } from "./models";
export const SecretVersionsSchema = z.object({
id: z.string().uuid(),
version: z.number().default(1),
- type: z.string().default('shared'),
- secretBlindIndex: z.string(),
+ type: z.string().default("shared"),
+ secretBlindIndex: z.string().nullable().optional(),
secretKeyCiphertext: z.string(),
secretKeyIV: z.string(),
secretKeyTag: z.string(),
@@ -24,15 +24,15 @@ export const SecretVersionsSchema = z.object({
secretReminderNote: z.string().nullable().optional(),
secretReminderRepeatDays: z.number().nullable().optional(),
skipMultilineEncoding: z.boolean().default(false).nullable().optional(),
- algorithm: z.string().default('aes-256-gcm'),
- keyEncoding: z.string().default('utf8'),
+ algorithm: z.string().default("aes-256-gcm"),
+ keyEncoding: z.string().default("utf8"),
metadata: z.unknown().nullable().optional(),
envId: z.string().uuid().nullable().optional(),
secretId: z.string().uuid(),
folderId: z.string().uuid(),
userId: z.string().uuid().nullable().optional(),
createdAt: z.date(),
- updatedAt: z.date(),
+ updatedAt: z.date()
});
export type TSecretVersions = z.infer;
diff --git a/backend/src/db/schemas/secrets.ts b/backend/src/db/schemas/secrets.ts
index a284ae770..3fe5ad8d8 100644
--- a/backend/src/db/schemas/secrets.ts
+++ b/backend/src/db/schemas/secrets.ts
@@ -10,8 +10,8 @@ import { TImmutableDBKeys } from "./models";
export const SecretsSchema = z.object({
id: z.string().uuid(),
version: z.number().default(1),
- type: z.string().default('shared'),
- secretBlindIndex: z.string(),
+ type: z.string().default("shared"),
+ secretBlindIndex: z.string().nullable().optional(),
secretKeyCiphertext: z.string(),
secretKeyIV: z.string(),
secretKeyTag: z.string(),
@@ -24,13 +24,13 @@ export const SecretsSchema = z.object({
secretReminderNote: z.string().nullable().optional(),
secretReminderRepeatDays: z.number().nullable().optional(),
skipMultilineEncoding: z.boolean().default(false).nullable().optional(),
- algorithm: z.string().default('aes-256-gcm'),
- keyEncoding: z.string().default('utf8'),
+ algorithm: z.string().default("aes-256-gcm"),
+ keyEncoding: z.string().default("utf8"),
metadata: z.unknown().nullable().optional(),
userId: z.string().uuid().nullable().optional(),
folderId: z.string().uuid(),
createdAt: z.date(),
- updatedAt: z.date(),
+ updatedAt: z.date()
});
export type TSecrets = z.infer;
diff --git a/backend/src/ee/services/secret-approval-request/secret-approval-request-service.ts b/backend/src/ee/services/secret-approval-request/secret-approval-request-service.ts
index 4809bd846..9680a6271 100644
--- a/backend/src/ee/services/secret-approval-request/secret-approval-request-service.ts
+++ b/backend/src/ee/services/secret-approval-request/secret-approval-request-service.ts
@@ -499,7 +499,10 @@ export const secretApprovalRequestServiceFactory = ({
blindIndexCfg
});
- const secsGroupedByBlindIndex = groupBy(secretsToBeUpdated, (el) => el.secretBlindIndex);
+ const secsGroupedByBlindIndex = groupBy(
+ secretsToBeUpdated,
+ (el) => el.secretBlindIndex as string
+ );
const updatedSecretIds = updatedSecrets.map(
(el) => secsGroupedByBlindIndex[keyName2BlindIndex[el.secretName]][0].id
);
@@ -540,7 +543,11 @@ export const secretApprovalRequestServiceFactory = ({
isNew: false,
blindIndexCfg
});
- const secretsGroupedByBlindIndex = groupBy(secrets, (i) => i.secretBlindIndex);
+ const secretsGroupedByBlindIndex = groupBy(secrets, (i) => {
+ if (!i.secretBlindIndex)
+ throw new BadRequestError({ message: "Missing secret blind index" });
+ return i.secretBlindIndex;
+ });
const deletedSecretIds = deletedSecrets.map(
(el) => secretsGroupedByBlindIndex[keyName2BlindIndex[el.secretName]][0].id
);
@@ -551,9 +558,12 @@ export const secretApprovalRequestServiceFactory = ({
commits.push(
...deletedSecrets.map((el) => {
const secretId = secretsGroupedByBlindIndex[keyName2BlindIndex[el.secretName]][0].id;
+ if (!latestSecretVersions[secretId].secretBlindIndex)
+ throw new BadRequestError({ message: "Failed to find secret blind index" });
return {
op: CommitType.Delete as const,
...latestSecretVersions[secretId],
+ secretBlindIndex: latestSecretVersions[secretId].secretBlindIndex as string,
secret: secretId,
secretVersion: latestSecretVersions[secretId].id
};
diff --git a/backend/src/ee/services/secret-rotation/secret-rotation-queue/secret-rotation-queue.ts b/backend/src/ee/services/secret-rotation/secret-rotation-queue/secret-rotation-queue.ts
index 441e890d9..5c4dc5e30 100644
--- a/backend/src/ee/services/secret-rotation/secret-rotation-queue/secret-rotation-queue.ts
+++ b/backend/src/ee/services/secret-rotation/secret-rotation-queue/secret-rotation-queue.ts
@@ -34,6 +34,7 @@ import {
TSecretRotationDbFn,
TSecretRotationEncData
} from "./secret-rotation-queue-types";
+import { BadRequestError } from "@app/lib/errors";
export type TSecretRotationQueueFactory = ReturnType;
@@ -259,10 +260,14 @@ export const secretRotationQueueFactory = ({
tx
);
await secretVersionDAL.insertMany(
- updatedSecrets.map(({ id, updatedAt, createdAt, ...el }) => ({
- ...el,
- secretId: id
- })),
+ updatedSecrets.map(({ id, updatedAt, createdAt, ...el }) => {
+ if (!el.secretBlindIndex) throw new BadRequestError({ message: "Missing blind index" });
+ return {
+ ...el,
+ secretId: id,
+ secretBlindIndex: el.secretBlindIndex as string
+ };
+ }),
tx
);
});
diff --git a/backend/src/services/secret/secret-service.ts b/backend/src/services/secret/secret-service.ts
index dd5c8ea71..2e716df50 100644
--- a/backend/src/services/secret/secret-service.ts
+++ b/backend/src/services/secret/secret-service.ts
@@ -116,18 +116,22 @@ export const secretServiceFactory = ({
inputSecrets.map(({ tags, ...el }) => ({ ...el, folderId })),
tx
);
- const newSecretGroupByBlindIndex = groupBy(newSecrets, (item) => item.secretBlindIndex);
+ const newSecretGroupByBlindIndex = groupBy(
+ newSecrets,
+ (item) => item.secretBlindIndex as string
+ );
const newSecretTags = inputSecrets.flatMap(({ tags: secretTags = [], secretBlindIndex }) =>
secretTags.map((tag) => ({
[`${TableName.SecretTag}Id` as const]: tag,
- [`${TableName.Secret}Id` as const]: newSecretGroupByBlindIndex[secretBlindIndex][0].id
+ [`${TableName.Secret}Id` as const]:
+ newSecretGroupByBlindIndex[secretBlindIndex as string][0].id
}))
);
const secretVersions = await secretVersionDAL.insertMany(
inputSecrets.map(({ tags, ...el }) => ({
...el,
folderId,
- secretId: newSecretGroupByBlindIndex[el.secretBlindIndex][0].id
+ secretId: newSecretGroupByBlindIndex[el.secretBlindIndex as string][0].id
})),
tx
);
@@ -269,7 +273,9 @@ export const secretServiceFactory = ({
if (isNew) {
if (secrets.length) throw new BadRequestError({ message: "Secret already exist" });
} else if (secrets.length !== inputSecrets.length)
- throw new BadRequestError({ message: `Secret not found: blind index ${JSON.stringify(keyName2BlindIndex)}` });
+ throw new BadRequestError({
+ message: `Secret not found: blind index ${JSON.stringify(keyName2BlindIndex)}`
+ });
return { blindIndex2KeyName, keyName2BlindIndex, secrets };
};
@@ -292,7 +298,7 @@ export const secretServiceFactory = ({
})),
userId
);
- const secsGroupedByBlindIndex = groupBy(secrets, (i) => i.secretBlindIndex);
+ const secsGroupedByBlindIndex = groupBy(secrets, (i) => i.secretBlindIndex as string);
return { secsGroupedByBlindIndex, secrets };
};
From 74ac75b878bbc8c52dada0810ca357d64f18ba2c Mon Sep 17 00:00:00 2001
From: Tuan Dang
Date: Mon, 29 Jan 2024 16:37:31 +0700
Subject: [PATCH 025/178] Remove async from isSamePath check in integration
sync
---
backend/src/lib/fn/string.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backend/src/lib/fn/string.ts b/backend/src/lib/fn/string.ts
index 2d7466c35..c3651fd4e 100644
--- a/backend/src/lib/fn/string.ts
+++ b/backend/src/lib/fn/string.ts
@@ -2,7 +2,7 @@ import path from "path";
// given two paths irrespective of ending with / or not
// this will return true if its equal
-export const isSamePath = async (from: string, to: string) => !path.relative(from, to);
+export const isSamePath = (from: string, to: string) => !path.relative(from, to);
export const removeTrailingSlash = (str: string) => {
if (str === "/") return str;
From d62e1c3703ef92a36ba89ce7087ed27d75f116c8 Mon Sep 17 00:00:00 2001
From: Tuan Dang
Date: Mon, 29 Jan 2024 16:51:38 +0700
Subject: [PATCH 026/178] Bump Cloudflare IP priority
---
backend/src/server/plugins/ip.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/backend/src/server/plugins/ip.ts b/backend/src/server/plugins/ip.ts
index d43bf8d70..b3c8171af 100644
--- a/backend/src/server/plugins/ip.ts
+++ b/backend/src/server/plugins/ip.ts
@@ -3,10 +3,10 @@ import fp from "fastify-plugin";
/*! https://github.com/pbojinov/request-ip/blob/9501cdf6e73059cc70fc6890adb086348d7cca46/src/index.js.
MIT License. 2022 Petar Bojinov - petarbojinov+github@gmail.com */
const headersOrder = [
- "x-client-ip", // Most common
- "x-forwarded-for", // Mostly used by proxies
"cf-connecting-ip", // Cloudflare
"Cf-Pseudo-IPv4", // Cloudflare
+ "x-client-ip", // Most common
+ "x-forwarded-for", // Mostly used by proxies
"fastly-client-ip",
"true-client-ip", // Akamai and Cloudflare
"x-real-ip", // Nginx
From 5239836e0fc3f7c2cc744ba97ab5bdb4577f2771 Mon Sep 17 00:00:00 2001
From: Maidul Islam
Date: Mon, 29 Jan 2024 05:28:14 -0500
Subject: [PATCH 027/178] set source map to inline
---
backend/tsup.config.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/backend/tsup.config.js b/backend/tsup.config.js
index 2cc687afc..f758e749c 100644
--- a/backend/tsup.config.js
+++ b/backend/tsup.config.js
@@ -9,5 +9,6 @@ export default defineConfig({
},
external: ["../../../frontend/node_modules/next/dist/server/next-server.js"],
outDir: "dist",
- entry: ["./src"]
+ entry: ["./src"],
+ sourceMap: "inline"
});
From 2a3f136b68f64cbae3f665d034dfcf9ef889b645 Mon Sep 17 00:00:00 2001
From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com>
Date: Mon, 29 Jan 2024 14:31:55 +0400
Subject: [PATCH 028/178] Schemas
---
backend/src/db/schemas/identity-access-tokens.ts | 2 +-
backend/src/db/schemas/organizations.ts | 2 +-
backend/src/db/schemas/secret-approval-requests-secrets.ts | 2 +-
backend/src/db/schemas/user-encryption-keys.ts | 6 +++---
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/backend/src/db/schemas/identity-access-tokens.ts b/backend/src/db/schemas/identity-access-tokens.ts
index 62f74f4aa..d36291ab9 100644
--- a/backend/src/db/schemas/identity-access-tokens.ts
+++ b/backend/src/db/schemas/identity-access-tokens.ts
@@ -8,7 +8,7 @@ import { z } from "zod";
import { TImmutableDBKeys } from "./models";
export const IdentityAccessTokensSchema = z.object({
- id: z.string().uuid(),
+ id: z.string(),
accessTokenTTL: z.coerce.number().default(2592000),
accessTokenMaxTTL: z.coerce.number().default(2592000),
accessTokenNumUses: z.coerce.number().default(0),
diff --git a/backend/src/db/schemas/organizations.ts b/backend/src/db/schemas/organizations.ts
index e0f70d1c0..539217c00 100644
--- a/backend/src/db/schemas/organizations.ts
+++ b/backend/src/db/schemas/organizations.ts
@@ -13,7 +13,7 @@ export const OrganizationsSchema = z.object({
customerId: z.string().nullable().optional(),
slug: z.string(),
createdAt: z.date(),
- updatedAt: z.date()
+ updatedAt: z.date(),
});
export type TOrganizations = z.infer;
diff --git a/backend/src/db/schemas/secret-approval-requests-secrets.ts b/backend/src/db/schemas/secret-approval-requests-secrets.ts
index 2fe6c6692..db98bda17 100644
--- a/backend/src/db/schemas/secret-approval-requests-secrets.ts
+++ b/backend/src/db/schemas/secret-approval-requests-secrets.ts
@@ -10,7 +10,7 @@ import { TImmutableDBKeys } from "./models";
export const SecretApprovalRequestsSecretsSchema = z.object({
id: z.string().uuid(),
version: z.number().default(1).nullable().optional(),
- secretBlindIndex: z.string(),
+ secretBlindIndex: z.string().nullable().optional(),
secretKeyCiphertext: z.string(),
secretKeyIV: z.string(),
secretKeyTag: z.string(),
diff --git a/backend/src/db/schemas/user-encryption-keys.ts b/backend/src/db/schemas/user-encryption-keys.ts
index 41a7ae57d..938b93aaf 100644
--- a/backend/src/db/schemas/user-encryption-keys.ts
+++ b/backend/src/db/schemas/user-encryption-keys.ts
@@ -12,9 +12,9 @@ export const UserEncryptionKeysSchema = z.object({
clientPublicKey: z.string().nullable().optional(),
serverPrivateKey: z.string().nullable().optional(),
encryptionVersion: z.number().default(2).nullable().optional(),
- protectedKey: z.string().nullable(),
- protectedKeyIV: z.string().nullable(),
- protectedKeyTag: z.string().nullable(),
+ protectedKey: z.string().nullable().optional(),
+ protectedKeyIV: z.string().nullable().optional(),
+ protectedKeyTag: z.string().nullable().optional(),
publicKey: z.string(),
encryptedPrivateKey: z.string(),
iv: z.string(),
From abd3652910350018c2cd68eba64a02008dd6d0bf Mon Sep 17 00:00:00 2001
From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com>
Date: Mon, 29 Jan 2024 14:33:35 +0400
Subject: [PATCH 029/178] Add user DAL
---
backend/.eslintrc.js | 2 +-
backend/src/server/routes/index.ts | 10 +++++++---
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/backend/.eslintrc.js b/backend/.eslintrc.js
index e9e98bffe..7a3a8d802 100644
--- a/backend/.eslintrc.js
+++ b/backend/.eslintrc.js
@@ -13,7 +13,7 @@ module.exports = {
tsconfigRootDir: __dirname
},
rules: {
- // "@typescript-eslint/no-empty-function": "off",
+ "@typescript-eslint/no-empty-function": "off",
"consistent-return": "off", // my style
"import/order": "off", // for simple-import-order
"import/prefer-default-export": "off", // why
diff --git a/backend/src/server/routes/index.ts b/backend/src/server/routes/index.ts
index 19bf09727..16d32aada 100644
--- a/backend/src/server/routes/index.ts
+++ b/backend/src/server/routes/index.ts
@@ -92,7 +92,10 @@ import { serviceTokenDALFactory } from "@app/services/service-token/service-toke
import { serviceTokenServiceFactory } from "@app/services/service-token/service-token-service";
import { TSmtpService } from "@app/services/smtp/smtp-service";
import { superAdminDALFactory } from "@app/services/super-admin/super-admin-dal";
-import { getServerCfg, superAdminServiceFactory } from "@app/services/super-admin/super-admin-service";
+import {
+ getServerCfg,
+ superAdminServiceFactory
+} from "@app/services/super-admin/super-admin-service";
import { telemetryServiceFactory } from "@app/services/telemetry/telemetry-service";
import { userDALFactory } from "@app/services/user/user-dal";
import { userServiceFactory } from "@app/services/user/user-service";
@@ -420,6 +423,7 @@ export const registerRoutes = async (
const serviceTokenService = serviceTokenServiceFactory({
projectEnvDAL,
serviceTokenDAL,
+ userDAL,
permissionService
});
@@ -516,14 +520,14 @@ export const registerRoutes = async (
},
handler: () => {
const cfg = getConfig();
- const serverCfg = getServerCfg()
+ const serverCfg = getServerCfg();
return {
date: new Date(),
message: "Ok" as const,
emailConfigured: cfg.isSmtpConfigured,
inviteOnlySignup: Boolean(serverCfg.allowSignUp),
redisConfigured: cfg.isRedisConfigured,
- secretScanningConfigured: cfg.isSecretScanningConfigured,
+ secretScanningConfigured: cfg.isSecretScanningConfigured
};
}
});
From fbfe797547c418fb90a36814ee3593cdf45bec09 Mon Sep 17 00:00:00 2001
From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com>
Date: Mon, 29 Jan 2024 14:33:45 +0400
Subject: [PATCH 030/178] Update sanitizedSchemas.ts
---
backend/src/server/routes/sanitizedSchemas.ts | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/backend/src/server/routes/sanitizedSchemas.ts b/backend/src/server/routes/sanitizedSchemas.ts
index cc9dedd45..afc12c081 100644
--- a/backend/src/server/routes/sanitizedSchemas.ts
+++ b/backend/src/server/routes/sanitizedSchemas.ts
@@ -1,6 +1,6 @@
import { z } from "zod";
-import { IntegrationAuthsSchema, SecretApprovalPoliciesSchema } from "@app/db/schemas";
+import { IntegrationAuthsSchema, SecretApprovalPoliciesSchema, UsersSchema } from "@app/db/schemas";
// sometimes the return data must be santizied to avoid leaking important values
// always prefer pick over omit in zod
@@ -28,6 +28,18 @@ export const sapPubSchema = SecretApprovalPoliciesSchema.merge(
})
);
+export const sanitizedServiceTokenUserSchema = UsersSchema.pick({
+ authMethods: true,
+ id: true,
+ createdAt: true,
+ updatedAt: true,
+ devices: true,
+ email: true,
+ firstName: true,
+ lastName: true,
+ mfaMethods: true
+});
+
export const secretRawSchema = z.object({
id: z.string(),
_id: z.string(),
From f335101369c525835a31a8f4679629ef5b0edee3 Mon Sep 17 00:00:00 2001
From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com>
Date: Mon, 29 Jan 2024 14:33:59 +0400
Subject: [PATCH 031/178] Add user
---
.../src/server/routes/v2/service-token-router.ts | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/backend/src/server/routes/v2/service-token-router.ts b/backend/src/server/routes/v2/service-token-router.ts
index 31f5c22d6..3ebce77dc 100644
--- a/backend/src/server/routes/v2/service-token-router.ts
+++ b/backend/src/server/routes/v2/service-token-router.ts
@@ -6,6 +6,8 @@ import { removeTrailingSlash } from "@app/lib/fn";
import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
import { AuthMode } from "@app/services/auth/auth-type";
+import { sanitizedServiceTokenUserSchema } from "../sanitizedSchemas";
+
export const sanitizedServiceTokenSchema = ServiceTokensSchema.omit({
secretHash: true,
encryptedKey: true,
@@ -20,15 +22,21 @@ export const registerServiceTokenRouter = async (server: FastifyZodProvider) =>
onRequest: verifyAuth([AuthMode.SERVICE_TOKEN]),
schema: {
response: {
- 200: ServiceTokensSchema.merge(z.object({ workspace: z.string() }))
+ 200: ServiceTokensSchema.merge(
+ z.object({
+ workspace: z.string(),
+ user: sanitizedServiceTokenUserSchema
+ })
+ )
}
},
handler: async (req) => {
- const serviceTokenData = await server.services.serviceToken.getServiceToken({
+ const { serviceToken, user } = await server.services.serviceToken.getServiceToken({
actorId: req.permission.id,
actor: req.permission.type
});
- return { ...serviceTokenData, workspace: serviceTokenData.projectId };
+
+ return { ...serviceToken, workspace: serviceToken.projectId, user };
}
});
From d5165e50860043b21cd62fbde3d8750f28381f82 Mon Sep 17 00:00:00 2001
From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com>
Date: Mon, 29 Jan 2024 14:34:13 +0400
Subject: [PATCH 032/178] Update secret-router.ts
---
backend/src/server/routes/v3/secret-router.ts | 30 ++++++++++++++++---
1 file changed, 26 insertions(+), 4 deletions(-)
diff --git a/backend/src/server/routes/v3/secret-router.ts b/backend/src/server/routes/v3/secret-router.ts
index cdb92fae6..99dc5ddfb 100644
--- a/backend/src/server/routes/v3/secret-router.ts
+++ b/backend/src/server/routes/v3/secret-router.ts
@@ -442,6 +442,8 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
secrets: SecretsSchema.omit({ secretBlindIndex: true })
.merge(
z.object({
+ workspace: z.string(),
+ environment: z.string(),
tags: SecretTagsSchema.pick({
id: true,
slug: true,
@@ -529,7 +531,12 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
}),
response: {
200: z.object({
- secret: SecretsSchema.omit({ secretBlindIndex: true })
+ secret: SecretsSchema.omit({ secretBlindIndex: true }).merge(
+ z.object({
+ workspace: z.string(),
+ environment: z.string()
+ })
+ )
})
}
},
@@ -610,7 +617,12 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
response: {
200: z.union([
z.object({
- secret: SecretsSchema.omit({ secretBlindIndex: true })
+ secret: SecretsSchema.omit({ secretBlindIndex: true }).merge(
+ z.object({
+ workspace: z.string(),
+ environment: z.string()
+ })
+ )
}),
z
.object({ approval: SecretApprovalRequestsSchema })
@@ -780,7 +792,12 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
response: {
200: z.union([
z.object({
- secret: SecretsSchema.omit({ secretBlindIndex: true })
+ secret: SecretsSchema.omit({ secretBlindIndex: true }).merge(
+ z.object({
+ workspace: z.string(),
+ environment: z.string()
+ })
+ )
}),
z
.object({ approval: SecretApprovalRequestsSchema })
@@ -944,7 +961,12 @@ export const registerSecretRouter = async (server: FastifyZodProvider) => {
response: {
200: z.union([
z.object({
- secret: SecretsSchema.omit({ secretBlindIndex: true })
+ secret: SecretsSchema.omit({ secretBlindIndex: true }).merge(
+ z.object({
+ workspace: z.string(),
+ environment: z.string()
+ })
+ )
}),
z
.object({ approval: SecretApprovalRequestsSchema })
From fc8bd0470fe1d5f82c2dd129669cf48049f2866e Mon Sep 17 00:00:00 2001
From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com>
Date: Mon, 29 Jan 2024 14:34:32 +0400
Subject: [PATCH 033/178] Update service-token-service.ts
---
.../service-token/service-token-service.ts | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/backend/src/services/service-token/service-token-service.ts b/backend/src/services/service-token/service-token-service.ts
index 48ead50e6..09f5e83a0 100644
--- a/backend/src/services/service-token/service-token-service.ts
+++ b/backend/src/services/service-token/service-token-service.ts
@@ -13,6 +13,7 @@ import { BadRequestError, UnauthorizedError } from "@app/lib/errors";
import { ActorType } from "../auth/auth-type";
import { TProjectEnvDALFactory } from "../project-env/project-env-dal";
+import { TUserDALFactory } from "../user/user-dal";
import { TServiceTokenDALFactory } from "./service-token-dal";
import {
TCreateServiceTokenDTO,
@@ -23,6 +24,7 @@ import {
type TServiceTokenServiceFactoryDep = {
serviceTokenDAL: TServiceTokenDALFactory;
+ userDAL: TUserDALFactory;
permissionService: Pick;
projectEnvDAL: Pick;
};
@@ -31,6 +33,7 @@ export type TServiceTokenServiceFactory = ReturnType {
@@ -51,14 +54,14 @@ export const serviceTokenServiceFactory = ({
ProjectPermissionActions.Create,
ProjectPermissionSub.ServiceTokens
);
-
+
scopes.forEach(({ environment, secretPath }) => {
ForbiddenError.from(permission).throwUnlessCan(
ProjectPermissionActions.Create,
subject(ProjectPermissionSub.Secrets, { environment, secretPath })
);
- })
-
+ });
+
const appCfg = getConfig();
// validates env
@@ -119,7 +122,10 @@ export const serviceTokenServiceFactory = ({
const serviceToken = await serviceTokenDAL.findById(actorId);
if (!serviceToken) throw new BadRequestError({ message: "Token not found" });
- return serviceToken;
+ const serviceTokenUser = await userDAL.findById(serviceToken.createdBy);
+ if (!serviceTokenUser) throw new BadRequestError({ message: "Server token user not found" });
+
+ return { serviceToken, user: serviceTokenUser };
};
const getProjectServiceTokens = async ({
From 36a4bf73a608ea93469012ca381cdfcbd603e13a Mon Sep 17 00:00:00 2001
From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com>
Date: Mon, 29 Jan 2024 15:10:55 +0400
Subject: [PATCH 034/178] Types
---
.../secret-approval-request-service.ts | 38 +++++++++++++++----
backend/src/server/routes/v2/mfa-router.ts | 8 +++-
backend/src/server/routes/v3/login-router.ts | 6 +--
3 files changed, 41 insertions(+), 11 deletions(-)
diff --git a/backend/src/ee/services/secret-approval-request/secret-approval-request-service.ts b/backend/src/ee/services/secret-approval-request/secret-approval-request-service.ts
index 9680a6271..81be86304 100644
--- a/backend/src/ee/services/secret-approval-request/secret-approval-request-service.ts
+++ b/backend/src/ee/services/secret-approval-request/secret-approval-request-service.ts
@@ -269,7 +269,14 @@ export const secretApprovalRequestServiceFactory = ({
const { secsGroupedByBlindIndex: conflictGroupByBlindIndex } =
await secretService.fnSecretBlindIndexCheckV2({
folderId,
- inputSecrets: secretCreationCommits.map(({ secretBlindIndex }) => ({ secretBlindIndex }))
+ inputSecrets: secretCreationCommits.map(({ secretBlindIndex }) => {
+ if (!secretBlindIndex) {
+ throw new BadRequestError({
+ message: "Missing secret blind index"
+ });
+ }
+ return { secretBlindIndex };
+ })
});
secretCreationCommits
.filter(({ secretBlindIndex }) => conflictGroupByBlindIndex[secretBlindIndex || ""])
@@ -291,7 +298,14 @@ export const secretApprovalRequestServiceFactory = ({
({ secretBlindIndex, secret }) =>
secret && secret.secretBlindIndex !== secretBlindIndex
)
- .map(({ secretBlindIndex }) => ({ secretBlindIndex }))
+ .map(({ secretBlindIndex }) => {
+ if (!secretBlindIndex) {
+ throw new BadRequestError({
+ message: "Missing secret blind index"
+ });
+ }
+ return { secretBlindIndex };
+ })
});
secretUpdationCommits
.filter(
@@ -381,10 +395,14 @@ export const secretApprovalRequestServiceFactory = ({
folderId,
tx,
actorId: "",
- inputSecrets: secretDeletionCommits.map(({ secretBlindIndex }) => ({
- secretBlindIndex,
- type: SecretType.Shared
- }))
+ inputSecrets: secretDeletionCommits.map(({ secretBlindIndex }) => {
+ if (!secretBlindIndex) {
+ throw new BadRequestError({
+ message: "Missing secret blind index"
+ });
+ }
+ return { secretBlindIndex, type: SecretType.Shared };
+ })
})
: [];
const updatedSecretApproval = await secretApprovalRequestDAL.updateById(
@@ -638,7 +656,13 @@ export const secretApprovalRequestServiceFactory = ({
),
tx
);
- const commitsGroupByBlindIndex = groupBy(approvalCommits, (i) => i.secretBlindIndex);
+
+ const commitsGroupByBlindIndex = groupBy(approvalCommits, (i) => {
+ if (!i.secretBlindIndex) {
+ throw new BadRequestError({ message: "Missing secret blind index" });
+ }
+ return i.secretBlindIndex;
+ });
if (tagIds.length) {
await secretApprovalRequestSecretDAL.insertApprovalSecretTags(
Object.keys(commitTagIds).flatMap((blindIndex) =>
diff --git a/backend/src/server/routes/v2/mfa-router.ts b/backend/src/server/routes/v2/mfa-router.ts
index 6efda7221..02006a470 100644
--- a/backend/src/server/routes/v2/mfa-router.ts
+++ b/backend/src/server/routes/v2/mfa-router.ts
@@ -86,7 +86,13 @@ export const registerMfaRouter = async (server: FastifyZodProvider) => {
secure: appCfg.HTTPS_ENABLED
});
- return { token: token.access, ...user };
+ return {
+ ...user,
+ token: token.access,
+ protectedKey: user.protectedKey || null,
+ protectedKeyIV: user.protectedKeyIV || null,
+ protectedKeyTag: user.protectedKeyTag || null
+ };
}
});
};
diff --git a/backend/src/server/routes/v3/login-router.ts b/backend/src/server/routes/v3/login-router.ts
index 22d7b8be7..1c513c183 100644
--- a/backend/src/server/routes/v3/login-router.ts
+++ b/backend/src/server/routes/v3/login-router.ts
@@ -96,9 +96,9 @@ export const registerLoginRouter = async (server: FastifyZodProvider) => {
encryptedPrivateKey: data.user.encryptedPrivateKey,
iv: data.user.iv,
tag: data.user.tag,
- protectedKey: data.user.protectedKey,
- protectedKeyIV: data.user.protectedKeyIV,
- protectedKeyTag: data.user.protectedKeyTag
+ protectedKey: data.user.protectedKey || null,
+ protectedKeyIV: data.user.protectedKeyIV || null,
+ protectedKeyTag: data.user.protectedKeyTag || null
} as const;
}
});
From 0d9ec7cd769fbb1c2fa2b0f831251ef8e0b64592 Mon Sep 17 00:00:00 2001
From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com>
Date: Mon, 29 Jan 2024 15:19:45 +0400
Subject: [PATCH 035/178] Update service-token-router.ts
---
backend/src/server/routes/v2/service-token-router.ts | 1 +
1 file changed, 1 insertion(+)
diff --git a/backend/src/server/routes/v2/service-token-router.ts b/backend/src/server/routes/v2/service-token-router.ts
index 3ebce77dc..52e4d7334 100644
--- a/backend/src/server/routes/v2/service-token-router.ts
+++ b/backend/src/server/routes/v2/service-token-router.ts
@@ -36,6 +36,7 @@ export const registerServiceTokenRouter = async (server: FastifyZodProvider) =>
actor: req.permission.type
});
+ // We return the user here because older versions of the deprecated Python SDK depend on it to properly parse the API response.
return { ...serviceToken, workspace: serviceToken.projectId, user };
}
});
From 62eacc712d4f3e1ca3a60a03dc26d6f9c6745268 Mon Sep 17 00:00:00 2001
From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com>
Date: Mon, 29 Jan 2024 15:21:53 +0400
Subject: [PATCH 036/178] Update service-token-service.ts
---
backend/src/services/service-token/service-token-service.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/backend/src/services/service-token/service-token-service.ts b/backend/src/services/service-token/service-token-service.ts
index 09f5e83a0..63d5f6aac 100644
--- a/backend/src/services/service-token/service-token-service.ts
+++ b/backend/src/services/service-token/service-token-service.ts
@@ -123,7 +123,7 @@ export const serviceTokenServiceFactory = ({
if (!serviceToken) throw new BadRequestError({ message: "Token not found" });
const serviceTokenUser = await userDAL.findById(serviceToken.createdBy);
- if (!serviceTokenUser) throw new BadRequestError({ message: "Server token user not found" });
+ if (!serviceTokenUser) throw new BadRequestError({ message: "Service token user not found" });
return { serviceToken, user: serviceTokenUser };
};
From 3eba4815c8a1b684188431e8f24b7d92e0543b60 Mon Sep 17 00:00:00 2001
From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com>
Date: Mon, 29 Jan 2024 16:04:52 +0400
Subject: [PATCH 037/178] Add __v and __id
---
backend/src/server/routes/sanitizedSchemas.ts | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/backend/src/server/routes/sanitizedSchemas.ts b/backend/src/server/routes/sanitizedSchemas.ts
index afc12c081..03e48c247 100644
--- a/backend/src/server/routes/sanitizedSchemas.ts
+++ b/backend/src/server/routes/sanitizedSchemas.ts
@@ -38,7 +38,12 @@ export const sanitizedServiceTokenUserSchema = UsersSchema.pick({
firstName: true,
lastName: true,
mfaMethods: true
-});
+}).merge(
+ z.object({
+ __v: z.number().default(0),
+ _id: z.string()
+ })
+);
export const secretRawSchema = z.object({
id: z.string(),
From 3702d411ca3d9d00bf674ce17c3dc5ae71a97143 Mon Sep 17 00:00:00 2001
From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com>
Date: Mon, 29 Jan 2024 16:05:18 +0400
Subject: [PATCH 038/178] Added formatting
---
.../src/server/routes/v2/service-token-router.ts | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/backend/src/server/routes/v2/service-token-router.ts b/backend/src/server/routes/v2/service-token-router.ts
index 52e4d7334..cb285a8cc 100644
--- a/backend/src/server/routes/v2/service-token-router.ts
+++ b/backend/src/server/routes/v2/service-token-router.ts
@@ -36,8 +36,19 @@ export const registerServiceTokenRouter = async (server: FastifyZodProvider) =>
actor: req.permission.type
});
+ const formattedUser = {
+ ...user,
+ _id: user.id,
+ __v: 0
+ } as const;
+
+ const formattedServiceToken = {
+ ...serviceToken,
+ _id: serviceToken.id
+ } as const;
+
// We return the user here because older versions of the deprecated Python SDK depend on it to properly parse the API response.
- return { ...serviceToken, workspace: serviceToken.projectId, user };
+ return { ...formattedServiceToken, workspace: serviceToken.projectId, user: formattedUser };
}
});
From 571e3c49615af2a0c53c7d37150fcf1859545639 Mon Sep 17 00:00:00 2001
From: Akhil Mohan
Date: Mon, 29 Jan 2024 18:22:09 +0530
Subject: [PATCH 039/178] fix: resolved encoding issue in multi line input
---
.../components/v2/SecretInput/SecretInput.tsx | 50 +++++++++----------
1 file changed, 25 insertions(+), 25 deletions(-)
diff --git a/frontend/src/components/v2/SecretInput/SecretInput.tsx b/frontend/src/components/v2/SecretInput/SecretInput.tsx
index 314dada0c..2dfafca74 100644
--- a/frontend/src/components/v2/SecretInput/SecretInput.tsx
+++ b/frontend/src/components/v2/SecretInput/SecretInput.tsx
@@ -1,43 +1,46 @@
/* eslint-disable react/no-danger */
import { forwardRef, TextareaHTMLAttributes } from "react";
-import sanitizeHtml, { DisallowedTagsModes } from "sanitize-html";
import { twMerge } from "tailwind-merge";
import { useToggle } from "@app/hooks";
-const REGEX = /\${([^}]+)}/g;
+const REGEX = /(\${([^}]+)})/g;
const replaceContentWithDot = (str: string) => {
let finalStr = "";
for (let i = 0; i < str.length; i += 1) {
const char = str.at(i);
- finalStr += char === "\n" ? "\n" : "•";
+ finalStr += char === "\n" ? "\n" : "*";
}
return finalStr;
};
-const sanitizeConf = {
- allowedTags: ["span"],
- disallowedTagsMode: "escape" as DisallowedTagsModes
-};
-
const syntaxHighlight = (content?: string | null, isVisible?: boolean) => {
if (content === "") return "EMPTY";
if (!content) return "EMPTY";
if (!isVisible) return replaceContentWithDot(content);
- const sanitizedContent = sanitizeHtml(
- content.replaceAll("<", "<").replaceAll(">", ">"),
- sanitizeConf
- );
- const newContent = sanitizedContent.replace(
- REGEX,
- (_a, b) =>
- `${${b} } `
- );
+ let skipNext = false;
+ const formatedContent = content.split(REGEX).flatMap((el, i) => {
+ const isInterpolationSyntax = el.startsWith("${") && el.endsWith("}");
+ if (isInterpolationSyntax) {
+ skipNext = true;
+ return (
+
+ ${{el.slice(2, -1)}
+ }
+
+ );
+ }
+ if (skipNext) {
+ skipNext = false;
+ return [];
+ }
+ return el;
+ });
// akhilmhdh: Dont remove this br. I am still clueless how this works but weirdly enough
// when break is added a line break works properly
- return `${newContent} `;
+ return formatedContent.concat( );
};
type Props = TextareaHTMLAttributes & {
@@ -59,18 +62,15 @@ export const SecretInput = forwardRef(
return (
-
+
+ {syntaxHighlight(value, isVisible || isSecretFocused)}
+