From e1bf97de523a73c62937eacb4bfdb7253f288043 Mon Sep 17 00:00:00 2001 From: nafees nazik Date: Thu, 6 Oct 2022 13:24:59 +0530 Subject: [PATCH 01/10] docs: add deploy to digital ocean button --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a2b62ceab..73869146e 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ [![Deploy with Vercel](https://vercel.com/button)]() [![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy) +[![Deploy to DO](https://www.deploytodo.com/do-btn-blue.svg)](https://cloud.digitalocean.com/apps/new?repo=https://github.com/boxyhq/jackson/tree/main) SAML SSO service From a1668a448ec575c4b8b8b3bb0f99f249bd55a07f Mon Sep 17 00:00:00 2001 From: nafees nazik Date: Thu, 6 Oct 2022 15:52:13 +0530 Subject: [PATCH 02/10] build: add deploy template --- .do/deploy.template.yaml | 59 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .do/deploy.template.yaml diff --git a/.do/deploy.template.yaml b/.do/deploy.template.yaml new file mode 100644 index 000000000..c25043c67 --- /dev/null +++ b/.do/deploy.template.yaml @@ -0,0 +1,59 @@ +spec: + name: SAML Jackson + services: + - name: web + build_command: npm run build + run_command: npm run start + git: + branch: release + repo_clone_url: https://github.com/boxyhq/jackson.git + envs: + # Jackson settings + - key: EXTERNAL_URL + - key: SAML_AUDIENCE + value: 'https://saml.boxyhq.com' + - key: JACKSON_API_KEYS + type: SECRET + - key: IDP_ENABLED + - key: PRE_LOADED_CONFIG + - key: CLIENT_SECRET_VERIFIER + + # Database settings + - key: DB_ENGINE + value: 'sql' + - key: DB_URL + value: 'postgres://postgres:postgres@localhost:5432/postgres' + - key: DB_TYPE + value: 'postgres' + - key: DB_TTL + value: 300 + - key: DB_CLEANUP_LIMIT + value: 1000 + - key: DB_PAGE_LIMIT + value: 50 + - key: DB_ENCRYPTION_KEY + type: SECRET + + # Admin UI settings + - key: SMTP_HOST + - key: SMTP_PORT + - key: SMTP_USER + - key: SMTP_PASSWORD + type: SECRET + - key: SMTP_FROM + - key: NEXTAUTH_URL + - key: NEXTAUTH_SECRET + type: SECRET + - key: NEXTAUTH_ACL + + # OpenTelemetry + - key: OTEL_EXPORTER_OTLP_METRICS_ENDPOINT + - key: OTEL_EXPORTER_OTLP_HEADERS + + - key: OPENID_JWS_ALG + + # JWT signing keys + - key: OPENID_RSA_PRIVATE_KEY + type: SECRET + - key: OPENID_RSA_PUBLIC_KEY + type: SECRET From ac51110aa4c4ec740260b0c5790ec4d039d5dc01 Mon Sep 17 00:00:00 2001 From: nafees nazik Date: Mon, 10 Oct 2022 23:15:01 +0530 Subject: [PATCH 03/10] fix: use string value --- .do/deploy.template.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.do/deploy.template.yaml b/.do/deploy.template.yaml index c25043c67..ac6939c99 100644 --- a/.do/deploy.template.yaml +++ b/.do/deploy.template.yaml @@ -26,11 +26,11 @@ spec: - key: DB_TYPE value: 'postgres' - key: DB_TTL - value: 300 + value: '300' - key: DB_CLEANUP_LIMIT - value: 1000 + value: '1000' - key: DB_PAGE_LIMIT - value: 50 + value: '50' - key: DB_ENCRYPTION_KEY type: SECRET From c846c8237879eb1865a614de2f94727da90f9a0d Mon Sep 17 00:00:00 2001 From: nafees nazik Date: Mon, 10 Oct 2022 23:20:45 +0530 Subject: [PATCH 04/10] fix:app spec name --- .do/deploy.template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.do/deploy.template.yaml b/.do/deploy.template.yaml index ac6939c99..df733f929 100644 --- a/.do/deploy.template.yaml +++ b/.do/deploy.template.yaml @@ -1,5 +1,5 @@ spec: - name: SAML Jackson + name: SAML-Jackson services: - name: web build_command: npm run build From 8762b24649f02fc21fe4cacf18e1fd57b837945a Mon Sep 17 00:00:00 2001 From: nafees nazik Date: Mon, 10 Oct 2022 23:23:11 +0530 Subject: [PATCH 05/10] fix: lowercase name --- .do/deploy.template.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.do/deploy.template.yaml b/.do/deploy.template.yaml index df733f929..b76dd5bda 100644 --- a/.do/deploy.template.yaml +++ b/.do/deploy.template.yaml @@ -1,5 +1,5 @@ spec: - name: SAML-Jackson + name: saml-jackson services: - name: web build_command: npm run build From 8a0926850c809f404100705201b21f3646a31fbb Mon Sep 17 00:00:00 2001 From: Aswin V Date: Tue, 11 Oct 2022 13:26:04 +0530 Subject: [PATCH 06/10] Sync lock file --- npm/package-lock.json | 99 ++++++++++++++++++++----------------------- package-lock.json | 33 ++++++++------- 2 files changed, 63 insertions(+), 69 deletions(-) diff --git a/npm/package-lock.json b/npm/package-lock.json index 342b6f807..4b34c6334 100644 --- a/npm/package-lock.json +++ b/npm/package-lock.json @@ -460,7 +460,7 @@ }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "@jridgewell/trace-mapping": "0.3.9" @@ -471,7 +471,7 @@ }, "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { "version": "0.3.9", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "@jridgewell/resolve-uri": "^3.0.3", @@ -663,7 +663,7 @@ }, "node_modules/@jridgewell/resolve-uri": { "version": "3.1.0", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=6.0.0" @@ -679,7 +679,7 @@ }, "node_modules/@jridgewell/sourcemap-codec": { "version": "1.4.14", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/@jridgewell/trace-mapping": { @@ -821,22 +821,22 @@ }, "node_modules/@tsconfig/node10": { "version": "1.0.9", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/@tsconfig/node12": { "version": "1.0.11", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/@tsconfig/node14": { "version": "1.0.3", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/@tsconfig/node16": { "version": "1.0.3", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/@types/json-schema": { @@ -1262,7 +1262,7 @@ }, "node_modules/acorn": { "version": "8.8.0", - "devOptional": true, + "dev": true, "license": "MIT", "bin": { "acorn": "bin/acorn" @@ -1281,7 +1281,7 @@ }, "node_modules/acorn-walk": { "version": "8.2.0", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=0.4.0" @@ -1375,7 +1375,7 @@ }, "node_modules/arg": { "version": "4.1.3", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/argparse": { @@ -1767,7 +1767,7 @@ }, "node_modules/create-require": { "version": "1.1.1", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/cross-env": { @@ -2990,7 +2990,7 @@ }, "node_modules/make-error": { "version": "1.3.6", - "devOptional": true, + "dev": true, "license": "ISC" }, "node_modules/marked": { @@ -6262,7 +6262,7 @@ }, "node_modules/ts-node": { "version": "10.9.1", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "@cspotcode/source-map-support": "^0.8.0", @@ -6304,7 +6304,7 @@ }, "node_modules/ts-node/node_modules/diff": { "version": "4.0.2", - "devOptional": true, + "dev": true, "license": "BSD-3-Clause", "engines": { "node": ">=0.3.1" @@ -6555,7 +6555,7 @@ "version": "4.8.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", - "devOptional": true, + "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -6638,7 +6638,7 @@ }, "node_modules/v8-compile-cache-lib": { "version": "3.0.1", - "devOptional": true, + "dev": true, "license": "MIT" }, "node_modules/webidl-conversions": { @@ -6896,7 +6896,7 @@ }, "node_modules/yn": { "version": "3.1.1", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=6" @@ -7196,14 +7196,14 @@ }, "@cspotcode/source-map-support": { "version": "0.8.1", - "devOptional": true, + "dev": true, "requires": { "@jridgewell/trace-mapping": "0.3.9" }, "dependencies": { "@jridgewell/trace-mapping": { "version": "0.3.9", - "devOptional": true, + "dev": true, "requires": { "@jridgewell/resolve-uri": "^3.0.3", "@jridgewell/sourcemap-codec": "^1.4.10" @@ -7330,7 +7330,7 @@ }, "@jridgewell/resolve-uri": { "version": "3.1.0", - "devOptional": true + "dev": true }, "@jridgewell/set-array": { "version": "1.1.2", @@ -7338,7 +7338,7 @@ }, "@jridgewell/sourcemap-codec": { "version": "1.4.14", - "devOptional": true + "dev": true }, "@jridgewell/trace-mapping": { "version": "0.3.14", @@ -7375,8 +7375,7 @@ "version": "0.27.0" }, "@redis/bloom": { - "version": "1.0.2", - "requires": {} + "version": "1.0.2" }, "@redis/client": { "version": "1.3.0", @@ -7387,20 +7386,16 @@ } }, "@redis/graph": { - "version": "1.0.1", - "requires": {} + "version": "1.0.1" }, "@redis/json": { - "version": "1.0.4", - "requires": {} + "version": "1.0.4" }, "@redis/search": { - "version": "1.1.0", - "requires": {} + "version": "1.1.0" }, "@redis/time-series": { - "version": "1.0.3", - "requires": {} + "version": "1.0.3" }, "@sinonjs/commons": { "version": "1.8.3", @@ -7434,19 +7429,19 @@ }, "@tsconfig/node10": { "version": "1.0.9", - "devOptional": true + "dev": true }, "@tsconfig/node12": { "version": "1.0.11", - "devOptional": true + "dev": true }, "@tsconfig/node14": { "version": "1.0.3", - "devOptional": true + "dev": true }, "@tsconfig/node16": { "version": "1.0.3", - "devOptional": true + "dev": true }, "@types/json-schema": { "version": "7.0.11", @@ -7693,16 +7688,15 @@ }, "acorn": { "version": "8.8.0", - "devOptional": true + "dev": true }, "acorn-jsx": { "version": "5.3.2", - "dev": true, - "requires": {} + "dev": true }, "acorn-walk": { "version": "8.2.0", - "devOptional": true + "dev": true }, "aggregate-error": { "version": "3.1.0", @@ -7758,7 +7752,7 @@ }, "arg": { "version": "4.1.3", - "devOptional": true + "dev": true }, "argparse": { "version": "2.0.1" @@ -7986,7 +7980,7 @@ }, "create-require": { "version": "1.1.1", - "devOptional": true + "dev": true }, "cross-env": { "version": "7.0.3", @@ -8143,8 +8137,7 @@ }, "eslint-config-prettier": { "version": "8.5.0", - "dev": true, - "requires": {} + "dev": true }, "eslint-scope": { "version": "5.1.1", @@ -8732,7 +8725,7 @@ }, "make-error": { "version": "1.3.6", - "devOptional": true + "dev": true }, "marked": { "version": "4.1.1", @@ -9109,8 +9102,7 @@ "version": "1.0.1" }, "pg-pool": { - "version": "3.5.2", - "requires": {} + "version": "3.5.2" }, "pg-protocol": { "version": "1.5.0" @@ -10698,8 +10690,7 @@ "ws": { "version": "7.5.7", "bundled": true, - "dev": true, - "requires": {} + "dev": true }, "yallist": { "version": "4.0.0", @@ -10825,7 +10816,7 @@ }, "ts-node": { "version": "10.9.1", - "devOptional": true, + "dev": true, "requires": { "@cspotcode/source-map-support": "^0.8.0", "@tsconfig/node10": "^1.0.7", @@ -10844,7 +10835,7 @@ "dependencies": { "diff": { "version": "4.0.2", - "devOptional": true + "dev": true } } }, @@ -10956,7 +10947,7 @@ "version": "4.8.4", "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", - "devOptional": true + "dev": true }, "unicode-length": { "version": "2.0.2", @@ -11002,7 +10993,7 @@ }, "v8-compile-cache-lib": { "version": "3.0.1", - "devOptional": true + "dev": true }, "webidl-conversions": { "version": "7.0.0" @@ -11170,7 +11161,7 @@ }, "yn": { "version": "3.1.1", - "devOptional": true + "dev": true }, "yocto-queue": { "version": "0.1.0", diff --git a/package-lock.json b/package-lock.json index f810d7351..61c29143b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5105,6 +5105,17 @@ "node": ">=0.10.0" } }, + "node_modules/marked": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.1.1.tgz", + "integrity": "sha512-0cNMnTcUJPxbA6uWmCmjWz4NJRe/0Xfk2NhXCUHjew9qJzFN20krFnsUe7QynwqOwa5m1fZ4UDg0ycKFVC0ccw==", + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 12" + } + }, "node_modules/mdast-util-definitions": { "version": "5.1.1", "license": "MIT", @@ -9061,7 +9072,7 @@ "@opentelemetry/api-metrics": "0.27.0", "axios": "0.27.2", "jose": "4.10.0", - "marked": "4.1.0", + "marked": "4.1.1", "mongodb": "4.10.0", "mysql2": "2.3.3", "node-forge": "1.3.1", @@ -9839,16 +9850,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "npm/node_modules/marked": { - "version": "4.1.0", - "license": "MIT", - "bin": { - "marked": "bin/marked.js" - }, - "engines": { - "node": ">= 12" - } - }, "npm/node_modules/mime-db": { "version": "1.52.0", "license": "MIT", @@ -12939,7 +12940,7 @@ "eslint": "8.24.0", "eslint-config-prettier": "8.5.0", "jose": "4.10.0", - "marked": "4.1.0", + "marked": "4.1.1", "mongodb": "4.10.0", "mysql2": "2.3.3", "node-forge": "1.3.1", @@ -13434,9 +13435,6 @@ "semver": "^6.0.0" } }, - "marked": { - "version": "4.1.0" - }, "mime-db": { "version": "1.52.0" }, @@ -17919,6 +17917,11 @@ "markdown-extensions": { "version": "1.1.1" }, + "marked": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.1.1.tgz", + "integrity": "sha512-0cNMnTcUJPxbA6uWmCmjWz4NJRe/0Xfk2NhXCUHjew9qJzFN20krFnsUe7QynwqOwa5m1fZ4UDg0ycKFVC0ccw==" + }, "mdast-util-definitions": { "version": "5.1.1", "requires": { From 6bd284035c14a8005a55e5d8f709c12978140182 Mon Sep 17 00:00:00 2001 From: nafees nazik Date: Tue, 11 Oct 2022 18:58:55 +0530 Subject: [PATCH 07/10] fix: remove secret --- .do/deploy.template.yaml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.do/deploy.template.yaml b/.do/deploy.template.yaml index b76dd5bda..2f3e04bd5 100644 --- a/.do/deploy.template.yaml +++ b/.do/deploy.template.yaml @@ -13,7 +13,6 @@ spec: - key: SAML_AUDIENCE value: 'https://saml.boxyhq.com' - key: JACKSON_API_KEYS - type: SECRET - key: IDP_ENABLED - key: PRE_LOADED_CONFIG - key: CLIENT_SECRET_VERIFIER @@ -32,18 +31,14 @@ spec: - key: DB_PAGE_LIMIT value: '50' - key: DB_ENCRYPTION_KEY - type: SECRET - # Admin UI settings - key: SMTP_HOST - key: SMTP_PORT - key: SMTP_USER - key: SMTP_PASSWORD - type: SECRET - key: SMTP_FROM - key: NEXTAUTH_URL - key: NEXTAUTH_SECRET - type: SECRET - key: NEXTAUTH_ACL # OpenTelemetry @@ -54,6 +49,4 @@ spec: # JWT signing keys - key: OPENID_RSA_PRIVATE_KEY - type: SECRET - - key: OPENID_RSA_PUBLIC_KEY - type: SECRET + - key: OPENID_RSA_PUBLIC_KE From aa698e362691cc5142d51975cf8d85290e394e5f Mon Sep 17 00:00:00 2001 From: nafees nazik Date: Tue, 11 Oct 2022 19:00:04 +0530 Subject: [PATCH 08/10] fix: remove db url value --- .do/deploy.template.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.do/deploy.template.yaml b/.do/deploy.template.yaml index 2f3e04bd5..9759811c6 100644 --- a/.do/deploy.template.yaml +++ b/.do/deploy.template.yaml @@ -21,7 +21,6 @@ spec: - key: DB_ENGINE value: 'sql' - key: DB_URL - value: 'postgres://postgres:postgres@localhost:5432/postgres' - key: DB_TYPE value: 'postgres' - key: DB_TTL From 8a4e9ca66fe6b50d99e2161241b06ec9825c0f07 Mon Sep 17 00:00:00 2001 From: nafees nazik Date: Tue, 11 Oct 2022 19:03:58 +0530 Subject: [PATCH 09/10] fix: use app url --- .do/deploy.template.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.do/deploy.template.yaml b/.do/deploy.template.yaml index 9759811c6..548307bf5 100644 --- a/.do/deploy.template.yaml +++ b/.do/deploy.template.yaml @@ -10,6 +10,7 @@ spec: envs: # Jackson settings - key: EXTERNAL_URL + value: ${APP_URL} - key: SAML_AUDIENCE value: 'https://saml.boxyhq.com' - key: JACKSON_API_KEYS @@ -37,6 +38,7 @@ spec: - key: SMTP_PASSWORD - key: SMTP_FROM - key: NEXTAUTH_URL + value: ${APP_URL} - key: NEXTAUTH_SECRET - key: NEXTAUTH_ACL From 5d9688fc9633e2a0c0b58a58a18b05f2f46fa5bc Mon Sep 17 00:00:00 2001 From: nafees nazik Date: Tue, 11 Oct 2022 19:07:07 +0530 Subject: [PATCH 10/10] fix: use ghost button --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 73869146e..0ad883cf7 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ [![Deploy with Vercel](https://vercel.com/button)]() [![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy) -[![Deploy to DO](https://www.deploytodo.com/do-btn-blue.svg)](https://cloud.digitalocean.com/apps/new?repo=https://github.com/boxyhq/jackson/tree/main) +[![Deploy to DO](https://www.deploytodo.com/do-btn-blue-ghost.svg)](https://cloud.digitalocean.com/apps/new?repo=https://github.com/boxyhq/jackson/tree/main) SAML SSO service