From e111fbbcc10fff36a793dc6f0163cb59faaeebcf Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sun, 29 Jun 2025 17:49:35 +0000 Subject: [PATCH] Deployed edb88b5 to master with MkDocs 1.6.1 and mike 2.1.3 --- .../configuration/overview/index.html | 11 +-- .../documentation/usage/webhooks/index.html | 96 +++++++++++++++---- master/search/search_index.json | 2 +- 3 files changed, 81 insertions(+), 28 deletions(-) diff --git a/master/documentation/configuration/overview/index.html b/master/documentation/configuration/overview/index.html index 2c15d4d..64ce702 100644 --- a/master/documentation/configuration/overview/index.html +++ b/master/documentation/configuration/overview/index.html @@ -85,13 +85,4 @@
encryption_passphrase
Controls how WireGuard Portal collects and reports usage statistics, including ping checks and Prometheus metrics.
use_ping_checks
true
ping_check_workers
10
ping_unprivileged
false
false
, ping checks run without root privileges. This is currently considered BETA.ping_check_interval
1m
s
, m
, h
, d
for seconds, minutes, hours, days, see time.ParseDuration.data_collection_interval
1m
s
, m
, h
, d
for seconds, minutes, hours, days, see time.ParseDuration.collect_interface_data
true
true
, collects interface-level data (bytes in/out) for monitoring and statistics.collect_peer_data
true
true
, collects peer-level data (bytes, last handshake, endpoint, etc.).collect_audit_data
true
true
, logs certain portal events (such as user logins) to the database.listening_address
:8787
:8787
or 127.0.0.1:8787
).Options for configuring email notifications or sending peer configurations via email.
host
127.0.0.1
port
25
encryption
none
none
, tls
, starttls
.cert_validation
true
true
, validate the SMTP server certificate (relevant if encryption
= tls
).username
password
auth_type
plain
plain
, login
, crammd5
.from
Wireguard Portal <noreply@wireguard.local>
link_only
false
true
, 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
), Passkeys (webauthn
) and LDAP (ldap
). Each can have multiple providers configured. Below are the relevant keys.
Some core authentication options are shared across all providers, while others are specific to each provider type.
min_password_length
16
hide_login_form
false
true
, the login form is hidden and only the OIDC, OAuth, LDAP, or WebAuthn providers are shown. This is useful if you want to enforce a specific authentication method. If no social login providers are configured, the login form is always shown, regardless of this setting.?all
query parameter to the login URL (e.g. https://wg.portal/#/login?all). The oidc
array contains a list of OpenID Connect providers. Below are the properties for each OIDC provider entry inside auth.oidc
:
provider_name
display_name
base_url
https://accounts.google.com
).client_id
client_secret
extra_scopes
profile
, email
).allowed_domains
field_map
Available 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_mapping
is_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_enabled
true
, a new user will be created in WireGuard Portal if not already present.log_user_info
true
, 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_name
display_name
client_id
client_secret
auth_url
token_url
user_info_url
scopes
allowed_domains
field_map
Available 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_mapping
is_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_enabled
true
, new users are created automatically on successful login.log_user_info
true
, 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
:
provider_name
url
ldap://srv-ad01.company.local:389
).start_tls
true
, use STARTTLS to secure the LDAP connection.cert_validation
true
, validate the LDAP server’s TLS certificate.tls_certificate_path
tls_key_path
base_dn
DC=COMPANY,DC=LOCAL
).bind_user
company\\ldap_wireguard
or ldap_wireguard@company.local
).bind_pass
field_map
Description: 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))
login_filter
must always be a valid LDAP filter. It should at most return one user. If the filter returns multiple or no users, the login will fail.admin_group
CN=WireGuardAdmins,OU=Some-OU,DC=YOURDOMAIN,DC=LOCAL
sync_interval
30m
) 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_missing
true
, any user not found in LDAP (during sync) is disabled in WireGuard Portal.auto_re_enable
true
, users that where disabled because they were missing (see disable_missing
) will be re-enabled once they are found again.registration_enabled
true
, new user accounts are created in WireGuard Portal upon first login.log_user_info
true
, logs LDAP user data at the trace level upon login.The webauthn
section contains configuration options for WebAuthn authentication (passkeys).
enabled
true
true
, Passkey authentication is enabled. If false
, WebAuthn is disabled. Users are encouraged to use Passkeys for secure authentication instead of passwords. If a passkey is registered, the password login is still available as a fallback. Ensure that the password is strong and secure.The web section contains configuration options for the web server, including the listening address, session management, and CSRF protection. It is important to specify a valid external_url
for the web server, especially if you are using a reverse proxy. Without a valid external_url
, the login process may fail due to CSRF protection.
listening_address
:8888
:8888
to bind on all interfaces or 127.0.0.1:8888
to bind only on the loopback interface). Ensure that access to WireGuard Portal is protected against unauthorized access, especially if binding to all interfaces.external_url
http://localhost:8888
site_company_name
WireGuard Portal
site_title
WireGuard Portal
session_identifier
wgPortalSession
session_secret
very_secret
csrf_secret
extremely_secret
request_logging
false
expose_host_info
false
cert_file
key_file
The webhook section allows you to configure a webhook that is called on certain events in WireGuard Portal. A JSON object is sent in a POST request to the webhook URL with the following structure:
{
- "event": "update",
- "entity": "peer",
- "identifier": "the-peer-identifier",
- "payload": {
- // The payload of the event, e.g. peer data.
- // Check the API documentation for the exact structure.
- }
-}
-
Further details can be found in the usage documentation.
url
authentication
Bearer <token>
.timeout
10s