Create and populate htpasswd file if missing
If htpasswd authentication option is configured but the htpasswd file is missing, populate it with a default user and automatically generated password. The password will be printed to stdout. Signed-off-by: Liron Levin <liron@twistlock.com>
This commit is contained in:
@@ -300,7 +300,7 @@ func NewApp(ctx context.Context, config *configuration.Configuration) *App {
|
||||
|
||||
authType := config.Auth.Type()
|
||||
|
||||
if authType != "" {
|
||||
if authType != "" && !strings.EqualFold(authType, "none") {
|
||||
accessController, err := auth.GetAccessController(config.Auth.Type(), config.Auth.Parameters())
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("unable to configure authorization (%s): %v", authType, err))
|
||||
|
Reference in New Issue
Block a user