From 45ec244aecf4ff474240bdeabbd33741672721ad Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Fri, 17 Dec 2021 18:07:33 +0100 Subject: [PATCH] don't expose not used config via env --- glauth/pkg/config/config.go | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/glauth/pkg/config/config.go b/glauth/pkg/config/config.go index 6292cfc350..f5a1bc5503 100644 --- a/glauth/pkg/config/config.go +++ b/glauth/pkg/config/config.go @@ -30,24 +30,24 @@ type Config struct { // Backend defined the available backend configuration. type Backend struct { - Datastore string `ocisConfig:"datastore" env:"GLAUTH_BACKEND_DATASTORE"` - BaseDN string `ocisConfig:"base_dn" env:"GLAUTH_BACKEND_BASEDN"` - Insecure bool `ocisConfig:"insecure" env:"GLAUTH_BACKEND_INSECURE"` - NameFormat string `ocisConfig:"name_format" env:"GLAUTH_BACKEND_NAME_FORMAT"` - GroupFormat string `ocisConfig:"group_format" env:"GLAUTH_BACKEND_GROUP_FORMAT"` - Servers []string `ocisConfig:"servers"` //TODO: how to configure this via env? - SSHKeyAttr string `ocisConfig:"ssh_key_attr" env:"GLAUTH_BACKEND_SSH_KEY_ATTR"` - UseGraphAPI bool `ocisConfig:"use_graph_api" env:"GLAUTH_BACKEND_USE_GRAPHAPI"` + Datastore string `ocisConfig:"datastore"` + BaseDN string `ocisConfig:"base_dn"` + Insecure bool `ocisConfig:"insecure"` + NameFormat string `ocisConfig:"name_format"` + GroupFormat string `ocisConfig:"group_format"` + Servers []string `ocisConfig:"servers"` + SSHKeyAttr string `ocisConfig:"ssh_key_attr"` + UseGraphAPI bool `ocisConfig:"use_graph_api"` } // FallbackBackend defined the available fallback backend configuration. type FallbackBackend struct { - Datastore string `ocisConfig:"datastore" env:"GLAUTH_FALLBACK_DATASTORE"` - BaseDN string `ocisConfig:"base_dn" env:"GLAUTH_FALLBACK_BASEDN"` - Insecure bool `ocisConfig:"insecure" env:"GLAUTH_FALLBACK_INSECURE"` - NameFormat string `ocisConfig:"name_format" env:"GLAUTH_FALLBACK_NAME_FORMAT"` - GroupFormat string `ocisConfig:"group_format" env:"GLAUTH_FALLBACK_GROUP_FORMAT"` - Servers []string `ocisConfig:"servers"` //TODO: how to configure this via env? - SSHKeyAttr string `ocisConfig:"ssh_key_attr" env:"GLAUTH_FALLBACK_SSH_KEY_ATTR"` - UseGraphAPI bool `ocisConfig:"use_graph_api" env:"GLAUTH_FALLBACK_USE_GRAPHAPI"` + Datastore string `ocisConfig:"datastore"` + BaseDN string `ocisConfig:"base_dn"` + Insecure bool `ocisConfig:"insecure"` + NameFormat string `ocisConfig:"name_format"` + GroupFormat string `ocisConfig:"group_format"` + Servers []string `ocisConfig:"servers"` + SSHKeyAttr string `ocisConfig:"ssh_key_attr"` + UseGraphAPI bool `ocisConfig:"use_graph_api"` }