From f5145c6c3943f3271d40394219d6f5c719ba7ea4 Mon Sep 17 00:00:00 2001 From: xphyr Date: Thu, 31 Aug 2023 17:43:15 -0400 Subject: [PATCH 01/11] fixing deployment.yaml file in secrets-operator helm chart. removed extra LF that was breaking the template --- .../secrets-operator/templates/deployment.yaml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/helm-charts/secrets-operator/templates/deployment.yaml b/helm-charts/secrets-operator/templates/deployment.yaml index 026728bfa..448fb614a 100644 --- a/helm-charts/secrets-operator/templates/deployment.yaml +++ b/helm-charts/secrets-operator/templates/deployment.yaml @@ -57,15 +57,13 @@ spec: env: - name: KUBERNETES_CLUSTER_DOMAIN value: {{ .Values.kubernetesClusterDomain }} - image: {{ .Values.controllerManager.kubeRbacProxy.image.repository }}:{{ .Values.controllerManager.kubeRbacProxy.image.tag - | default .Chart.AppVersion }} + image: {{ .Values.controllerManager.kubeRbacProxy.image.repository }}:{{ .Values.controllerManager.kubeRbacProxy.image.tag | default .Chart.AppVersion }} name: kube-rbac-proxy ports: - containerPort: 8443 name: https protocol: TCP - resources: {{- toYaml .Values.controllerManager.kubeRbacProxy.resources | nindent - 10 }} + resources: {{- toYaml .Values.controllerManager.kubeRbacProxy.resources | nindent 10 }} securityContext: allowPrivilegeEscalation: false capabilities: @@ -80,8 +78,7 @@ spec: env: - name: KUBERNETES_CLUSTER_DOMAIN value: {{ .Values.kubernetesClusterDomain }} - image: {{ .Values.controllerManager.manager.image.repository }}:{{ .Values.controllerManager.manager.image.tag - | default .Chart.AppVersion }} + image: {{ .Values.controllerManager.manager.image.repository }}:{{ .Values.controllerManager.manager.image.tag | default .Chart.AppVersion }} livenessProbe: httpGet: path: /healthz @@ -95,8 +92,7 @@ spec: port: 8081 initialDelaySeconds: 5 periodSeconds: 10 - resources: {{- toYaml .Values.controllerManager.manager.resources | nindent 10 - }} + resources: {{- toYaml .Values.controllerManager.manager.resources | nindent 10 }} securityContext: allowPrivilegeEscalation: false capabilities: From a7b3d128446e0aa51cb98d36c9d0772206c9ec69 Mon Sep 17 00:00:00 2001 From: Maidul Islam Date: Thu, 31 Aug 2023 20:58:07 -0400 Subject: [PATCH 02/11] only capture non sign up secret events --- backend/src/helpers/secrets.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/backend/src/helpers/secrets.ts b/backend/src/helpers/secrets.ts index e8c3419ba..ad6296adf 100644 --- a/backend/src/helpers/secrets.ts +++ b/backend/src/helpers/secrets.ts @@ -509,7 +509,7 @@ export const getSecretsHelper = async ({ throw UnauthorizedRequestError({ message: "Folder Permission Denied" }); } } - + if (!folderId) { folderId = await getFolderIdFromServiceToken(workspaceId, environment, secretPath); } @@ -583,7 +583,10 @@ export const getSecretsHelper = async ({ } } - if (postHogClient) { + const numberOfSignupSecrets = (secrets.filter((secret) => secret?.metadata?.source === "signup")).length; + const atLeastOneNonSignUpSecret = (secrets.length - numberOfSignupSecrets > 0) + + if (postHogClient && atLeastOneNonSignUpSecret) { const shouldCapture = authData.userAgent !== K8_USER_AGENT_NAME || shouldRecordK8Event; const approximateForNoneCapturedEvents = secrets.length * 10 From e3ecfbaaa5c6829274e21fccbb33e06d8b8cb8d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20H=C3=B6nig?= Date: Fri, 1 Sep 2023 12:16:44 +0200 Subject: [PATCH 03/11] Fix date-fn format string --- .../ProjectSettingsPage/components/WebhooksTab/WebhooksTab.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/views/Settings/ProjectSettingsPage/components/WebhooksTab/WebhooksTab.tsx b/frontend/src/views/Settings/ProjectSettingsPage/components/WebhooksTab/WebhooksTab.tsx index d5cb16b7b..3b48ac8b3 100644 --- a/frontend/src/views/Settings/ProjectSettingsPage/components/WebhooksTab/WebhooksTab.tsx +++ b/frontend/src/views/Settings/ProjectSettingsPage/components/WebhooksTab/WebhooksTab.tsx @@ -197,7 +197,7 @@ export const WebhooksTab = () => {
Updated At:{" "} - {format(new Date(updatedAt), "YYYY-MM-DD, hh:mm aaa")} + {format(new Date(updatedAt), "yyyy-MM-dd, hh:mm aaa")}
{lastRunErrorMessage && (
From bf95415a0d90afb7bbc5e0267754e7f87088afb3 Mon Sep 17 00:00:00 2001 From: Maidul Islam Date: Fri, 1 Sep 2023 13:33:51 -0400 Subject: [PATCH 04/11] Update k8 operator Chart version --- helm-charts/secrets-operator/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helm-charts/secrets-operator/Chart.yaml b/helm-charts/secrets-operator/Chart.yaml index 1452c4638..53afe79e4 100644 --- a/helm-charts/secrets-operator/Chart.yaml +++ b/helm-charts/secrets-operator/Chart.yaml @@ -13,7 +13,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.2.0 +version: 0.2.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. From 41774fa97cb448dd1f7dfc77279a89a3a5290876 Mon Sep 17 00:00:00 2001 From: Vladyslav Matsiiako Date: Fri, 1 Sep 2023 19:34:38 -0700 Subject: [PATCH 05/11] fixed the bug with reading secrets from json --- .../DashboardPage/components/SecretDropzone/SecretDropzone.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/views/DashboardPage/components/SecretDropzone/SecretDropzone.tsx b/frontend/src/views/DashboardPage/components/SecretDropzone/SecretDropzone.tsx index 6df9ab834..1c992df25 100644 --- a/frontend/src/views/DashboardPage/components/SecretDropzone/SecretDropzone.tsx +++ b/frontend/src/views/DashboardPage/components/SecretDropzone/SecretDropzone.tsx @@ -175,7 +175,7 @@ export const SecretDropzone = ({ e.dataTransfer.dropEffect = "copy"; setDragActive.off(); - parseFile(e.dataTransfer.files[0]); + parseFile(e.dataTransfer.files[0], e.dataTransfer?.files?.[0]?.type === "application/json"); }; const handleFileUpload = (e: ChangeEvent) => { From 6dd46885f813bbe1ea810efafda86f7c4318d1c7 Mon Sep 17 00:00:00 2001 From: Tuan Dang Date: Sat, 2 Sep 2023 11:11:27 +0100 Subject: [PATCH 06/11] Add support for syncing secrets containing / to AWS parameter store integration --- backend/src/integrations/sync.ts | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/backend/src/integrations/sync.ts b/backend/src/integrations/sync.ts index 2867ad44f..8023f74a2 100644 --- a/backend/src/integrations/sync.ts +++ b/backend/src/integrations/sync.ts @@ -688,15 +688,17 @@ const syncSecretsAWSParameterStore = async ({ const parameterList = (await ssm.getParametersByPath(params).promise()).Parameters; let awsParameterStoreSecretsObj: { - [key: string]: any; // TODO: fix type + [key: string]: any; } = {}; if (parameterList) { awsParameterStoreSecretsObj = parameterList.reduce( - (obj: any, secret: any) => ({ - ...obj, - [secret.Name.split("/").pop()]: secret - }), + (obj: any, secret: any) => { + return ({ + ...obj, + [secret.Name.substring(integration.path.length)]: secret + }); + }, {} ); } From 3f61a24ef15dc8408628bdcd6ab432b48add860f Mon Sep 17 00:00:00 2001 From: omahs <73983677+omahs@users.noreply.github.com> Date: Sun, 3 Sep 2023 15:06:53 +0200 Subject: [PATCH 07/11] fix typos --- docs/documentation/getting-started/docker.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/documentation/getting-started/docker.mdx b/docs/documentation/getting-started/docker.mdx index 567745ea4..4a3c79ee8 100644 --- a/docs/documentation/getting-started/docker.mdx +++ b/docs/documentation/getting-started/docker.mdx @@ -15,7 +15,7 @@ Prerequisites: ## Dockerfile Modification - Follow the instruction for your specific Linux distrubtion to add the Infisical CLI to your Dockerfile. + Follow the instructions for your specific Linux distribution to add the Infisical CLI to your Dockerfile. @@ -87,7 +87,7 @@ Prerequisites: ## Dockerfile Modifications - Follow the instruction for your specific Linux distributions to add the Infisical CLI to your Dockerfiles. + Follow the instructions for your specific Linux distributions to add the Infisical CLI to your Dockerfiles. @@ -182,4 +182,4 @@ Prerequisites: See also: - [Documentation for Docker](/integrations/platforms/docker) -- [Documentation for Docker Compose](/integrations/platforms/docker-compose) \ No newline at end of file +- [Documentation for Docker Compose](/integrations/platforms/docker-compose) From 9afad7df329bd396e4c477ab5a5d7c07d1209602 Mon Sep 17 00:00:00 2001 From: omahs <73983677+omahs@users.noreply.github.com> Date: Sun, 3 Sep 2023 15:09:18 +0200 Subject: [PATCH 08/11] fix typos --- docs/documentation/guides/node.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/documentation/guides/node.mdx b/docs/documentation/guides/node.mdx index 323d95072..d182840b4 100644 --- a/docs/documentation/guides/node.mdx +++ b/docs/documentation/guides/node.mdx @@ -28,7 +28,7 @@ Now that we've created a project and added a secret to its development environme ## Create a Node app -For this demonstration, we use a minimal Express application. However, the same principles will apply for any Node application such as those built on Koa or Fastify. +For this demonstration, we use a minimal Express application. However, the same principles will apply to any Node application such as those built on Koa or Fastify. ### Create an Express app @@ -107,7 +107,7 @@ At this stage, you know how to fetch secrets from Infisical back to your Node ap Although the SDK requires you to pass in a token, it enables greater efficiency and security than if you managed dozens of secrets yourself without it. Here're some benefits: - - You always pull in the right secrets because they're fetched on demand from a centralize source that is Infisical. + - You always pull in the right secrets because they're fetched on demand from a centralized source that is Infisical. - You can use the Infisical which comes with tons of benefits like secret versioning, access controls, audit logs, etc. - You now risk leaking one token that can be revoked instead of dozens of raw secrets. @@ -118,4 +118,4 @@ At this stage, you know how to fetch secrets from Infisical back to your Node ap See also: -- Explore the [Node SDK](https://github.com/Infisical/infisical-node) \ No newline at end of file +- Explore the [Node SDK](https://github.com/Infisical/infisical-node) From d4a7ad713c670e60f3ba5265f31f0a359f86f24e Mon Sep 17 00:00:00 2001 From: omahs <73983677+omahs@users.noreply.github.com> Date: Sun, 3 Sep 2023 15:10:19 +0200 Subject: [PATCH 09/11] fix typos --- docs/documentation/guides/python.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/documentation/guides/python.mdx b/docs/documentation/guides/python.mdx index 2c558a69c..50ee44a86 100644 --- a/docs/documentation/guides/python.mdx +++ b/docs/documentation/guides/python.mdx @@ -27,7 +27,7 @@ Now that we've created a project and added a secret to its development environme ## Create a Python app -For this demonstration, we use a minimal Flask application. However, the same principles will apply for any Python application such as those built with Django. +For this demonstration, we use a minimal Flask application. However, the same principles will apply to any Python application such as those built with Django. ### Create a Flask app @@ -103,7 +103,7 @@ At this stage, you know how to fetch secrets from Infisical back to your Python Although the SDK requires you to pass in a token, it enables greater efficiency and security than if you managed dozens of secrets yourself without it. Here're some benefits: - - You always pull in the right secrets because they're fetched on demand from a centralize source that is Infisical. + - You always pull in the right secrets because they're fetched on demand from a centralized source that is Infisical. - You can use the Infisical which comes with tons of benefits like secret versioning, access controls, audit logs, etc. - You now risk leaking one token that can be revoked instead of dozens of raw secrets. From 43c8c4224926f4248d1c461e3fe509193f14094d Mon Sep 17 00:00:00 2001 From: omahs <73983677+omahs@users.noreply.github.com> Date: Sun, 3 Sep 2023 15:11:26 +0200 Subject: [PATCH 10/11] fix typo --- docs/documentation/platform/folder.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/documentation/platform/folder.mdx b/docs/documentation/platform/folder.mdx index b112b5787..506b30da2 100644 --- a/docs/documentation/platform/folder.mdx +++ b/docs/documentation/platform/folder.mdx @@ -4,7 +4,7 @@ description: "Organize your secrets with folders" --- Folders provide a powerful and intuitive way to structure your secrets. -They offer a system to keep your secrets organized and easily accessible, which becomes increasingly important as your collection of secrets grow. +They offer a system to keep your secrets organized and easily accessible, which becomes increasingly important as your collection of secrets grows. With folders in Infisical, you can now create a hierarchy of folders to organize your secrets, mirroring your application's architecture or any logical grouping that suits your needs. Whether you follow a microservices architecture or work with monorepos, folders make it simpler to locate, manage and collaborate between teams. From 09b22f36c0e31910ab860b681590ac14c23221f0 Mon Sep 17 00:00:00 2001 From: omahs <73983677+omahs@users.noreply.github.com> Date: Sun, 3 Sep 2023 15:12:13 +0200 Subject: [PATCH 11/11] fix typo --- .github/ISSUE_TEMPLATE/feature_request.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 6b6aa64a3..4bbe0e2ad 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -8,7 +8,7 @@ assignees: '' --- ### Feature description -A clear and concise description of what the the feature should be. +A clear and concise description of what the feature should be. ### Why would it be useful? Why would this feature be useful for Infisical users?