diff --git a/config/cmd/cmd.go b/config/cmd/cmd.go index c2476a7e..1dfd87c5 100644 --- a/config/cmd/cmd.go +++ b/config/cmd/cmd.go @@ -271,6 +271,11 @@ var ( EnvVars: []string{"MICRO_AUTH_SECRET"}, Usage: "Account secret used for client authentication", }, + &cli.StringFlag{ + Name: "auth_namespace", + EnvVars: []string{"MICRO_AUTH_NAMESPACE"}, + Usage: "Namespace for the services auth account", + }, &cli.StringFlag{ Name: "auth_public_key", EnvVars: []string{"MICRO_AUTH_PUBLIC_KEY"}, @@ -681,6 +686,10 @@ func (c *cmd) Before(ctx *cli.Context) error { )) } + if len(ctx.String("auth_namespace")) > 0 { + authOpts = append(authOpts, auth.Namespace(ctx.String("auth_namespace"))) + } + if len(ctx.String("auth_public_key")) > 0 { authOpts = append(authOpts, auth.PublicKey(ctx.String("auth_public_key"))) }