Greenbone Security Assistant HTTP server

July 17, 2026 ยท View on GitHub

Greenbone Logo

Greenbone Security Assistant HTTP server

GitHub releases Build and test C

The Greenbone Security Assistant HTTP Server is the server developed for the communication with the Greenbone Enterprise appliances.

It connects to the Greenbone Vulnerability Manager Daemon gvmd to provide a full-featured HTTP interface for vulnerability management.

Releases

All release files are signed with the Greenbone Community Feed integrity key. This gpg key can be downloaded at https://www.greenbone.net/GBCommunitySigningKey.asc and the fingerprint is 8AE4 BE42 9B60 A59B 311C 2E73 9823 FAA6 0ED1 E580.

Installation

If you are not familiar or comfortable building from source code, we recommend that you use the Greenbone Security Manager TRIAL (GSM TRIAL), a prepared virtual machine with a readily available setup. Information regarding the virtual machine is available at https://www.greenbone.net/en/testnow.

This module can be configured, built and installed with following commands:

cd path/to/gsad
mkdir build && cd build
cmake ..
make install

Please note: The reference system used by most of the developers is Debian GNU/Linux 'Buster' 10. The build might fail on any other system. Also, it is necessary to install dependent development packages.

Prerequisites

See at the end of this section how to easily install these prerequisites on some supported platforms.

Prerequisites:

  • libgvm_base, libgvm_util >= 22.8.0
  • libgvm_gmp >= 22.38.0
  • gnutls >= 3.2.15
  • libgcrypt
  • cmake >= 3.18
  • glib-2.0 >= 2.42
  • libxml
  • libmicrohttpd >= 0.9.0
  • pkg-config
  • gcc
  • zlib >= 1.2
  • libbrotli (optional, for Brotli compression)

Optional prerequisites

  • Doxygen (for building documentation)
  • xmltoman (for building man page)
  • cgreen (for building tests)
  • libasan (for building tests)

Install prerequisites on Debian GNU/Linux:

apt-get install libmicrohttpd-dev libxml2-dev zlib1g-dev

Compiling

If you have installed required libraries to a non-standard location, remember to set the PKG_CONFIG_PATH environment variable to the location of you pkg-config files before configuring:

export PKG_CONFIG_PATH=/your/location/lib/pkgconfig:$PKG_CONFIG_PATH

Create a build directory and change into it with:

mkdir build && cd build

Then configure the build with:

cmake -DCMAKE_INSTALL_PREFIX=/path/to/your/installation ..

Or (if you want to use the default installation path /usr/local):

cmake ..

This only needs to be done once.

Thereafter, the following commands are useful:

make                # build the scanner
make doc            # build the documentation
make doc-full       # build more developer-oriented documentation
make install        # install the build
make rebuild_cache  # rebuild the cmake cache

Please note that you may have to execute make install as root, especially if you have specified a prefix for which your user does not have full permissions.

To clean up the build environment, simply remove the contents of the build directory you created above.

In case you have installed the Greenbone Security Assistant Daemon into a path different from the other GVM modules, you might need to set some paths explicitly before running cmake. See the top-level CMakeLists.txt.

Unit tests

In order to build and run unit tests use the commands below:

cmake -DBUILD_TESTING=1 ..  # enable building unit tests
make tests                  # build the unit tests
make test                   # run the unit tests

Logging Configuration

By default, gsad writes logs to the file

<install-prefix>/var/log/gvm/gsad.log

Logging is configured entirely by the file

<install-prefix>/etc/gvm/gsad_log.conf

The configuration is divided into domains like this one

[gsad main]
prepend=%t %p
prepend_time_format=%Y-%m-%d %Hh%M.%S %Z
file=/var/log/gvm/gsad.log
level=debug

The level field controls the amount of logging that is written. The value of level can be:

error      4  Errors.
critical   8  Critical situation.
warning   16  Warnings.
message   32  Messages.
info      64  Information.
debug    128  Debug.  (Lots of output.)

Enabling any level includes all the levels above it. So enabling Information will include Warnings, Critical situations and Errors.

To get absolutely all logging, set the level to 128 for all domains in the configuration file.

Logging to syslog can be enabled in each domain like:

[gsad main]
prepend=%t %p
prepend_time_format=%Y-%m-%d %Hh%M.%S %Z
file=syslog
syslog_facility=daemon
level=debug

Usage

In case everything was installed using the defaults, then starting the HTTP daemon of the Greenbone Security Assistant can be done with this simple command:

gsad

The daemon will listen on port 443, making the web interface available in your network at https://<your host>.

