diff --git a/.github/workflows/release_build.yml b/.github/workflows/release_build.yml index df00c5c92..3d11a1157 100644 --- a/.github/workflows/release_build.yml +++ b/.github/workflows/release_build.yml @@ -19,6 +19,7 @@ jobs: with: fetch-depth: 0 - run: git fetch --force --tags + - run: echo "Ref name ${{github.ref_name}}" - uses: actions/setup-go@v3 with: go-version: '>=1.19.3' @@ -33,11 +34,11 @@ jobs: run: | mkdir ../../osxcross git clone https://github.com/plentico/osxcross-target.git ../../osxcross/target - - uses: goreleaser/goreleaser-action@v2 + - uses: goreleaser/goreleaser-action@v4 with: distribution: goreleaser version: latest - args: release --rm-dist + args: release --clean env: GITHUB_TOKEN: ${{ secrets.GO_RELEASER_GITHUB_TOKEN }} FURY_TOKEN: ${{ secrets.FURYPUSHTOKEN }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index 51154a4f3..fc39224aa 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -14,6 +14,9 @@ before: builds: - id: darwin-build binary: infisical + ldflags: -X github.com/Infisical/infisical-merge/packages/util.CLI_VERSION={{ .Version }} + flags: + - -trimpath env: - CGO_ENABLED=1 - CC=/home/runner/work/osxcross/target/bin/o64-clang @@ -24,10 +27,14 @@ builds: - goos: darwin goarch: "386" dir: ./cli + - id: all-other-builds env: - CGO_ENABLED=0 binary: infisical + ldflags: -X github.com/Infisical/infisical-merge/packages/util.CLI_VERSION={{ .Version }} + flags: + - -trimpath goos: - freebsd - linux @@ -65,8 +72,10 @@ release: checksum: name_template: 'checksums.txt' + snapshot: - name_template: "{{ incpatch .Version }}" + name_template: "{{ incpatch .Version }}-devel" + changelog: sort: asc filters: @@ -80,6 +89,7 @@ changelog: # - infisical # dir: "{{ dir .ArtifactPath }}" # cmd: curl -F package=@{{ .ArtifactName }} https://{{ .Env.FURY_TOKEN }}@push.fury.io/infisical/ + brews: - name: infisical tap: @@ -91,6 +101,13 @@ brews: folder: Formula homepage: "https://infisical.com" description: "The official Infisical CLI" + install: |- + bin.install "infisical" + bash_completion.install "completions/infisical.bash" => "infisical" + zsh_completion.install "completions/infisical.zsh" => "_infisical" + fish_completion.install "completions/infisical.fish" + man1.install "manpages/infisical.1.gz" + nfpms: - id: infisical package_name: infisical @@ -116,6 +133,7 @@ nfpms: dst: /usr/share/zsh/site-functions/_infisical - src: ./manpages/infisical.1.gz dst: /usr/share/man/man1/infisical.1.gz + scoop: bucket: owner: Infisical @@ -126,6 +144,7 @@ scoop: homepage: "https://infisical.com" description: "The official Infisical CLI" license: MIT + aurs: - name: infisical-bin diff --git a/README.md b/README.md index 8db0b919d..1ec8cff50 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ git commit activity - Cloudsmith downloads + Cloudsmith downloads Slack community channel @@ -55,11 +55,11 @@ - **[Secret Versioning](https://infisical.com/docs/getting-started/dashboard/versioning)** to view the change history for any secret - **[Activity Logs](https://infisical.com/docs/getting-started/dashboard/audit-logs)** to record every action taken in a project - **[Point-in-time Secrets Recovery](https://infisical.com/docs/getting-started/dashboard/pit-recovery)** for rolling back to any snapshot of your secrets +- **Role-based Access Controls** per environment +- ๐Ÿ”œ **2FA** (next week) - ๐Ÿ”œ **1-Click Deploy** to Digital Ocean and Heroku -- ๐Ÿ”œ **Authentication/Authorization** for projects (read/write controls soon) - ๐Ÿ”œ **Automatic Secret Rotation** -- ๐Ÿ”œ **2FA** -- ๐Ÿ”œ **Slack Integration & MS Teams** integrations +- ๐Ÿ”œ **Slack & MS Teams** integrations And more. @@ -99,15 +99,13 @@ Not sure where to get started? You can: - [GitHub Issues](https://github.com/Infisical/infisical-cli/issues) (For any bugs and errors you encounter using Infisical) - [Twitter](https://twitter.com/infisical) (Get news fast) -## ๐Ÿฅ Status +## ๐ŸŒ„ Status -- [x] Public Alpha: Anyone can sign up over at [infisical.com](https://infisical.com) but go easy on us, there are kinks and we're just getting started. +- [x] Public Alpha: Anyone can sign up over at [infisical.com](https://infisical.com) but there are some minor kinks. - [ ] Public Beta: Stable enough for most non-enterprise use-cases. - [ ] Public: Production-ready. -We're currently in Public Alpha. - -## ๐Ÿ”Œ Integrations +## ๏ฟฝ๐Ÿ”Œ Integrations We're currently setting the foundation and building [integrations](https://infisical.com/docs/integrations/overview) so secrets can be synced everywhere. Any help is welcome! :) @@ -157,7 +155,7 @@ We're currently setting the foundation and building [integrations](https://infis - ๐Ÿ”œ AWS + ๐Ÿ”œ AWS PS (https://github.com/Infisical/infisical/issues/286) @@ -170,7 +168,7 @@ We're currently setting the foundation and building [integrations](https://infis - ๐Ÿ”œ GCP + ๐Ÿ”œ GCP SM (https://github.com/Infisical/infisical/issues/285) ๐Ÿ”œ GitLab CI/CD (https://github.com/Infisical/infisical/issues/134) @@ -216,6 +214,17 @@ We're currently setting the foundation and building [integrations](https://infis + + + ๐Ÿ”œ BuddyCI + + + ๐Ÿ”œ Serverless + + + ๐Ÿ”œ AWS Lambda + + @@ -347,7 +356,7 @@ Infisical officially launched as v.1.0 on November 21st, 2022. There are a lot o - + ## ๐ŸŒŽ Translations diff --git a/backend/package-lock.json b/backend/package-lock.json index 902f49baf..6703e198f 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -10,13 +10,13 @@ "license": "ISC", "dependencies": { "@godaddy/terminus": "^4.11.2", + "@sentry/node": "^7.21.1", "@octokit/rest": "^19.0.5", - "@sentry/node": "^7.14.0", - "@sentry/tracing": "^7.19.0", + "@sentry/tracing": "^7.21.1", "@types/crypto-js": "^4.1.1", + "axios": "^1.2.0", "@types/libsodium-wrappers": "^0.7.10", "await-to-js": "^3.0.0", - "axios": "^1.1.3", "bcrypt": "^5.1.0", "bigint-conversion": "^2.2.2", "builder-pattern": "^2.2.0", @@ -32,9 +32,9 @@ "js-yaml": "^4.1.0", "jsonwebtoken": "^9.0.0", "jsrp": "^0.2.4", + "mongoose": "^6.7.3", "libsodium-wrappers": "^0.7.10", "lodash": "^4.17.21", - "mongoose": "^6.7.2", "nodemailer": "^6.8.0", "posthog-node": "^2.2.2", "query-string": "^7.1.3", @@ -2838,6 +2838,19 @@ "@maxmind/geoip2-node": "^3.4.0" } }, + "node_modules/@sentry/core": { + "version": "7.21.1", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.21.1.tgz", + "integrity": "sha512-Og5wEEsy24fNvT/T7IKjcV4EvVK5ryY2kxbJzKY6GU2eX+i+aBl+n/vp7U0Es351C/AlTkS+0NOUsp2TQQFxZA==", + "dependencies": { + "@sentry/types": "7.21.1", + "@sentry/utils": "7.21.1", + "tslib": "^1.9.3" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", @@ -2914,28 +2927,25 @@ "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.19.0.tgz", "integrity": "sha512-YF9cTBcAnO4R44092BJi5Wa2/EO02xn2ziCtmNgAVTN2LD31a/YVGxGBt/FDr4Y6yeuVehaqijVVvtpSmXrGJw==", "dependencies": { - "@sentry/types": "7.19.0", - "@sentry/utils": "7.19.0", + "@sentry/types": "7.21.1", + "@sentry/utils": "7.21.1", "tslib": "^1.9.3" }, "engines": { "node": ">=8" } }, - "node_modules/@sentry/node/node_modules/@sentry/types": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.19.0.tgz", - "integrity": "sha512-oGRAT6lfzoKrxO1mvxiSj0XHxWPd6Gd1wpPGuu6iJo03xgWDS+MIlD1h2unqL4N5fAzLjzmbC2D2lUw50Kn2pA==", - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/node/node_modules/@sentry/utils": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.19.0.tgz", - "integrity": "sha512-2L6lq+c9Ol2uiRxQDdcgoapmHJp24MhMN0gIkn2alSfMJ+ls6bGXzQHx6JAIdoOiwFQXRZHKL9ecfAc8O+vItA==", + "node_modules/@sentry/node": { + "version": "7.21.1", + "resolved": "https://registry.npmjs.org/@sentry/node/-/node-7.21.1.tgz", + "integrity": "sha512-B+p1nQHaFWdCCRVmvqlr/+vdQCI3mGLObucNfK2YC22IQZg7+3u6tEbxJ7umITIjeSSKgf7ZoZwCxL9VfkrNXg==", "dependencies": { - "@sentry/types": "7.19.0", + "@sentry/core": "7.21.1", + "@sentry/types": "7.21.1", + "@sentry/utils": "7.21.1", + "cookie": "^0.4.1", + "https-proxy-agent": "^5.0.0", + "lru_map": "^0.3.3", "tslib": "^1.9.3" }, "engines": { @@ -2943,46 +2953,53 @@ } }, "node_modules/@sentry/tracing": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@sentry/tracing/-/tracing-7.19.0.tgz", - "integrity": "sha512-SWY17M3TsgBePaGowUcSqBwaT0TJQzuNexVnLojuU0k6F57L9hubvP9zaoosoCfARXQ/3NypAFWnlJyf570rFQ==", + "version": "7.21.1", + "resolved": "https://registry.npmjs.org/@sentry/tracing/-/tracing-7.21.1.tgz", + "integrity": "sha512-b1BTPsRaNQpohzegoz59KGuBl+To651vEq0vMS4tCzSyIdxkYso3JCrjDdEqW/2MliQYANNVrUai2bmwmU9h1g==", "dependencies": { - "@sentry/core": "7.19.0", - "@sentry/types": "7.19.0", - "@sentry/utils": "7.19.0", + "@sentry/core": "7.21.1", + "@sentry/types": "7.21.1", + "@sentry/utils": "7.21.1", "tslib": "^1.9.3" }, "engines": { "node": ">=8" } }, - "node_modules/@sentry/tracing/node_modules/@sentry/core": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.19.0.tgz", - "integrity": "sha512-YF9cTBcAnO4R44092BJi5Wa2/EO02xn2ziCtmNgAVTN2LD31a/YVGxGBt/FDr4Y6yeuVehaqijVVvtpSmXrGJw==", + "node_modules/@sentry/types": { + "version": "7.21.1", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.21.1.tgz", + "integrity": "sha512-3/IKnd52Ol21amQvI+kz+WB76s8/LR5YvFJzMgIoI2S8d82smIr253zGijRXxHPEif8kMLX4Yt+36VzrLxg6+A==", + "engines": { + "node": ">=8" + } + }, + "node_modules/@sentry/utils": { + "version": "7.21.1", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.21.1.tgz", + "integrity": "sha512-F0W0AAi8tgtTx6ApZRI2S9HbXEA9ENX1phTZgdNNWcMFm1BNbc21XEwLqwXBNjub5nlA6CE8xnjXRgdZKx4kzQ==", "dependencies": { - "@sentry/types": "7.19.0", - "@sentry/utils": "7.19.0", + "@sentry/types": "7.21.1", "tslib": "^1.9.3" }, "engines": { "node": ">=8" } }, - "node_modules/@sentry/tracing/node_modules/@sentry/types": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.19.0.tgz", - "integrity": "sha512-oGRAT6lfzoKrxO1mvxiSj0XHxWPd6Gd1wpPGuu6iJo03xgWDS+MIlD1h2unqL4N5fAzLjzmbC2D2lUw50Kn2pA==", + "node_modules/@sentry/types": { + "version": "7.21.1", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.21.1.tgz", + "integrity": "sha512-3/IKnd52Ol21amQvI+kz+WB76s8/LR5YvFJzMgIoI2S8d82smIr253zGijRXxHPEif8kMLX4Yt+36VzrLxg6+A==", "engines": { "node": ">=8" } }, - "node_modules/@sentry/tracing/node_modules/@sentry/utils": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.19.0.tgz", - "integrity": "sha512-2L6lq+c9Ol2uiRxQDdcgoapmHJp24MhMN0gIkn2alSfMJ+ls6bGXzQHx6JAIdoOiwFQXRZHKL9ecfAc8O+vItA==", + "node_modules/@sentry/utils": { + "version": "7.21.1", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.21.1.tgz", + "integrity": "sha512-F0W0AAi8tgtTx6ApZRI2S9HbXEA9ENX1phTZgdNNWcMFm1BNbc21XEwLqwXBNjub5nlA6CE8xnjXRgdZKx4kzQ==", "dependencies": { - "@sentry/types": "7.19.0", + "@sentry/types": "7.21.1", "tslib": "^1.9.3" }, "engines": { @@ -3767,9 +3784,9 @@ } }, "node_modules/axios": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.1.3.tgz", - "integrity": "sha512-00tXVRwKx/FZr/IDVFt4C+f9FYairX517WoGCL6dpOntqLkZofjhu43F/Xl44UOpqa+9sLFDrG/XAnFsUYgkDA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.2.0.tgz", + "integrity": "sha512-zT7wZyNYu3N5Bu0wuZ6QccIf93Qk1eV8LOewxgjOZFd2DenOs98cJ7+Y6703d0wkaXGY6/nZd4EweJaHz9uzQw==", "dependencies": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -7165,9 +7182,9 @@ } }, "node_modules/mongoose": { - "version": "6.7.2", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.7.2.tgz", - "integrity": "sha512-lrP2V5U1qhaf+z33fiIn7aYAZZ1fVDly+TkFRjTujNBF/FIHESATj2RbgAOSlWqv32fsZXkXejXzeVfjbv35Ow==", + "version": "6.7.3", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.7.3.tgz", + "integrity": "sha512-bLC2Pt6Vpoov+1kBYvQgJXG/2DWXbfIvfK4Gh68kCdYGh6CVO31YxYuIGz70hyGwX2g4DmSzbs5IA8Px2neMCQ==", "dependencies": { "bson": "^4.7.0", "kareem": "2.4.1", @@ -14289,6 +14306,16 @@ "@maxmind/geoip2-node": "^3.4.0" } }, + "@sentry/core": { + "version": "7.21.1", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.21.1.tgz", + "integrity": "sha512-Og5wEEsy24fNvT/T7IKjcV4EvVK5ryY2kxbJzKY6GU2eX+i+aBl+n/vp7U0Es351C/AlTkS+0NOUsp2TQQFxZA==", + "requires": { + "@sentry/types": "7.21.1", + "@sentry/utils": "7.21.1", + "tslib": "^1.9.3" + } + }, "@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", @@ -14344,80 +14371,56 @@ "integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==" }, "@sentry/node": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@sentry/node/-/node-7.19.0.tgz", - "integrity": "sha512-yG7Tx32WqOkEHVotFLrumCcT9qlaSDTkFNZ+yLSvZXx74ifsE781DzBA9W7K7bBdYO3op+p2YdsOKzf3nPpAyQ==", + "version": "7.21.1", + "resolved": "https://registry.npmjs.org/@sentry/node/-/node-7.21.1.tgz", + "integrity": "sha512-B+p1nQHaFWdCCRVmvqlr/+vdQCI3mGLObucNfK2YC22IQZg7+3u6tEbxJ7umITIjeSSKgf7ZoZwCxL9VfkrNXg==", "requires": { - "@sentry/core": "7.19.0", - "@sentry/types": "7.19.0", - "@sentry/utils": "7.19.0", + "@sentry/core": "7.21.1", + "@sentry/types": "7.21.1", + "@sentry/utils": "7.21.1", "cookie": "^0.4.1", "https-proxy-agent": "^5.0.0", "lru_map": "^0.3.3", "tslib": "^1.9.3" - }, - "dependencies": { - "@sentry/core": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.19.0.tgz", - "integrity": "sha512-YF9cTBcAnO4R44092BJi5Wa2/EO02xn2ziCtmNgAVTN2LD31a/YVGxGBt/FDr4Y6yeuVehaqijVVvtpSmXrGJw==", - "requires": { - "@sentry/types": "7.19.0", - "@sentry/utils": "7.19.0", - "tslib": "^1.9.3" - } - }, - "@sentry/types": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.19.0.tgz", - "integrity": "sha512-oGRAT6lfzoKrxO1mvxiSj0XHxWPd6Gd1wpPGuu6iJo03xgWDS+MIlD1h2unqL4N5fAzLjzmbC2D2lUw50Kn2pA==" - }, - "@sentry/utils": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.19.0.tgz", - "integrity": "sha512-2L6lq+c9Ol2uiRxQDdcgoapmHJp24MhMN0gIkn2alSfMJ+ls6bGXzQHx6JAIdoOiwFQXRZHKL9ecfAc8O+vItA==", - "requires": { - "@sentry/types": "7.19.0", - "tslib": "^1.9.3" - } - } } }, "@sentry/tracing": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@sentry/tracing/-/tracing-7.19.0.tgz", - "integrity": "sha512-SWY17M3TsgBePaGowUcSqBwaT0TJQzuNexVnLojuU0k6F57L9hubvP9zaoosoCfARXQ/3NypAFWnlJyf570rFQ==", + "version": "7.21.1", + "resolved": "https://registry.npmjs.org/@sentry/tracing/-/tracing-7.21.1.tgz", + "integrity": "sha512-b1BTPsRaNQpohzegoz59KGuBl+To651vEq0vMS4tCzSyIdxkYso3JCrjDdEqW/2MliQYANNVrUai2bmwmU9h1g==", "requires": { - "@sentry/core": "7.19.0", - "@sentry/types": "7.19.0", - "@sentry/utils": "7.19.0", + "@sentry/core": "7.21.1", + "@sentry/types": "7.21.1", + "@sentry/utils": "7.21.1", + "tslib": "^1.9.3" + } + }, + "@sentry/types": { + "version": "7.21.1", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.21.1.tgz", + "integrity": "sha512-3/IKnd52Ol21amQvI+kz+WB76s8/LR5YvFJzMgIoI2S8d82smIr253zGijRXxHPEif8kMLX4Yt+36VzrLxg6+A==" + }, + "@sentry/utils": { + "version": "7.21.1", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.21.1.tgz", + "integrity": "sha512-F0W0AAi8tgtTx6ApZRI2S9HbXEA9ENX1phTZgdNNWcMFm1BNbc21XEwLqwXBNjub5nlA6CE8xnjXRgdZKx4kzQ==", + "requires": { + "@sentry/types": "7.21.1", + "tslib": "^1.9.3" + } + }, + "@sentry/types": { + "version": "7.21.1", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.21.1.tgz", + "integrity": "sha512-3/IKnd52Ol21amQvI+kz+WB76s8/LR5YvFJzMgIoI2S8d82smIr253zGijRXxHPEif8kMLX4Yt+36VzrLxg6+A==" + }, + "@sentry/utils": { + "version": "7.21.1", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.21.1.tgz", + "integrity": "sha512-F0W0AAi8tgtTx6ApZRI2S9HbXEA9ENX1phTZgdNNWcMFm1BNbc21XEwLqwXBNjub5nlA6CE8xnjXRgdZKx4kzQ==", + "requires": { + "@sentry/types": "7.21.1", "tslib": "^1.9.3" - }, - "dependencies": { - "@sentry/core": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.19.0.tgz", - "integrity": "sha512-YF9cTBcAnO4R44092BJi5Wa2/EO02xn2ziCtmNgAVTN2LD31a/YVGxGBt/FDr4Y6yeuVehaqijVVvtpSmXrGJw==", - "requires": { - "@sentry/types": "7.19.0", - "@sentry/utils": "7.19.0", - "tslib": "^1.9.3" - } - }, - "@sentry/types": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.19.0.tgz", - "integrity": "sha512-oGRAT6lfzoKrxO1mvxiSj0XHxWPd6Gd1wpPGuu6iJo03xgWDS+MIlD1h2unqL4N5fAzLjzmbC2D2lUw50Kn2pA==" - }, - "@sentry/utils": { - "version": "7.19.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.19.0.tgz", - "integrity": "sha512-2L6lq+c9Ol2uiRxQDdcgoapmHJp24MhMN0gIkn2alSfMJ+ls6bGXzQHx6JAIdoOiwFQXRZHKL9ecfAc8O+vItA==", - "requires": { - "@sentry/types": "7.19.0", - "tslib": "^1.9.3" - } - } } }, "@sinclair/typebox": { @@ -15051,9 +15054,9 @@ "integrity": "sha512-zJAaP9zxTcvTHRlejau3ZOY4V7SRpiByf3/dxx2uyKxxor19tpmpV2QRsTKikckwhaPmr2dVpxxMr7jOCYVp5g==" }, "axios": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.1.3.tgz", - "integrity": "sha512-00tXVRwKx/FZr/IDVFt4C+f9FYairX517WoGCL6dpOntqLkZofjhu43F/Xl44UOpqa+9sLFDrG/XAnFsUYgkDA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.2.0.tgz", + "integrity": "sha512-zT7wZyNYu3N5Bu0wuZ6QccIf93Qk1eV8LOewxgjOZFd2DenOs98cJ7+Y6703d0wkaXGY6/nZd4EweJaHz9uzQw==", "requires": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -17626,9 +17629,9 @@ } }, "mongoose": { - "version": "6.7.2", - "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.7.2.tgz", - "integrity": "sha512-lrP2V5U1qhaf+z33fiIn7aYAZZ1fVDly+TkFRjTujNBF/FIHESATj2RbgAOSlWqv32fsZXkXejXzeVfjbv35Ow==", + "version": "6.7.3", + "resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.7.3.tgz", + "integrity": "sha512-bLC2Pt6Vpoov+1kBYvQgJXG/2DWXbfIvfK4Gh68kCdYGh6CVO31YxYuIGz70hyGwX2g4DmSzbs5IA8Px2neMCQ==", "requires": { "bson": "^4.7.0", "kareem": "2.4.1", diff --git a/backend/package.json b/backend/package.json index e64d9d446..f2a2710c9 100644 --- a/backend/package.json +++ b/backend/package.json @@ -1,4 +1,32 @@ { + "dependencies": { + "@godaddy/terminus": "^4.11.2", + "@sentry/node": "^7.21.1", + "@sentry/tracing": "^7.21.1", + "@types/crypto-js": "^4.1.1", + "axios": "^1.2.0", + "bigint-conversion": "^2.2.2", + "cookie-parser": "^1.4.6", + "cors": "^2.8.5", + "crypto-js": "^4.1.1", + "dotenv": "^16.0.1", + "express": "^4.18.1", + "express-rate-limit": "^6.7.0", + "express-validator": "^6.14.2", + "handlebars": "^4.7.7", + "helmet": "^5.1.1", + "jsonwebtoken": "^8.5.1", + "jsrp": "^0.2.4", + "mongoose": "^6.7.3", + "nodemailer": "^6.8.0", + "posthog-node": "^2.1.0", + "query-string": "^7.1.3", + "rimraf": "^3.0.2", + "stripe": "^10.7.0", + "tweetnacl": "^1.0.3", + "tweetnacl-util": "^0.15.1", + "typescript": "^4.9.3" + }, "name": "infisical-api", "version": "1.0.0", "main": "src/index.js", diff --git a/backend/src/controllers/v2/serviceTokenDataController.ts b/backend/src/controllers/v2/serviceTokenDataController.ts index 83c8fea94..780bae9a4 100644 --- a/backend/src/controllers/v2/serviceTokenDataController.ts +++ b/backend/src/controllers/v2/serviceTokenDataController.ts @@ -8,6 +8,8 @@ import { import { SALT_ROUNDS } from '../../config'; +import { userHasWorkspaceAccess } from '../../ee/helpers/checkMembershipPermissions'; +import { ABILITY_READ } from '../../variables/organization'; /** * Return service token data associated with service token on request @@ -37,6 +39,11 @@ export const createServiceTokenData = async (req: Request, res: Response) => { expiresIn } = req.body; + const hasAccess = await userHasWorkspaceAccess(req.user, workspaceId, environment, ABILITY_READ) + if (!hasAccess) { + throw UnauthorizedRequestError({ message: "You do not have the necessary permission(s) perform this action" }) + } + const secret = crypto.randomBytes(16).toString('hex'); const secretHash = await bcrypt.hash(secret, SALT_ROUNDS); @@ -100,4 +107,8 @@ export const deleteServiceTokenData = async (req: Request, res: Response) => { return res.status(200).send({ serviceTokenData }); -} \ No newline at end of file +} + +function UnauthorizedRequestError(arg0: { message: string; }) { + throw new Error('Function not implemented.'); +} diff --git a/backend/src/routes/v2/organizations.ts b/backend/src/routes/v2/organizations.ts index 1362a7759..e1488e8a7 100644 --- a/backend/src/routes/v2/organizations.ts +++ b/backend/src/routes/v2/organizations.ts @@ -30,7 +30,7 @@ router.patch( '/:organizationId/memberships/:membershipId', param('organizationId').exists().trim(), param('membershipId').exists().trim(), - body('role').exists().isString().trim().isIn([ADMIN, MEMBER]), + body('role').exists().isString().trim().isIn([OWNER, ADMIN, MEMBER]), validateRequest, requireAuth({ acceptedAuthModes: ['jwt', 'apiKey'] diff --git a/cli/main.go b/cli/main.go index 9b1e420fa..a51661ff6 100644 --- a/cli/main.go +++ b/cli/main.go @@ -1,5 +1,5 @@ /* -Copyright ยฉ 2022 NAME HERE +Copyright (c) 2023 Infisical Inc. */ package main diff --git a/cli/packages/api/api.go b/cli/packages/api/api.go index a414b03d3..7417a2594 100644 --- a/cli/packages/api/api.go +++ b/cli/packages/api/api.go @@ -5,6 +5,7 @@ import ( "github.com/Infisical/infisical-merge/packages/config" "github.com/go-resty/resty/v2" + log "github.com/sirupsen/logrus" ) const USER_AGENT = "cli" @@ -144,3 +145,24 @@ func CallGetAllWorkSpacesUserBelongsTo(httpClient *resty.Client) (GetWorkSpacesR return workSpacesResponse, nil } + +func CallIsAuthenticated(httpClient *resty.Client) bool { + var workSpacesResponse GetWorkSpacesResponse + response, err := httpClient. + R(). + SetResult(&workSpacesResponse). + SetHeader("User-Agent", USER_AGENT). + Post(fmt.Sprintf("%v/v1/auth/checkAuth", config.INFISICAL_URL)) + + log.Debugln(fmt.Errorf("CallIsAuthenticated: Unsuccessful response: [response=%v]", response)) + + if err != nil { + return false + } + + if response.IsError() { + return false + } + + return true +} diff --git a/cli/packages/cmd/export.go b/cli/packages/cmd/export.go index 2a6fa0dbd..41e170f70 100644 --- a/cli/packages/cmd/export.go +++ b/cli/packages/cmd/export.go @@ -1,5 +1,5 @@ /* -Copyright ยฉ 2022 NAME HERE +Copyright (c) 2023 Infisical Inc. */ package cmd diff --git a/cli/packages/cmd/init.go b/cli/packages/cmd/init.go index a9a2d943d..413f61440 100644 --- a/cli/packages/cmd/init.go +++ b/cli/packages/cmd/init.go @@ -1,5 +1,5 @@ /* -Copyright ยฉ 2022 NAME HERE +Copyright (c) 2023 Infisical Inc. */ package cmd diff --git a/cli/packages/cmd/login.go b/cli/packages/cmd/login.go index c10f38fc4..6a1dc2313 100644 --- a/cli/packages/cmd/login.go +++ b/cli/packages/cmd/login.go @@ -1,5 +1,5 @@ /* -Copyright ยฉ 2022 NAME HERE +Copyright (c) 2023 Infisical Inc. */ package cmd @@ -33,13 +33,13 @@ var loginCmd = &cobra.Command{ PreRun: toggleDebug, Run: func(cmd *cobra.Command, args []string) { currentLoggedInUserDetails, err := util.GetCurrentLoggedInUserDetails() - if err != nil && strings.Contains(err.Error(), "The specified item could not be found in the keyring") { // if the key can't be found allow them to override + if err != nil && (strings.Contains(err.Error(), "The specified item could not be found in the keyring") || strings.Contains(err.Error(), "unable to get key from Keyring")) { // if the key can't be found allow them to override log.Debug(err) } else if err != nil { util.HandleError(err) } - if currentLoggedInUserDetails.IsUserLoggedIn { + if currentLoggedInUserDetails.IsUserLoggedIn && !currentLoggedInUserDetails.LoginExpired { // if you are logged in but not expired shouldOverride, err := shouldOverrideLoginPrompt(currentLoggedInUserDetails.UserCredentials.Email) if err != nil { util.HandleError(err) diff --git a/cli/packages/cmd/man.go b/cli/packages/cmd/man.go index efe8686b3..86d68c8e7 100644 --- a/cli/packages/cmd/man.go +++ b/cli/packages/cmd/man.go @@ -1,5 +1,5 @@ /* -Copyright ยฉ 2022 NAME HERE +Copyright (c) 2023 Infisical Inc. */ package cmd diff --git a/cli/packages/cmd/root.go b/cli/packages/cmd/root.go index 93a498860..ac827feb3 100644 --- a/cli/packages/cmd/root.go +++ b/cli/packages/cmd/root.go @@ -1,5 +1,5 @@ /* -Copyright ยฉ 2022 NAME HERE +Copyright (c) 2023 Infisical Inc. */ package cmd diff --git a/cli/packages/cmd/run.go b/cli/packages/cmd/run.go index 4c7c9782f..d31981b02 100644 --- a/cli/packages/cmd/run.go +++ b/cli/packages/cmd/run.go @@ -1,5 +1,5 @@ /* -Copyright ยฉ 2022 NAME HERE +Copyright (c) 2023 Infisical Inc. */ package cmd @@ -58,9 +58,9 @@ var runCmd = &cobra.Command{ util.HandleError(err, "Unable to parse flag") } - if !util.IsSecretEnvironmentValid(envName) { - util.PrintMessageAndExit("Invalid environment name passed. Environment names can only be prod, dev, test or staging") - } + // if !util.IsSecretEnvironmentValid(envName) { + // util.PrintMessageAndExit("Invalid environment name passed. Environment names can only be prod, dev, test or staging") + // } secretOverriding, err := cmd.Flags().GetBool("secret-overriding") if err != nil { diff --git a/cli/packages/cmd/secrets.go b/cli/packages/cmd/secrets.go index 912801f5d..060a69a45 100644 --- a/cli/packages/cmd/secrets.go +++ b/cli/packages/cmd/secrets.go @@ -1,5 +1,5 @@ /* -Copyright ยฉ 2022 NAME HERE +Copyright (c) 2023 Infisical Inc. */ package cmd diff --git a/cli/packages/cmd/vault.go b/cli/packages/cmd/vault.go index a2b03dbec..d9e32769e 100644 --- a/cli/packages/cmd/vault.go +++ b/cli/packages/cmd/vault.go @@ -1,5 +1,5 @@ /* -Copyright ยฉ 2022 NAME HERE +Copyright (c) 2023 Infisical Inc. */ package cmd diff --git a/cli/packages/util/check-for-update.go b/cli/packages/util/check-for-update.go index 5fbf39a1e..a23b90ad1 100644 --- a/cli/packages/util/check-for-update.go +++ b/cli/packages/util/check-for-update.go @@ -2,10 +2,10 @@ package util import ( "encoding/json" + "errors" "fmt" "io/ioutil" "net/http" - "errors" ) func CheckForUpdate() { @@ -42,5 +42,5 @@ func getLatestTag(repoOwner string, repoName string) (string, error) { json.Unmarshal(body, &tags) - return tags[0].Name, nil + return tags[0].Name[1:], nil } diff --git a/cli/packages/util/constants.go b/cli/packages/util/constants.go index 1243fb325..5c169f6d5 100644 --- a/cli/packages/util/constants.go +++ b/cli/packages/util/constants.go @@ -11,5 +11,8 @@ const ( KEYRING_SERVICE_NAME = "infisical" PERSONAL_SECRET_TYPE_NAME = "personal" SHARED_SECRET_TYPE_NAME = "shared" - CLI_VERSION = "v0.2.8" +) + +var ( + CLI_VERSION = "devel" ) diff --git a/cli/packages/util/credentials.go b/cli/packages/util/credentials.go index 6410002c0..1766f04c7 100644 --- a/cli/packages/util/credentials.go +++ b/cli/packages/util/credentials.go @@ -5,7 +5,7 @@ import ( "fmt" "github.com/99designs/keyring" - "github.com/Infisical/infisical-merge/packages/config" + "github.com/Infisical/infisical-merge/packages/api" "github.com/Infisical/infisical-merge/packages/models" "github.com/go-resty/resty/v2" ) @@ -87,17 +87,10 @@ func GetCurrentLoggedInUserDetails() (LoggedInUserDetails, error) { SetAuthToken(userCreds.JTWToken). SetHeader("Accept", "application/json") - response, err := httpClient. - R(). - Post(fmt.Sprintf("%v/v1/auth/checkAuth", config.INFISICAL_URL)) - - if err != nil { - return LoggedInUserDetails{}, err - } - - if response.StatusCode() > 299 { + isAuthenticated := api.CallIsAuthenticated(httpClient) + if !isAuthenticated { return LoggedInUserDetails{ - IsUserLoggedIn: true, + IsUserLoggedIn: true, // was logged in LoginExpired: true, UserCredentials: userCreds, }, nil diff --git a/cli/packages/util/vault.go b/cli/packages/util/vault.go index 7e4ce1b31..0852e5f48 100644 --- a/cli/packages/util/vault.go +++ b/cli/packages/util/vault.go @@ -57,7 +57,7 @@ func fileKeyringPassphrasePrompt(prompt string) (string, error) { if password, ok := os.LookupEnv("INFISICAL_VAULT_FILE_PASSPHRASE"); ok { return password, nil } else { - fmt.Println("You may set the `INFISICAL_VAULT_FILE_PASSPHRASE` environment variable to avoid typing password") + fmt.Println("You may set the environment variable `INFISICAL_VAULT_FILE_PASSPHRASE` with your password to avoid typing it") } fmt.Fprintf(os.Stderr, "%s:", prompt) @@ -65,6 +65,7 @@ func fileKeyringPassphrasePrompt(prompt string) (string, error) { if err != nil { return "", err } + fmt.Println("") return string(b), nil } diff --git a/frontend/public/locales/en/common.json b/frontend/public/locales/en/common.json index 34cdcaea8..e02c4f474 100644 --- a/frontend/public/locales/en/common.json +++ b/frontend/public/locales/en/common.json @@ -1,5 +1,5 @@ { - "head-title": "{{title}} | Infiscal", + "head-title": "{{title}} | Infisical", "error_project-already-exists": "A project with this name already exists.", "no-mobile": " To use Infisical, please log in through a device with larger dimensions. ", "email": "Email", @@ -28,7 +28,7 @@ "select-event": "Select an event", "event": "Event", "user": "User", - "source": "Source", - "time": "Time", + "source": "Source", + "time": "Time", "timestamp": "Timestamp" -} +} \ No newline at end of file diff --git a/frontend/public/locales/fr/common.json b/frontend/public/locales/fr/common.json index 8552668aa..1f6a52447 100644 --- a/frontend/public/locales/fr/common.json +++ b/frontend/public/locales/fr/common.json @@ -1,5 +1,5 @@ { - "head-title": "{{title}} | Infiscal", + "head-title": "{{title}} | Infisical", "error_project-already-exists": "Un projet avec ce nom existe dรฉjร .", "no-mobile": " Pour utiliser Infisical, veuillez vous connecter avec un appareil avec des dimensions plus grandes. ", "email": "Email", @@ -28,7 +28,7 @@ "select-event": "Sรฉlectionnez un รฉvรฉnement", "event": "ร‰vรฉnement", "user": "Utilisateur", - "source": "Source", - "time": "Heure", + "source": "Source", + "time": "Heure", "timestamp": "Horodatage" -} +} \ No newline at end of file diff --git a/frontend/public/locales/ko/common.json b/frontend/public/locales/ko/common.json index 8274dd060..f0692ebf7 100644 --- a/frontend/public/locales/ko/common.json +++ b/frontend/public/locales/ko/common.json @@ -1,5 +1,5 @@ { - "head-title": "{{title}} | Infiscal", + "head-title": "{{title}} | Infisical", "error_project-already-exists": "๋™์ผํ•œ ์ด๋ฆ„์„ ๊ฐ€์ง„ ํ”„๋กœ์ ํŠธ๊ฐ€ ์ด๋ฏธ ์กด์žฌํ•ด์š”.", "no-mobile": " Infisical์„ ์‚ฌ์šฉํ•˜๋ ค๋ฉด, ํฐ ํ™”๋ฉด์„ ๊ฐ€์ง„ ๋””๋ฐ”์ด์Šค๋กœ ๋กœ๊ทธ์ธํ•˜์—ฌ ์ฃผ์„ธ์š”.", "email": "๋ฉ”์ผ", @@ -23,4 +23,4 @@ "language": "์–ธ์–ด", "search": "๊ฒ€์ƒ‰ํ•˜๊ธฐ...", "note": "Note" -} +} \ No newline at end of file diff --git a/frontend/public/locales/pt-BR/common.json b/frontend/public/locales/pt-BR/common.json index 12e657d7c..207f0db29 100644 --- a/frontend/public/locales/pt-BR/common.json +++ b/frontend/public/locales/pt-BR/common.json @@ -1,5 +1,5 @@ { - "head-title": "{{title}} | Infiscal", + "head-title": "{{title}} | Infisical", "error_project-already-exists": "Jรก exite um projeto com este nome.", "no-mobile": "Para usar o Infisical, faรงa o login atravรฉs de um dispositivo com dimensรตes maiores.", "email": "Email", diff --git a/frontend/src/components/basic/table/ProjectUsersTable.tsx b/frontend/src/components/basic/table/ProjectUsersTable.tsx index adf1ea130..9d278bdc4 100644 --- a/frontend/src/components/basic/table/ProjectUsersTable.tsx +++ b/frontend/src/components/basic/table/ProjectUsersTable.tsx @@ -110,7 +110,7 @@ const ProjectUsersTable = ({ userData, changeData, myUser, filter }: Props) => { denials = []; } - if (currentPlan !== plans.professional && host !== 'https://app.infisical.com') { + if (currentPlan !== plans.professional && host === 'https://app.infisical.com') { setIsUpgradeModalOpen(true); } else { const allDenials = userData[index].deniedPermissions.filter((perm: { ability: string; environmentSlug: string; }) => perm.environmentSlug !== slug).concat(denials); @@ -264,7 +264,7 @@ const ProjectUsersTable = ({ userData, changeData, myUser, filter }: Props) => { ? "No Access" : (row.deniedPermissions.filter((perm: any) => perm.environmentSlug === env.slug).map((perm: {ability: string}) => perm.ability).includes("write") ? "Read Only" : "Read & Write") } - disabled={myUser === row.email || myRole !== 'admin'} + disabled={myRole !== 'admin'} // onOpenChange={(open) => setIsOpen(open)} > No Access diff --git a/frontend/src/components/basic/table/UserTable.tsx b/frontend/src/components/basic/table/UserTable.tsx index e82556b50..02e65c547 100644 --- a/frontend/src/components/basic/table/UserTable.tsx +++ b/frontend/src/components/basic/table/UserTable.tsx @@ -2,8 +2,8 @@ import { useEffect, useState } from 'react'; import { useRouter } from 'next/router'; import { faX } from '@fortawesome/free-solid-svg-icons'; +import changeUserRoleInOrganization from '@app/pages/api/organization/changeUserRoleInOrganization'; import deleteUserFromOrganization from '@app/pages/api/organization/deleteUserFromOrganization'; -import changeUserRoleInWorkspace from '@app/pages/api/workspace/changeUserRoleInWorkspace'; import deleteUserFromWorkspace from '@app/pages/api/workspace/deleteUserFromWorkspace'; import getLatestFileKey from '@app/pages/api/workspace/getLatestFileKey'; import uploadKeys from '@app/pages/api/workspace/uploadKeys'; @@ -55,9 +55,9 @@ const UserTable = ({ userData, changeData, myUser, filter, resendInvite, isOrg } ]); }; - // Update the rold of a certain user + // Update the role of a certain user const handleRoleUpdate = (index: number, e: string) => { - changeUserRoleInWorkspace(userData[index].membershipId, e); + changeUserRoleInOrganization(String(localStorage.getItem("orgData.id")), userData[index].membershipId, e); changeData([ ...userData.slice(0, index), ...[ @@ -145,9 +145,9 @@ const UserTable = ({ userData, changeData, myUser, filter, resendInvite, isOrg }
- {row.status === 'granted' && + {row.status === 'accepted' && ((myRole === 'admin' && row.role !== 'owner') || myRole === 'owner') && - myUser !== row.email ? ( + (myUser !== row.email) ? ( handleRoleUpdate(index, e)} diff --git a/frontend/src/components/navigation/NavHeader.tsx b/frontend/src/components/navigation/NavHeader.tsx index c550d46e9..247d4ac3d 100644 --- a/frontend/src/components/navigation/NavHeader.tsx +++ b/frontend/src/components/navigation/NavHeader.tsx @@ -25,6 +25,7 @@ export default function NavHeader({ const [orgName, setOrgName] = useState(''); const [workspaceName, setWorkspaceName] = useState(''); const router = useRouter(); + const projectId = String(router.query.id); useEffect(() => { (async () => { @@ -35,12 +36,12 @@ export default function NavHeader({ setOrgName(org.name); const workspace = await getProjectInfo({ - projectId: String(router.query.id) + projectId }); setWorkspaceName(workspace.name); })(); // eslint-disable-next-line react-hooks/exhaustive-deps - }, []); + }, [projectId]); return (
diff --git a/frontend/src/components/utilities/config/index.ts b/frontend/src/components/utilities/config/index.ts index 7570785ba..7ecfb9d4d 100644 --- a/frontend/src/components/utilities/config/index.ts +++ b/frontend/src/components/utilities/config/index.ts @@ -4,11 +4,12 @@ const POSTHOG_HOST = process.env.NEXT_PUBLIC_POSTHOG_HOST! || "https://app.posthog.com"; const STRIPE_PRODUCT_PRO = process.env.NEXT_PUBLIC_STRIPE_PRODUCT_PRO!; const STRIPE_PRODUCT_STARTER = process.env.NEXT_PUBLIC_STRIPE_PRODUCT_STARTER!; +const {SITE_URL} = process.env export { ENV, POSTHOG_API_KEY, POSTHOG_HOST, + SITE_URL, STRIPE_PRODUCT_PRO, - STRIPE_PRODUCT_STARTER -}; \ No newline at end of file + STRIPE_PRODUCT_STARTER}; \ No newline at end of file diff --git a/frontend/src/components/utilities/generateBackupPDF.ts b/frontend/src/components/utilities/generateBackupPDF.ts index a4ee0035e..e51dfaa0a 100644 --- a/frontend/src/components/utilities/generateBackupPDF.ts +++ b/frontend/src/components/utilities/generateBackupPDF.ts @@ -1,5 +1,7 @@ import { jsPDF } from 'jspdf'; +import { SITE_URL } from './config'; + interface PDFProps { personalName: string; personalEmail: string; @@ -73,7 +75,7 @@ function generateBackupPDF({ personalName, personalEmail, generatedKey }: PDFPro doc.roundedRect(170, 488, 375, 35, 5, 5, 'F'); doc.setTextColor(23, 23, 23); doc.setFontSize(14); - doc.text('https://app.infisical.com/login', 180, 420); + doc.text(`${SITE_URL}/login`, 180, 420); doc.text(personalEmail, 180, 465); doc.text(generatedKey, 180, 510); doc.text('Need help? Contact us at support@infisical.com', 32, 575); diff --git a/frontend/src/const.ts b/frontend/src/const.ts index 0e5ed9516..6ec3941a4 100644 --- a/frontend/src/const.ts +++ b/frontend/src/const.ts @@ -15,6 +15,8 @@ export const publicPaths = [ `/privacy`, `/terms`, `/subprocessors`, + `/verify-email`, + `/password-reset`, ]; export const languageMap = { diff --git a/frontend/src/pages/api/organization/changeUserRoleInOrganization.ts b/frontend/src/pages/api/organization/changeUserRoleInOrganization.ts new file mode 100644 index 000000000..6bbe966c4 --- /dev/null +++ b/frontend/src/pages/api/organization/changeUserRoleInOrganization.ts @@ -0,0 +1,27 @@ +import SecurityClient from '@app/components/utilities/SecurityClient'; + +/** + * This function change the access of a user in a certain organization + * @param {string} organizationId + * @param {string} membershipId + * @param {string} role + * @returns + */ +const changeUserRoleInOrganization = (organizationId: string, membershipId: string, role: string) => + SecurityClient.fetchCall(`/api/v2/organizations/${organizationId}/memberships/${membershipId}`, { + method: 'PATCH', + headers: { + 'Content-Type': 'application/json' + }, + body: JSON.stringify({ + role + }) + }).then(async (res) => { + if (res && res.status === 200) { + return res; + } + console.log('Failed to change the user role in an org'); + return undefined; + }); + +export default changeUserRoleInOrganization; diff --git a/frontend/src/pages/home/[id].tsx b/frontend/src/pages/home/[id].tsx index 9ec119973..fef9397c4 100644 --- a/frontend/src/pages/home/[id].tsx +++ b/frontend/src/pages/home/[id].tsx @@ -167,7 +167,7 @@ export default function Home() { })} {learningItem({ text: 'Inject secrets locally', - subText: 'Replace .env files with a more secure an efficient alternative.', + subText: 'Replace .env files with a more secure and efficient alternative.', complete: false, icon: faNetworkWired, time: '8 min', diff --git a/frontend/src/pages/login.tsx b/frontend/src/pages/login.tsx index c32c4bd4f..213b5a263 100644 --- a/frontend/src/pages/login.tsx +++ b/frontend/src/pages/login.tsx @@ -22,6 +22,7 @@ export default function Login() { const [password, setPassword] = useState(''); const [errorLogin, setErrorLogin] = useState(false); const [isLoading, setIsLoading] = useState(false); + const [isAlreadyLoggedIn, setIsAlreadyLoggedIn] = useState(false); const router = useRouter(); const { t } = useTranslation(); const lang = router.locale ?? 'en'; @@ -44,6 +45,7 @@ export default function Login() { } }; if (isLoggedIn()) { + setIsAlreadyLoggedIn(true); redirectToDashboard(); } }, []); @@ -64,6 +66,10 @@ export default function Login() { }); }; + if (isAlreadyLoggedIn) { + return null + } + return (
diff --git a/frontend/src/pages/verify-email.tsx b/frontend/src/pages/verify-email.tsx index d134a07af..3b7e1c8d5 100644 --- a/frontend/src/pages/verify-email.tsx +++ b/frontend/src/pages/verify-email.tsx @@ -29,7 +29,7 @@ export default function VerifyEmail() { Login - +

-

Open-source, E2EE, simple tool to manage and sync environment variables across your team and infrastructure.

+

Open-source, E2EE, simple tool to manage secrets and configs across your team and infrastructure.

@@ -21,9 +21,12 @@ PRs welcome! - + git commit activity + + Cloudsmith downloads + Slack community channel @@ -34,20 +37,29 @@ Dashboard -**[Infisical](https://infisical.com)** is an open source, E2EE tool to help teams manage and sync environment variables across their development workflow and infrastructure. It's designed to be simple and take minutes to get going. -- **[User-Friendly Dashboard](https://infisical.com/docs/getting-started/dashboard/project)** to manage your team's environment variables within projects -- **[Language-Agnostic CLI](https://infisical.com/docs/cli/overview)** that pulls and injects environment variables into your local workflow +**Read this in other languages**: [English language](i18n/README.en.md) +[Spanish language](i18n/README.es.md) +[Korean language](i18n/README.ko.md) +[Turkish language](i18n/README.tr.md) + +**[Infisical](https://infisical.com)** is an open source, E2EE tool to help teams manage and sync secrets and configs across their development workflow and infrastructure. It's designed to be simple and take minutes to get going. + +- **[User-Friendly Dashboard](https://infisical.com/docs/getting-started/dashboard/project)** to manage your team's secrets and configs within projects +- **[Language-Agnostic CLI](https://infisical.com/docs/cli/overview)** that pulls and injects esecrets and configs into your local workflow - **[Complete control over your data](https://infisical.com/docs/self-hosting/overview)** - host it yourself on any infrastructure - **Navigate Multiple Environments** per project (e.g. development, staging, production, etc.) -- **Personal/Shared** scoping for environment variables +- **Personal overrides** for secrets and configs - **[Integrations](https://infisical.com/docs/integrations/overview)** with CI/CD and production infrastructure +- **[Infisical API](https://infisical.com/docs/api-reference/overview/introduction)** - manage secrets via HTTPS requests to the platform +- **[Secret Versioning](https://infisical.com/docs/getting-started/dashboard/versioning)** to view the change history for any secret +- **[Activity Logs](https://infisical.com/docs/getting-started/dashboard/audit-logs)** to record every action taken in a project +- **[Point-in-time Secrets Recovery](https://infisical.com/docs/getting-started/dashboard/pit-recovery)** for rolling back to any snapshot of your secrets +- **Role-based Access Controls** per environment +- ๐Ÿ”œ **2FA** (next week) - ๐Ÿ”œ **1-Click Deploy** to Digital Ocean and Heroku -- ๐Ÿ”œ **Authentication/Authorization** for projects (read/write controls soon) - ๐Ÿ”œ **Automatic Secret Rotation** -- ๐Ÿ”œ **2FA** -- ๐Ÿ”œ **Access Logs** -- ๐Ÿ”œ **Slack Integration & MS Teams** integrations +- ๐Ÿ”œ **Slack & MS Teams** integrations And more. @@ -65,7 +77,7 @@ To quickly get started, visit our [get started guide](https://infisical.com/docs 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. +According to a [report](https://www.ekransystem.com/en/blog/secrets-management), only 10% of organizations use secret management solutions despite all using digital secrets to some extent. If you care about efficiency and security, then Infisical is right for you. @@ -87,15 +99,13 @@ Not sure where to get started? You can: - [GitHub Issues](https://github.com/Infisical/infisical-cli/issues) (For any bugs and errors you encounter using Infisical) - [Twitter](https://twitter.com/infisical) (Get news fast) -## ๐Ÿฅ Status +## ๐ŸŒ„ Status -- [x] Public Alpha: Anyone can sign up over at [infisical.com](https://infisical.com) but go easy on us, there are kinks and we're just getting started. +- [x] Public Alpha: Anyone can sign up over at [infisical.com](https://infisical.com) but there are some minor kinks. - [ ] Public Beta: Stable enough for most non-enterprise use-cases. - [ ] Public: Production-ready. -We're currently in Public Alpha. - -## ๐Ÿ”Œ Integrations +## ๏ฟฝ๐Ÿ”Œ Integrations We're currently setting the foundation and building [integrations](https://infisical.com/docs/integrations/overview) so secrets can be synced everywhere. Any help is welcome! :) @@ -138,12 +148,14 @@ We're currently setting the foundation and building [integrations](https://infis - ๐Ÿ”œ Fly.io + + โœ”๏ธ Fly.io + - ๐Ÿ”œ AWS + ๐Ÿ”œ AWS PS (https://github.com/Infisical/infisical/issues/286) @@ -151,12 +163,12 @@ We're currently setting the foundation and building [integrations](https://infis - ๐Ÿ”œ Railway + ๐Ÿ”œ Railway (https://github.com/Infisical/infisical/issues/271) - ๐Ÿ”œ GCP + ๐Ÿ”œ GCP SM (https://github.com/Infisical/infisical/issues/285) ๐Ÿ”œ GitLab CI/CD (https://github.com/Infisical/infisical/issues/134) @@ -186,7 +198,7 @@ We're currently setting the foundation and building [integrations](https://infis - ๐Ÿ”œ Railway + ๐Ÿ”œ Forge @@ -197,7 +209,20 @@ We're currently setting the foundation and building [integrations](https://infis ๐Ÿ”œ Supabase - ๐Ÿ”œ Render (https://github.com/Infisical/infisical/issues/132) + + โœ”๏ธ Render + + + + + + ๐Ÿ”œ BuddyCI + + + ๐Ÿ”œ Serverless + + + ๐Ÿ”œ AWS Lambda @@ -270,13 +295,13 @@ We're currently setting the foundation and building [integrations](https://infis - - โœ”๏ธ Ruby on Rails + + โœ”๏ธ Vue - - โœ”๏ธ Vue + + โœ”๏ธ Ruby on Rails @@ -292,6 +317,16 @@ We're currently setting the foundation and building [integrations](https://infis + + + + โœ”๏ธ .NET + + + + And more... + + @@ -309,7 +344,7 @@ Looking to report a security vulnerability? Please don't post about it in GitHub ## ๐Ÿšจ Stay Up-to-Date -Infisical officially launched as v.1.0 on November 21st, 2022. However, a lot of new features are coming very quickly. Watch **releases** of this repository to be notified about future updates: +Infisical officially launched as v.1.0 on November 21st, 2022. There are a lot of new features coming very frequently. Watch **releases** of this repository to be notified about future updates: ![infisical-star-github](https://github.com/Infisical/infisical/blob/main/.github/images/star-infisical.gif?raw=true) @@ -321,10 +356,10 @@ Infisical officially launched as v.1.0 on November 21st, 2022. However, a lot of - + ## ๐ŸŒŽ Translations -Infisical is currently available in English and Korean. Help us translate Infisical to your language! +Infisical is currently available in English, Korean, French, and Portuguese (Brazil). Help us translate Infisical to your language! -You can find all the info in [this issue](https://github.com/Infisical/infisical/issues/181). \ No newline at end of file +You can find all the info in [this issue](https://github.com/Infisical/infisical/issues/181). diff --git a/i18n/README.es.md b/i18n/README.es.md index 0139bdd65..d579bfa1c 100644 --- a/i18n/README.es.md +++ b/i18n/README.es.md @@ -144,12 +144,14 @@ Actualmente estamos sentando bases y construyendo [integraciones](https://infisi - ๐Ÿ”œ Fly.io + + โœ”๏ธ Fly.io + - ๐Ÿ”œ AWS + ๐Ÿ”œ AWS PS (https://github.com/Infisical/infisical/issues/286) @@ -157,12 +159,12 @@ Actualmente estamos sentando bases y construyendo [integraciones](https://infisi - ๐Ÿ”œ Railway + ๐Ÿ”œ Railway (https://github.com/Infisical/infisical/issues/271) - ๐Ÿ”œ GCP + ๐Ÿ”œ GCP SM (https://github.com/Infisical/infisical/issues/285) ๐Ÿ”œ GitLab CI/CD (https://github.com/Infisical/infisical/issues/134) @@ -192,7 +194,7 @@ Actualmente estamos sentando bases y construyendo [integraciones](https://infisi - ๐Ÿ”œ Railway + ๐Ÿ”œ Forge @@ -203,7 +205,20 @@ Actualmente estamos sentando bases y construyendo [integraciones](https://infisi ๐Ÿ”œ Supabase - ๐Ÿ”œ Render (https://github.com/Infisical/infisical/issues/132) + + โœ”๏ธ Render + + + + + + ๐Ÿ”œ BuddyCI + + + ๐Ÿ”œ Serverless + + + ๐Ÿ”œ AWS Lambda @@ -337,7 +352,7 @@ Infisical se lanzรณ oficialmente como v.1.0 el 21 de noviembre de 2022. Hay much - + ## ๐ŸŒŽ Traducciones diff --git a/i18n/README.ko.md b/i18n/README.ko.md index c56862b71..bab9e4d49 100644 --- a/i18n/README.ko.md +++ b/i18n/README.ko.md @@ -145,12 +145,14 @@ Infisical์€ ํ˜„์žฌ ๊ณต๊ฐœ ์•ŒํŒŒ ์ƒํƒœ์—์š”. - ๐Ÿ”œ Fly.io + + โœ”๏ธ Fly.io + - ๐Ÿ”œ AWS + ๐Ÿ”œ AWS PS (https://github.com/Infisical/infisical/issues/286) @@ -158,12 +160,12 @@ Infisical์€ ํ˜„์žฌ ๊ณต๊ฐœ ์•ŒํŒŒ ์ƒํƒœ์—์š”. - ๐Ÿ”œ Railway + ๐Ÿ”œ Railway (https://github.com/Infisical/infisical/issues/271) - ๐Ÿ”œ GCP + ๐Ÿ”œ GCP SM (https://github.com/Infisical/infisical/issues/285) ๐Ÿ”œ GitLab CI/CD (https://github.com/Infisical/infisical/issues/134) @@ -193,7 +195,7 @@ Infisical์€ ํ˜„์žฌ ๊ณต๊ฐœ ์•ŒํŒŒ ์ƒํƒœ์—์š”. - ๐Ÿ”œ Railway + ๐Ÿ”œ Forge @@ -204,7 +206,20 @@ Infisical์€ ํ˜„์žฌ ๊ณต๊ฐœ ์•ŒํŒŒ ์ƒํƒœ์—์š”. ๐Ÿ”œ Supabase - ๐Ÿ”œ Render (https://github.com/Infisical/infisical/issues/132) + + โœ”๏ธ Render + + + + + + ๐Ÿ”œ BuddyCI + + + ๐Ÿ”œ Serverless + + + ๐Ÿ”œ AWS Lambda @@ -306,7 +321,7 @@ Infisical์€ ํ˜„์žฌ ๊ณต๊ฐœ ์•ŒํŒŒ ์ƒํƒœ์—์š”. - ๋” ์ฐพ์•„์˜ต๋‹ˆ๋‹ค! + And more... @@ -338,7 +353,7 @@ Infisical์€ 2022๋…„ 11์›” 21์ผ์— v1.0 ๋ฒ„์ „์„ ์ถœ์‹œํ–ˆ์–ด์š”. ์ƒˆ๋กœ์šด - + ## ๐ŸŒŽ ๋ฒˆ์—ญ diff --git a/i18n/README.tr.md b/i18n/README.tr.md index 24daa8fc8..bef6aa6b8 100644 --- a/i18n/README.tr.md +++ b/i18n/README.tr.md @@ -143,12 +143,14 @@ Nereden baลŸlayacaฤŸฤฑnฤฑzdan emin deฤŸil misiniz? O zaman; - ๐Ÿ”œ Fly.io + + โœ”๏ธ Fly.io + - ๐Ÿ”œ AWS + ๐Ÿ”œ AWS PS (https://github.com/Infisical/infisical/issues/286) @@ -156,12 +158,12 @@ Nereden baลŸlayacaฤŸฤฑnฤฑzdan emin deฤŸil misiniz? O zaman; - ๐Ÿ”œ Railway + ๐Ÿ”œ Railway (https://github.com/Infisical/infisical/issues/271) - ๐Ÿ”œ GCP + ๐Ÿ”œ GCP SM (https://github.com/Infisical/infisical/issues/285) ๐Ÿ”œ GitLab CI/CD (https://github.com/Infisical/infisical/issues/134) @@ -191,7 +193,7 @@ Nereden baลŸlayacaฤŸฤฑnฤฑzdan emin deฤŸil misiniz? O zaman; - ๐Ÿ”œ Railway + ๐Ÿ”œ Forge @@ -202,7 +204,20 @@ Nereden baลŸlayacaฤŸฤฑnฤฑzdan emin deฤŸil misiniz? O zaman; ๐Ÿ”œ Supabase - ๐Ÿ”œ Render (https://github.com/Infisical/infisical/issues/132) + + โœ”๏ธ Render + + + + + + ๐Ÿ”œ BuddyCI + + + ๐Ÿ”œ Serverless + + + ๐Ÿ”œ AWS Lambda @@ -275,13 +290,13 @@ Nereden baลŸlayacaฤŸฤฑnฤฑzdan emin deฤŸil misiniz? O zaman; - - โœ”๏ธ Ruby on Rails + + โœ”๏ธ Vue - - โœ”๏ธ Vue + + โœ”๏ธ Ruby on Rails @@ -297,6 +312,16 @@ Nereden baลŸlayacaฤŸฤฑnฤฑzdan emin deฤŸil misiniz? O zaman; + + + + โœ”๏ธ .NET + + + + And more... + + @@ -326,7 +351,7 @@ Infisical 21 Kasฤฑm 2022 de v.1.0 resmi olarak olarak yayฤฑnlandฤฑ. Buna raฤŸmen - + ## ๐ŸŒŽ ร‡eviriler