feat: read masterkey from file or env (#3389)

* feat: read masterkey from file

* add read from env
This commit is contained in:
Livio Amstutz
2022-04-04 10:10:57 +02:00
committed by GitHub
parent 5112aae177
commit 7d6a10015a
5 changed files with 152 additions and 7 deletions

View File

@@ -3,6 +3,8 @@ package start
import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/caos/zitadel/cmd/admin/key"
)
func startFlags(cmd *cobra.Command) {
@@ -11,7 +13,7 @@ func startFlags(cmd *cobra.Command) {
bindStringFlag(cmd, "externalPort", "port ZITADEL will be exposed on")
bindBoolFlag(cmd, "externalSecure", "if ZITADEL will be served on HTTPS")
cmd.PersistentFlags().String(flagMasterKey, "", "masterkey for en/decryption keys")
key.AddMasterKeyFlag(cmd)
}