From 212f1feeb60a95189b6b4975b7499cd617e98fe8 Mon Sep 17 00:00:00 2001
From: mv-turtle <78047717+mv-turtle@users.noreply.github.com>
Date: Sat, 3 Dec 2022 14:21:56 -0500
Subject: [PATCH 01/33] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 6b1fc9436..20a4b3ee1 100644
--- a/README.md
+++ b/README.md
@@ -124,7 +124,7 @@ We're currently setting the foundation and building [integrations](https://infis
|
- π Vercel
+ π Vercel (https://github.com/Infisical/infisical/issues/60)
|
π GitLab CI/CD
From 8bbd5a1184e2465d2001692e6e35061a99c8ae0e Mon Sep 17 00:00:00 2001
From: seunghyunOh
Date: Sun, 4 Dec 2022 08:31:19 +0900
Subject: [PATCH 02/33] Fix typo in readme
---
frontend/README.md | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/frontend/README.md b/frontend/README.md
index b33ff4335..d97bb4bef 100644
--- a/frontend/README.md
+++ b/frontend/README.md
@@ -1,20 +1,22 @@
This is the client repository for Infisical.
-## Before you get started with development locally
+## Before you get started with development locally
+
Please ensure you have Docker and Docker Compose installed for your OS.
-### Steps to start server
+### Steps to start server
+
- `CD` into the repo
- run command `docker-compose -f docker-compose.dev.yml up --build --force-recreate`
-- Vist localhost:3000 and the website should be live
+- Visit localhost:3000 and the website should be live
+
+### Steps to shutdown this Docker compose
-### Steps to shutdown this Docker compose
- `CD` into this repo
-- run command `docker-compose -f docker-compose-dev.yml down`
+- run command `docker-compose -f docker-compose.dev.yml down`
### Notes
-Any changes made to local files in the `/components`, `/pages`, `styles` will be hot reloaded. If would like like to watch for other files or folders live, please add them to the docker volume.
+
+Any changes made to local files in the `/components`, `/pages`, `/styles` will be hot reloaded. If would like like to watch for other files or folders live, please add them to the docker volume.
You will also need to ensure that a .env.local file exists with all required environment variables
-
-
From de7e5016ddedc2e0293d0950b7ac80ffbd3d028c Mon Sep 17 00:00:00 2001
From: seunghyunOh
Date: Sun, 4 Dec 2022 08:32:43 +0900
Subject: [PATCH 03/33] Fix babel error
---
frontend/.eslintrc.json | 22 ++++++----------------
1 file changed, 6 insertions(+), 16 deletions(-)
diff --git a/frontend/.eslintrc.json b/frontend/.eslintrc.json
index 0c5504b90..fc0c07a74 100644
--- a/frontend/.eslintrc.json
+++ b/frontend/.eslintrc.json
@@ -1,8 +1,6 @@
{
- "extends": "next/core-web-vitals",
- "plugins": [
- "simple-import-sort"
- ],
+ "extends": ["next/babel", "next/core-web-vitals"],
+ "plugins": ["simple-import-sort"],
"rules": {
"react-hooks/exhaustive-deps": "off",
"simple-import-sort/exports": "warn",
@@ -18,15 +16,9 @@
"^(assert|buffer|child_process|cluster|console|constants|crypto|dgram|dns|domain|events|fs|http|https|module|net|os|path|punycode|querystring|readline|repl|stream|string_decoder|sys|timers|tls|tty|url|util|vm|zlib|freelist|v8|process|async_hooks|http2|perf_hooks)(/.*|$)"
],
// Packages `react` related packages
- [
- "^react",
- "^next",
- "^@?\\w"
- ],
+ ["^react", "^next", "^@?\\w"],
// Internal packages.
- [
- "^~(/.*|$)"
- ],
+ ["^~(/.*|$)"],
// Relative imports
[
"^\\.\\.(?!/?$)",
@@ -36,11 +28,9 @@
"^\\./?$"
],
// Style imports.
- [
- "^.+\\.?(css|scss)$"
- ]
+ ["^.+\\.?(css|scss)$"]
]
}
]
}
-}
\ No newline at end of file
+}
From fe15af4c2808188fd9d2500a23acfb19f73dc457 Mon Sep 17 00:00:00 2001
From: Maidul Islam
Date: Sat, 3 Dec 2022 19:58:23 -0500
Subject: [PATCH 04/33] add Helm chart
---
charts/infisical/.helmignore | 23 +++++++
charts/infisical/Chart.yaml | 16 +++++
charts/infisical/templates/NOTES.txt | 0
charts/infisical/templates/_helpers.tpl | 62 +++++++++++++++++++
charts/infisical/templates/deployment.yaml | 61 ++++++++++++++++++
charts/infisical/templates/ingress.yaml | 61 ++++++++++++++++++
.../templates/tests/test-connection.yaml | 15 +++++
charts/infisical/values.yaml | 39 ++++++++++++
8 files changed, 277 insertions(+)
create mode 100644 charts/infisical/.helmignore
create mode 100644 charts/infisical/Chart.yaml
create mode 100644 charts/infisical/templates/NOTES.txt
create mode 100644 charts/infisical/templates/_helpers.tpl
create mode 100644 charts/infisical/templates/deployment.yaml
create mode 100644 charts/infisical/templates/ingress.yaml
create mode 100644 charts/infisical/templates/tests/test-connection.yaml
create mode 100644 charts/infisical/values.yaml
diff --git a/charts/infisical/.helmignore b/charts/infisical/.helmignore
new file mode 100644
index 000000000..0e8a0eb36
--- /dev/null
+++ b/charts/infisical/.helmignore
@@ -0,0 +1,23 @@
+# Patterns to ignore when building packages.
+# This supports shell glob matching, relative path matching, and
+# negation (prefixed with !). Only one pattern per line.
+.DS_Store
+# Common VCS dirs
+.git/
+.gitignore
+.bzr/
+.bzrignore
+.hg/
+.hgignore
+.svn/
+# Common backup files
+*.swp
+*.bak
+*.tmp
+*.orig
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
diff --git a/charts/infisical/Chart.yaml b/charts/infisical/Chart.yaml
new file mode 100644
index 000000000..ecef711f1
--- /dev/null
+++ b/charts/infisical/Chart.yaml
@@ -0,0 +1,16 @@
+apiVersion: v2
+name: infisical
+description: A helm chart for a full Infisical application
+
+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.1.0
+
+# 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.
+# It is recommended to use it with quotes.
+appVersion: "1.16.0"
diff --git a/charts/infisical/templates/NOTES.txt b/charts/infisical/templates/NOTES.txt
new file mode 100644
index 000000000..e69de29bb
diff --git a/charts/infisical/templates/_helpers.tpl b/charts/infisical/templates/_helpers.tpl
new file mode 100644
index 000000000..dc7552d35
--- /dev/null
+++ b/charts/infisical/templates/_helpers.tpl
@@ -0,0 +1,62 @@
+{{/*
+Expand the name of the chart.
+*/}}
+{{- define "infisical.name" -}}
+{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
+{{- end }}
+
+{{/*
+Create a default fully qualified app name.
+We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
+If release name contains chart name it will be used as a full name.
+*/}}
+{{- define "infisical.fullname" -}}
+{{- if .Values.fullnameOverride }}
+{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
+{{- else }}
+{{- $name := default .Chart.Name .Values.nameOverride }}
+{{- if contains $name .Release.Name }}
+{{- .Release.Name | trunc 63 | trimSuffix "-" }}
+{{- else }}
+{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
+{{- end }}
+{{- end }}
+{{- end }}
+
+{{/*
+Create chart name and version as used by the chart label.
+*/}}
+{{- define "infisical.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
+{{- end }}
+
+{{/*
+Common labels
+*/}}
+{{- define "infisical.labels" -}}
+helm.sh/chart: {{ include "infisical.chart" . }}
+{{ include "infisical.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end }}
+
+{{/*
+Selector labels
+*/}}
+{{- define "infisical.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "infisical.name" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end }}
+
+{{/*
+Create the name of the service account to use
+*/}}
+{{- define "infisical.serviceAccountName" -}}
+{{- if .Values.serviceAccount.create }}
+{{- default (include "infisical.fullname" .) .Values.serviceAccount.name }}
+{{- else }}
+{{- default "default" .Values.serviceAccount.name }}
+{{- end }}
+{{- end }}
diff --git a/charts/infisical/templates/deployment.yaml b/charts/infisical/templates/deployment.yaml
new file mode 100644
index 000000000..ef7f3a0fc
--- /dev/null
+++ b/charts/infisical/templates/deployment.yaml
@@ -0,0 +1,61 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: {{ include "infisical.fullname" . }}
+ labels:
+ {{- include "infisical.labels" . | nindent 4 }}
+spec:
+ {{- if not .Values.autoscaling.enabled }}
+ replicas: {{ .Values.replicaCount }}
+ {{- end }}
+ selector:
+ matchLabels:
+ {{- include "infisical.selectorLabels" . | nindent 6 }}
+ template:
+ metadata:
+ {{- with .Values.podAnnotations }}
+ annotations:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ labels:
+ {{- include "infisical.selectorLabels" . | nindent 8 }}
+ spec:
+ {{- with .Values.imagePullSecrets }}
+ imagePullSecrets:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ serviceAccountName: {{ include "infisical.serviceAccountName" . }}
+ securityContext:
+ {{- toYaml .Values.podSecurityContext | nindent 8 }}
+ containers:
+ - name: {{ .Chart.Name }}
+ securityContext:
+ {{- toYaml .Values.securityContext | nindent 12 }}
+ image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
+ imagePullPolicy: {{ .Values.image.pullPolicy }}
+ ports:
+ - name: http
+ containerPort: {{ .Values.service.port }}
+ protocol: TCP
+ livenessProbe:
+ httpGet:
+ path: /
+ port: http
+ readinessProbe:
+ httpGet:
+ path: /
+ port: http
+ resources:
+ {{- toYaml .Values.resources | nindent 12 }}
+ {{- with .Values.nodeSelector }}
+ nodeSelector:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.affinity }}
+ affinity:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
+ {{- with .Values.tolerations }}
+ tolerations:
+ {{- toYaml . | nindent 8 }}
+ {{- end }}
diff --git a/charts/infisical/templates/ingress.yaml b/charts/infisical/templates/ingress.yaml
new file mode 100644
index 000000000..d30bb50a5
--- /dev/null
+++ b/charts/infisical/templates/ingress.yaml
@@ -0,0 +1,61 @@
+{{- if .Values.ingress.enabled -}}
+{{- $fullName := include "infisical.fullname" . -}}
+{{- $svcPort := .Values.service.port -}}
+{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
+ {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
+ {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
+ {{- end }}
+{{- end }}
+{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
+apiVersion: networking.k8s.io/v1
+{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
+apiVersion: networking.k8s.io/v1beta1
+{{- else -}}
+apiVersion: extensions/v1beta1
+{{- end }}
+kind: Ingress
+metadata:
+ name: {{ $fullName }}
+ labels:
+ {{- include "infisical.labels" . | nindent 4 }}
+ {{- with .Values.ingress.annotations }}
+ annotations:
+ {{- toYaml . | nindent 4 }}
+ {{- end }}
+spec:
+ {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
+ ingressClassName: {{ .Values.ingress.className }}
+ {{- end }}
+ {{- if .Values.ingress.tls }}
+ tls:
+ {{- range .Values.ingress.tls }}
+ - hosts:
+ {{- range .hosts }}
+ - {{ . | quote }}
+ {{- end }}
+ secretName: {{ .secretName }}
+ {{- end }}
+ {{- end }}
+ rules:
+ {{- range .Values.ingress.hosts }}
+ - host: {{ .host | quote }}
+ http:
+ paths:
+ {{- range .paths }}
+ - path: {{ .path }}
+ {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
+ pathType: {{ .pathType }}
+ {{- end }}
+ backend:
+ {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
+ service:
+ name: {{ $fullName }}
+ port:
+ number: {{ $svcPort }}
+ {{- else }}
+ serviceName: {{ $fullName }}
+ servicePort: {{ $svcPort }}
+ {{- end }}
+ {{- end }}
+ {{- end }}
+{{- end }}
diff --git a/charts/infisical/templates/tests/test-connection.yaml b/charts/infisical/templates/tests/test-connection.yaml
new file mode 100644
index 000000000..6c14858d4
--- /dev/null
+++ b/charts/infisical/templates/tests/test-connection.yaml
@@ -0,0 +1,15 @@
+apiVersion: v1
+kind: Pod
+metadata:
+ name: "{{ include "infisical.fullname" . }}-test-connection"
+ labels:
+ {{- include "infisical.labels" . | nindent 4 }}
+ annotations:
+ "helm.sh/hook": test
+spec:
+ containers:
+ - name: wget
+ image: busybox
+ command: ['wget']
+ args: ['{{ include "infisical.fullname" . }}:{{ .Values.service.port }}']
+ restartPolicy: Never
diff --git a/charts/infisical/values.yaml b/charts/infisical/values.yaml
new file mode 100644
index 000000000..90ef97ae1
--- /dev/null
+++ b/charts/infisical/values.yaml
@@ -0,0 +1,39 @@
+# Default values for Infisical
+frontend:
+ replicaCount: 1
+ image:
+ repository:
+ pullPolicy: IfNotPresent
+ # Overrides the image tag whose default is the chart appVersion.
+ tag: ""
+
+backend:
+ replicaCount: 1
+ image:
+ repository:
+ pullPolicy: IfNotPresent
+ # Overrides the image tag whose default is the chart appVersion.
+ tag: ""
+
+ingress:
+ enabled: false
+ className: ""
+ annotations: {}
+ # kubernetes.io/ingress.class: nginx
+ # kubernetes.io/tls-acme: "true"
+ hosts:
+ - host: chart-example.local
+ paths:
+ - path: /
+ pathType: ImplementationSpecific
+ tls: []
+ # - secretName: chart-example-tls
+ # hosts:
+ # - chart-example.local
+
+autoscaling:
+ enabled: false
+ minReplicas: 1
+ maxReplicas: 100
+ targetCPUUtilizationPercentage: 80
+ # targetMemoryUtilizationPercentage: 80
\ No newline at end of file
From fa41baa8b6bb204f1182155aa266a2bedadf93aa Mon Sep 17 00:00:00 2001
From: seunghyunOh
Date: Sun, 4 Dec 2022 09:58:51 +0900
Subject: [PATCH 05/33] Update dashboard component
---
frontend/components/basic/buttons/Button.tsx | 48 ++++---
...dInputField.js => DashboardInputField.tsx} | 128 ++++++++++--------
2 files changed, 103 insertions(+), 73 deletions(-)
rename frontend/components/dashboard/{DashboardInputField.js => DashboardInputField.tsx} (57%)
diff --git a/frontend/components/basic/buttons/Button.tsx b/frontend/components/basic/buttons/Button.tsx
index 40251be93..863dc4b48 100644
--- a/frontend/components/basic/buttons/Button.tsx
+++ b/frontend/components/basic/buttons/Button.tsx
@@ -1,25 +1,28 @@
import React from "react";
import Image from "next/image";
import { IconProp } from "@fortawesome/fontawesome-svg-core";
-import { FontAwesomeIcon, FontAwesomeIconProps } from "@fortawesome/react-fontawesome";
+import {
+ FontAwesomeIcon,
+ FontAwesomeIconProps,
+} from "@fortawesome/react-fontawesome";
var classNames = require("classnames");
type ButtonProps = {
text: string;
onButtonPressed: () => void;
- loading: boolean;
+ loading?: boolean;
color: string;
size: string;
- icon: IconProp;
- active: boolean;
- iconDisabled: string;
- textDisabled: string;
-}
+ icon?: IconProp;
+ active?: boolean;
+ iconDisabled?: string;
+ textDisabled?: string;
+};
/**
* This is the main butto component in the app.
- * @param {object} props
+ * @param {object} props
* @param {string} props.text - text inside the button
* @param {function} props.onButtonPressed - the action that happens when the button is clicked
* @param {boolean} props.loading - if a button is currently in the laoding state
@@ -29,21 +32,28 @@ type ButtonProps = {
* @param {boolean} props.active - if the button is active or disabled
* @param {FontAwesomeIconProps} props.text - the icon inside the button when it is disabled
* @param {string} props.textDisable - text inside the button when it is disabled
- * @returns
+ * @returns
*/
-export default function Button (props: ButtonProps): JSX.Element {
+export default function Button(props: ButtonProps): JSX.Element {
// Check if the button show always be 'active' - then true;
// or if it should switch between 'active' and 'disabled' - then give the status
- const activityStatus = props.active || (props.text != "" && props.textDisabled == undefined)
-
+ const activityStatus =
+ props.active || (props.text != "" && props.textDisabled == undefined);
+
let styleButton = classNames(
"group m-auto md:m-0 inline-block rounded-md duration-200",
// Setting background colors and hover modes
- props.color == "mineshaft" && activityStatus && "bg-mineshaft-700 hover:bg-primary",
+ props.color == "mineshaft" &&
+ activityStatus &&
+ "bg-mineshaft-700 hover:bg-primary",
props.color == "mineshaft" && !activityStatus && "bg-mineshaft",
- (props.color == "primary" || !props.color) && activityStatus && "bg-primary hover:opacity-80",
- (props.color == "primary" || !props.color) && !activityStatus && "bg-primary",
+ (props.color == "primary" || !props.color) &&
+ activityStatus &&
+ "bg-primary hover:opacity-80",
+ (props.color == "primary" || !props.color) &&
+ !activityStatus &&
+ "bg-primary",
props.color == "red" && "bg-red",
// Changing the opacity when active vs when not
@@ -73,7 +83,7 @@ export default function Button (props: ButtonProps): JSX.Element {
"relative duration-200",
// Show the loading sign if the loading indicator is on
- props.loading == true ? "opacity-0" : "opacity-100",
+ Boolean(props.loading) ? "opacity-0" : "opacity-100",
props.size == "md" && "text-sm",
props.size == "lg" && "text-lg"
);
@@ -100,7 +110,7 @@ export default function Button (props: ButtonProps): JSX.Element {
{props.icon && (
)}
{(props.text || props.textDisabled) && (
- {activityStatus ? props.text : props.textDisabled}
+
+ {activityStatus ? props.text : props.textDisabled}
+
)}
diff --git a/frontend/components/dashboard/DashboardInputField.js b/frontend/components/dashboard/DashboardInputField.tsx
similarity index 57%
rename from frontend/components/dashboard/DashboardInputField.js
rename to frontend/components/dashboard/DashboardInputField.tsx
index 634591c07..286792784 100644
--- a/frontend/components/dashboard/DashboardInputField.js
+++ b/frontend/components/dashboard/DashboardInputField.tsx
@@ -1,4 +1,4 @@
-import React, { useRef } from "react";
+import React, { SyntheticEvent, UIEvent, useRef, WheelEvent } from "react";
import { faCircle } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
@@ -6,6 +6,15 @@ import guidGenerator from "../utilities/randomId";
const REGEX = /([$]{.*?})/g;
+interface DashboardInputFieldProps {
+ index: number;
+ onChangeHandler: (value: string, index: number) => void;
+ value: string;
+ type: "varName" | "value";
+ blurred: boolean;
+ duplicates: string[];
+}
+
/**
* This component renders the input fields on the dashboard
* @param {object} obj - the order number of a keyPair
@@ -14,51 +23,60 @@ const REGEX = /([$]{.*?})/g;
* @param {string} obj.type - whether the input field is for a Key Name or for a Key Value
* @param {string} obj.value - value of the InputField
* @param {boolean} obj.blurred - whether the input field should be blurred (behind the gray dots) or not; this can be turned on/off in the dashboard
- * @param {string[]} obj.duplicates - list of all the suplicated key names on the dashboard
+ * @param {string[]} obj.duplicates - list of all the duplicated key names on the dashboard
* @returns
*/
+
const DashboardInputField = ({
index,
onChangeHandler,
type,
value,
blurred,
- duplicates
-}) => {
- const ref = useRef(null);
- const syncScroll = (e) => {
- ref.current.scrollTop = e.target.scrollTop;
- ref.current.scrollLeft = e.target.scrollLeft;
+ duplicates,
+}: DashboardInputFieldProps) => {
+ const ref = useRef(null);
+ const syncScroll = (e: SyntheticEvent) => {
+ if (ref.current == null) return;
+
+ ref.current.scrollTop = e.currentTarget.scrollTop;
+ ref.current.scrollLeft = e.currentTarget.scrollLeft;
};
-
+
if (type === "varName") {
- const startsWithNumber = !isNaN(value.charAt(0)) && value != "";
+ const startsWithNumber = !isNaN(Number(value.charAt(0))) && value != "";
const hasDuplicates = duplicates?.includes(value);
const error = startsWithNumber || hasDuplicates;
return (
onChangeHandler(e.target.value.toUpperCase(), index)}
+ onChange={(e) =>
+ onChangeHandler(e.target.value.toUpperCase(), index)
+ }
type={type}
value={value}
- className={`asolute z-10 peer font-mono ph-no-capture bg-bunker-800 rounded-md caret-white text-gray-400 text-md px-2 py-1.5 w-full min-w-16 outline-none focus:ring-2 ${error ? "focus:ring-red/50" : "focus:ring-primary/50"} duration-200`}
+ className={`absolute z-10 peer font-mono ph-no-capture bg-bunker-800 rounded-md caret-white text-gray-400 text-md px-2 py-1.5 w-full min-w-16 outline-none focus:ring-2 ${
+ error ? "focus:ring-red/50" : "focus:ring-primary/50"
+ } duration-200`}
spellCheck="false"
/>
- {startsWithNumber &&
+ {startsWithNumber && (
Should not start with a number
- }
- {hasDuplicates && !startsWithNumber &&
+ )}
+ {hasDuplicates && !startsWithNumber && (
Secret names should be unique
- }
+ )}
);
} else if (type === "value") {
@@ -78,61 +96,61 @@ const DashboardInputField = ({
} z-10 peer font-mono ph-no-capture bg-transparent rounded-md caret-white text-transparent text-md px-2 py-1.5 w-full min-w-16 outline-none focus:ring-2 focus:ring-primary/50 duration-200 no-scrollbar no-scrollbar::-webkit-scrollbar`}
spellCheck="false"
/>
-
- {
- value
- .split(REGEX)
- .map((word, id) => {
- if (word.match(REGEX) !== null) {
- return (
-
- {word.slice(0, 2)}
-
- {word.slice(2, word.length - 1)}
-
- {word.slice(word.length - 1, word.length) == "}" ? (
-
- {word.slice(word.length - 1, word.length)}
-
- ) : (
-
- {word.slice(word.length - 1, word.length)}
-
- )}
+ {value.split(REGEX).map((word, id) => {
+ if (word.match(REGEX) !== null) {
+ return (
+
+ {word.slice(0, 2)}
+
+ {word.slice(2, word.length - 1)}
- );
- } else {
- return {word};
- }
- })
- }
+ {word.slice(word.length - 1, word.length) == "}" ? (
+
+ {word.slice(word.length - 1, word.length)}
+
+ ) : (
+
+ {word.slice(word.length - 1, word.length)}
+
+ )}
+
+ );
+ } else {
+ return (
+
+ {word}
+
+ );
+ }
+ })}
{blurred && (
- {value
- .split("")
- .map(() => (
-
- ))}
+ {value.split("").map(() => (
+
+ ))}
- )}
+ )}
);
}
+
+ return <>Something Wrong>;
};
export default React.memo(DashboardInputField);
From f5035a4169268d8490b0efac8d216119c6d5b192 Mon Sep 17 00:00:00 2001
From: mv-turtle <78047717+mv-turtle@users.noreply.github.com>
Date: Sat, 3 Dec 2022 20:10:56 -0500
Subject: [PATCH 06/33] Update README.md
---
README.md | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index 20a4b3ee1..4215a9fa8 100644
--- a/README.md
+++ b/README.md
@@ -54,15 +54,13 @@ To quickly get started, visit our [get started guide](https://infisical.com/docs
## What's cool about this?
-Infisical is simple, E2EE, and (soon to be) complete.
+Infisical makes secret management simple and end-to-end encrypted by default. We're on a mission to make it more accessible to all developers, not just security teams.
According to a [report](https://www.ekransystem.com/en/blog/secrets-management) in 2019, only 10% of organizations use secret management solutions despite all using digital secrets to some extent.
-We're on a mission to make secret management more accessible to everyone β that means building for developers, not just security teams.
-
If you care about efficiency and security, then Infisical is right for you.
-Need any integrations or want a new feature? Feel free to [create an issue](https://github.com/Infisical/infisical/issues) or [contribute](https://infisical.com/docs/contributing/overview) directly to the repository.
+We are currently working hard to make Infisical more extensive. Need any integrations or want a new feature? Feel free to [create an issue](https://github.com/Infisical/infisical/issues) or [contribute](https://infisical.com/docs/contributing/overview) directly to the repository.
## Contributing
@@ -279,4 +277,4 @@ Looking to report a security vulnerability? Please don't post about it in GitHub
-
+
From 656d375af0322f75c4d094654bc497304216af10 Mon Sep 17 00:00:00 2001
From: Maidul Islam
Date: Sat, 3 Dec 2022 20:29:42 -0500
Subject: [PATCH 07/33] add frontend/backend deployment Helm
---
.../infisical/templates/backend-deployment | 35 +++++++++++++++++++
.../templates/frontend-deployment.yml | 33 +++++++++++++++++
helm-charts/infisical/templates/secrets.yml | 10 ++++++
3 files changed, 78 insertions(+)
create mode 100644 helm-charts/infisical/templates/backend-deployment
create mode 100644 helm-charts/infisical/templates/frontend-deployment.yml
create mode 100644 helm-charts/infisical/templates/secrets.yml
diff --git a/helm-charts/infisical/templates/backend-deployment b/helm-charts/infisical/templates/backend-deployment
new file mode 100644
index 000000000..645fafb99
--- /dev/null
+++ b/helm-charts/infisical/templates/backend-deployment
@@ -0,0 +1,35 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: infisical-backend
+ labels:
+ app: backend
+spec:
+ replicas: {{ .Values.backend.replicaCount }}
+ selector:
+ matchLabels:
+ app: backend
+ template:
+ metadata:
+ labels:
+ app: backend
+ spec:
+ containers:
+ - name: backend
+ image: infisical/backend
+ ports:
+ - containerPort: 4000
+ env:
+
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: infisical-backend-service
+spec:
+ selector:
+ app: backend
+ ports:
+ - protocol: TCP
+ port: 4000
+ targetPort: 4000 # container port
diff --git a/helm-charts/infisical/templates/frontend-deployment.yml b/helm-charts/infisical/templates/frontend-deployment.yml
new file mode 100644
index 000000000..f33313436
--- /dev/null
+++ b/helm-charts/infisical/templates/frontend-deployment.yml
@@ -0,0 +1,33 @@
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: infisical-frontend
+ labels:
+ app: frontend
+spec:
+ replicas: {{ .Values.frontend.replicaCount }}
+ selector:
+ matchLabels:
+ app: frontend
+ template:
+ metadata:
+ labels:
+ app: frontend
+ spec:
+ containers:
+ - name: frontend
+ image: infisical/frontend
+ ports:
+ - containerPort: 4000
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: infisical-frontend-service
+spec:
+ selector:
+ app: frontend
+ ports:
+ - protocol: TCP
+ port: 3000 # service
+ targetPort: 3000 # container port
diff --git a/helm-charts/infisical/templates/secrets.yml b/helm-charts/infisical/templates/secrets.yml
new file mode 100644
index 000000000..d5e2de83c
--- /dev/null
+++ b/helm-charts/infisical/templates/secrets.yml
@@ -0,0 +1,10 @@
+apiVersion: v1
+kind: Secret
+metadata:
+ name: {{ .Values.secrets.name | default infisicalSecrets }}
+type: {{ .Values.secrets.type }}
+data:
+ {{- range $key, $val := .Values.secrets.all }}
+ {{"SECRET_"}}{{ $key }}: {{ $val | b64enc | quote }}
+ {{- end}}
+
\ No newline at end of file
From 20d8d255cbb23ef1355b2ee5b66ad420ca9d5c3f Mon Sep 17 00:00:00 2001
From: Vladyslav Matsiiako
Date: Sat, 3 Dec 2022 23:23:32 -0500
Subject: [PATCH 08/33] Added a quick start guide for new users
---
frontend/components/basic/layout.js | 135 ++++++++++--------
frontend/components/billing/Plan.js | 2 +-
.../pages/api/organization/GetOrgUsers.js | 8 +-
frontend/pages/home/[id].tsx | 135 ++++++++++++++++++
frontend/pages/signup.js | 4 +-
5 files changed, 222 insertions(+), 62 deletions(-)
create mode 100644 frontend/pages/home/[id].tsx
diff --git a/frontend/components/basic/layout.js b/frontend/components/basic/layout.js
index 0a8cb3ebd..63dbf5dea 100644
--- a/frontend/components/basic/layout.js
+++ b/frontend/components/basic/layout.js
@@ -3,8 +3,9 @@ import { useEffect, useState } from "react";
import Link from "next/link";
import { useRouter } from "next/router";
import {
+ faBookOpen,
faGear,
- faHouse,
+ faKey,
faMobile,
faPlug,
faUser,
@@ -114,7 +115,7 @@ export default function Layout({ children }) {
href:
"/dashboard/" + workspaceMapping[workspaceSelected] + "?Development",
title: "Secrets",
- emoji: ,
+ emoji: ,
},
{
href: "/users/" + workspaceMapping[workspaceSelected],
@@ -214,66 +215,88 @@ export default function Layout({ children }) {
|