-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: Remove secret definitions through env vars (#666)
Remove the ability to define secrets in the env vars of the typegate. Secrets can now only be defined in the metatype config file and the `--secret` CLI option. #### Motivation and context - [MET-370](https://linear.app/metatypedev/issue/MET-370/easier-way-to-pass-secrets-in-metatypeyaml-config-file) - Security - Better DX #### Migration notes 1. **Metatype config file**: On the node configuration, secrets are defined at `secrets.<tg_name>.key`: ```yaml # before typegates: dev: env: TG_CONSOLE_POSTGRES_CONN: postgresql://postgres:password@localhost:5432/db?schema=console TG_CONSOLE_BASIC_ADMIN: password #after typegates: dev: secrets: console: POSTGRES_CONN: postgresql://postgres:password@localhost:5432/db?schema=console BASIC_ADMIN: password ``` 2. **Secret override option on meta/cli** ```sh # before meta deploy -f my-tg.py --secret TG_CONSOLE_POSTGRES_CONN=postgresql://postgres:password@localhost:5432/db?schema=console # after meta deploy -f my-tg.py --secret POSTGRES_CONN=postgresql://postgres:password@localhost:5432/db?schema=console # or - with the typegraph name meta deploy -f my-tg.py --secret console:POSTGRES_CONN=postgresql://postgres:password@localhost:5432/db?schema=console ``` ### Checklist - [x] The change come with new or modified tests - [ ] Hard-to-understand functions have explanatory comments - [x] End-user documentation is updated to reflect the change
- Loading branch information
Showing
22 changed files
with
201 additions
and
224 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,11 +84,6 @@ | |
"portRef": "[email protected]", | ||
"pluginRepo": "https://github.com/asdf-community/asdf-cmake" | ||
}, | ||
"468769528cbf87576285bfcd000271d6398bf3c2b20083d90105d083d61854ba": { | ||
"version": "2.40.1", | ||
"depConfigs": {}, | ||
"portRef": "[email protected]" | ||
}, | ||
"402fae54fb94ffdba9cd2617602c7b33c55002275f3c3bb588615b01ff0c3c26": { | ||
"version": "v1.6.4", | ||
"depConfigs": {}, | ||
|
@@ -99,7 +94,7 @@ | |
"depConfigs": {}, | ||
"portRef": "[email protected]" | ||
}, | ||
"f6c92b4425a3c13dfde7fe516efd376287e66cfa74aefd7b6a7a7bb0f3547a47": { | ||
"80635b3a3967246789cc5f09137a8334fcfae9e96d507b6f8143d385093f024f": { | ||
"version": "0.116.0", | ||
"depConfigs": { | ||
"cargo_binstall_ghrel": { | ||
|
@@ -241,7 +236,7 @@ | |
"version": "1.0.0", | ||
"depConfigs": { | ||
"node_org": { | ||
"version": "v21.7.1", | ||
"version": "v21.7.2", | ||
"depConfigs": { | ||
"tar_aa": { | ||
"version": "1.35", | ||
|
@@ -256,7 +251,7 @@ | |
"packageName": "@bytecodealliance/jco" | ||
}, | ||
"77a0197285cae563176871bd72f2ea24504c195dc596f5c33d4c9cc95eda1fba": { | ||
"version": "v21.7.1", | ||
"version": "v21.7.2", | ||
"depConfigs": { | ||
"tar_aa": { | ||
"version": "1.35", | ||
|
@@ -270,7 +265,7 @@ | |
"version": "10.0.1", | ||
"depConfigs": { | ||
"node_org": { | ||
"version": "v21.7.1", | ||
"version": "v21.7.2", | ||
"depConfigs": { | ||
"tar_aa": { | ||
"version": "1.35", | ||
|
@@ -414,37 +409,6 @@ | |
"portRef": "[email protected]", | ||
"crateName": "whiz", | ||
"locked": true | ||
}, | ||
"80635b3a3967246789cc5f09137a8334fcfae9e96d507b6f8143d385093f024f": { | ||
"version": "0.116.0", | ||
"depConfigs": { | ||
"cargo_binstall_ghrel": { | ||
"version": "v1.6.4", | ||
"depConfigs": {}, | ||
"portRef": "[email protected]" | ||
}, | ||
"rust_rustup": { | ||
"version": "1.76.0", | ||
"depConfigs": { | ||
"rustup_rustlang": { | ||
"version": "1.27.0", | ||
"depConfigs": { | ||
"git_aa": { | ||
"version": "2.43.0", | ||
"depConfigs": {}, | ||
"portRef": "[email protected]" | ||
} | ||
}, | ||
"portRef": "[email protected]" | ||
} | ||
}, | ||
"portRef": "[email protected]", | ||
"profile": "minimal" | ||
} | ||
}, | ||
"portRef": "[email protected]", | ||
"crateName": "wasm-opt", | ||
"locked": true | ||
} | ||
} | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ pub mod deploy; | |
mod fs; | ||
mod global_config; | ||
mod logger; | ||
mod secrets; | ||
|
||
#[cfg(test)] | ||
mod tests; | ||
|
Oops, something went wrong.