Compare commits

..

223 Commits

Author SHA1 Message Date
6ecd289e6c update rate limits 2024-01-27 18:38:57 -05:00
b8a6f5dc54 add email templates and disposable_emails.text to build 2024-01-27 18:15:12 -05:00
dedbc4fd60 remove unused imports 2024-01-27 17:11:40 -05:00
d14099990f remove notice 2024-01-27 17:04:53 -05:00
3f5ab2a09e remove console.log 2024-01-27 17:04:02 -05:00
a191f437e9 patch blind index route 2024-01-27 17:03:16 -05:00
1a375ec45b patch import * 2024-01-27 12:35:53 -05:00
81f3a6a7a8 add loca host to docker prod 2024-01-27 12:27:15 -05:00
dc8b64708a add debug logs 2024-01-27 11:20:17 -05:00
dd3790c995 patch git workflow 2024-01-27 10:31:30 -05:00
a91b6ebc03 new workflow for releasing standalone 2024-01-27 10:28:49 -05:00
e68d1d06a8 Merge pull request #1334 from akhilmhdh/feat/patch-pg-v2
feat: changed backend-pg to backend
2024-01-27 10:06:34 -05:00
8f754d659a feat: resolved tiny bug secret blind indexing 2024-01-27 20:23:19 +05:30
bef28fea2d Update release-standalone-docker-img.yml 2024-01-27 09:42:20 -05:00
28f15de8df Update build-docker-image-to-prod.yml 2024-01-27 09:40:59 -05:00
66d258f02b feat: changed backend-pg to backend 2024-01-27 19:14:33 +05:30
d13eafcef7 Merge pull request #1332 from akhilmhdh/feat/infisical-pg
Hello world from PG
2024-01-27 02:26:05 -05:00
6db47499de add index for blind index 2024-01-27 12:40:37 +05:30
1cefb036e0 ignore dup user and make email unique 2024-01-27 12:40:37 +05:30
af77ad8b2f update rate limits 2024-01-27 12:40:37 +05:30
dd0f9f5216 patch secret apporval request secrets 2024-01-27 12:40:37 +05:30
29df6f067e remove unnecessary concole 2024-01-27 12:40:37 +05:30
4dc9a3692e add mongo to docker compose 2024-01-27 12:40:37 +05:30
49bb2121b9 update helm values 2024-01-27 12:40:37 +05:30
07679d9318 add postgres helm chart 2024-01-27 12:40:37 +05:30
fb271726fe make emails not unique for now 2024-01-27 12:40:37 +05:30
f9e7d4ddd2 make MI access token have string id 2024-01-27 12:40:37 +05:30
442c454932 make email unique 2024-01-27 12:40:37 +05:30
8b22ee1fac coerce strings to number responses 2024-01-27 12:40:37 +05:30
8a10dc8983 make before and after more clear in roll back 2024-01-27 12:40:37 +05:30
d57920706a patch bug validateAccessTokenExp bug 2024-01-27 12:40:37 +05:30
425611b409 remove uuid from snapshot project response 2024-01-27 12:40:37 +05:30
b20489982d delete unneeded file 2024-01-27 12:40:37 +05:30
4b569ee4b4 make access token non uui 2024-01-27 12:40:37 +05:30
af9661b221 feat(infisical-pg): minor bug fixes in frontend and pg migrator secret approval req 2024-01-27 12:40:37 +05:30
53f16f01b8 feat(infisical-pg): fixed audit log to estimate doc count and resolve cors issue 2024-01-27 12:40:37 +05:30
f519d1cffc remove async from validateAccessTokenExp 2024-01-27 12:40:37 +05:30
b8b28d2710 feat(infisical-pg): resolved linting issues 2024-01-27 12:40:37 +05:30
deab700716 feat(infisical-pg): made api key backward compat 2024-01-27 12:40:37 +05:30
4d184003a8 feat(infisical-pg): made identity ua client sec backward compat 2024-01-27 12:40:37 +05:30
9849312317 remove console 2024-01-27 12:40:37 +05:30
79454a6aea feat(infisical-pg): fixed org bot gone missing 2024-01-27 12:40:37 +05:30
8e0fb9fe9b feat(infisical-pg): wrapped saml get option in try catch 2024-01-27 12:40:37 +05:30
a729114376 remove prefix from redis 2024-01-27 12:40:37 +05:30
0c20cb0f91 JWT_AUTH_SECRET => AUTH_SECRET 2024-01-27 12:40:37 +05:30
d1597ed8da find by id of ormify patch 2024-01-27 12:40:37 +05:30
6cee8dc7e5 uni auth remove auth type 2024-01-27 12:40:37 +05:30
13040439c3 coerce big int from string to number from sql 2024-01-27 12:40:37 +05:30
9a4f294749 add prefix to queue 2024-01-27 12:40:37 +05:30
2436a572f0 revert to only arm build 2024-01-27 12:40:37 +05:30
7cd21e3a93 remove timeout and signal from license requester 2024-01-27 12:40:37 +05:30
e28416b50b patch service token migration backwards with mongo 2024-01-27 12:40:37 +05:30
9677836b76 feat(infisical-pg): added telemtry service 2024-01-27 12:40:37 +05:30
ca858f8e13 rename ci 2024-01-27 12:40:37 +05:30
c2beff493f add linux/amd64,linux/arm64 for standone release 2024-01-27 12:40:37 +05:30
34fafd815c set postgres ci to only linux/arm64 2024-01-27 12:40:37 +05:30
c05ebbb864 set SmtpHost.Sendgrid secure=true 2024-01-27 12:40:37 +05:30
372f2be2f3 increase license server request time out 2024-01-27 12:40:37 +05:30
23e621f557 increase license request timeout 2024-01-27 12:40:36 +05:30
464b80140f add 443 port to docker 2024-01-27 12:40:36 +05:30
01cd496afe update status api 2024-01-27 12:40:36 +05:30
6094940a8b add success message 2024-01-27 12:40:36 +05:30
30b959babb JWT_AUTH_SECRET => AUTH_SECRET 2024-01-27 12:40:36 +05:30
cec14efe86 add logs to license server 2024-01-27 12:40:36 +05:30
b3f090d87e only amd 2024-01-27 12:40:36 +05:30
1deb6827cf add STANDALONE_MODE to docker file 2024-01-27 12:40:36 +05:30
24dbf11962 add back arm 2024-01-27 12:40:36 +05:30
20fb3906aa only amd 2024-01-27 12:40:36 +05:30
e7e2ca0f45 update postgress workflow 2024-01-27 12:40:36 +05:30
caabf2c952 patch bot keys 2024-01-27 12:40:36 +05:30
35eade0206 update to alpine node 20 2024-01-27 12:40:36 +05:30
6d1b79430d lower node alpine 2024-01-27 12:40:36 +05:30
7864524944 remove QEMU 2024-01-27 12:40:36 +05:30
adc90e91fe update build-push-actio version 2024-01-27 12:40:36 +05:30
db7db0cc04 remove version 2024-01-27 12:40:36 +05:30
aa4d9ad267 Revert "update npm time out"
This reverts commit 38a7b1acf1a445ea62dcad5b60e9624733976b78.
2024-01-27 12:40:36 +05:30
27fd857120 update npm time out 2024-01-27 12:40:36 +05:30
205e46571a remove depot 2024-01-27 12:40:36 +05:30
70a6a7cfa1 create CI for standalone image 2024-01-27 12:40:36 +05:30
558315c24b set secret blind index count to Number 2024-01-27 12:40:36 +05:30
a2bd808196 rename project roles message 2024-01-27 12:40:36 +05:30
cfb0d4ee96 add no access to org service role 2024-01-27 12:40:36 +05:30
15fc4fd609 set cascade in trusted ip for project id 2024-01-27 12:40:36 +05:30
83bff9ae14 make protectedKey protectedKeyIV protectedKeyTag nullable 2024-01-27 12:40:36 +05:30
86ba6355cf more patches to migrator 2024-01-27 12:40:36 +05:30
6b427adfe0 feat(infisical-pg): added v3 secret blind index enable feature 2024-01-27 12:40:36 +05:30
01f711ad19 feat(infisical-pg): completed audit log migrator 2024-01-27 12:39:54 +05:30
fa572f7ee0 feat(infisical-pg): completed standalone and docker node version 2024-01-27 12:39:54 +05:30
249edf98e9 remove notNullable from various tables 2024-01-27 12:39:54 +05:30
753a4daf69 remove authType from mi access token 2024-01-27 12:39:54 +05:30
b9320ed9bd comment out corrupt seed files 2024-01-27 12:39:54 +05:30
8eace5528f point migrations to pg backend folder 2024-01-27 12:39:54 +05:30
9407c16e83 Update queue-service.ts 2024-01-27 12:39:54 +05:30
dcdcc40a4a Update smtp-service.ts 2024-01-27 12:39:54 +05:30
edd78eaeba Refactor 2024-01-27 12:39:54 +05:30
c21ea6fb75 Cleanup 2024-01-27 12:39:54 +05:30
a60dbe523b Refactor to secret queue 2024-01-27 12:39:54 +05:30
bb9a6b4272 Update index.ts 2024-01-27 12:39:54 +05:30
eaca1b694a Log 2024-01-27 12:39:54 +05:30
0afb44af29 Handle deletion 2024-01-27 12:39:54 +05:30
3b39e38c89 Secret reminder types 2024-01-27 12:39:54 +05:30
4189d1028d Optional secret reminder typing 2024-01-27 12:39:54 +05:30
f227824fb8 Added secret reminders email 2024-01-27 12:39:54 +05:30
49d6918297 Update secret-service.ts 2024-01-27 12:39:54 +05:30
00212f1c72 Secret reminder queue factory 2024-01-27 12:39:54 +05:30
987f0c9081 Added secret reminder service 2024-01-27 12:39:54 +05:30
e4f00f74e9 Added new special query for getting org from project ID 2024-01-27 12:39:54 +05:30
ce580f417e Registered secret reminder service 2024-01-27 12:39:54 +05:30
c1662d6db5 Added secret reminder to queue service 2024-01-27 12:39:54 +05:30
2dae59c6be Update fastify.d.ts 2024-01-27 12:39:54 +05:30
9bd764e535 feat(infisical-pg): updated pg migrator to new table name changes 2024-01-27 12:39:54 +05:30
e4f32f092a feat(infisical-pg): completed test for secret folder and import 2024-01-27 12:39:54 +05:30
e02c082c7a more patches for migration script 2024-01-27 12:39:54 +05:30
80b6c4ad94 feat(infisical-pg): completed tag support to all secret operations 2024-01-27 12:39:54 +05:30
42eb01e1e2 feat(infisical-pg): completed support for tags in secret snapshot 2024-01-27 12:39:54 +05:30
b8157122e6 patches for dangling data 2024-01-27 12:39:54 +05:30
4f66749430 feat(infisical-pg): added secret version tag 2024-01-27 12:39:54 +05:30
bfe5ee672b patches for migration 2024-01-27 12:39:54 +05:30
32a1a0a9e5 feat(infisical-pg): removed short form names in secret approval to long form 2024-01-27 12:39:54 +05:30
f7e1da65d5 feat(infisical-pg): added slug for org and project, resolved build error 2024-01-27 12:39:53 +05:30
6bf9bc1d2c feat(infisical-pg): changed all dal to DAL as said by maidul 2024-01-27 12:38:23 +05:30
59c747cf72 feat(infisical-pg): added rate limiter and bootstrap 2024-01-27 12:38:23 +05:30
b04030a060 feat(infisical-pg): resolved missing integration auth api 2024-01-27 12:38:23 +05:30
e8fd693da3 feat(infisical-pg): added single scope service token auto filling for get secret by name raw and version option for both get secret by name 2024-01-27 12:38:23 +05:30
6c2803da93 feat(infisical-pg): crct permission for secret approval policy check 2024-01-27 12:38:23 +05:30
4031f4a559 feat(infisical-pg): idempotent folder creation 2024-01-27 12:38:23 +05:30
8ab89bc420 feat(infisical-pg): resolved import secret breaking cli backward compatiability 2024-01-27 12:38:23 +05:30
e46e87d758 feat(infisical-pg): fixed secret deletion not getting triggered 2024-01-27 12:38:23 +05:30
9c2ef15314 feat(infisical-pg): fixed missing secret path and commiter message in frontend 2024-01-27 12:38:23 +05:30
3213dafba9 add check to make sure user can only create service token for secrets they have access to 2024-01-27 12:38:23 +05:30
33c3c5ecc5 add permission check for target env/path for imports 2024-01-27 12:38:23 +05:30
627c8711dc feat(infisical-pg): fixed v3 raw endpoint auto filling based on service token data single scoped 2024-01-27 12:38:23 +05:30
8d3d4f222f feat(infisical-pg): fixed service token cli endpoint 2024-01-27 12:38:23 +05:30
65d3038414 set ignoreTrailingSlash to true in fastify 2024-01-27 12:38:23 +05:30
6b7b888fb4 feat(infisical-pg): fixed service token return body 2024-01-27 12:38:23 +05:30
bf059e0fe5 feat(infisical-pg): fixed secret rotation and secret approval limit offset 2024-01-27 12:38:23 +05:30
28fdf4ed4b Update service-token-router.ts 2024-01-27 12:38:23 +05:30
2606e42079 Correct Cloudflare Pages authorization page 2024-01-27 12:38:23 +05:30
b1285b401b Patch integration issues 2024-01-27 12:38:23 +05:30
3afafbb885 Add Makefile, pg-admin to docker compose 2024-01-27 12:38:23 +05:30
257547ff4d fix delete secret scans after git app uninstall 2024-01-27 12:38:23 +05:30
da4ae3c503 switch getSapOfFolder to check for secrets instead of approval 2024-01-27 12:38:23 +05:30
fb79e9e6fb update project add user text typo 2024-01-27 12:38:23 +05:30
5373cb6afb feat(infisical-pg): added secret version api, fixed pass reset flow, smtp connection issue fixed 2024-01-27 12:38:23 +05:30
31c0bf6831 Fixed UI glitch 2024-01-27 12:38:23 +05:30
67618046c0 Fixed creating service tokens with no expiry 2024-01-27 12:38:23 +05:30
df642179ba fix typo 2024-01-27 12:38:23 +05:30
c7d0f2325c Fixed secret creation 2024-01-27 12:38:23 +05:30
bb6d482ff9 feat(infisical-pg): added global error handler, try catch in oauth passport 2024-01-27 12:38:23 +05:30
4f619d7e48 Fixed signup for gitlab and github 2024-01-27 12:38:23 +05:30
295c1e5d4a feat(infisical-pg): fixed ts issue on passport type change 2024-01-27 12:38:23 +05:30
0be3ad9517 Fixed eslint bug 2024-01-27 12:38:23 +05:30
606ed25104 Fixed GitHub auth registration issue 2024-01-27 12:38:23 +05:30
c880a48749 feat(infisical-pg): fixed radix issue, bugs in oauth and tag cascade on 2024-01-27 12:38:23 +05:30
92f7b45e01 feat(infisical-pg): fixed plan going undefined and resolved project missing on env delete 2024-01-27 12:38:23 +05:30
5fe8bdc00b feat(infisical-pg): completed first version of pg migrator 2024-01-27 12:38:23 +05:30
9f813d72f2 feat(infisical-pg): resolved multi integration auth and ip v6 support in ua 2024-01-27 12:38:23 +05:30
d90fdac5ce feat(infisical-pg): fixed bugs in integrations and self hosted license failure 2024-01-27 12:38:23 +05:30
87709dc86f feat(infisical-pg): first setup for postgres migration script 2024-01-27 12:38:23 +05:30
deb8e74749 feat(infisical-pg): fixed some bugs on org invite missing auth method 2024-01-27 12:38:23 +05:30
3519412639 feat: added secret raw endpoint and include imports 2024-01-27 12:38:23 +05:30
0506389ada feat: added logged in based testing by injecting jwt token logic 2024-01-27 12:38:23 +05:30
dd7c449483 feat: added login test and fixed super admin bug 2024-01-27 12:38:23 +05:30
c7572a3374 feat: completed license server integration 2024-01-27 12:38:23 +05:30
fe416556f2 feat: changed req.auth.userId to permission.id to satisfy type error 2024-01-27 12:38:23 +05:30
20fb99f042 feat: added token based communications 2024-01-27 12:38:23 +05:30
daa94db874 feat(infisical-pg): changed back to old infisical-radar url 2024-01-27 12:38:23 +05:30
850e7bff98 feat(infisical-pg): completed secret scanner 2024-01-27 12:38:23 +05:30
bfaf87c4c2 feat(infisical-pg): completed saml integration 2024-01-27 12:38:23 +05:30
55f1392faf feat(infisical-pg): completed sync in secret approval 2024-01-27 12:38:23 +05:30
0bf658e501 feat(infisical-pg): completed webhook and integration trigger queue 2024-01-27 12:38:23 +05:30
aed94ff5bb feat(infisical-pg): resolved integration invalid cred error 2024-01-27 12:38:23 +05:30
0d3f09d668 feat(infisical-pg): completed checklist run for dashboard 2024-01-27 12:38:23 +05:30
16f0ac6d43 feat(infisical-pg): completed audit log moved ee routes to normal routing pattern 2024-01-27 12:38:23 +05:30
6e6a1c87f2 feat(infisical-pg): completed secrets fetching from imports based on priority 2024-01-27 12:38:23 +05:30
b5aa6c0000 feat(infisical-pg): completed secret rollback 2024-01-27 12:38:23 +05:30
784cdb4201 feat(infisical-pg): completed secret rotation with queue service 2024-01-27 12:38:23 +05:30
17e61bfc68 feat(infisical-pg): completed secret approval policy and services for approval requests 2024-01-27 12:38:23 +05:30
a6a60b7bbb feat(infisical-pg): fixing minor compatiability issues with frontend and backend on identity 2024-01-27 12:38:23 +05:30
d154f68a59 feat(infisical-pg: completed machine identity services 2024-01-27 12:38:23 +05:30
f5159583ae feat(infisical-pg: completed webhook and service token 2024-01-27 12:38:23 +05:30
771bec6d6d feat(infisical-pg): completed integration, integration auth and project bot api migration 2024-01-27 12:38:23 +05:30
010963a80c feat(infisical-pg): completed nested folder support for secret,folder and import operations 2024-01-27 12:38:23 +05:30
0e1191f2ea feat(infisical-pg): completed root folder level secret, secret import and folder 2024-01-27 12:38:23 +05:30
8a6ab7f2f6 feat(infisical-pg): connected project api changes with frontend 2024-01-27 12:38:22 +05:30
4f3582a98b feat(infisical-pg): added routes for workspaces and updated frontend 2024-01-27 12:38:22 +05:30
498a90c484 feat(infisical-pg: linted after import order fix 2024-01-27 12:38:22 +05:30
76e5d61da5 feat(infisical-pg: added services for project, project key and environment 2024-01-27 12:38:22 +05:30
53bb3bc610 feat(infisical-pg): added database schema for project, its membership role and env 2024-01-27 12:38:22 +05:30
1df7b88abf feat(infisical-pg): added e2e test setup 2024-01-27 12:38:22 +05:30
3670b16657 feat(infisical-pg): new org role routes completed 2024-01-27 12:38:22 +05:30
9a4b2f7d81 feat(infisical-pg): resolved type check issue and linted frontend 2024-01-27 12:38:22 +05:30
fadb36edb8 feat(infisical-pg): removed _id with id for new backend 2024-01-27 12:38:22 +05:30
fbe5a1adb0 feat(infisical-pg): added github,gitlab and google oauth 2024-01-27 12:38:22 +05:30
d0695a8998 feat(infisical-pg): added a seed setup with test user creation and org creation 2024-01-27 12:38:22 +05:30
a19e8ad016 feat(infisical-pg): updated names and simplified dal layer using ormify 2024-01-27 12:38:22 +05:30
15b57de0ed feat(infisical-pg): test first milestone one flow 2024-01-27 12:38:22 +05:30
aaba4a0895 feat(infisical-pg): changed frontend api types _id to normal id 2024-01-27 12:38:22 +05:30
f3b37de3f3 feat(infisical-pg): auth injection completed and validation in password router 2024-01-27 12:38:22 +05:30
fcfd6b3fb2 feat(infisical-pg): completed signup, login, password and backup key migration 2024-01-27 12:38:22 +05:30
05205d1eff feat(infisical-pg): added all previous simple server middlewares, swagger support 2024-01-27 12:38:22 +05:30
2243bcb3a4 feat: added dev and prod setup using esbuild 2024-01-27 12:38:22 +05:30
356e981401 Merge pull request #1313 from akhilmhdh/feat/migration-mode
feat(infisical-pg): added migration mode env and page
2024-01-27 00:58:58 -05:00
5b41fb0ff5 update text and patch notice 2024-01-27 00:21:57 -05:00
8893aec213 patch saml sso for rippling 2024-01-23 01:11:29 -05:00
c4cb8f8008 Merge pull request #1319 from Infisical/daniel/better-sdk-docs
(Docs): Improve SDK docs
2024-01-23 08:53:28 +04:00
046557c97f Add .NET 2024-01-23 08:47:29 +04:00
a15ba28c18 Update node guide to reflect new SDK 2024-01-23 08:47:20 +04:00
8386f4dcbd Update python guide to reflect new SDK 2024-01-23 08:47:11 +04:00
ada0fd9c5b Add new item for fallbacks 2024-01-23 08:47:01 +04:00
6376c29e49 update maintenace notice 2024-01-19 17:28:35 -05:00
402692614e updated maintenance page 2024-01-19 12:59:18 -08:00
34de6d4e29 feat(infisical-pg): added migration mode env and page 2024-01-20 01:20:14 +05:30
829e906650 Merge pull request #1311 from Infisical/daniel/changelog-jan-2024
[JAN] Changelog points
2024-01-18 20:25:52 -05:00
b7cbb0f1a8 Update overview.mdx 2024-01-19 00:14:03 +04:00
a50ffbb59d Update overview.mdx 2024-01-19 00:13:57 +04:00
48eda0c684 Update overview.mdx 2024-01-15 15:55:37 +04:00
ed89413689 Merge pull request #1293 from Infisical/update-blog
Update blog notification
2024-01-12 13:52:11 -05:00
0c94f77a6d Merge pull request #1302 from akhilmhdh/feat/banner
feat: added main banner for migration
2024-01-12 10:48:21 -05:00
e6068826f8 update migration notification 2024-01-11 23:34:46 -08:00
746ffb3840 feat: added main banner for migration 2024-01-11 23:09:57 +05:30
8fbc930012 updated notification text 2024-01-08 13:51:40 -08:00
0e5190a920 added the december update blog 2024-01-08 13:47:58 -08:00
1226 changed files with 111709 additions and 80043 deletions

View File

@ -3,6 +3,7 @@ on:
push:
tags:
- "infisical/v*.*.*"
- "!infisical/v*.*.*-postgres"
jobs:
backend-image:

View File

@ -0,0 +1,57 @@
name: Release standalone docker image
on:
push:
tags:
- "infisical/v*.*.*-postgres"
jobs:
infisical-standalone:
name: Build infisical standalone image postgres
runs-on: ubuntu-latest
steps:
- name: Extract version from tag
id: extract_version
run: echo "::set-output name=version::${GITHUB_REF_NAME#infisical/}"
- name: ☁️ Checkout source
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: 📦 Install dependencies to test all dependencies
run: npm ci --only-production
working-directory: backend
- name: version output
run: |
echo "Output Value: ${{ steps.version.outputs.major }}"
echo "Output Value: ${{ steps.version.outputs.minor }}"
echo "Output Value: ${{ steps.version.outputs.patch }}"
echo "Output Value: ${{ steps.version.outputs.version }}"
echo "Output Value: ${{ steps.version.outputs.version_type }}"
echo "Output Value: ${{ steps.version.outputs.increment }}"
- name: Save commit hashes for tag
id: commit
uses: pr-mpt/actions-commit-hash@v2
- name: 🔧 Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: 🐋 Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Depot CLI
uses: depot/setup-action@v1
- name: 📦 Build backend and export to Docker
uses: depot/build-push-action@v1
with:
project: 64mmf0n610
token: ${{ secrets.DEPOT_PROJECT_TOKEN }}
push: true
context: .
tags: |
infisical/infisical:latest-postgres
infisical/infisical:${{ steps.commit.outputs.short }}
infisical/infisical:${{ steps.extract_version.outputs.version }}
platforms: linux/amd64,linux/arm64
file: Dockerfile.standalone-infisical
build-args: |
POSTHOG_API_KEY=${{ secrets.PUBLIC_POSTHOG_API_KEY }}
INFISICAL_PLATFORM_VERSION=${{ steps.extract_version.outputs.version }}

View File

@ -3,6 +3,7 @@ on:
push:
tags:
- "infisical/v*.*.*"
- "!infisical/v*.*.*-postgres"
jobs:
infisical-standalone:

3
.gitignore vendored
View File

@ -1,6 +1,7 @@
# backend
node_modules
.env
.env.test
.env.dev
.env.gamma
.env.prod
@ -61,4 +62,4 @@ yarn-error.log*
# Editor specific
.vscode/*
frontend-build
frontend-build

View File

@ -2,7 +2,7 @@ ARG POSTHOG_HOST=https://app.posthog.com
ARG POSTHOG_API_KEY=posthog-api-key
ARG INTERCOM_ID=intercom-id
FROM node:16-alpine AS base
FROM node:20-alpine AS base
FROM base AS frontend-dependencies
@ -73,6 +73,7 @@ RUN npm ci --only-production
COPY /backend .
COPY --chown=non-root-user:nodejs standalone-entrypoint.sh standalone-entrypoint.sh
RUN npm i -D tsconfig-paths
RUN npm run build
# Production stage
@ -103,14 +104,17 @@ ENV NEXT_PUBLIC_INTERCOM_ID=$INTERCOM_ID \
WORKDIR /
COPY --from=backend-runner /app /backend
COPY --from=backend-runner /app/dist/services/smtp/templates /backend/dist/templates
COPY --from=frontend-runner /app ./backend/frontend-build
ENV PORT 8080
ENV HOST=0.0.0.0
ENV HTTPS_ENABLED false
ENV NODE_ENV production
ENV STANDALONE_BUILD true
ENV STANDALONE_MODE true
WORKDIR /backend
ENV TELEMETRY_ENABLED true
@ -119,10 +123,8 @@ HEALTHCHECK --interval=10s --timeout=3s --start-period=10s \
CMD node healthcheck.js
EXPOSE 8080
EXPOSE 443
USER non-root-user
CMD ["./standalone-entrypoint.sh"]

View File

@ -7,6 +7,9 @@ push:
up-dev:
docker-compose -f docker-compose.dev.yml up --build
up-pg-dev:
docker compose -f docker-compose.pg.yml up --build
i-dev:
infisical run -- docker-compose -f docker-compose.dev.yml up --build

View File

@ -0,0 +1,11 @@
node_modules
.env
.env.*
.git
.gitignore
Dockerfile
.dockerignore
docker-compose.*
.DS_Store
*.swp
*~

View File

@ -0,0 +1,2 @@
node_modules
built

33
backend-mongo/Dockerfile Normal file
View File

@ -0,0 +1,33 @@
# Build stage
FROM node:16-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci --only-production
COPY . .
RUN npm run build
# Production stage
FROM node:16-alpine
WORKDIR /app
ENV npm_config_cache /home/node/.npm
COPY package*.json ./
RUN npm ci --only-production && npm cache clean --force
COPY --from=build /app .
RUN apk add --no-cache bash curl && curl -1sLf \
'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.alpine.sh' | bash \
&& apk add infisical=0.8.1 && apk add --no-cache git
HEALTHCHECK --interval=10s --timeout=3s --start-period=10s \
CMD node healthcheck.js
EXPOSE 4000
CMD ["node", "build/index.js"]

View File

Before

Width:  |  Height:  |  Size: 493 KiB

After

Width:  |  Height:  |  Size: 493 KiB

View File

@ -0,0 +1,6 @@
{
"watch": ["src"],
"ext": ".ts,.js",
"ignore": [],
"exec": "ts-node ./src/index.ts"
}

32861
backend-mongo/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

148
backend-mongo/package.json Normal file
View File

@ -0,0 +1,148 @@
{
"dependencies": {
"@aws-sdk/client-secrets-manager": "^3.319.0",
"@casl/ability": "^6.5.0",
"@casl/mongoose": "^7.2.1",
"@godaddy/terminus": "^4.12.0",
"@node-saml/passport-saml": "^4.0.4",
"@octokit/rest": "^19.0.5",
"@sentry/node": "^7.77.0",
"@sentry/tracing": "^7.48.0",
"@serdnam/pino-cloudwatch-transport": "^1.0.4",
"@types/crypto-js": "^4.1.1",
"@types/libsodium-wrappers": "^0.7.10",
"@ucast/mongo2js": "^1.3.4",
"ajv": "^8.12.0",
"argon2": "^0.30.3",
"aws-sdk": "^2.1364.0",
"axios": "^1.6.0",
"axios-retry": "^3.4.0",
"bcrypt": "^5.1.0",
"bigint-conversion": "^2.4.0",
"cookie-parser": "^1.4.6",
"cors": "^2.8.5",
"crypto-js": "^4.2.0",
"dotenv": "^16.0.1",
"express": "^4.18.1",
"express-async-errors": "^3.1.1",
"express-rate-limit": "^6.7.0",
"express-validator": "^6.14.2",
"handlebars": "^4.7.7",
"helmet": "^5.1.1",
"infisical-node": "^1.2.1",
"ioredis": "^5.3.2",
"jmespath": "^0.16.0",
"js-yaml": "^4.1.0",
"jsonwebtoken": "^9.0.0",
"jsrp": "^0.2.4",
"libsodium-wrappers": "^0.7.10",
"lodash": "^4.17.21",
"mongoose": "^7.4.1",
"mysql2": "^3.6.2",
"nanoid": "^3.3.6",
"node-cache": "^5.1.2",
"nodemailer": "^6.8.0",
"ora": "^5.4.1",
"passport": "^0.6.0",
"passport-github": "^1.1.0",
"passport-gitlab2": "^5.0.0",
"passport-google-oauth20": "^2.0.0",
"pg": "^8.11.3",
"pino": "^8.16.1",
"pino-http": "^8.5.1",
"posthog-node": "^2.6.0",
"probot": "^12.3.3",
"query-string": "^7.1.3",
"rate-limit-mongo": "^2.3.2",
"rimraf": "^3.0.2",
"swagger-ui-express": "^4.6.2",
"tweetnacl": "^1.0.3",
"tweetnacl-util": "^0.15.1",
"typescript": "^4.9.3",
"utility-types": "^3.10.0",
"zod": "^3.22.3"
},
"overrides": {
"rate-limit-mongo": {
"mongodb": "5.8.0"
}
},
"name": "infisical-api",
"version": "1.0.0",
"main": "src/index.js",
"scripts": {
"start": "node build/index.js",
"dev": "nodemon index.js",
"swagger-autogen": "node ./swagger/index.ts",
"build": "rimraf ./build && tsc && cp -R ./src/templates ./build && cp -R ./src/data ./build",
"lint": "eslint . --ext .ts",
"lint-and-fix": "eslint . --ext .ts --fix",
"lint-staged": "lint-staged",
"pretest": "docker compose -f test-resources/docker-compose.test.yml up -d",
"test": "cross-env NODE_ENV=test jest --verbose --testTimeout=10000 --detectOpenHandles; npm run posttest",
"test:ci": "npm test -- --watchAll=false --ci --reporters=default --reporters=jest-junit --reporters=github-actions --coverage --testLocationInResults --json --outputFile=coverage/report.json",
"posttest": "docker compose -f test-resources/docker-compose.test.yml down"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Infisical/infisical-api.git"
},
"author": "",
"license": "ISC",
"bugs": {
"url": "https://github.com/Infisical/infisical-api/issues"
},
"homepage": "https://github.com/Infisical/infisical-api#readme",
"description": "",
"devDependencies": {
"@jest/globals": "^29.3.1",
"@posthog/plugin-scaffold": "^1.3.4",
"@swc/core": "^1.3.99",
"@swc/helpers": "^0.5.3",
"@types/bcrypt": "^5.0.0",
"@types/bcryptjs": "^2.4.2",
"@types/bull": "^4.10.0",
"@types/cookie-parser": "^1.4.3",
"@types/cors": "^2.8.12",
"@types/express": "^4.17.14",
"@types/jest": "^29.5.0",
"@types/jmespath": "^0.15.1",
"@types/jsonwebtoken": "^8.5.9",
"@types/lodash": "^4.14.191",
"@types/node": "^18.11.3",
"@types/nodemailer": "^6.4.6",
"@types/passport": "^1.0.12",
"@types/pg": "^8.10.7",
"@types/picomatch": "^2.3.0",
"@types/pino": "^7.0.5",
"@types/supertest": "^2.0.12",
"@types/swagger-jsdoc": "^6.0.1",
"@types/swagger-ui-express": "^4.1.3",
"@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^5.40.1",
"cross-env": "^7.0.3",
"eslint": "^8.26.0",
"eslint-plugin-unused-imports": "^2.0.0",
"install": "^0.13.0",
"jest": "^29.3.1",
"jest-junit": "^15.0.0",
"nodemon": "^2.0.19",
"npm": "^8.19.3",
"pino-pretty": "^10.2.3",
"regenerator-runtime": "^0.14.0",
"smee-client": "^1.2.3",
"supertest": "^6.3.3",
"swagger-autogen": "^2.23.5",
"ts-jest": "^29.0.3",
"ts-node": "^10.9.1"
},
"jest-junit": {
"outputDirectory": "reports",
"outputName": "jest-junit.xml",
"ancestorSeparator": " ",
"uniqueOutputName": "false",
"suiteNameTemplate": "{filepath}",
"classNameTemplate": "{classname}",
"titleTemplate": "{title}"
}
}

View File

@ -6,6 +6,9 @@ export const client = new InfisicalClient({
token: process.env.INFISICAL_TOKEN!
});
export const getIsMigrationMode = async () =>
(await client.getSecret("MIGRATION_MODE")).secretValue === "true";
export const getPort = async () => (await client.getSecret("PORT")).secretValue || 4000;
export const getEncryptionKey = async () => {
const secretValue = (await client.getSecret("ENCRYPTION_KEY")).secretValue;

View File

@ -3,11 +3,11 @@ import { IServerConfig, ServerConfig } from "../models/serverConfig";
let serverConfig: IServerConfig;
export const serverConfigInit = async () => {
const cfg = await ServerConfig.findOne({});
const cfg = await ServerConfig.findOne({}).lean();
if (!cfg) {
const cfg = new ServerConfig();
await cfg.save();
serverConfig = cfg;
serverConfig = cfg.toObject();
} else {
serverConfig = cfg;
}
@ -19,6 +19,6 @@ export const getServerConfig = () => serverConfig;
export const updateServerConfig = async (data: Partial<IServerConfig>) => {
const cfg = await ServerConfig.findByIdAndUpdate(serverConfig._id, data, { new: true });
if (!cfg) throw new Error("Failed to update server config");
serverConfig = cfg;
serverConfig = cfg.toObject();
return serverConfig;
};

View File

@ -1,5 +1,5 @@
import { Request, Response } from "express";
import { getHttpsEnabled } from "../../config";
import { getHttpsEnabled, getIsMigrationMode } from "../../config";
import { getServerConfig, updateServerConfig as setServerConfig } from "../../config/serverConfig";
import { initializeDefaultOrg, issueAuthTokens } from "../../helpers";
import { validateRequest } from "../../helpers/validation";
@ -8,9 +8,10 @@ import { TelemetryService } from "../../services";
import { BadRequestError, UnauthorizedRequestError } from "../../utils/errors";
import * as reqValidator from "../../validation/admin";
export const getServerConfigInfo = (_req: Request, res: Response) => {
export const getServerConfigInfo = async (_req: Request, res: Response) => {
const config = getServerConfig();
return res.send({ config });
const isMigrationModeOn = await getIsMigrationMode();
return res.send({ config: { ...config, isMigrationModeOn } });
};
export const updateServerConfig = async (req: Request, res: Response) => {

View File

@ -1,6 +1,5 @@
import * as authController from "./authController";
import * as universalAuthController from "./universalAuthController";
import * as ldapController from "./ldapController";
import * as botController from "./botController";
import * as integrationAuthController from "./integrationAuthController";
import * as integrationController from "./integrationController";
@ -23,7 +22,6 @@ import * as adminController from "./adminController";
export {
authController,
universalAuthController,
ldapController,
botController,
integrationAuthController,
integrationController,

View File

@ -101,15 +101,14 @@ export const completeAccountSignup = async (req: Request, res: Response) => {
salt,
verifier
});
if (!user) throw new Error("Failed to complete account for non-existent user"); // ensure user is non-null
// this might need to consider LDAP
const hasOrgAuthMethodEnabled = user.authMethods.some((authMethod: AuthMethod) =>
[AuthMethod.OKTA_SAML, AuthMethod.AZURE_SAML, AuthMethod.JUMPCLOUD_SAML, AuthMethod.LDAP].includes(authMethod)
const hasSamlEnabled = user.authMethods.some((authMethod: AuthMethod) =>
[AuthMethod.OKTA_SAML, AuthMethod.AZURE_SAML, AuthMethod.JUMPCLOUD_SAML].includes(authMethod)
);
if (!hasOrgAuthMethodEnabled) {
if (!hasSamlEnabled) {
// TODO: modify this part
// initialize default organization and workspace
await initializeDefaultOrg({

View File

@ -1,6 +1,5 @@
import { Types } from "mongoose";
import {
LDAPConfig,
SSOConfig
} from "../models";
import {
@ -62,53 +61,4 @@ export const getSSOConfigHelper = async ({
issuer,
cert
});
}
export const getLdapConfigHelper = async ({
organizationId
}: {
organizationId: Types.ObjectId;
}) => {
const ldapConfig = await LDAPConfig.findOne({
organization: organizationId
});
if (!ldapConfig) throw new Error("Failed to find organization LDAP data");
const key = await BotOrgService.getSymmetricKey(
ldapConfig.organization
);
const bindDN = client.decryptSymmetric(
ldapConfig.encryptedBindDN,
key,
ldapConfig.bindDNIV,
ldapConfig.bindDNTag
);
const bindPass = client.decryptSymmetric(
ldapConfig.encryptedBindPass,
key,
ldapConfig.bindPassIV,
ldapConfig.bindPassTag
);
const caCert = client.decryptSymmetric(
ldapConfig.encryptedCACert,
key,
ldapConfig.caCertIV,
ldapConfig.caCertTag
);
return ({
_id: ldapConfig._id,
organization: ldapConfig.organization,
isActive: ldapConfig.isActive,
url: ldapConfig.url,
bindDN,
bindPass,
searchBase: ldapConfig.searchBase,
caCert
});
}

View File

@ -3,11 +3,10 @@ export * from "./secretVersion";
export * from "./folderVersion";
export * from "./role";
export * from "./ssoConfig";
export * from "./ldapConfig";
export * from "./trustedIp";
export * from "./auditLog";
export * from "./gitRisks";
export * from "./gitAppOrganizationInstallation";
export * from "./gitAppInstallationSession";
export * from "./secretApprovalPolicy";
export * from "./secretApprovalRequest";
export * from "./secretApprovalRequest";

Some files were not shown because too many files have changed in this diff Show More