Configuring the WAPT agent with advanced options¶
The configuration file wapt-get.ini
defines the behavior
of the WAPT agent.
System |
Location |
---|---|
Windows |
|
Linux |
|
Mac OS |
|
The [global]
section is required.
[global]
After standard installation, the default configuration is:
[global]
waptupdate_task_period=120
wapt_server=https://srvwapt.mydomain.lan
repo_url=https://srvwapt.mydomain.lan/wapt/
use_hostpackages=1
All parameters are not available on agent generation.
It is possible to make changes in wapt-get.ini
manually or by deploying a WAPT package with the new configuration settings.
An example package is available from the Tranquil IT repository:
https://store.wapt.fr/store/tis-wapt-conf-policy
# -*- coding: utf-8 -*-
from setuphelpers import *
uninstallkey = []
def install():
print('Modify max_gpo_script_wait')
inifile_writestring(WAPT.config_filename,'global','max_gpo_script_wait',180)
print('Modify Preshutdowntimeout')
inifile_writestring(WAPT.config_filename,'global','pre_shutdown_timeout',180)
print('Disable Hyberboot')
inifile_writestring(WAPT.config_filename,'global','hiberboot_enabled',0)
print('Disable Notify User')
inifile_writestring(WAPT.config_filename,'global','notify_user',0)
print('Reload WAPT configuration')
WAPT.reload_config_if_updated()
The function inifile_writestring
definition is:
inifile_writestring(inifilename,section,key,value)
Description of available sections¶
Section |
Description |
---|---|
|
Global WAPT agent options. |
|
Main repository options. |
|
External remote repository options. |
|
Repository for host packages options. |
|
WUA agent options. |
|
For synching multiple repositories. |
All sections are detailed below.
Description of available options by section¶
[global]¶
General settings¶
Options / Default value |
Description |
Example |
---|---|---|
Allows rebooting hosts remotely from the WAPT console (default False). |
|
|
Allows shutting down the host remotely from the WAPT console (default False). |
|
|
|
Forces the package certificate’s date and CRL to be verified. |
|
|
Path to the local database file. |
|
|
Defines whether a download of pending packages should be started after an update with waptupdate_task_period. |
|
Allows to force an Organizational Unit on the WAPT agent (convenient for assigning a fake OU for out-of-domain PC).
Make sure it respects a consistent case (do not mix “dc”s and “DC”s, for example), which you can find in the console (in the DN/ |
|
|
Allows to define a WAPT package list that the WAPT agent must install. |
|
|
|
Forces the default language for the GUI (not for package filtering) |
|
|
Allows to set the list of WAPT agent languages to pre-filter the list of packages visible by the WAPT agent (for package filtering).
The parameter accepts multiple entries ordered by preference (eg. |
|
|
Sends the WAPT logs in the Window event log. |
|
|
Log level of the WAPT agent. Possible values are: |
|
|
List of package maturities than can be viewed and installed by WAPT Agent. Default value is |
|
|
Address of the main WAPT repository. |
|
|
List of enabled repositories, separated by a comma. Each value defines a section of the |
|
|
Allows the WAPT console to send anonymous statistics to Tranquil IT. Set to 0 to disable telemetry. |
|
|
Sets how the self service authentication works. Possible values are: |
|
Defines whether or not it is possible for the user to uninstall applications via the self-service. |
|
|
For using group packages (default False). |
|
|
|
Allows to use the FQDN rather than the BIOS UUID as the unique machine identifier in WAPT (default False). |
|
|
Defines whether host packages are to be used (default False). |
|
Defines whether repositories are replicated (default False). |
|
|
|
Defines the frequency at which audits are triggered. |
|
|
Defines the WAPT Server URL. If the attribute is not present, no WAPT Server will be contacted. |
|
|
WAPT agent loopback port. The port is not accessible from the network. |
|
|
Defines the update frequency (120 minutes by default). |
|
|
Defines the upgrade frequency |
|
Note
If there is no
repo_url
attribute in the [global] section, then a repository in the[wapt]
section will have to be explicitly defined. It will have to be enabled by adding it to therepositories
attribute.If there is no
wapt_server
attribute in the [global] section, then no WAPT Server will be used.
Server settings¶
These options will set the WAPT agent behavior when connecting to the WAPT Server.
Options / Default value |
Description |
Example |
---|---|---|
|
Folder of certificates authorized to verify the signature of WAPT packages. |
|
|
Use kerberos authentication for initial registration on the WAPT Server (default False). |
|
|
See the documentation on activating the verification of HTTPS certificates |
|
|
WAPT Server URL. If the attribute is not present, no WAPT Server will be contacted. |
|
|
WAPT Server HTTPS connection timeout in seconds |
|
waptexit settings¶
Options / Default value |
Description |
Example |
---|---|---|
|
Prevents users from canceling package upgrades on computer shutdown. If disabled, users will not be able to cancel an upgrade on computer shutdown. If this value is not indicated the default value will be 10. |
|
|
Disables Hiberboot on Windows 10 to make waptexit work correctly. |
|
|
Timeout for GPO execution at computer shutdown. |
|
|
Timeout for scripts at computer shutdown. |
|
|
Not to run an upgrade of running software on the machine (impacted_process attribute of the package) |
|
|
Only upgrade packages with a specific priority |
|
|
Time before the automatic start of the installations |
|
WAPT Self-Service and Waptservice Authentification settings¶
Options / Default value |
Description |
Example |
---|---|---|
|
Useful with waptagent-ldap, defines the base dn for the LDAP request. |
|
|
Useful with waptagent-ldap, defines whether the LDAP request must be encrypted. |
|
|
Useful with waptagent-ldap, defines the LDAP server to contact. |
|
|
Defines the authentication system of the WAPT service, available value are system, waptserver-ldap, waptagent-ldap. |
|
|
Useful with waptagent-ldap, define whether the certificate should be verified. |
|
|
Apply selfservice package view filtering for Local Administrators. |
|
|
sha256 hashed password when waptservice_user is used (the value NOPASSWORD disables the requirement for a password). |
|
|
Forces a user to authenticate on the WAPT service. |
|
wapttray settings¶
Options / Default value |
Description |
Example |
---|---|---|
|
Prevents |
|
Proxy settings¶
Options / Default value |
Description |
Example |
---|---|---|
|
HTTP proxy address |
|
|
Use the proxy to access the repositories. |
|
|
Use a proxy to access the WAPT Server. |
|
Creating packages settings¶
Options / Default value |
Description |
Example |
---|---|---|
|
Default prefix for new or imported packages. |
|
|
Directory for storing packages in development. |
|
|
Default suffix for new or imported packages. |
|
|
Path to the Administrator’s private key. |
|
[wapt-wua]¶
Refer to configuring WAPTWUA on the WAPT agent.
Several repository settings¶
Comprehensive list of repositories usable on wapt-get.ini
, another [section]
can be added.
Note
Active repositories are listed in the repositories
attribute of the [global]
section.
Attention
This parameter can be configured both in the WAPT agent configuration and in the WAPT console configuration file C:\Users\%username%\AppData\Local\waptconsole\waptconsole.ini
.
For information on configuring the WAPT console, please refer to this documentation.
[wapt]¶
Hint
If this section does not exist, parameters are read from the [global]
section.
[wapt-templates]¶
External remote repositories that will be used in the WAPT console for importing new or updated packages. The Tranquil IT repository is set by default.
[wapt-host]¶
Repository for host packages. If this section does not exist, default locations will be used on the main repository.
More information on that usage can be found in this article on working with multiple public or private repositories.
Configuring the WAPT console¶
Hint
the WAPT console configuration is stored in 2 locations:
C:\Users\%username%\AppData\Local\waptconsole\waptconsole.ini
.C:\Users\%username%\AppData\Roaming\waptconsole\waptconsole.ini
.
These files are automatically generated when the waptconsole is first launched and it is generated from the wapt-get.ini
file configured on the Administrator’s workstation;
Description of available sections¶
Section |
Description |
---|---|
|
global console options |
|
external repository options. |
|
WUA options |
All sections are detailed below.
Others sections present on C:\Users\%username%\AppData\Roaming\waptconsole\waptconsole.ini
are not editable manually, therefore they are not detailed.
Attention
For parameters both present in wapt-get.ini
and waptconsole.ini
, values are set in wapt-get.ini
and copied to waptconsole.ini
.
Do not edit manually these parameters.
Description of available options by section¶
[global]¶
Several options are available in the [global]
section of the waptconsole.ini
file.
Options / Default value |
Description |
Example |
---|---|---|
|
Launches the console in debug mode. |
|
Allows rebooting hosts remotely from the WAPT console (default False). |
|
|
Allows shutting down the host remotely from the WAPT console (default False). |
|
|
|
If remote repository is using Client Side SSL Authentification |
|
|
If remote repository is using Client Side SSL Authentification |
|
|
Forces the package certificate’s date and CRL to be verified. |
|
|
Default upload maturity for WAPT packages. |
|
|
Prefix used for naming WAPT packages. |
|
|
WAPT base package development folder. |
|
|
External plugins for the WAPT console. Default is |
|
|
Allows to define a WAPT package list that the WAPT agent must install. |
|
|
Disables Hiberboot on Windows 10 to make waptexit |
|
|
Address of the proxy server in the WAPT console. |
|
|
Date when the WAPT console was last used. |
|
|
Last user logged on this WAPT console. |
|
|
Timeout for GPO execution at computer shutdown. |
|
|
Path to the certificate associated with the Administrator’s private key. |
|
|
Timeout for scripts at computer shutdown. |
|
|
Address of the main WAPT repository. |
|
|
Allows the WAPT console to send anonymous statistics to Tranquil IT. Set to False to disable telemetry. |
|
|
List of allowed signature algorithms for the WAPT packages. |
|
For using unit packages. |
|
|
|
Allows to use the FQDN rather than the BIOS UUID as the unique machine identifier in WAPT. |
|
|
Use kerberos authentication for initial registration on the WAPT Server. |
|
|
Use host packages. |
|
|
Use a proxy to connect to the main WAPT repository from the console. |
|
|
Use a proxy to connect to the WAPT Server from the console. |
|
|
||
|
|
|
|
Address of the WAPT Server. |
|
Options / Default value |
Description |
Example |
---|---|---|
|
Launches the console in debug mode. |
|
|
Displays the actions that call external applications (RDP, Windows tools etc…). |
|
|
Displays the button to create self-signed certificates or to create the WAPT agent’s installer. |
|
|
Hides actions that are not available for the WAPT agent |
|
|
Limit of hosts displayed in the WAPT console. |
|
|
Force default langage for GUI (not for package filtering) |
|
|
Ini file was actually used by console. |
|
|
Display Audit data tab on host inventory. |
|
For using unit packages (default False). |
|
|
|
Allows you to use the fqdn name rather than the uuid BIOS as the unique machine identifier in wapt (default False). |
|
|
Version of console |
|
|
For displaying |
|
[sections]¶
You may add several external repositories by adding [sections]
in C:\Users\%username%\AppData\Local\waptconsole\waptconsole.ini
.
Attention
This parameter can be configured both in the WAPT agent configuration and in the WAPT console configuration C:\Users\%username%\AppData\Local\waptconsole\waptconsole.ini
.
For information on configuring the WAPT agent, please refer to this point.
See available parameters and configurations by visiting this documentation on setting up multiple repositories.
Configuring the WAPT Server¶
The WAPT Server configuration file on GNU/ Linux and macOS systems is found in /opt/wapt/conf/waptserver.ini
or in /opt/wapt/waptserver/waptserver.ini
.
The WAPT Server configuration file on Windows is found in C:\wapt\conf\waptserver.ini
.
Attention
Modification of these files is reserved for advanced users!!
Section [option] of waptserver.ini¶
Several options can be defined in the [option] section.
[options]
Options / Default value |
Description |
Example |
---|---|---|
|
Defines whether websocket connections should be authenticated. If |
|
|
Allows the initial registration of the WAPT agent using a login and password. |
|
|
Debug only - Allows unsigned status data from agent. |
|
|
Defines a custom WAPT server application root path. |
|
|
Related to user ACLs |
|
|
Defines the host certificate lifetime (in days). |
|
|
Automatically clean KB Windows on WAPT server. |
|
|
Defines the websocket client timeout. |
|
|
Defines the host certificate signing cert path. |
|
|
Defines the host certificate signing CRL periodicity (in days). |
|
|
Defines the host certificate signing CRL path. |
|
|
Defines the host certificate signing CRL URL. |
|
|
Defines the host certificate signing key path. |
|
|
Defines the maximum allowed delay before WAPT agent requests timeout. |
|
|
Defines the maximum allowed delay before PostgreSQL queries timeout. |
|
|
Defines the url of the PostgreSQL server (by default WAPT use a local Unix Socket). |
|
|
Defines the maximum simultaneous connections to the PostgreSQL database. |
|
|
Defines the PostgreSQL database that the WAPT Server will connect to. |
|
|
Defines the password for authenticating the user on the PostgreSQL database (by default WAPT use a local UNIX socket). |
|
|
Defines the port of the PostgreSQL server. |
|
|
Defines the database stale timeout. |
|
|
Defines the PostgreSQL user connecting to the database. |
|
Enables WAPT Store Webui. |
|
|
|
Encrypts host package with client certificate. |
|
|
Adds basic authentication to WAPT Server. |
|
|
Defines the proxy server to allow the WAPT server to recover its CRL. |
|
|
Adds additional known CA to verify certificates. |
|
|
Defines the LDAP authentication base DN. |
|
|
Defines the LDAP authentication server. |
|
|
Sets SSL authentication on LDAP connections. |
|
|
Defines the log level. Possible values are: |
|
|
Sets the maximum simultaneous WAPT clients connection. |
|
|
Sets the minimum admin password length. |
|
|
Defines the Nginx web server HTTP port (Windows only). |
|
|
Defines the Nginx web server HTTPS port (Windows only). |
|
|
Enables remote repositories functionality from the WAPT Server. |
|
|
Enables websocket communication with agents configured as remote repositories. |
|
|
Defines the random string for initializing the Python Flask application server. It is generated when first installing the WAPT Server and is unique for every WAPT Server. |
|
|
Defines the WAPT Server UUID (this anonymous id is used for WAPT statistics). |
|
|
Defines the maximum allowed time difference for the websockets (in seconds). |
|
|
Defines the authentication token lifetime (in seconds). |
|
|
Defines the path to the trusted signers certificate directory. |
|
|
Defines the path to trusted users CA certificate directory. |
|
|
Enables a WAPT agent to register using its kerberos account. If |
|
|
Enables client certification authentication. |
|
|
LDAP DN of Active Directory User Group allowed to connect to the WAPT console. |
|
|
Defines the directory path of the WAPT repository. |
|
|
Defines the path to database that handles tasks. |
|
|
Defines the SuperAdmin password for connecting to the WAPT console. |
|
|
Defines the WAPT Server python service port, default is |
|
|
Defines the SuperAdmin username in the WAPT console. |
|
|
Defines the location of WAPT WUA folder. |
|
|
Defines the list of WakeOnLAN UDP ports to send magic packets to. |
|
|
Defines how to listen to the waptserver service. |
|
Configuring Nginx¶
The default Nginx configuration is as follows:
server {
listen 80;
listen 443 ssl;
server_name _;
ssl_certificate "/opt/wapt/waptserver/ssl/cert.pem";
ssl_certificate_key "/opt/wapt/waptserver/ssl/key.pem";
ssl_protocols TLSv1.2;
ssl_dhparam /etc/ssl/certs/dhparam.pem;
ssl_prefer_server_ciphers on;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
ssl_stapling on;
ssl_stapling_verify on;
ssl_session_cache none;
ssl_session_tickets off;
index index.html;
location ~ ^/wapt.* {
proxy_set_header Cache-Control "store, no-cache, must-revalidate, post-check=0, pre-check=0";
proxy_set_header Pragma "no-cache";
proxy_set_header Expires "Sun, 19 Nov 1978 05:00:00 GMT";
root "/var/www";
}
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
location ~ ^/(api/v3/upload_packages|api/v3/upload_hosts/|upload_waptsetup) {
proxy_pass http://127.0.0.1:8080;
client_max_body_size 4096m;
client_body_timeout 1800;
}
location /wapt-host/Packages {
return 403;
}
location /wapt-host/add_host_kerberos {
return 403;
}
location / {
proxy_pass http://127.0.0.1:8080;
}
location /socket.io {
proxy_http_version 1.1;
proxy_buffering off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_pass http://127.0.0.1:8080/socket.io;
}
}
}
Configuring WAPT Server for large deployments¶
The default operating system, Nginx and Postgresql settings are adapted for around 400 WAPT agents. If you have more than 400 clients it is necessary to modify a few system level parameters along with PostgreSQL database, Nginx web and WAPT Server python server.
In the future the postconf.sh script might take charge of this configuration depending on the expected number of client computers.
With the following parameters, one WAPT Server should scale up to around 5000 concurrent active clients. You may have more clients in the database if they are not all running at the same time. If you have more than 5000 clients it is recommended to have more than one WAPT Server.
The limit in the number of end point clients is due to the bottleneck in the python code and the PostgreSQL backend. WAPT performance gets better with time and in the future WAPT Server might support a large base on a single server. However the Nginx part scales very well and it can takes full advantage of a 10Gbps connection for high load package deployments.
Note
The parameters to be modified below are linked together and should be modified globally and not individually.
Configuring Nginx¶
In the /etc/nginx/nginx.conf
file (for Windows C:\wapt\waptserver\nginx\conf\nginx.conf
), modify worker_connections
parameter. The value should be around 2.5 times the number of WAPT clients (n connections for websockets and n connections for package downloads and inventory upload + some margin).
events {
worker_connections 4096;
}
Then upgrade the number of filedescriptors in the /etc/nginx/nginx.conf
file (for Windows C:\wapt\waptserver\nginx\conf\nginx.conf
):
worker_rlimit_nofile 32768;
Depending on the partitioning of your WAPT server you might have to be careful with the Nginx temporary file upload directory. Nginx acts as a reverse proxy for the WAPTServer Python engine and its does a caching of packages uploaded when uploading a new package from the console.
The packages are stored in the /var/lib/nginx/proxy
directory.
You have to make sure that the partition hosting this directory is large enough.
You may change this directory location using the following Nginx configuration parameter.
$client_body_temp_path
Configuring the Linux System¶
Increase the number of filedescriptors. The system unit file asks for an increase in the allowed number of filedescriptors (LimitNOFILE=32768). We should have the same thing for Nginx. There are a few limits to modify.
First we modify system wide the number of filedescriptors allowed for Nginx and WAPT.
Create the
/etc/security/limits.d/wapt.conf
.
cat > /etc/security/limits.d/wapt.conf <<EOF
wapt hard nofile 32768
wapt soft nofile 32768
www-data hard nofile 32768
www-data soft nofile 32768
EOF
Nginx serves as a reverse proxy and makes quite a lot of connections. Each WAPT client keeps a websocket connection up all the time in order to respond to actions from the WAPT Server.
The Linux kernel has a protection against having too many TCP connections opened at the same time and one may get the SYN flooding on port message in the Nginx log. In order to avoid these messages, it is necessary to modify the two following parameters. It must around 1.5 times the number of WAPT clients.
cat > /etc/sysctl.d/wapt.conf <<EOF
net.ipv4.tcp_max_syn_backlog=4096
net.core.somaxconn=4096
EOF
sysctl --system
Configuring the PostgreSQL database¶
A higher number of clients need a higher number of connections to the PostgreSQL database. In the postgresql.conf
file (file:/etc/postgresql/{version}/main/postgresql.conf on debian 10 for example or for Windows C:\wapt\waptserver\pgsqlversion_data\postgresql.conf
), you need to increase the following parameter to approximately 1/4 the number of active WAPT agents.
max_connections = 1000
In /opt/wapt/conf/waptserver.ini
file (for Windows C:\wapt\conf\waptserver.ini
, db_max_connections
should be equal to PostgreSQL max_connections
minus 10 (PostgreSQL needs to keep some connections for its housekeeping stuff).
The max_clients
parameter should be set around 1.2 times the number of WAPT agents:
[options]
...
max_clients = 4096
db_max_connections = 990