# Upgrade V2 Version 2 includes configuration changes for username resolution, client-specific configuration, token validation, and security hardening. ## Table of contents - [Upgrade checklist](#upgrade-checklist) - [Required configuration changes](#required-configuration-changes) - [Environment variable prefix](#environment-variable-prefix) - [Strict configuration parsing](#strict-configuration-parsing) - [Common name mode](#common-name-mode) - [Short URL](#short-url) - [Pass-through socket permissions](#pass-through-socket-permissions) - [Security hardening](#security-hardening) - [Debug listener](#debug-listener) - [OAuth2 provider HTTP requests](#oauth2-provider-http-requests) - [Custom HTML templates and client config names](#custom-html-templates-and-client-config-names) - [Reverse proxy headers](#reverse-proxy-headers) - [OpenVPN plugin](#openvpn-plugin) - [OAuth2 identity and CEL expressions](#oauth2-identity-and-cel-expressions) - [OAuth2 client authentication style](#oauth2-client-authentication-style) - [CEL context](#cel-context) - [OpenVPN username](#openvpn-username) - [Client-specific configuration](#client-specific-configuration) - [Common name client config](#common-name-client-config) - [Token claim client config](#token-claim-client-config) - [Profile selector](#profile-selector) - [Additive group routes](#additive-group-routes) - [Token validation](#token-validation) - [Common name validation](#common-name-validation) - [IP address validation](#ip-address-validation) - [Roles validation](#roles-validation) - [ACR validation](#acr-validation) - [Combining validation rules](#combining-validation-rules) - [Environment variable rename reference](#environment-variable-rename-reference) - [Verify the upgrade](#verify-the-upgrade) ## Upgrade checklist Complete the steps that apply to your deployment: - [ ] [Rename all environment variables](#environment-variable-prefix). - [ ] [Remove unsupported settings and fix invalid configuration](#strict-configuration-parsing). - [ ] [Review the security changes](#security-hardening), especially for debug, reverse proxy, custom template, and plugin configurations. - [ ] [Update OAuth2 authentication and CEL settings](#oauth2-identity-and-cel-expressions). - [ ] [Migrate client-specific configuration](#client-specific-configuration), if enabled. - [ ] [Migrate token validation](#token-validation), if configured. - [ ] [Verify the migrated deployment](#verify-the-upgrade). ## Required configuration changes Review these changes for every deployment. The subsections about removed options apply only when those options were configured in version 1. ### Environment variable prefix Version 2 uses the project-specific `OPENVPN_AUTH_OAUTH2_` prefix for environment variables. The `CONFIG_` prefix used by version 1 is no longer supported. Rename every environment variable before upgrading. | Version 1 | Version 2 | | --- | --- | | `CONFIG_FILE` | `OPENVPN_AUTH_OAUTH2_CONFIG_FILE` | | `CONFIG_HTTP_LISTEN` | `OPENVPN_AUTH_OAUTH2_HTTP_LISTEN` | | `CONFIG_OAUTH2_CLIENT_ID` | `OPENVPN_AUTH_OAUTH2_OAUTH2_CLIENT_ID` | The suffix conversion also changes: dots and dashes both become single underscores. The earlier project-prefixed spelling used double underscores for dashes. Review the complete [environment variable rename reference](#environment-variable-rename-reference) for affected names and an example that applies both changes. ### Strict configuration parsing Version 2 rejects invalid configuration input instead of silently using a default: - Boolean environment values must be exactly `true` or `false`. - Malformed environment values, such as an invalid duration, stop startup with an error. - Unknown variables with the `OPENVPN_AUTH_OAUTH2_` prefix stop startup with an error. - Positional command-line arguments are rejected. The unused top-level YAML `config:` property has been removed. Select the configuration file with `--config` or `OPENVPN_AUTH_OAUTH2_CONFIG_FILE`. Configuration precedence remains, from lowest to highest priority: built-in defaults, YAML, environment variables, and command-line flags. `openvpn.command-timeout` is now a public option for the maximum time to wait for an OpenVPN management command response. Its default is `10s`. It can be configured through YAML, the `--openvpn.command-timeout` flag, or `OPENVPN_AUTH_OAUTH2_OPENVPN_COMMAND_TIMEOUT`. #### Common name mode The common name mode has been removed. Version 2 always keeps the common name unchanged in the OAuth2 state. Remove every configured form of the option: | Source | Removed setting | | --- | --- | | YAML | `openvpn.common-name.mode` | | Command line | `--openvpn.common-name.mode` | | Version 1 environment | `CONFIG_OPENVPN_COMMON__NAME_MODE` | If you previously used `mode: omit` to keep the web authentication URL short, verify that the complete `client-pending-auth` command remains within OpenVPN's 1023-byte management command limit. #### Short URL The `http.short-url` option and the `/?s=` redirect endpoint have been removed. Version 2 always uses `/oauth2/start?state=` for the authentication URL. Remove every configured form of the option. The complete `client-pending-auth` command, including the URL and client identifiers, must fit within OpenVPN's 1023-byte management command limit. | Source | Removed setting | | --- | --- | | YAML | `http.short-url` | | Command line | `--http.short-url` | | Version 1 environment | `CONFIG_HTTP_SHORT__URL` | #### Pass-through socket permissions `openvpn.pass-through.socket-mode` now requires explicit octal notation and accepts only permission values from `0000` through `0777`. Use either a leading zero, such as `0660`, or the `0o660` form. Unprefixed and decimal values are no longer accepted. For YAML configuration, quote the value so other YAML tools also preserve its octal notation: ```yaml openvpn: pass-through: socket-mode: "0660" ``` For command-line or environment configuration, use `0660`: ```shell --openvpn.pass-through.socket-mode=0660 OPENVPN_AUTH_OAUTH2_OPENVPN_PASS_THROUGH_SOCKET_MODE=0660 ``` If you previously used decimal `432` to obtain permissions `0660`, replace it with the explicit octal value `0660`. ## Security hardening Review each subsection and apply the migration steps for the features used by your deployment. ### Debug listener The default `debug.listen` address changes from `:9001` to `127.0.0.1:9001`. When `debug.pprof` is enabled without an explicit listen address, the profiling endpoint is now available only from the local host. Existing configurations that set `debug.listen` keep their configured address. If remote profiling access is required, prefer a secure tunnel or explicitly set a protected listen address. The profiling endpoint exposes runtime details and must not be available on an untrusted network. ### OAuth2 provider HTTP requests Version 2 accepts an HTTP redirect from an OAuth2 provider only when the target uses the same host as the original request. A request that starts with HTTPS also cannot redirect to HTTP. This prevents authorization data or tokens from being redirected to an unexpected host or an unencrypted connection. Provider requests now have an overall timeout of 30 seconds. A provider that relies on cross-host redirects or takes longer than 30 seconds will cause authentication to fail. Where possible, update the configured issuer, discovery URL, or custom endpoint to its final URL instead of relying on an HTTP redirect. ### Custom HTML templates and client config names Version 2 renders `http.template` files with Go's `html/template` package instead of `text/template`. Dynamic values are contextually escaped for their location in HTML, including text, attributes, URLs, CSS, and JavaScript. Retest custom templates before upgrading. A template that relied on a dynamic value being inserted as raw HTML will now render that value as text or reject an unsafe context. Contextual escaping is required because template values can include profile names derived from identity provider claims or CEL expressions. Without escaping, a crafted value could become browser-rendered markup or script. Client config names containing `<`, `>`, `"`, `'`, `&`, `` ` ``, or control characters are also rejected. These names are used as both configuration file names and values in the browser-based profile selector. Rename affected `.conf` files and update `openvpn.client-config.expression` to return the new names. ### Reverse proxy headers If `http.enable-proxy-headers` is enabled, `http.trusted-proxies` is now required. openvpn-auth-oauth2 will reject the configuration if proxy headers are enabled without at least one trusted proxy CIDR. Use the CIDR ranges of the reverse proxies that connect directly to openvpn-auth-oauth2: ```yaml http: enable-proxy-headers: true trusted-proxies: - 127.0.0.1/32 - 10.0.0.0/24 ``` Environment variable configuration: ```ini OPENVPN_AUTH_OAUTH2_HTTP_ENABLE_PROXY_HEADERS=true OPENVPN_AUTH_OAUTH2_HTTP_TRUSTED_PROXIES=127.0.0.1/32,10.0.0.0/24 ``` If openvpn-auth-oauth2 is not behind a reverse proxy, keep `http.enable-proxy-headers` disabled. ### OpenVPN plugin The OpenVPN plugin is no longer experimental. The plugin management socket now requires password authentication. Existing OpenVPN plugin configurations that pass only the listen socket must add a password file argument, and openvpn-auth-oauth2 must use the same password for `openvpn.password`. Before: ```openvpn plugin /path/to/openvpn-auth-oauth2.so "unix:///var/run/openvpn-oauth2.sock" ``` After: ```openvpn plugin /path/to/openvpn-auth-oauth2.so "unix:///var/run/openvpn-oauth2.sock" "/etc/openvpn/oauth2-plugin-password.txt" ``` openvpn-auth-oauth2 configuration: ```yaml openvpn: addr: unix:///var/run/openvpn-oauth2.sock password: "file:///etc/openvpn-auth-oauth2/oauth2-plugin-password.txt" ``` The two password files must contain the same password. They can be separate files so OpenVPN and openvpn-auth-oauth2 can each read a file from the path allowed by their service permissions. ## OAuth2 identity and CEL expressions Review this section when the deployment configures the OAuth2 client authentication style, username resolution, or any CEL expression. ### OAuth2 client authentication style Version 2 replaces the Go-specific `oauth2.auth-style` values with concise configuration values: | Version 1 value | Version 2 value | | --- | --- | | `AuthStyleAutoDetect` | `auto` | | `AuthStyleInParams` | `params` | | `AuthStyleInHeader` | `header` | Update the value in YAML, the `--oauth2.auth-style` command-line flag, or the `OPENVPN_AUTH_OAUTH2_OAUTH2_AUTH_STYLE` environment variable. The version 1 values are no longer accepted. ### CEL context Version 2 uses one namespaced context for username resolution, validation, and client config resolution. Update every CEL expression to use the new names: | Previous field | Version 2 field | | --- | --- | | `authMode` | `auth.mode` | | `openVPNSessionState` | `openvpn.sessionState` | | `openVPNUserCommonName` | `openvpn.commonName` | | `openVPNUserIPAddr` | `openvpn.ip` | | `oauth2TokenIPAddr` | `token.ip` | | `oauth2TokenClaims` | `token.claims` | | `username` | `user.username` | The four context namespaces are typed objects in version 2. Field names and types are checked when the configuration loads. Unknown fixed fields now prevent startup instead of producing an evaluation error during authentication. `token.claims` remains a dynamic map, so use `has(token.claims.department)` for optional claims. Version 2 also exposes normalized `user.subject`, `user.email`, `user.groups`, and `user.roles` fields. Prefer these fields when an expression should work across generic OIDC, UserInfo, GitHub, and refresh authentication. Raw `token.claims` can be empty when a provider supplies identity data through another source. Provider data and groups or roles are resolved first. The `oauth2.openvpn-username` expression then sets the final `user.username`, and validation and client config resolution use that final identity. ### OpenVPN username The following options were removed or renamed: | Version 1 option | Version 2 option | | --- | --- | | `oauth2.openvpn-username-claim` | `oauth2.openvpn-username` | | `oauth2.openvpn-username-cel` | `oauth2.openvpn-username` | `oauth2.openvpn-username` is a CEL expression and must evaluate to a string. The default changed from the claim name `preferred_username` to `user.username`. This uses the provider's normalized username, including `preferred_username` for OIDC and the GitHub login for GitHub. If you used `oauth2.openvpn-username-claim`, convert the claim name into a CEL token claim lookup: ```yaml # Version 1 oauth2: openvpn-username-claim: email # Version 2 oauth2: openvpn-username: user.email ``` If you used `oauth2.openvpn-username-cel`, move it to `oauth2.openvpn-username` and translate its fields to the namespaced context: ```yaml # Version 1 oauth2: openvpn-username-cel: 'oauth2TokenClaims.email.split("@")[0]' # Version 2 oauth2: openvpn-username: 'user.email.split("@")[0]' ``` The environment variable for the new option is `OPENVPN_AUTH_OAUTH2_OAUTH2_OPENVPN_USERNAME`. Unlike version 1's provider-specific paths, the expression is applied consistently when identity comes from an ID token, UserInfo, or the GitHub API, and during validated refresh authentication. ## Client-specific configuration Version 2 changes OpenVPN client-specific configuration from a single config name lookup to an expression-based resolver. The default client configuration directory changes from `/etc/openvpn-auth-oauth2/client-config-dir/` to `/etc/openvpn-auth-oauth2/client-config/`, matching the directory created by the installation packages. Deployments relying on the previous default must move their client configuration files or explicitly configure the previous path with `openvpn.client-config.path`. The following options are removed: | Version 1 option | Version 2 replacement | |-----------------------------------------------------|-------------------------------------------------| | `openvpn.client-config.token-claim` | `openvpn.client-config.expression` | | `openvpn.client-config.user-selector.enabled` | `openvpn.client-config.strategy: user-selector` | | `openvpn.client-config.user-selector.static-values` | `openvpn.client-config.expression` | `openvpn.client-config.expression` is a CEL expression and must evaluate to an ordered list of strings. It receives the full shared CEL context. `user.username` contains the resolved OpenVPN username, `user.groups` and `user.roles` contain normalized provider data, and `token.claims` contains raw ID token claims. The default strategy is now `merge`. It loads every resolved config file, deduplicates repeated config names and identical config lines, and skips missing config files. Keep authorization in `oauth2.validate.groups` or `oauth2.validate.expression`; client config files only assign OpenVPN settings such as routes. When `openvpn.client-config.expression` returns an empty list, version 2 loads `DEFAULT.conf`. This follows OpenVPN's `client-config-dir` default-file pattern. When the expression returns one or more config names, missing `.conf` files are ignored by default. Set `openvpn.client-config.ignore-not-found: false` to deny the client when a returned config file does not exist. ### Common name client config Version 1 could use the OpenVPN common name as the implicit client config name: ```yaml # Version 1 openvpn: client-config: enabled: true path: /etc/openvpn-auth-oauth2/client-config ``` In version 2, configure the resolver explicitly: ```yaml # Version 2 openvpn: client-config: enabled: true path: /etc/openvpn-auth-oauth2/client-config expression: | [openvpn.commonName] ``` To use the resolved OpenVPN username instead, use `user.username`: ```yaml openvpn: client-config: enabled: true path: /etc/openvpn-auth-oauth2/client-config expression: | [user.username] ``` ### Token claim client config Version 1 could read a config name from one token claim: ```yaml # Version 1 openvpn: client-config: enabled: true path: /etc/openvpn-auth-oauth2/client-config token-claim: groups ``` In version 2, read the claim through `client-config.expression`: ```yaml # Version 2 openvpn: client-config: enabled: true path: /etc/openvpn-auth-oauth2/client-config expression: | token.claims.groups ``` If the claim can contain several values, all matching config files are merged by default. ### Profile selector Version 1 enabled the selector with `user-selector.enabled`: ```yaml # Version 1 openvpn: client-config: enabled: true path: /etc/openvpn-auth-oauth2/client-config token-claim: groups user-selector: enabled: true ``` In version 2, use `strategy: user-selector`: ```yaml # Version 2 openvpn: client-config: enabled: true path: /etc/openvpn-auth-oauth2/client-config strategy: user-selector expression: | token.claims.groups ``` Static selector values also move into the expression: ```yaml # Version 1 openvpn: client-config: enabled: true path: /etc/openvpn-auth-oauth2/client-config user-selector: enabled: true static-values: - corporate - guest ``` ```yaml # Version 2 openvpn: client-config: enabled: true path: /etc/openvpn-auth-oauth2/client-config strategy: user-selector expression: | ["corporate", "guest"] ``` ### Additive group routes To assign several config files without showing the selector, keep the default `merge` strategy and return every allowed config name: ```yaml oauth2: validate: groups: - GRP-VPN openvpn: client-config: enabled: true path: /etc/openvpn-auth-oauth2/client-config expression: | user.groups.filter(g, g in [ "GRP-VPN", "GRP-ADMIN", "GRP-NETWORK" ]) + [user.username] ``` ## Token validation Version 2 renames the general CEL validation option and its environment variable: | Version 1 | Version 2 | | --- | --- | | `oauth2.validate.cel` | `oauth2.validate.expression` | | `CONFIG_OAUTH2_VALIDATE_CEL` | `OPENVPN_AUTH_OAUTH2_OAUTH2_VALIDATE_EXPRESSION` | Update the fields used by the expression as described in [CEL context](#cel-context). Version 2 removes the following dedicated validation options: | Version 1 option | Version 2 replacement | | --- | --- | | `oauth2.validate.acr` | `oauth2.validate.expression` | | `oauth2.validate.common-name` | `oauth2.validate.expression` | | `oauth2.validate.common-name-case-sensitive` | `oauth2.validate.expression` | | `oauth2.validate.ipaddr` | `oauth2.validate.expression` | | `oauth2.validate.issuer` | Removed | | `oauth2.validate.roles` | `oauth2.validate.expression` | `oauth2.validate.groups` stays available and does not need to be migrated. Remove `oauth2.validate.issuer` and `CONFIG_OAUTH2_VALIDATE_ISSUER` from your configuration. The setting did not disable issuer checks; issuer validation is always enforced for OIDC discovery and ID token verification. ### Common name validation Version 1 compared the OpenVPN common name with a configured ID token claim. By default, the comparison was case-insensitive. ```yaml # Version 1 oauth2: validate: common-name: preferred_username ``` Use a CEL expression with `lowerAscii()` for the same case-insensitive behavior: ```yaml # Version 2 oauth2: validate: expression: | has(token.claims.preferred_username) && openvpn.commonName.lowerAscii() == string(token.claims.preferred_username).lowerAscii() ``` If you used case-sensitive common name validation: ```yaml # Version 1 oauth2: validate: common-name: preferred_username common-name-case-sensitive: true ``` Use a direct CEL comparison: ```yaml # Version 2 oauth2: validate: expression: | has(token.claims.preferred_username) && openvpn.commonName == string(token.claims.preferred_username) ``` ### IP address validation Version 1 compared the OpenVPN client IP address with the `ipaddr` ID token claim: ```yaml # Version 1 oauth2: validate: ipaddr: true ``` Version 2 exposes the OpenVPN client IP as `openvpn.ip` and the token IP address claim as `token.ip`: ```yaml # Version 2 oauth2: validate: expression: 'openvpn.ip == token.ip' ``` ### Roles validation Version 1 allowed access if at least one configured role was present in the token roles: ```yaml # Version 1 oauth2: validate: roles: - admin - vpn-user ``` Use the normalized roles list: ```yaml # Version 2 oauth2: validate: expression: | 'admin' in user.roles || 'vpn-user' in user.roles ``` For GitHub provider configurations, team validation is also migrated to CEL. The GitHub provider always fetches organizations from `/user/orgs` and teams from `/user/teams`. It exposes organizations through `user.groups`. Teams are available through `user.roles` in the same `org:slug` format used by version 1: ```yaml # Version 1 oauth2: provider: github validate: roles: - my-org:vpn-users - my-org:admins ``` ```yaml # Version 2 oauth2: provider: github validate: expression: | 'my-org:vpn-users' in user.roles || 'my-org:admins' in user.roles ``` Keep organization checks with `oauth2.validate.groups`; for GitHub this still uses the `/user/orgs` API. ### ACR validation Version 1 used `oauth2.validate.acr` to require an Authentication Context Class Reference value: ```yaml # Version 1 oauth2: validate: acr: - phr - phrh ``` Use CEL to check the `acr` claim: ```yaml # Version 2 oauth2: validate: expression: | has(token.claims.acr) && (token.claims.acr == 'phr' || token.claims.acr == 'phrh') ``` ### Combining validation rules If you used multiple removed validation options, combine them into one CEL expression: ```yaml # Version 1 oauth2: validate: common-name: preferred_username ipaddr: true roles: - vpn-user ``` ```yaml # Version 2 oauth2: validate: expression: | has(token.claims.preferred_username) && openvpn.commonName.lowerAscii() == string(token.claims.preferred_username).lowerAscii() && openvpn.ip == token.ip && 'vpn-user' in user.roles ``` You can keep `oauth2.validate.groups` alongside CEL: ```yaml oauth2: validate: groups: - vpn-users expression: | has(token.claims.acr) && token.claims.acr == 'phr' ``` ## Environment variable rename reference The earlier project-prefixed spelling used double underscores for dashes. Rename every affected variable as follows: | Previous project-prefixed name | Version 2 name | | --- | --- | | `OPENVPN_AUTH_OAUTH2_HTTP_ASSETS__PATH` | `OPENVPN_AUTH_OAUTH2_HTTP_ASSETS_PATH` | | `OPENVPN_AUTH_OAUTH2_HTTP_ENABLE__PROXY__HEADERS` | `OPENVPN_AUTH_OAUTH2_HTTP_ENABLE_PROXY_HEADERS` | | `OPENVPN_AUTH_OAUTH2_HTTP_TRUSTED__PROXIES` | `OPENVPN_AUTH_OAUTH2_HTTP_TRUSTED_PROXIES` | | `OPENVPN_AUTH_OAUTH2_LOG_VPN__CLIENT__IP` | `OPENVPN_AUTH_OAUTH2_LOG_VPN_CLIENT_IP` | | `OPENVPN_AUTH_OAUTH2_OAUTH2_AUTHORIZE__PARAMS` | `OPENVPN_AUTH_OAUTH2_OAUTH2_AUTHORIZE_PARAMS` | | `OPENVPN_AUTH_OAUTH2_OAUTH2_AUTH__STYLE` | `OPENVPN_AUTH_OAUTH2_OAUTH2_AUTH_STYLE` | | `OPENVPN_AUTH_OAUTH2_OAUTH2_CLIENT_PRIVATE__KEY` | `OPENVPN_AUTH_OAUTH2_OAUTH2_CLIENT_PRIVATE_KEY` | | `OPENVPN_AUTH_OAUTH2_OAUTH2_CLIENT_PRIVATE__KEY__ID` | `OPENVPN_AUTH_OAUTH2_OAUTH2_CLIENT_PRIVATE_KEY_ID` | | `OPENVPN_AUTH_OAUTH2_OAUTH2_GROUPS__CLAIM` | `OPENVPN_AUTH_OAUTH2_OAUTH2_GROUPS_CLAIM` | | `OPENVPN_AUTH_OAUTH2_OAUTH2_OPENVPN__USERNAME` | `OPENVPN_AUTH_OAUTH2_OAUTH2_OPENVPN_USERNAME` | | `OPENVPN_AUTH_OAUTH2_OAUTH2_REFRESH_USE__SESSION__ID` | `OPENVPN_AUTH_OAUTH2_OAUTH2_REFRESH_USE_SESSION_ID` | | `OPENVPN_AUTH_OAUTH2_OAUTH2_REFRESH_VALIDATE__USER` | `OPENVPN_AUTH_OAUTH2_OAUTH2_REFRESH_VALIDATE_USER` | | `OPENVPN_AUTH_OAUTH2_OAUTH2_REFRESH__NONCE` | `OPENVPN_AUTH_OAUTH2_OAUTH2_REFRESH_NONCE` | | `OPENVPN_AUTH_OAUTH2_OAUTH2_USER__INFO` | `OPENVPN_AUTH_OAUTH2_OAUTH2_USER_INFO` | | `OPENVPN_AUTH_OAUTH2_OPENVPN_AUTH__PENDING__TIMEOUT` | `OPENVPN_AUTH_OAUTH2_OPENVPN_AUTH_PENDING_TIMEOUT` | | `OPENVPN_AUTH_OAUTH2_OPENVPN_AUTH__TOKEN__USER` | `OPENVPN_AUTH_OAUTH2_OPENVPN_AUTH_TOKEN_USER` | | `OPENVPN_AUTH_OAUTH2_OPENVPN_BYPASS_COMMON__NAMES` | `OPENVPN_AUTH_OAUTH2_OPENVPN_BYPASS_COMMON_NAMES` | | `OPENVPN_AUTH_OAUTH2_OPENVPN_CLIENT__CONFIG_ENABLED` | `OPENVPN_AUTH_OAUTH2_OPENVPN_CLIENT_CONFIG_ENABLED` | | `OPENVPN_AUTH_OAUTH2_OPENVPN_CLIENT__CONFIG_EXPRESSION` | `OPENVPN_AUTH_OAUTH2_OPENVPN_CLIENT_CONFIG_EXPRESSION` | | `OPENVPN_AUTH_OAUTH2_OPENVPN_CLIENT__CONFIG_IGNORE__NOT__FOUND` | `OPENVPN_AUTH_OAUTH2_OPENVPN_CLIENT_CONFIG_IGNORE_NOT_FOUND` | | `OPENVPN_AUTH_OAUTH2_OPENVPN_CLIENT__CONFIG_PATH` | `OPENVPN_AUTH_OAUTH2_OPENVPN_CLIENT_CONFIG_PATH` | | `OPENVPN_AUTH_OAUTH2_OPENVPN_CLIENT__CONFIG_STRATEGY` | `OPENVPN_AUTH_OAUTH2_OPENVPN_CLIENT_CONFIG_STRATEGY` | | `OPENVPN_AUTH_OAUTH2_OPENVPN_COMMON__NAME_ENVIRONMENT__VARIABLE__NAME` | `OPENVPN_AUTH_OAUTH2_OPENVPN_COMMON_NAME_ENVIRONMENT_VARIABLE_NAME` | | `OPENVPN_AUTH_OAUTH2_OPENVPN_ENFORCE__UNIQUE__USER` | `OPENVPN_AUTH_OAUTH2_OPENVPN_ENFORCE_UNIQUE_USER` | | `OPENVPN_AUTH_OAUTH2_OPENVPN_OVERRIDE__USERNAME` | `OPENVPN_AUTH_OAUTH2_OPENVPN_OVERRIDE_USERNAME` | | `OPENVPN_AUTH_OAUTH2_OPENVPN_PASS__THROUGH_ADDRESS` | `OPENVPN_AUTH_OAUTH2_OPENVPN_PASS_THROUGH_ADDRESS` | | `OPENVPN_AUTH_OAUTH2_OPENVPN_PASS__THROUGH_ENABLED` | `OPENVPN_AUTH_OAUTH2_OPENVPN_PASS_THROUGH_ENABLED` | | `OPENVPN_AUTH_OAUTH2_OPENVPN_PASS__THROUGH_PASSWORD` | `OPENVPN_AUTH_OAUTH2_OPENVPN_PASS_THROUGH_PASSWORD` | | `OPENVPN_AUTH_OAUTH2_OPENVPN_PASS__THROUGH_SOCKET__GROUP` | `OPENVPN_AUTH_OAUTH2_OPENVPN_PASS_THROUGH_SOCKET_GROUP` | | `OPENVPN_AUTH_OAUTH2_OPENVPN_PASS__THROUGH_SOCKET__MODE` | `OPENVPN_AUTH_OAUTH2_OPENVPN_PASS_THROUGH_SOCKET_MODE` | | `OPENVPN_AUTH_OAUTH2_PROVIDER_GOOGLE_VALIDATE_GROUPS__TRANSITIVE` | `OPENVPN_AUTH_OAUTH2_PROVIDER_GOOGLE_VALIDATE_GROUPS_TRANSITIVE` | For `CONFIG_` variables, apply both the prefix and suffix changes. For example, rename `CONFIG_HTTP_ASSETS__PATH` to `OPENVPN_AUTH_OAUTH2_HTTP_ASSETS_PATH`. Variables not listed in this table only require the prefix change. ## Verify the upgrade After migrating the configuration: 1. Start version 2 and confirm that configuration parsing reports no unknown, removed, or malformed settings. 2. Complete browser-based authentication and confirm that OpenVPN receives the expected username. 3. If refresh authentication is enabled, verify an authentication refresh. 4. If client-specific configuration is enabled, verify the selected or merged configuration files and their resulting OpenVPN settings. 5. Exercise every enabled integration affected by the security changes, such as a reverse proxy, custom HTML template, debug listener, or OpenVPN plugin.