mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-12 19:29:15 +00:00
Merge remote-tracking branch 'origin' into ip-address
This commit is contained in:
@@ -19,6 +19,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- run: git fetch --force --tags
|
- run: git fetch --force --tags
|
||||||
|
- run: echo "Ref name ${{github.ref_name}}"
|
||||||
- uses: actions/setup-go@v3
|
- uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: '>=1.19.3'
|
go-version: '>=1.19.3'
|
||||||
@@ -33,11 +34,11 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
mkdir ../../osxcross
|
mkdir ../../osxcross
|
||||||
git clone https://github.com/plentico/osxcross-target.git ../../osxcross/target
|
git clone https://github.com/plentico/osxcross-target.git ../../osxcross/target
|
||||||
- uses: goreleaser/goreleaser-action@v2
|
- uses: goreleaser/goreleaser-action@v4
|
||||||
with:
|
with:
|
||||||
distribution: goreleaser
|
distribution: goreleaser
|
||||||
version: latest
|
version: latest
|
||||||
args: release --rm-dist
|
args: release --clean
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GO_RELEASER_GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GO_RELEASER_GITHUB_TOKEN }}
|
||||||
FURY_TOKEN: ${{ secrets.FURYPUSHTOKEN }}
|
FURY_TOKEN: ${{ secrets.FURYPUSHTOKEN }}
|
||||||
|
|||||||
+20
-1
@@ -14,6 +14,9 @@ before:
|
|||||||
builds:
|
builds:
|
||||||
- id: darwin-build
|
- id: darwin-build
|
||||||
binary: infisical
|
binary: infisical
|
||||||
|
ldflags: -X github.com/Infisical/infisical-merge/packages/util.CLI_VERSION={{ .Version }}
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
env:
|
env:
|
||||||
- CGO_ENABLED=1
|
- CGO_ENABLED=1
|
||||||
- CC=/home/runner/work/osxcross/target/bin/o64-clang
|
- CC=/home/runner/work/osxcross/target/bin/o64-clang
|
||||||
@@ -24,10 +27,14 @@ builds:
|
|||||||
- goos: darwin
|
- goos: darwin
|
||||||
goarch: "386"
|
goarch: "386"
|
||||||
dir: ./cli
|
dir: ./cli
|
||||||
|
|
||||||
- id: all-other-builds
|
- id: all-other-builds
|
||||||
env:
|
env:
|
||||||
- CGO_ENABLED=0
|
- CGO_ENABLED=0
|
||||||
binary: infisical
|
binary: infisical
|
||||||
|
ldflags: -X github.com/Infisical/infisical-merge/packages/util.CLI_VERSION={{ .Version }}
|
||||||
|
flags:
|
||||||
|
- -trimpath
|
||||||
goos:
|
goos:
|
||||||
- freebsd
|
- freebsd
|
||||||
- linux
|
- linux
|
||||||
@@ -65,8 +72,10 @@ release:
|
|||||||
|
|
||||||
checksum:
|
checksum:
|
||||||
name_template: 'checksums.txt'
|
name_template: 'checksums.txt'
|
||||||
|
|
||||||
snapshot:
|
snapshot:
|
||||||
name_template: "{{ incpatch .Version }}"
|
name_template: "{{ incpatch .Version }}-devel"
|
||||||
|
|
||||||
changelog:
|
changelog:
|
||||||
sort: asc
|
sort: asc
|
||||||
filters:
|
filters:
|
||||||
@@ -80,6 +89,7 @@ changelog:
|
|||||||
# - infisical
|
# - infisical
|
||||||
# dir: "{{ dir .ArtifactPath }}"
|
# dir: "{{ dir .ArtifactPath }}"
|
||||||
# cmd: curl -F package=@{{ .ArtifactName }} https://{{ .Env.FURY_TOKEN }}@push.fury.io/infisical/
|
# cmd: curl -F package=@{{ .ArtifactName }} https://{{ .Env.FURY_TOKEN }}@push.fury.io/infisical/
|
||||||
|
|
||||||
brews:
|
brews:
|
||||||
- name: infisical
|
- name: infisical
|
||||||
tap:
|
tap:
|
||||||
@@ -91,6 +101,13 @@ brews:
|
|||||||
folder: Formula
|
folder: Formula
|
||||||
homepage: "https://infisical.com"
|
homepage: "https://infisical.com"
|
||||||
description: "The official Infisical CLI"
|
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:
|
nfpms:
|
||||||
- id: infisical
|
- id: infisical
|
||||||
package_name: infisical
|
package_name: infisical
|
||||||
@@ -116,6 +133,7 @@ nfpms:
|
|||||||
dst: /usr/share/zsh/site-functions/_infisical
|
dst: /usr/share/zsh/site-functions/_infisical
|
||||||
- src: ./manpages/infisical.1.gz
|
- src: ./manpages/infisical.1.gz
|
||||||
dst: /usr/share/man/man1/infisical.1.gz
|
dst: /usr/share/man/man1/infisical.1.gz
|
||||||
|
|
||||||
scoop:
|
scoop:
|
||||||
bucket:
|
bucket:
|
||||||
owner: Infisical
|
owner: Infisical
|
||||||
@@ -126,6 +144,7 @@ scoop:
|
|||||||
homepage: "https://infisical.com"
|
homepage: "https://infisical.com"
|
||||||
description: "The official Infisical CLI"
|
description: "The official Infisical CLI"
|
||||||
license: MIT
|
license: MIT
|
||||||
|
|
||||||
aurs:
|
aurs:
|
||||||
-
|
-
|
||||||
name: infisical-bin
|
name: infisical-bin
|
||||||
|
|||||||
Generated
+119
-116
@@ -10,13 +10,13 @@
|
|||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@godaddy/terminus": "^4.11.2",
|
"@godaddy/terminus": "^4.11.2",
|
||||||
|
"@sentry/node": "^7.21.1",
|
||||||
"@octokit/rest": "^19.0.5",
|
"@octokit/rest": "^19.0.5",
|
||||||
"@sentry/node": "^7.14.0",
|
"@sentry/tracing": "^7.21.1",
|
||||||
"@sentry/tracing": "^7.19.0",
|
|
||||||
"@types/crypto-js": "^4.1.1",
|
"@types/crypto-js": "^4.1.1",
|
||||||
|
"axios": "^1.2.0",
|
||||||
"@types/libsodium-wrappers": "^0.7.10",
|
"@types/libsodium-wrappers": "^0.7.10",
|
||||||
"await-to-js": "^3.0.0",
|
"await-to-js": "^3.0.0",
|
||||||
"axios": "^1.1.3",
|
|
||||||
"bcrypt": "^5.1.0",
|
"bcrypt": "^5.1.0",
|
||||||
"bigint-conversion": "^2.2.2",
|
"bigint-conversion": "^2.2.2",
|
||||||
"builder-pattern": "^2.2.0",
|
"builder-pattern": "^2.2.0",
|
||||||
@@ -32,9 +32,9 @@
|
|||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"jsonwebtoken": "^9.0.0",
|
"jsonwebtoken": "^9.0.0",
|
||||||
"jsrp": "^0.2.4",
|
"jsrp": "^0.2.4",
|
||||||
|
"mongoose": "^6.7.3",
|
||||||
"libsodium-wrappers": "^0.7.10",
|
"libsodium-wrappers": "^0.7.10",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"mongoose": "^6.7.2",
|
|
||||||
"nodemailer": "^6.8.0",
|
"nodemailer": "^6.8.0",
|
||||||
"posthog-node": "^2.2.2",
|
"posthog-node": "^2.2.2",
|
||||||
"query-string": "^7.1.3",
|
"query-string": "^7.1.3",
|
||||||
@@ -2838,6 +2838,19 @@
|
|||||||
"@maxmind/geoip2-node": "^3.4.0"
|
"@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": {
|
"node_modules/@protobufjs/aspromise": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz",
|
"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",
|
"resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.19.0.tgz",
|
||||||
"integrity": "sha512-YF9cTBcAnO4R44092BJi5Wa2/EO02xn2ziCtmNgAVTN2LD31a/YVGxGBt/FDr4Y6yeuVehaqijVVvtpSmXrGJw==",
|
"integrity": "sha512-YF9cTBcAnO4R44092BJi5Wa2/EO02xn2ziCtmNgAVTN2LD31a/YVGxGBt/FDr4Y6yeuVehaqijVVvtpSmXrGJw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sentry/types": "7.19.0",
|
"@sentry/types": "7.21.1",
|
||||||
"@sentry/utils": "7.19.0",
|
"@sentry/utils": "7.21.1",
|
||||||
"tslib": "^1.9.3"
|
"tslib": "^1.9.3"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@sentry/node/node_modules/@sentry/types": {
|
"node_modules/@sentry/node": {
|
||||||
"version": "7.19.0",
|
"version": "7.21.1",
|
||||||
"resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.19.0.tgz",
|
"resolved": "https://registry.npmjs.org/@sentry/node/-/node-7.21.1.tgz",
|
||||||
"integrity": "sha512-oGRAT6lfzoKrxO1mvxiSj0XHxWPd6Gd1wpPGuu6iJo03xgWDS+MIlD1h2unqL4N5fAzLjzmbC2D2lUw50Kn2pA==",
|
"integrity": "sha512-B+p1nQHaFWdCCRVmvqlr/+vdQCI3mGLObucNfK2YC22IQZg7+3u6tEbxJ7umITIjeSSKgf7ZoZwCxL9VfkrNXg==",
|
||||||
"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==",
|
|
||||||
"dependencies": {
|
"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"
|
"tslib": "^1.9.3"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -2943,46 +2953,53 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@sentry/tracing": {
|
"node_modules/@sentry/tracing": {
|
||||||
"version": "7.19.0",
|
"version": "7.21.1",
|
||||||
"resolved": "https://registry.npmjs.org/@sentry/tracing/-/tracing-7.19.0.tgz",
|
"resolved": "https://registry.npmjs.org/@sentry/tracing/-/tracing-7.21.1.tgz",
|
||||||
"integrity": "sha512-SWY17M3TsgBePaGowUcSqBwaT0TJQzuNexVnLojuU0k6F57L9hubvP9zaoosoCfARXQ/3NypAFWnlJyf570rFQ==",
|
"integrity": "sha512-b1BTPsRaNQpohzegoz59KGuBl+To651vEq0vMS4tCzSyIdxkYso3JCrjDdEqW/2MliQYANNVrUai2bmwmU9h1g==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sentry/core": "7.19.0",
|
"@sentry/core": "7.21.1",
|
||||||
"@sentry/types": "7.19.0",
|
"@sentry/types": "7.21.1",
|
||||||
"@sentry/utils": "7.19.0",
|
"@sentry/utils": "7.21.1",
|
||||||
"tslib": "^1.9.3"
|
"tslib": "^1.9.3"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@sentry/tracing/node_modules/@sentry/core": {
|
"node_modules/@sentry/types": {
|
||||||
"version": "7.19.0",
|
"version": "7.21.1",
|
||||||
"resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.19.0.tgz",
|
"resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.21.1.tgz",
|
||||||
"integrity": "sha512-YF9cTBcAnO4R44092BJi5Wa2/EO02xn2ziCtmNgAVTN2LD31a/YVGxGBt/FDr4Y6yeuVehaqijVVvtpSmXrGJw==",
|
"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": {
|
"dependencies": {
|
||||||
"@sentry/types": "7.19.0",
|
"@sentry/types": "7.21.1",
|
||||||
"@sentry/utils": "7.19.0",
|
|
||||||
"tslib": "^1.9.3"
|
"tslib": "^1.9.3"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@sentry/tracing/node_modules/@sentry/types": {
|
"node_modules/@sentry/types": {
|
||||||
"version": "7.19.0",
|
"version": "7.21.1",
|
||||||
"resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.19.0.tgz",
|
"resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.21.1.tgz",
|
||||||
"integrity": "sha512-oGRAT6lfzoKrxO1mvxiSj0XHxWPd6Gd1wpPGuu6iJo03xgWDS+MIlD1h2unqL4N5fAzLjzmbC2D2lUw50Kn2pA==",
|
"integrity": "sha512-3/IKnd52Ol21amQvI+kz+WB76s8/LR5YvFJzMgIoI2S8d82smIr253zGijRXxHPEif8kMLX4Yt+36VzrLxg6+A==",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@sentry/tracing/node_modules/@sentry/utils": {
|
"node_modules/@sentry/utils": {
|
||||||
"version": "7.19.0",
|
"version": "7.21.1",
|
||||||
"resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.19.0.tgz",
|
"resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.21.1.tgz",
|
||||||
"integrity": "sha512-2L6lq+c9Ol2uiRxQDdcgoapmHJp24MhMN0gIkn2alSfMJ+ls6bGXzQHx6JAIdoOiwFQXRZHKL9ecfAc8O+vItA==",
|
"integrity": "sha512-F0W0AAi8tgtTx6ApZRI2S9HbXEA9ENX1phTZgdNNWcMFm1BNbc21XEwLqwXBNjub5nlA6CE8xnjXRgdZKx4kzQ==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@sentry/types": "7.19.0",
|
"@sentry/types": "7.21.1",
|
||||||
"tslib": "^1.9.3"
|
"tslib": "^1.9.3"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
@@ -3767,9 +3784,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/axios": {
|
"node_modules/axios": {
|
||||||
"version": "1.1.3",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/axios/-/axios-1.2.0.tgz",
|
||||||
"integrity": "sha512-00tXVRwKx/FZr/IDVFt4C+f9FYairX517WoGCL6dpOntqLkZofjhu43F/Xl44UOpqa+9sLFDrG/XAnFsUYgkDA==",
|
"integrity": "sha512-zT7wZyNYu3N5Bu0wuZ6QccIf93Qk1eV8LOewxgjOZFd2DenOs98cJ7+Y6703d0wkaXGY6/nZd4EweJaHz9uzQw==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"follow-redirects": "^1.15.0",
|
"follow-redirects": "^1.15.0",
|
||||||
"form-data": "^4.0.0",
|
"form-data": "^4.0.0",
|
||||||
@@ -7165,9 +7182,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/mongoose": {
|
"node_modules/mongoose": {
|
||||||
"version": "6.7.2",
|
"version": "6.7.3",
|
||||||
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.7.2.tgz",
|
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.7.3.tgz",
|
||||||
"integrity": "sha512-lrP2V5U1qhaf+z33fiIn7aYAZZ1fVDly+TkFRjTujNBF/FIHESATj2RbgAOSlWqv32fsZXkXejXzeVfjbv35Ow==",
|
"integrity": "sha512-bLC2Pt6Vpoov+1kBYvQgJXG/2DWXbfIvfK4Gh68kCdYGh6CVO31YxYuIGz70hyGwX2g4DmSzbs5IA8Px2neMCQ==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bson": "^4.7.0",
|
"bson": "^4.7.0",
|
||||||
"kareem": "2.4.1",
|
"kareem": "2.4.1",
|
||||||
@@ -14289,6 +14306,16 @@
|
|||||||
"@maxmind/geoip2-node": "^3.4.0"
|
"@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": {
|
"@protobufjs/aspromise": {
|
||||||
"version": "1.1.2",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz",
|
||||||
@@ -14344,80 +14371,56 @@
|
|||||||
"integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw=="
|
"integrity": "sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw=="
|
||||||
},
|
},
|
||||||
"@sentry/node": {
|
"@sentry/node": {
|
||||||
"version": "7.19.0",
|
"version": "7.21.1",
|
||||||
"resolved": "https://registry.npmjs.org/@sentry/node/-/node-7.19.0.tgz",
|
"resolved": "https://registry.npmjs.org/@sentry/node/-/node-7.21.1.tgz",
|
||||||
"integrity": "sha512-yG7Tx32WqOkEHVotFLrumCcT9qlaSDTkFNZ+yLSvZXx74ifsE781DzBA9W7K7bBdYO3op+p2YdsOKzf3nPpAyQ==",
|
"integrity": "sha512-B+p1nQHaFWdCCRVmvqlr/+vdQCI3mGLObucNfK2YC22IQZg7+3u6tEbxJ7umITIjeSSKgf7ZoZwCxL9VfkrNXg==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@sentry/core": "7.19.0",
|
"@sentry/core": "7.21.1",
|
||||||
"@sentry/types": "7.19.0",
|
"@sentry/types": "7.21.1",
|
||||||
"@sentry/utils": "7.19.0",
|
"@sentry/utils": "7.21.1",
|
||||||
"cookie": "^0.4.1",
|
"cookie": "^0.4.1",
|
||||||
"https-proxy-agent": "^5.0.0",
|
"https-proxy-agent": "^5.0.0",
|
||||||
"lru_map": "^0.3.3",
|
"lru_map": "^0.3.3",
|
||||||
"tslib": "^1.9.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": {
|
"@sentry/tracing": {
|
||||||
"version": "7.19.0",
|
"version": "7.21.1",
|
||||||
"resolved": "https://registry.npmjs.org/@sentry/tracing/-/tracing-7.19.0.tgz",
|
"resolved": "https://registry.npmjs.org/@sentry/tracing/-/tracing-7.21.1.tgz",
|
||||||
"integrity": "sha512-SWY17M3TsgBePaGowUcSqBwaT0TJQzuNexVnLojuU0k6F57L9hubvP9zaoosoCfARXQ/3NypAFWnlJyf570rFQ==",
|
"integrity": "sha512-b1BTPsRaNQpohzegoz59KGuBl+To651vEq0vMS4tCzSyIdxkYso3JCrjDdEqW/2MliQYANNVrUai2bmwmU9h1g==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@sentry/core": "7.19.0",
|
"@sentry/core": "7.21.1",
|
||||||
"@sentry/types": "7.19.0",
|
"@sentry/types": "7.21.1",
|
||||||
"@sentry/utils": "7.19.0",
|
"@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"
|
"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": {
|
"@sinclair/typebox": {
|
||||||
@@ -15051,9 +15054,9 @@
|
|||||||
"integrity": "sha512-zJAaP9zxTcvTHRlejau3ZOY4V7SRpiByf3/dxx2uyKxxor19tpmpV2QRsTKikckwhaPmr2dVpxxMr7jOCYVp5g=="
|
"integrity": "sha512-zJAaP9zxTcvTHRlejau3ZOY4V7SRpiByf3/dxx2uyKxxor19tpmpV2QRsTKikckwhaPmr2dVpxxMr7jOCYVp5g=="
|
||||||
},
|
},
|
||||||
"axios": {
|
"axios": {
|
||||||
"version": "1.1.3",
|
"version": "1.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/axios/-/axios-1.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/axios/-/axios-1.2.0.tgz",
|
||||||
"integrity": "sha512-00tXVRwKx/FZr/IDVFt4C+f9FYairX517WoGCL6dpOntqLkZofjhu43F/Xl44UOpqa+9sLFDrG/XAnFsUYgkDA==",
|
"integrity": "sha512-zT7wZyNYu3N5Bu0wuZ6QccIf93Qk1eV8LOewxgjOZFd2DenOs98cJ7+Y6703d0wkaXGY6/nZd4EweJaHz9uzQw==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"follow-redirects": "^1.15.0",
|
"follow-redirects": "^1.15.0",
|
||||||
"form-data": "^4.0.0",
|
"form-data": "^4.0.0",
|
||||||
@@ -17626,9 +17629,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mongoose": {
|
"mongoose": {
|
||||||
"version": "6.7.2",
|
"version": "6.7.3",
|
||||||
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.7.2.tgz",
|
"resolved": "https://registry.npmjs.org/mongoose/-/mongoose-6.7.3.tgz",
|
||||||
"integrity": "sha512-lrP2V5U1qhaf+z33fiIn7aYAZZ1fVDly+TkFRjTujNBF/FIHESATj2RbgAOSlWqv32fsZXkXejXzeVfjbv35Ow==",
|
"integrity": "sha512-bLC2Pt6Vpoov+1kBYvQgJXG/2DWXbfIvfK4Gh68kCdYGh6CVO31YxYuIGz70hyGwX2g4DmSzbs5IA8Px2neMCQ==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"bson": "^4.7.0",
|
"bson": "^4.7.0",
|
||||||
"kareem": "2.4.1",
|
"kareem": "2.4.1",
|
||||||
|
|||||||
@@ -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",
|
"name": "infisical-api",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
|
|||||||
@@ -8,6 +8,8 @@ import {
|
|||||||
import {
|
import {
|
||||||
SALT_ROUNDS
|
SALT_ROUNDS
|
||||||
} from '../../config';
|
} from '../../config';
|
||||||
|
import { userHasWorkspaceAccess } from '../../ee/helpers/checkMembershipPermissions';
|
||||||
|
import { ABILITY_READ } from '../../variables/organization';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return service token data associated with service token on request
|
* Return service token data associated with service token on request
|
||||||
@@ -37,6 +39,11 @@ export const createServiceTokenData = async (req: Request, res: Response) => {
|
|||||||
expiresIn
|
expiresIn
|
||||||
} = req.body;
|
} = 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 secret = crypto.randomBytes(16).toString('hex');
|
||||||
const secretHash = await bcrypt.hash(secret, SALT_ROUNDS);
|
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({
|
return res.status(200).send({
|
||||||
serviceTokenData
|
serviceTokenData
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function UnauthorizedRequestError(arg0: { message: string; }) {
|
||||||
|
throw new Error('Function not implemented.');
|
||||||
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ router.patch(
|
|||||||
'/:organizationId/memberships/:membershipId',
|
'/:organizationId/memberships/:membershipId',
|
||||||
param('organizationId').exists().trim(),
|
param('organizationId').exists().trim(),
|
||||||
param('membershipId').exists().trim(),
|
param('membershipId').exists().trim(),
|
||||||
body('role').exists().isString().trim().isIn([ADMIN, MEMBER]),
|
body('role').exists().isString().trim().isIn([OWNER, ADMIN, MEMBER]),
|
||||||
validateRequest,
|
validateRequest,
|
||||||
requireAuth({
|
requireAuth({
|
||||||
acceptedAuthModes: ['jwt', 'apiKey']
|
acceptedAuthModes: ['jwt', 'apiKey']
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
|
Copyright (c) 2023 Infisical Inc.
|
||||||
*/
|
*/
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import (
|
|||||||
|
|
||||||
"github.com/Infisical/infisical-merge/packages/config"
|
"github.com/Infisical/infisical-merge/packages/config"
|
||||||
"github.com/go-resty/resty/v2"
|
"github.com/go-resty/resty/v2"
|
||||||
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
const USER_AGENT = "cli"
|
const USER_AGENT = "cli"
|
||||||
@@ -144,3 +145,24 @@ func CallGetAllWorkSpacesUserBelongsTo(httpClient *resty.Client) (GetWorkSpacesR
|
|||||||
|
|
||||||
return workSpacesResponse, nil
|
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
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
|
Copyright (c) 2023 Infisical Inc.
|
||||||
*/
|
*/
|
||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
|
Copyright (c) 2023 Infisical Inc.
|
||||||
*/
|
*/
|
||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
|
Copyright (c) 2023 Infisical Inc.
|
||||||
*/
|
*/
|
||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
@@ -33,13 +33,13 @@ var loginCmd = &cobra.Command{
|
|||||||
PreRun: toggleDebug,
|
PreRun: toggleDebug,
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
currentLoggedInUserDetails, err := util.GetCurrentLoggedInUserDetails()
|
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)
|
log.Debug(err)
|
||||||
} else if err != nil {
|
} else if err != nil {
|
||||||
util.HandleError(err)
|
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)
|
shouldOverride, err := shouldOverrideLoginPrompt(currentLoggedInUserDetails.UserCredentials.Email)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
util.HandleError(err)
|
util.HandleError(err)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
|
Copyright (c) 2023 Infisical Inc.
|
||||||
*/
|
*/
|
||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
|
Copyright (c) 2023 Infisical Inc.
|
||||||
*/
|
*/
|
||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
|
Copyright (c) 2023 Infisical Inc.
|
||||||
*/
|
*/
|
||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
@@ -58,9 +58,9 @@ var runCmd = &cobra.Command{
|
|||||||
util.HandleError(err, "Unable to parse flag")
|
util.HandleError(err, "Unable to parse flag")
|
||||||
}
|
}
|
||||||
|
|
||||||
if !util.IsSecretEnvironmentValid(envName) {
|
// if !util.IsSecretEnvironmentValid(envName) {
|
||||||
util.PrintMessageAndExit("Invalid environment name passed. Environment names can only be prod, dev, test or staging")
|
// util.PrintMessageAndExit("Invalid environment name passed. Environment names can only be prod, dev, test or staging")
|
||||||
}
|
// }
|
||||||
|
|
||||||
secretOverriding, err := cmd.Flags().GetBool("secret-overriding")
|
secretOverriding, err := cmd.Flags().GetBool("secret-overriding")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
|
Copyright (c) 2023 Infisical Inc.
|
||||||
*/
|
*/
|
||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
|
Copyright (c) 2023 Infisical Inc.
|
||||||
*/
|
*/
|
||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,10 @@ package util
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
"errors"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func CheckForUpdate() {
|
func CheckForUpdate() {
|
||||||
@@ -42,5 +42,5 @@ func getLatestTag(repoOwner string, repoName string) (string, error) {
|
|||||||
|
|
||||||
json.Unmarshal(body, &tags)
|
json.Unmarshal(body, &tags)
|
||||||
|
|
||||||
return tags[0].Name, nil
|
return tags[0].Name[1:], nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,5 +11,8 @@ const (
|
|||||||
KEYRING_SERVICE_NAME = "infisical"
|
KEYRING_SERVICE_NAME = "infisical"
|
||||||
PERSONAL_SECRET_TYPE_NAME = "personal"
|
PERSONAL_SECRET_TYPE_NAME = "personal"
|
||||||
SHARED_SECRET_TYPE_NAME = "shared"
|
SHARED_SECRET_TYPE_NAME = "shared"
|
||||||
CLI_VERSION = "v0.2.8"
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
CLI_VERSION = "devel"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
"github.com/99designs/keyring"
|
"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/Infisical/infisical-merge/packages/models"
|
||||||
"github.com/go-resty/resty/v2"
|
"github.com/go-resty/resty/v2"
|
||||||
)
|
)
|
||||||
@@ -87,17 +87,10 @@ func GetCurrentLoggedInUserDetails() (LoggedInUserDetails, error) {
|
|||||||
SetAuthToken(userCreds.JTWToken).
|
SetAuthToken(userCreds.JTWToken).
|
||||||
SetHeader("Accept", "application/json")
|
SetHeader("Accept", "application/json")
|
||||||
|
|
||||||
response, err := httpClient.
|
isAuthenticated := api.CallIsAuthenticated(httpClient)
|
||||||
R().
|
if !isAuthenticated {
|
||||||
Post(fmt.Sprintf("%v/v1/auth/checkAuth", config.INFISICAL_URL))
|
|
||||||
|
|
||||||
if err != nil {
|
|
||||||
return LoggedInUserDetails{}, err
|
|
||||||
}
|
|
||||||
|
|
||||||
if response.StatusCode() > 299 {
|
|
||||||
return LoggedInUserDetails{
|
return LoggedInUserDetails{
|
||||||
IsUserLoggedIn: true,
|
IsUserLoggedIn: true, // was logged in
|
||||||
LoginExpired: true,
|
LoginExpired: true,
|
||||||
UserCredentials: userCreds,
|
UserCredentials: userCreds,
|
||||||
}, nil
|
}, nil
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ func fileKeyringPassphrasePrompt(prompt string) (string, error) {
|
|||||||
if password, ok := os.LookupEnv("INFISICAL_VAULT_FILE_PASSPHRASE"); ok {
|
if password, ok := os.LookupEnv("INFISICAL_VAULT_FILE_PASSPHRASE"); ok {
|
||||||
return password, nil
|
return password, nil
|
||||||
} else {
|
} 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)
|
fmt.Fprintf(os.Stderr, "%s:", prompt)
|
||||||
@@ -65,6 +65,7 @@ func fileKeyringPassphrasePrompt(prompt string) (string, error) {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
fmt.Println("")
|
fmt.Println("")
|
||||||
return string(b), nil
|
return string(b), nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"head-title": "{{title}} | Infiscal",
|
"head-title": "{{title}} | Infisical",
|
||||||
"error_project-already-exists": "A project with this name already exists.",
|
"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. ",
|
"no-mobile": " To use Infisical, please log in through a device with larger dimensions. ",
|
||||||
"email": "Email",
|
"email": "Email",
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
"select-event": "Select an event",
|
"select-event": "Select an event",
|
||||||
"event": "Event",
|
"event": "Event",
|
||||||
"user": "User",
|
"user": "User",
|
||||||
"source": "Source",
|
"source": "Source",
|
||||||
"time": "Time",
|
"time": "Time",
|
||||||
"timestamp": "Timestamp"
|
"timestamp": "Timestamp"
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"head-title": "{{title}} | Infiscal",
|
"head-title": "{{title}} | Infisical",
|
||||||
"error_project-already-exists": "Un projet avec ce nom existe déjà.",
|
"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. ",
|
"no-mobile": " Pour utiliser Infisical, veuillez vous connecter avec un appareil avec des dimensions plus grandes. ",
|
||||||
"email": "Email",
|
"email": "Email",
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
"select-event": "Sélectionnez un événement",
|
"select-event": "Sélectionnez un événement",
|
||||||
"event": "Événement",
|
"event": "Événement",
|
||||||
"user": "Utilisateur",
|
"user": "Utilisateur",
|
||||||
"source": "Source",
|
"source": "Source",
|
||||||
"time": "Heure",
|
"time": "Heure",
|
||||||
"timestamp": "Horodatage"
|
"timestamp": "Horodatage"
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"head-title": "{{title}} | Infiscal",
|
"head-title": "{{title}} | Infisical",
|
||||||
"error_project-already-exists": "동일한 이름을 가진 프로젝트가 이미 존재해요.",
|
"error_project-already-exists": "동일한 이름을 가진 프로젝트가 이미 존재해요.",
|
||||||
"no-mobile": " Infisical을 사용하려면, 큰 화면을 가진 디바이스로 로그인하여 주세요.",
|
"no-mobile": " Infisical을 사용하려면, 큰 화면을 가진 디바이스로 로그인하여 주세요.",
|
||||||
"email": "메일",
|
"email": "메일",
|
||||||
@@ -23,4 +23,4 @@
|
|||||||
"language": "언어",
|
"language": "언어",
|
||||||
"search": "검색하기...",
|
"search": "검색하기...",
|
||||||
"note": "Note"
|
"note": "Note"
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"head-title": "{{title}} | Infiscal",
|
"head-title": "{{title}} | Infisical",
|
||||||
"error_project-already-exists": "Já exite um projeto com este nome.",
|
"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.",
|
"no-mobile": "Para usar o Infisical, faça o login através de um dispositivo com dimensões maiores.",
|
||||||
"email": "Email",
|
"email": "Email",
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ const ProjectUsersTable = ({ userData, changeData, myUser, filter }: Props) => {
|
|||||||
denials = [];
|
denials = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentPlan !== plans.professional && host !== 'https://app.infisical.com') {
|
if (currentPlan !== plans.professional && host === 'https://app.infisical.com') {
|
||||||
setIsUpgradeModalOpen(true);
|
setIsUpgradeModalOpen(true);
|
||||||
} else {
|
} else {
|
||||||
const allDenials = userData[index].deniedPermissions.filter((perm: { ability: string; environmentSlug: string; }) => perm.environmentSlug !== slug).concat(denials);
|
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"
|
? "No Access"
|
||||||
: (row.deniedPermissions.filter((perm: any) => perm.environmentSlug === env.slug).map((perm: {ability: string}) => perm.ability).includes("write") ? "Read Only" : "Read & Write")
|
: (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)}
|
// onOpenChange={(open) => setIsOpen(open)}
|
||||||
>
|
>
|
||||||
<SelectItem value="No Access">No Access</SelectItem>
|
<SelectItem value="No Access">No Access</SelectItem>
|
||||||
|
|||||||
@@ -2,8 +2,8 @@ import { useEffect, useState } from 'react';
|
|||||||
import { useRouter } from 'next/router';
|
import { useRouter } from 'next/router';
|
||||||
import { faX } from '@fortawesome/free-solid-svg-icons';
|
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 deleteUserFromOrganization from '@app/pages/api/organization/deleteUserFromOrganization';
|
||||||
import changeUserRoleInWorkspace from '@app/pages/api/workspace/changeUserRoleInWorkspace';
|
|
||||||
import deleteUserFromWorkspace from '@app/pages/api/workspace/deleteUserFromWorkspace';
|
import deleteUserFromWorkspace from '@app/pages/api/workspace/deleteUserFromWorkspace';
|
||||||
import getLatestFileKey from '@app/pages/api/workspace/getLatestFileKey';
|
import getLatestFileKey from '@app/pages/api/workspace/getLatestFileKey';
|
||||||
import uploadKeys from '@app/pages/api/workspace/uploadKeys';
|
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) => {
|
const handleRoleUpdate = (index: number, e: string) => {
|
||||||
changeUserRoleInWorkspace(userData[index].membershipId, e);
|
changeUserRoleInOrganization(String(localStorage.getItem("orgData.id")), userData[index].membershipId, e);
|
||||||
changeData([
|
changeData([
|
||||||
...userData.slice(0, index),
|
...userData.slice(0, index),
|
||||||
...[
|
...[
|
||||||
@@ -145,9 +145,9 @@ const UserTable = ({ userData, changeData, myUser, filter, resendInvite, isOrg }
|
|||||||
</td>
|
</td>
|
||||||
<td className="pl-6 pr-10 py-2 border-mineshaft-700 border-t text-gray-300">
|
<td className="pl-6 pr-10 py-2 border-mineshaft-700 border-t text-gray-300">
|
||||||
<div className="justify-start h-full flex flex-row items-center">
|
<div className="justify-start h-full flex flex-row items-center">
|
||||||
{row.status === 'granted' &&
|
{row.status === 'accepted' &&
|
||||||
((myRole === 'admin' && row.role !== 'owner') || myRole === 'owner') &&
|
((myRole === 'admin' && row.role !== 'owner') || myRole === 'owner') &&
|
||||||
myUser !== row.email ? (
|
(myUser !== row.email) ? (
|
||||||
<Listbox
|
<Listbox
|
||||||
isSelected={row.role}
|
isSelected={row.role}
|
||||||
onChange={(e) => handleRoleUpdate(index, e)}
|
onChange={(e) => handleRoleUpdate(index, e)}
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ export default function NavHeader({
|
|||||||
const [orgName, setOrgName] = useState('');
|
const [orgName, setOrgName] = useState('');
|
||||||
const [workspaceName, setWorkspaceName] = useState('');
|
const [workspaceName, setWorkspaceName] = useState('');
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const projectId = String(router.query.id);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
(async () => {
|
(async () => {
|
||||||
@@ -35,12 +36,12 @@ export default function NavHeader({
|
|||||||
setOrgName(org.name);
|
setOrgName(org.name);
|
||||||
|
|
||||||
const workspace = await getProjectInfo({
|
const workspace = await getProjectInfo({
|
||||||
projectId: String(router.query.id)
|
projectId
|
||||||
});
|
});
|
||||||
setWorkspaceName(workspace.name);
|
setWorkspaceName(workspace.name);
|
||||||
})();
|
})();
|
||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, []);
|
}, [projectId]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="pt-20 ml-6 flex flex-row items-center">
|
<div className="pt-20 ml-6 flex flex-row items-center">
|
||||||
|
|||||||
@@ -4,11 +4,12 @@ const POSTHOG_HOST =
|
|||||||
process.env.NEXT_PUBLIC_POSTHOG_HOST! || "https://app.posthog.com";
|
process.env.NEXT_PUBLIC_POSTHOG_HOST! || "https://app.posthog.com";
|
||||||
const STRIPE_PRODUCT_PRO = process.env.NEXT_PUBLIC_STRIPE_PRODUCT_PRO!;
|
const STRIPE_PRODUCT_PRO = process.env.NEXT_PUBLIC_STRIPE_PRODUCT_PRO!;
|
||||||
const STRIPE_PRODUCT_STARTER = process.env.NEXT_PUBLIC_STRIPE_PRODUCT_STARTER!;
|
const STRIPE_PRODUCT_STARTER = process.env.NEXT_PUBLIC_STRIPE_PRODUCT_STARTER!;
|
||||||
|
const {SITE_URL} = process.env
|
||||||
|
|
||||||
export {
|
export {
|
||||||
ENV,
|
ENV,
|
||||||
POSTHOG_API_KEY,
|
POSTHOG_API_KEY,
|
||||||
POSTHOG_HOST,
|
POSTHOG_HOST,
|
||||||
|
SITE_URL,
|
||||||
STRIPE_PRODUCT_PRO,
|
STRIPE_PRODUCT_PRO,
|
||||||
STRIPE_PRODUCT_STARTER
|
STRIPE_PRODUCT_STARTER};
|
||||||
};
|
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
import { jsPDF } from 'jspdf';
|
import { jsPDF } from 'jspdf';
|
||||||
|
|
||||||
|
import { SITE_URL } from './config';
|
||||||
|
|
||||||
interface PDFProps {
|
interface PDFProps {
|
||||||
personalName: string;
|
personalName: string;
|
||||||
personalEmail: string;
|
personalEmail: string;
|
||||||
@@ -73,7 +75,7 @@ function generateBackupPDF({ personalName, personalEmail, generatedKey }: PDFPro
|
|||||||
doc.roundedRect(170, 488, 375, 35, 5, 5, 'F');
|
doc.roundedRect(170, 488, 375, 35, 5, 5, 'F');
|
||||||
doc.setTextColor(23, 23, 23);
|
doc.setTextColor(23, 23, 23);
|
||||||
doc.setFontSize(14);
|
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(personalEmail, 180, 465);
|
||||||
doc.text(generatedKey, 180, 510);
|
doc.text(generatedKey, 180, 510);
|
||||||
doc.text('Need help? Contact us at [email protected]', 32, 575);
|
doc.text('Need help? Contact us at [email protected]', 32, 575);
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ export const publicPaths = [
|
|||||||
`/privacy`,
|
`/privacy`,
|
||||||
`/terms`,
|
`/terms`,
|
||||||
`/subprocessors`,
|
`/subprocessors`,
|
||||||
|
`/verify-email`,
|
||||||
|
`/password-reset`,
|
||||||
];
|
];
|
||||||
|
|
||||||
export const languageMap = {
|
export const languageMap = {
|
||||||
|
|||||||
@@ -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;
|
||||||
@@ -167,7 +167,7 @@ export default function Home() {
|
|||||||
})}
|
})}
|
||||||
{learningItem({
|
{learningItem({
|
||||||
text: 'Inject secrets locally',
|
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,
|
complete: false,
|
||||||
icon: faNetworkWired,
|
icon: faNetworkWired,
|
||||||
time: '8 min',
|
time: '8 min',
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ export default function Login() {
|
|||||||
const [password, setPassword] = useState('');
|
const [password, setPassword] = useState('');
|
||||||
const [errorLogin, setErrorLogin] = useState(false);
|
const [errorLogin, setErrorLogin] = useState(false);
|
||||||
const [isLoading, setIsLoading] = useState(false);
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
|
const [isAlreadyLoggedIn, setIsAlreadyLoggedIn] = useState(false);
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const lang = router.locale ?? 'en';
|
const lang = router.locale ?? 'en';
|
||||||
@@ -44,6 +45,7 @@ export default function Login() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (isLoggedIn()) {
|
if (isLoggedIn()) {
|
||||||
|
setIsAlreadyLoggedIn(true);
|
||||||
redirectToDashboard();
|
redirectToDashboard();
|
||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
@@ -64,6 +66,10 @@ export default function Login() {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (isAlreadyLoggedIn) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="bg-bunker-800 h-screen flex flex-col justify-start px-6">
|
<div className="bg-bunker-800 h-screen flex flex-col justify-start px-6">
|
||||||
<Head>
|
<Head>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export default function VerifyEmail() {
|
|||||||
<title>Login</title>
|
<title>Login</title>
|
||||||
<link rel="icon" href="/infisical.ico" />
|
<link rel="icon" href="/infisical.ico" />
|
||||||
<meta property="og:image" content="/images/message.png" />
|
<meta property="og:image" content="/images/message.png" />
|
||||||
<meta property="og:title" content="Log In to Infisical" />
|
<meta property="og:title" content="Verify your email in Infisical" />
|
||||||
<meta
|
<meta
|
||||||
name="og:description"
|
name="og:description"
|
||||||
content="Infisical a simple end-to-end encrypted platform that enables teams to sync and manage their .env files."
|
content="Infisical a simple end-to-end encrypted platform that enables teams to sync and manage their .env files."
|
||||||
|
|||||||
+65
-30
File diff suppressed because one or more lines are too long
+22
-7
File diff suppressed because one or more lines are too long
+23
-8
File diff suppressed because one or more lines are too long
+36
-11
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user