diff --git a/master/documentation/configuration/overview/index.html b/master/documentation/configuration/overview/index.html index 96620d9..991ed1d 100644 --- a/master/documentation/configuration/overview/index.html +++ b/master/documentation/configuration/overview/index.html @@ -45,7 +45,7 @@ host: 127.0.0.1 port: 25 encryption: none - cert_validation: false + cert_validation: true username: "" password: "" auth_type: plain @@ -69,7 +69,7 @@ cert_file: "" key_File: ""
Below you will find sections like core, advanced, database, statistics, mail, auth and web.
Each section describes the individual configuration keys, their default values, and a brief explanation of their purpose.
These are the primary configuration options that control fundamental WireGuard Portal behavior. More advanced options are found in the subsequent Advanced section.
admin_useradmin@wgportal.localadmin_passwordwgportalwgportal should be changed immediately.admin_api_tokeneditable_keystruecreate_default_peerfalsecreate_default_peer_on_creationfalsere_enable_peer_after_user_enabletruedelete_peer_after_user_deletedfalseself_provisioning_allowedfalseimport_existingtruerestore_statetrueAdditional or more specialized configuration options for logging and interface creation details.
log_levelinfotrace, debug, info, warn, error.log_prettyfalsetrue, log messages are colorized and formatted for readability (pretty-print).log_jsonfalsetrue, log messages are structured in JSON format.start_listen_port51820start_cidr_v410.11.12.0/24start_cidr_v6fdfd:d3ad:c0de:1234::0/64use_ip_v6trueconfig_storage_pathwg-quick style configuration files will be stored (if you need local filesystem configs).expiry_check_interval15ms, m, h, d for seconds, minutes, hours, days, see time.ParseDuration.rule_prio_offset20000route_table_offset20000api_admin_onlytruetrue, the public REST API is accessible only to admin users. The API docs live at /api/v1/doc.html.Configuration for the underlying database used by WireGuard Portal. Supported databases include SQLite, MySQL, Microsoft SQL Server, and Postgres.
debugfalsetrue, logs all database statements (verbose).slow_query_threshold100ms) above which queries are considered slow and logged as warnings. If empty or zero, slow query logging is disabled. Format uses s, ms for seconds, milliseconds, see time.ParseDuration.typesqlitesqlite, mssql, mysql, postgres.dsndata/sqlite.dbuser:pass@tcp(1.2.3.4:3306)/dbname?charset=utf8mb4&parseTime=True&loc=Local
-Controls how WireGuard Portal collects and reports usage statistics, including ping checks and Prometheus metrics.
use_ping_checkstrueping_check_workers10ping_unprivilegedfalsefalse, ping checks run without root privileges. This is currently considered BETA.ping_check_interval1ms, m, h, d for seconds, minutes, hours, days, see time.ParseDuration.data_collection_interval1ms, m, h, d for seconds, minutes, hours, days, see time.ParseDuration.collect_interface_datatruetrue, collects interface-level data (bytes in/out) for monitoring and statistics.collect_peer_datatruetrue, collects peer-level data (bytes, last handshake, endpoint, etc.).collect_audit_datatruetrue, logs certain portal events (such as user logins) to the database.listening_address:8787:8787).Options for configuring email notifications or sending peer configurations via email.
host127.0.0.1port25encryptionnonenone, tls, starttls.cert_validationfalsetrue, validate the SMTP server certificate (relevant if encryption = tls).usernamepasswordauth_typeplainplain, login, crammd5.fromWireguard Portal <noreply@wireguard.local>link_onlyfalsetrue, emails only contain a link to WireGuard Portal, rather than attaching the full configuration.WireGuard Portal supports multiple authentication strategies, including OpenID Connect (oidc), OAuth (oauth), and LDAP (ldap). Each can have multiple providers configured. Below are the relevant keys.
The oidc array contains a list of OpenID Connect providers. Below are the properties for each OIDC provider entry inside auth.oidc:
provider_namedisplay_namebase_urlhttps://accounts.google.com).client_idclient_secretextra_scopesprofile, email).field_mapAvailable fields: user_identifier, email, firstname, lastname, phone, department, is_admin, user_groups.
| Field | Typical OIDC Claim | Explanation |
|---|---|---|
user_identifier | sub or preferred_username | A unique identifier for the user. Often the OIDC sub claim is used because it’s guaranteed to be unique for the user within the IdP. Some providers also support preferred_username if it’s unique. |
email | email | The user’s email address as provided by the IdP. Not always verified, depending on IdP settings. |
firstname | given_name | The user’s first name, typically provided by the IdP in the given_name claim. |
lastname | family_name | The user’s last (family) name, typically provided by the IdP in the family_name claim. |
phone | phone_number | The user’s phone number. This may require additional scopes/permissions from the IdP to access. |
department | Custom claim (e.g., department) | If the IdP can provide organizational data, it may store it in a custom claim. Adjust accordingly (e.g., department, org, or another attribute). |
is_admin | Custom claim or derived role | If the IdP returns a role or admin flag, you can map that to is_admin. Often this is managed through custom claims or group membership. |
user_groups | groups or another custom claim | A list of group memberships for the user. Some IdPs provide groups out of the box; others require custom claims or directory lookups. |
admin_mappingis_admin claim against a regular expression. Alternatively, a regular expression can be used to check if a user is member of a specific group listed in the user_group claim. The regular expressions are defined in admin_value_regex and admin_group_regex.admin_value_regex: A regular expression to match the is_admin claim. By default, this expression matches the string "true" (^true$).admin_group_regex: A regular expression to match the user_groups claim. Each entry in the user_groups claim is checked against this regex.registration_enabledtrue, a new user will be created in WireGuard Portal if not already present.log_user_infotrue, OIDC user data is logged at the trace level upon login (for debugging).The oauth array contains a list of plain OAuth2 providers. Below are the properties for each OAuth provider entry inside auth.oauth:
provider_namedisplay_nameclient_idclient_secretauth_urltoken_urluser_info_urlscopesfield_mapAvailable fields: user_identifier, email, firstname, lastname, phone, department, is_admin, user_groups.
| Field | Typical Claim | Explanation |
|---|---|---|
user_identifier | sub or preferred_username | A unique identifier for the user. Often the OIDC sub claim is used because it’s guaranteed to be unique for the user within the IdP. Some providers also support preferred_username if it’s unique. |
email | email | The user’s email address as provided by the IdP. Not always verified, depending on IdP settings. |
firstname | given_name | The user’s first name, typically provided by the IdP in the given_name claim. |
lastname | family_name | The user’s last (family) name, typically provided by the IdP in the family_name claim. |
phone | phone_number | The user’s phone number. This may require additional scopes/permissions from the IdP to access. |
department | Custom claim (e.g., department) | If the IdP can provide organizational data, it may store it in a custom claim. Adjust accordingly (e.g., department, org, or another attribute). |
is_admin | Custom claim or derived role | If the IdP returns a role or admin flag, you can map that to is_admin. Often this is managed through custom claims or group membership. |
user_groups | groups or another custom claim | A list of group memberships for the user. Some IdPs provide groups out of the box; others require custom claims or directory lookups. |
admin_mappingis_admin claim against a regular expression. Alternatively, a regular expression can be used to check if a user is member of a specific group listed in the user_group claim. The regular expressions are defined in admin_value_regex and admin_group_regex.admin_value_regex: A regular expression to match the is_admin claim. By default, this expression matches the string "true" (^true$).admin_group_regex: A regular expression to match the user_groups claim. Each entry in the user_groups claim is checked against this regex.registration_enabledtrue, new users are created automatically on successful login.log_user_infotrue, logs user info at the trace level upon login.The ldap array contains a list of LDAP authentication providers. Below are the properties for each LDAP provider entry inside auth.ldap:
urlldap://srv-ad01.company.local:389).start_tlstrue, use STARTTLS to secure the LDAP connection.cert_validationtrue, validate the LDAP server’s TLS certificate.tls_certificate_pathtls_key_pathbase_dnDC=COMPANY,DC=LOCAL).bind_usercompany\\ldap_wireguard or ldap_wireguard@company.local).bind_passfield_mapDescription: Maps LDAP attributes to WireGuard Portal fields.
user_identifier, email, firstname, lastname, phone, department, memberof.| WireGuard Portal Field | Typical LDAP Attribute | Short Description |
|---|---|---|
| user_identifier | sAMAccountName / uid | Uniquely identifies the user within the LDAP directory. |
| mail / userPrincipalName | Stores the user's primary email address. | |
| firstname | givenName | Contains the user's first (given) name. |
| lastname | sn | Contains the user's last (surname) name. |
| phone | telephoneNumber / mobile | Holds the user's phone or mobile number. |
| department | departmentNumber / ou | Specifies the department or organizational unit of the user. |
| memberof | memberOf | Lists the groups and roles to which the user belongs. |
login_filter{{login_identifier}} to insert the username. For example: (&(objectClass=organizationalPerson)(mail={{login_identifier}})(!userAccountControl:1.2.840.113556.1.4.803:=2))
+Controls how WireGuard Portal collects and reports usage statistics, including ping checks and Prometheus metrics.
use_ping_checkstrueping_check_workers10ping_unprivilegedfalsefalse, ping checks run without root privileges. This is currently considered BETA.ping_check_interval1ms, m, h, d for seconds, minutes, hours, days, see time.ParseDuration.data_collection_interval1ms, m, h, d for seconds, minutes, hours, days, see time.ParseDuration.collect_interface_datatruetrue, collects interface-level data (bytes in/out) for monitoring and statistics.collect_peer_datatruetrue, collects peer-level data (bytes, last handshake, endpoint, etc.).collect_audit_datatruetrue, logs certain portal events (such as user logins) to the database.listening_address:8787:8787).Options for configuring email notifications or sending peer configurations via email.
host127.0.0.1port25encryptionnonenone, tls, starttls.cert_validationtruetrue, validate the SMTP server certificate (relevant if encryption = tls).usernamepasswordauth_typeplainplain, login, crammd5.fromWireguard Portal <noreply@wireguard.local>link_onlyfalsetrue, emails only contain a link to WireGuard Portal, rather than attaching the full configuration.WireGuard Portal supports multiple authentication strategies, including OpenID Connect (oidc), OAuth (oauth), and LDAP (ldap). Each can have multiple providers configured. Below are the relevant keys.
The oidc array contains a list of OpenID Connect providers. Below are the properties for each OIDC provider entry inside auth.oidc:
provider_namedisplay_namebase_urlhttps://accounts.google.com).client_idclient_secretextra_scopesprofile, email).field_mapAvailable fields: user_identifier, email, firstname, lastname, phone, department, is_admin, user_groups.
| Field | Typical OIDC Claim | Explanation |
|---|---|---|
user_identifier | sub or preferred_username | A unique identifier for the user. Often the OIDC sub claim is used because it’s guaranteed to be unique for the user within the IdP. Some providers also support preferred_username if it’s unique. |
email | email | The user’s email address as provided by the IdP. Not always verified, depending on IdP settings. |
firstname | given_name | The user’s first name, typically provided by the IdP in the given_name claim. |
lastname | family_name | The user’s last (family) name, typically provided by the IdP in the family_name claim. |
phone | phone_number | The user’s phone number. This may require additional scopes/permissions from the IdP to access. |
department | Custom claim (e.g., department) | If the IdP can provide organizational data, it may store it in a custom claim. Adjust accordingly (e.g., department, org, or another attribute). |
is_admin | Custom claim or derived role | If the IdP returns a role or admin flag, you can map that to is_admin. Often this is managed through custom claims or group membership. |
user_groups | groups or another custom claim | A list of group memberships for the user. Some IdPs provide groups out of the box; others require custom claims or directory lookups. |
admin_mappingis_admin claim against a regular expression. Alternatively, a regular expression can be used to check if a user is member of a specific group listed in the user_group claim. The regular expressions are defined in admin_value_regex and admin_group_regex.admin_value_regex: A regular expression to match the is_admin claim. By default, this expression matches the string "true" (^true$).admin_group_regex: A regular expression to match the user_groups claim. Each entry in the user_groups claim is checked against this regex.registration_enabledtrue, a new user will be created in WireGuard Portal if not already present.log_user_infotrue, OIDC user data is logged at the trace level upon login (for debugging).The oauth array contains a list of plain OAuth2 providers. Below are the properties for each OAuth provider entry inside auth.oauth:
provider_namedisplay_nameclient_idclient_secretauth_urltoken_urluser_info_urlscopesfield_mapAvailable fields: user_identifier, email, firstname, lastname, phone, department, is_admin, user_groups.
| Field | Typical Claim | Explanation |
|---|---|---|
user_identifier | sub or preferred_username | A unique identifier for the user. Often the OIDC sub claim is used because it’s guaranteed to be unique for the user within the IdP. Some providers also support preferred_username if it’s unique. |
email | email | The user’s email address as provided by the IdP. Not always verified, depending on IdP settings. |
firstname | given_name | The user’s first name, typically provided by the IdP in the given_name claim. |
lastname | family_name | The user’s last (family) name, typically provided by the IdP in the family_name claim. |
phone | phone_number | The user’s phone number. This may require additional scopes/permissions from the IdP to access. |
department | Custom claim (e.g., department) | If the IdP can provide organizational data, it may store it in a custom claim. Adjust accordingly (e.g., department, org, or another attribute). |
is_admin | Custom claim or derived role | If the IdP returns a role or admin flag, you can map that to is_admin. Often this is managed through custom claims or group membership. |
user_groups | groups or another custom claim | A list of group memberships for the user. Some IdPs provide groups out of the box; others require custom claims or directory lookups. |
admin_mappingis_admin claim against a regular expression. Alternatively, a regular expression can be used to check if a user is member of a specific group listed in the user_group claim. The regular expressions are defined in admin_value_regex and admin_group_regex.admin_value_regex: A regular expression to match the is_admin claim. By default, this expression matches the string "true" (^true$).admin_group_regex: A regular expression to match the user_groups claim. Each entry in the user_groups claim is checked against this regex.registration_enabledtrue, new users are created automatically on successful login.log_user_infotrue, logs user info at the trace level upon login.The ldap array contains a list of LDAP authentication providers. Below are the properties for each LDAP provider entry inside auth.ldap:
urlldap://srv-ad01.company.local:389).start_tlstrue, use STARTTLS to secure the LDAP connection.cert_validationtrue, validate the LDAP server’s TLS certificate.tls_certificate_pathtls_key_pathbase_dnDC=COMPANY,DC=LOCAL).bind_usercompany\\ldap_wireguard or ldap_wireguard@company.local).bind_passfield_mapDescription: Maps LDAP attributes to WireGuard Portal fields.
user_identifier, email, firstname, lastname, phone, department, memberof.| WireGuard Portal Field | Typical LDAP Attribute | Short Description |
|---|---|---|
| user_identifier | sAMAccountName / uid | Uniquely identifies the user within the LDAP directory. |
| mail / userPrincipalName | Stores the user's primary email address. | |
| firstname | givenName | Contains the user's first (given) name. |
| lastname | sn | Contains the user's last (surname) name. |
| phone | telephoneNumber / mobile | Holds the user's phone or mobile number. |
| department | departmentNumber / ou | Specifies the department or organizational unit of the user. |
| memberof | memberOf | Lists the groups and roles to which the user belongs. |
login_filter{{login_identifier}} to insert the username. For example: (&(objectClass=organizationalPerson)(mail={{login_identifier}})(!userAccountControl:1.2.840.113556.1.4.803:=2))
admin_groupCN=WireGuardAdmins,OU=Some-OU,DC=YOURDOMAIN,DC=LOCAL
sync_interval30m) to synchronize users from LDAP. Empty or 0 disables sync. Format uses s, m, h, d for seconds, minutes, hours, days, see time.ParseDuration. Only users that match the sync_filter are synchronized, if disable_missing is true, users not found in LDAP are disabled.sync_filter(&(objectClass=organizationalPerson)(!userAccountControl:1.2.840.113556.1.4.803:=2)(mail=*))
disable_missingtrue, any user not found in LDAP (during sync) is disabled in WireGuard Portal.auto_re_enabletrue, users that where disabled because they were missing (see disable_missing) will be re-enabled once they are found again.registration_enabledtrue, new user accounts are created in WireGuard Portal upon first login.log_user_infotrue, logs LDAP user data at the trace level upon login.listening_address:8888external_urlhttp://localhost:8888site_company_nameWireGuard Portalsite_titleWireGuard Portalsession_identifierwgPortalSessionsession_secretvery_secretcsrf_secretextremely_secretrequest_loggingfalsecert_filekey_file