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.
Danger
Modification of these files is reserved for advanced users!!
7.1. Default configurations of waptserver file and nginx¶
7.1.1. Modify the [options] section of waptserver.ini¶
Several options can be defined in the [options] section.
[options]
After modifying the waptserver.ini file, please ensure to restart the relevant waptservices to apply the changes, or restart the postconf.sh.
systemctlrestartwapttaskswaptserver
Open a cmd.exe
netstopwaptservice&&netstartwaptservice
Some available parameters for the [options] section of waptserver.ini
LDAP Parameters
Options (Default Value)
Description
Example
default_ldap_users_acls (default view)
Defines the default acl for a new user opening the WAPT Console.
default_ldap_users_acls = admin
ldap_account_service_login (default None)
Defines the UPN Active directory user for SSO and/or waptserver-ldap mode for self-service.
Defines the sAMAccountName Active Directory User Group(s) allowed to connect to the WAPT Console.
The value can be several groups, separated by commas.
wapt_admin_group = waptadmins, wapttechs
Path Parameters
Options (Default Value)
Description
Example
agents_folder (default waptagentinwaptrepository)
Defines where the WAPT Agents are stored on the WAPT Server.
agents_folder = /var/www/wapt/waptagent
application_root (default None)
Defines a custom WAPT Server application root path.
Defines whether websocket connections should be authenticated.
If use_kerberos = True, then allow_unauthenticated_connectMUST BE set to False or it will take precedence.
Allows the initial registration of the WAPT Agent using a login and password.
allow_unauthenticated_registration = True
allow_unsigned_status_data (default False)
Debug only - Allows unsigned status data from Agent.
allow_unsigned_status_data = True
optimized_authentication_logs (default True)
If one of the option is set, it will not log it: waptagent_version, host_tasks_status, get_ad_groups, get_ad_sites, get_ad_ou_split, host_data, get_hosts , audit_data, wsus.windows_updates, wsus.windows_products, wsus.windows_updates_classifications, packages_for_hosts, enterprise.reporting_exec, known_packages, repositories.get_all_agentrepos, repositories.get_sync_version, repositories.get_all_rules, get_all_users_acls, known_signers_certificates, enterprise.reporting_list, usage_statistics, repositories.get_createupdatefilesync, repositories.get_sync_changelog, licences
optimized_authentication_logs = False
auto_create_waptagent_from_config (default False)
Creates a stuffed waptsetup (conf + personal certificates are added to waptsetup) from each configuration created in the WAPT Console.
auto_create_waptagent_from_config = True
cleanup_kbs (default True)
Defines whether unused :ref:` Windows KB should be automatically deleted <auto_kb_clean>` from the WAPT Server.
cleanup_kbs = False
copy_winpe_x64_in_tftp_folder (default False)
If x64, allows you to copy all WinPE from wads_folder when WinPE is uploaded.
copy_winpe_x64_in_tftp_folder = True
download_wsusscn2 (default True)
Automatically downloads the wsusscn2.cab file.
download_wsusscn2 = False
enable_store (default False)
Enables WAPT Store Webui (Deprecated).
enable_store = False
encrypt_host_packages (default False)
Encrypts host package with client certificate.
encrypt_host_packages = True
login_on_homepage (default True)
Enable or disable the login on the homepage of the waptserver.
homepage_enable = True
homepage_enable (default True)
Enable or disable the homepage of the waptserver.
homepage_enable = True
ldap_nesting_group_support (default True)
Enables the search of nested group in Active Directory.
ldap_nesting_group_support = False
ldap_primary_group_ad_support (default True)
Enables the search on Active Directory primary group users.
ldap_primary_group_ad_support = False
login_on_wads (default False)
Enables authentication to use WADS (format is user:password).
login_on_wads = True
optimized_authentication_logs (default True)
If one of the option is set, it will not log it: waptagent_version, host_tasks_status, get_ad_groups, get_ad_sites, get_ad_ou_split, host_data, get_hosts, audit_data, wsus.windows_updates, wsus.windows_products, wsus.windows_updates_classifications, packages_for_hosts, enterprise.reporting_exec, known_packages, repositories.get_all_agentrepos, repositories.get_sync_version, repositories.get_all_rules, get_all_users_acls, known_signers_certificates, enterprise.reporting_list, usage_statistics, repositories.get_createupdatefilesync, repositories.get_sync_changelog, licences
optimized_authentication_logs = False
remote_repo_websockets (default True)
Enables websocket communication with WAPT Agents configured as remote repositories.
remote_repo_websockets = False
use_kerberos (default False)
Enables a WAPT Agent to register using its kerberos account.
If use_kerberos = True, then allow_unauthenticated_connectMUST BE set to False or it will take precedence.
Defines the random string for initializing the Python Flask application server.
The string is generated when first installing the WAPT Server and is unique for every WAPT Server.
secret_key = FKjfzjfkF687fjrkeznfkj7678jknk78687
server_uuid (default None)
Defines the WAPT Server UUID (this anonymous id is used for WAPT statistics).
# uwsgi upstream serverupstreamwaptserver{serverunix:///run/waptserver/uwsgi.sock;}log_formatcombined_ssl'$remote_addr$ssl_client_s_dn$ssl_client_verify$remote_user[$time_local]''"$request"$status$body_bytes_sent''"$http_referer""$http_user_agent"';server{listen80;listen[::]:80;listen443ssl;listen[::]:443ssl;server_namesrvwapt.mydomain.lan;server_name192.168.100.12;access_log"/var/log/nginx/access.log"combined_ssl;ssl_certificate"/opt/wapt/waptserver/ssl/cert.pem";ssl_certificate_key"/opt/wapt/waptserver/ssl/key.pem";ssl_protocolsTLSv1.2;ssl_dhparam"/etc/ssl/certs/dhparam.pem";ssl_prefer_server_cipherson;ssl_ciphers'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';ssl_staplingon;ssl_stapling_verifyon;ssl_session_cachenone;ssl_session_ticketsoff;# HSTS (ngx_http_headers_module is required) (63072000 seconds)add_headerStrict-Transport-Security"max-age=63072000"always;ssl_client_certificate"/opt/wapt/conf/ca-srvwapt.mydomain.lan.crt";ssl_crl"/opt/wapt/conf/ca-check-clients.crl";ssl_verify_clientoptional;gzip_min_length1000;gzip_buffers48k;gzip_http_version1.0;gzip_disable"msie6";gzip_typestext/plaintext/cssapplication/json;gzip_varyon;indexindex.html;server_tokensoff;client_max_body_size12288m;client_body_timeout1800;large_client_header_buffers416k;proxy_headers_hash_max_size1024;proxy_headers_hash_bucket_size128;proxy_request_bufferingoff;location^~/.well-known/acme-challenge/{default_type"text/plain";root/var/www/html;}# sub instancesinclude"/opt/wapt/conf/wapt.d/*.conf";location/static{alias"/opt/wapt/waptserver/static";}location/ssl{alias"/var/www/ssl";}# not protected URLlocation~^/(wapt/waptsetup.*\.exe|wapt/ping|wapt/waptagent/.*|wapt/waptagent\.exe|wapt/waptdeploy\.exe|wapt/conf\.d/.*\.json)${add_headerCache-Control"store,no-cache,must-revalidate,post-check=0,pre-check=0";add_headerPragma"no-cache";root"/var/www";}location~^/api/v3/(wads_register_host|set_host_wads_status|baseipxe|get_host_ipxe|get_wads_exe.*|get_wads_config)${proxy_http_version1.1;proxy_request_bufferingoff;include"/opt/wapt/conf/forward_ssl_auth.conf";rewrite/(.*)/$1break;proxy_passhttp://127.0.0.1:8080;}# not protected URLlocation/wads{alias"/var/www/wads";}location=/{include"/opt/wapt/conf/forward_ssl_auth.conf";proxy_passhttp://127.0.0.1:8080;}# SSL protected URLlocation/waptwua{add_headerCache-Control"store,no-cache,must-revalidate,post-check=0,pre-check=0";add_headerPragma"no-cache";include"/opt/wapt/conf/forward_ssl_auth.conf";include"/opt/wapt/conf/require_ssl_auth.conf";alias"/var/www/waptwua";}# SSL protected URLlocation~^/(wapt/.*|wapt-diff-repos/.*|licences\.json|sync\.json)${add_headerCache-Control"store,no-cache,must-revalidate,post-check=0,pre-check=0";add_headerPragma"no-cache";include"/opt/wapt/conf/forward_ssl_auth.conf";include"/opt/wapt/conf/require_ssl_auth.conf";root"/var/www";}location/rules.json{add_headerCache-Control"store,no-cache,must-revalidate,post-check=0,pre-check=0";add_headerPragma"no-cache";include"/opt/wapt/conf/forward_ssl_auth.conf";root"/var/www";}# we don't want to expose our list of computers in case someone scan this folder.location/wapt-host/Packages{return403;}location~^/(wapt-host/.*)${log_not_foundoff;add_headerCache-Control"store,no-cache,must-revalidate,post-check=0,pre-check=0";add_headerPragma"no-cache";include"/opt/wapt/conf/forward_ssl_auth.conf";include"/opt/wapt/conf/require_ssl_auth.conf";root"/var/www";}location~^/.*_kerberos${proxy_http_version1.1;proxy_request_bufferingoff;include"/opt/wapt/conf/forward_ssl_auth.conf";auth_gsson;auth_gss_format_fullon;auth_gss_keytab/etc/nginx/http-krb5.keytab;proxy_passhttp://127.0.0.1:8080;}# we need socketio for these actions.# they are enabled only locally on the loopbacklocation~^/api/v3/(update_hosts_sid_table|hosts_sid)${proxy_http_version1.1;proxy_request_bufferingoff;include"/opt/wapt/conf/forward_ssl_auth.conf";rewrite/(.*)/$1break;proxy_passhttp://127.0.0.1:8080;allow127.0.0.1;denyall;}# we need socketio for these actionslocation~^/api/v3/(update_hosts_sid_table|trigger_host_action|reset_hosts_sid|host_tasks_status|trigger_cancel_task|hosts_delete|launch_sync_on_remotes_repos|broadcast_sync_on_remotes_repo)${proxy_http_version1.1;proxy_request_bufferingoff;include"/opt/wapt/conf/forward_ssl_auth.conf";include"/opt/wapt/conf/require_ssl_auth.conf";rewrite/(.*)/$1break;proxy_passhttp://127.0.0.1:8080;}location/get_websocket_auth_token{return404;}# these actions are not protected by SSL client side certificate, as we perhaps don't have one at this stage.# in case uwsgi is enabled, we wat this to still be handled by eventlet waptserver as these endpoints are not cpu intensive but often calledlocation~^/(ping)${proxy_http_version1.1;proxy_request_bufferingoff;include"/opt/wapt/conf/forward_ssl_auth.conf";rewrite/(.*)/$1break;proxy_passhttp://127.0.0.1:8080;}# these actions are not protected by SSL client side certificate, as we perhaps don't have one at this stage.location~^/(login|api/v3/login|api/v3/logout|api/v3/get_hash_json_content|api/v3/waptagent_version|add_host|api/v3/add_host|api/v3/get_waptagent_exe/.*/waptagent.exe)${proxy_http_version1.1;proxy_request_bufferingoff;include"/opt/wapt/conf/forward_ssl_auth.conf";rewrite/(.*)/$1break;include/opt/wapt/conf/uwsgi_params;uwsgi_passwaptserver;}location/{proxy_http_version1.1;proxy_request_bufferingoff;include"/opt/wapt/conf/forward_ssl_auth.conf";include"/opt/wapt/conf/require_ssl_auth.conf";include/opt/wapt/conf/uwsgi_params;uwsgi_passwaptserver;}location/socket.io{proxy_http_version1.1;proxy_request_bufferingoff;include"/opt/wapt/conf/forward_ssl_auth.conf";include"/opt/wapt/conf/require_ssl_auth.conf";proxy_set_headerUpgrade$http_upgrade;proxy_set_headerConnection"Upgrade";proxy_passhttp://127.0.0.1:8080/socket.io;}}
7.2. Configuring WAPT Server for large infrastructures¶
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 host.
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.
In the nginx.conf file, modify the 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_connections4096;}
Then upgrade the number of filedescriptors in the nginx.conf file:
worker_rlimit_nofile32768;
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 WAPT Server 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.
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<<EOFwapt hard nofile 32768wapt soft nofile 32768www-data hard nofile 32768www-data soft nofile 32768EOF
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 should be around 1.5 times the number of WAPT clients.
A higher number of clients need a higher number of connections to the PostgreSQL database.
In the postgresql.conf file, 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:
The wapt-get upload-package <path to the package> command uploads a package onto the main WAPT repository.
The command wapt-get upload-package C:\waptdev\tis-tightvnc.wapt returns:
Using config file: C:\Users\documentation\AppData\Local\waptconsole\waptconsole.iniUploading packages to https://srvwapt.mydomain.lanPlease get login for https://srvwapt.mydomain.lan/api/v3/upload_xxx:adminPassword:c:\waptdev\tis-tightvnc.wapt[================================] 54316019/54316019 - 00:00:17OK : 1 Packages uploaded, 0 errors
The wapt-scanpackages <directory> command rebuilds a Packages file for a WAPT package repository.
The command wapt-scanpackages /var/www/wapt/ returns nothing.
7.3.4. Re-signing packages on the WAPT Server using a command line¶
Use this method if re-signing from the WAPT console method does not complete successfully.
These commands are ONLY available for WAPT Servers running Linux.
Warning
Before using this method, ensure that your WAPT Server is safe and not under the control of an unauthorized third party entity.
Copy your .crt and .pem to /tmp/ on the WAPT Server using Winscp or an equivalent tool.
It is then possible to re-sign all the packages at once on the WAPT Server with the following commands.