Configure end-to-end transport security

    This section will help you configure and improve the security of the agent-to-server communication using correct SSL/TLS certificates and verification process.

    The GoCD agent allows for some configuration to be able to configure and secure the end-to-end transport security to varying security levels.

    The agent by default trusts any and all certificates offered to it, which may possibly allow for MITM attacks. If you’d like to improve security further, by providing your own server certificate, you may provide one of the following options before starting the agent process.

    The option must point to the root certificate from the GoCD server (If you’re using a certificate signed by a known CA, you may not need to pass the rootCertFile if the root certificate is present in the default JVM trust store). You can export it from firefox using the page info window by clicking “export” from the certificate details page as shown below:

    If you have the openssl binary available then you can also run the command below to export the root certificate from the GoCD server:

    The -sslVerificationMode option

    • NONE (the default) will disable all SSL/TLS verification.
    • NO_VERIFY_HOST will perform certificate check, but ignore verification of the server hostname.
    • FULL will perform complete certificate validation.

    For performing mutual TLS between the GoCD agent and server, specify the certificate (in PEM format) that the agent should use to authenticate with the HTTPs server.

    The option

    For performing mutual TLS between the GoCD agent and server, specify the private key (in PEM format) that the agent should use to authenticate with the HTTPs server.

    If the private key is encrypted using a passphrase, specify the file that contains the passphrase.

    Configuring the agent

    1. wrapper.app.parameter.103=-rootCertFile
    2. wrapper.app.parameter.104=/path/to/root-cert.pem
    3. wrapper.app.parameter.106=FULL