If port 443 was not available or the user has no root privileges, gsad tries to serve at port 9392 as a fallback (https://<your host>:9392).

To see all available command line options of gsad, enter this command:

gsad --help

Settings

The following settings can be adjusted for the gsad service.

CLIEnvTypeDefaultDescription
--drop-privilegesGSAD_DROP_PRIVILEGESstringfalseWhen starting as root drop priviledges to a different user
-f, --foregroundGSAD_FOREGROUNDbooleanfalseRun gsad in the foreground and don't fork at startup
--http-onlyGSAD_HTTP_ONLYbooleanfalseServe HTTP only, without SSL. Implies --no-redirect.
--listenGSAD_ADDRESSstring0.0.0.0IP Address to listen on
--portGSAD_PORTint9392 for HTTP and 443 for HTTPSPort to listen on
-r, --rportGSAD_REDIRECT_PORTint9392Redirect port to listen on
--no-redirectGSAD_NO_REDIRECTbooleanfalseDon't redirect HTTP to HTTPS (implied when using --http-only).
--version, -VbooleanPrint version information
-k, --ssl-private-keyGSAD_TLS_PRIVATE_KEYpath/var/lib/gvm/private/CA/serverkey.pemPath to a TLS private key
-c, --ssl-certificateGSAD_TLS_CERTIFICATEpath/var/lib/gvm/CA/servercert.pemPath to a TLS certificate
--dh-paramsGSAD_DH_PARAMSpathPath to a Diffie-Hellman parameters file
--do-chrootGSAD_DO_CHROOTbooleanfalseDo chroot into the static content directory.
--secure-cookieGSAD_SECURE_COOKIEbooleanfalseUse a secure cookie (implied when using HTTPS).
--timeoutGSAD_SESSION_TIMEOUTint15Minutes of user idle time before session expires. Has to be between 0 (no timeout) and 40320 (4 weeks).
--client-watch-intervalGSAD_CLIENT_WATCH_INTERVALint0Interval in seconds to Check if client connection was closed. 0 disables the client watch interval
--debug-tlsGSAD_DEBUG_TLSint0Level at which the TLS debugging is enabled. O to disable.
--gnutls-prioritiesGSAD_GNUTLS_PRIORITIESstringGnuTLS priorities string.
--http-frame-optsGSAD_HTTP_FRAME_OPTSstringSAMEORIGINX-Frame-Options HTTP header.
--http-cspGSAD_HTTP_CSPstringContent-Security-Policy HTTP header.
--http-stsGSAD_HSTS_ENABLEDbooleanfalseEnable HTTP Strict-Transport-Security header.
--http-sts-max-ageGSAD_HSTS_MAX_AGEint31536000max-age in seconds for HTTP Strict-Transport-Security header.
--ignore-x-real-ipGSAD_IGNORE_X_REAL_IPbooleanfalseDo not use X-Real-IP to determine the client address.
--per-ip-connection-limitGSAD_PER_IP_CONNECTION_LIMITint30Sets the maximum number of connections per ip. Use 0 for unlimited.
--unix-socketGSAD_UNIX_SOCKETPathPath to unix socket to listen on. Set to listen on a unix socket.
--unix-socket-ownerGSAD_UNIX_SOCKET_OWNERstringOwner of the unix socket
--unix-socket-groupGSAD_UNIX_SOCKET_GROUPstringGroup of the unix socket
--unix-socket-modeGSAD_UNIX_SOCKET_MODEstringFile mode of the unix socket
--munix-socketGSAD_MANAGER_UNIX_SOCKETpath/run/gvmd/gvmd.sockPath to the unix socket of gvmd
--http-coepGSAD_HTTP_COEPstringSet Cross-Origin-Embedder-Policy (COEP) http header
--http-coopGSAD_HTTP_COOPstringSet Cross-Origin-Resource-Policy (COOP) http header
--http-corpGSAD_HTTP_CORPstringSet Cross-Origin-Resource-Policy (CORP) http header
--http-corsGSAD_HTTP_CORSstringSet Cross-Origin Resource Sharing (CORS) allow origin http header
--user-session-limitGSAD_USER_SESSION_LIMITint0Set maximum number of active sessions per user. 0 for unlimited.
--log-configGSAD_LOG_CONFIGpath/etc/gvm/gsad_log.confPath to logging configuration file.
--pid-fileGSAD_PID_FILEpath/run/gsad/gsad.pidPath to PID file.
--static-contentGSAD_STATIC_CONTENTpath/usr/local/share/gvm/gsad/webPath to static content directory.
--api-onlyGSAD_API_ONLYbooleanfalseRun in API-only mode, disabling serving of static content.
--jwt-requestedGSAD_JWT_REQUESTEDbooleanfalseEnable JWT-based mode using the token returned in the login response.

Development

For development a Devcontainers setup can be used. Devcontainers are currently supported by Visual Studio Code and IntelliJ IDEA. The provided Devcontainers setup comes with all required dependencies for building gsad out of the box.

Support

For any question on the usage of gsad please use the Greenbone Community Portal. If you found a problem with the software, please create an issue on GitHub. If you are a Greenbone customer you may alternatively or additionally forward your issue to the Greenbone Support Portal.

Maintainer

This project is maintained by Greenbone Networks GmbH.

Contributing

Your contributions are highly appreciated. Please create a pull request on GitHub. Bigger changes need to be discussed with the development team via the issues section at github first.

Code style and formatting

Before creating a pull request, it is recommended to run the following command:

make format

This reformats the new code to ensure that it follows the code style and formatting guidelines.

CMake formatting

All CMake files are formatted using gersemi. To install gersemi on a Debian based system the following commands can be used:

sudo apt install pipx
pipx install gersemi

To format all CMake files run the command:

gersemi -i cmake .

License

Copyright (C) 2009-2026 Greenbone AG

Licensed under the GNU Affero General Public License v3.0 or later.