diff --git a/docs/Configuration.md b/docs/Configuration.md index c7b0a4f1..04bed3ca 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -200,8 +200,8 @@ Usage of openvpn-auth-oauth2: Override the username of a session with the username from the token by using auth-token-user, if the client username is empty (env: CONFIG_OPENVPN_AUTH__TOKEN__USER) (default true) --openvpn.bypass.common-names value bypass oauth authentication for CNs. Comma separated list. (env: CONFIG_OPENVPN_BYPASS_COMMON__NAMES) - --openvpn.common-name.environment-variable string - Name of the environment variable in the OpenVPN management interface which contains the common name. If username-as-common-name is enabled, this should be set to 'username' to use the username as common name. Other values like 'X509_0_emailAddress' are supported. See https://openvpn.net/community-resources/reference-manual-for-openvpn-2-6/#environmental-variables for more information. (env: CONFIG_OPENVPN_COMMON__NAME_ENVIRONMENT__VARIABLE) (default "common_name") + --openvpn.common-name.environment-variable-name string + Name of the environment variable in the OpenVPN management interface which contains the common name. If username-as-common-name is enabled, this should be set to 'username' to use the username as common name. Other values like 'X509_0_emailAddress' are supported. See https://openvpn.net/community-resources/reference-manual-for-openvpn-2-6/#environmental-variables for more information. (env: CONFIG_OPENVPN_COMMON__NAME_ENVIRONMENT__VARIABLE__NAME) (default "common_name") --openvpn.common-name.mode value If common names are too long, use md5/sha1 to hash them or omit to skip them. If omit, oauth2.validate.common-name does not work anymore. Values: [plain,omit] (env: CONFIG_OPENVPN_COMMON__NAME_MODE) (default plain) --openvpn.pass-through.address string diff --git a/internal/config/flags.go b/internal/config/flags.go index e16d2c2b..b3a2eb84 100644 --- a/internal/config/flags.go +++ b/internal/config/flags.go @@ -168,7 +168,7 @@ func flagSetOpenVPN(flagSet *flag.FlagSet) { "bypass oauth authentication for CNs. Comma separated list.", ) flagSet.String( - "openvpn.common-name.environment-variable", + "openvpn.common-name.environment-variable-name", Defaults.OpenVpn.CommonName.EnvironmentVariableName, "Name of the environment variable in the OpenVPN management interface which contains the common name. "+ "If username-as-common-name is enabled, this should be set to 'username' to use the username as common name. "+