Authentication
Your synthetic test can incorporate any authentication method that Splunk Synthetic Monitoring supports for that test type.
The following authentication methods are available for you to configure in your Synthetics tests:
Basic authentication through HTML login forms
Configure your browser test with basic authentication through an HTML login form.
If your test target provides an HTML form for entering username and password, configure your browser test as follows.
To verify that the login is working, select Try now. Results may take a while. The Try now result pane should display each screen that your test navigated to on the target page, plus the message Success.
Basic authentication through HTTP headers
Configure your browser test with basic authentication through an HTTP header.
If your test target expects login credentials to be included in an HTTP header, configure your browser test as follows.
To verify that the login is working, select Try now. Results may take a while. The Try now result pane should display each screen that your test navigated to on the target page, plus the message Success.
Basic authentication through API request headers
Configure your API test with basic authentication through an API request header.
curl -G https://api.twilio.com/2010-04-01/Accounts.json -u <YOUR_ACCOUNT_SID>:<YOUR_AUTH_TOKEN>. You can modify these steps for targets that support a bearer token.
If your test target expects login credentials to be included in an an API request header, configure your browser test as follows.
To verify that the login is working, select Try now. Results may take a while. The Try now result pane should display each screen that your test navigated to on the target page, plus the message Success.
Multifactor authentication through SMS
Configure your browser test with multifactor authentication through SMS.
If your test target sends a one time passcode (OTP) through SMS for multifactor authentication, your browser test must retrieve the OTP from the SMS message and enter it into the input field on the target’s page. To do this, configure your browser test as follows.
-
Virtual phone number
To authenticate through SMS, you must have a virtual phone number that can receive one time passcodes through SMS. Several services offer virtual phone numbers and provide SMS content through an API, such as the Sinch service . For instructions on receiving messages through this service, see the Sinch API .
Certain services, such as Twilio, may block incoming SMS messages containing OTPs. For more information, see Twilio's OTP Message Body Filtered documentation.
-
SMS notifications
To enhance the authorization process, you must have a service that sends SMS notifications, such as GitHub .
- Limitations
-
Some services may not be accessible during Synthetics tests due to violations of Content-Security-Policy (CSP). In such instances, a workaround is to implement third-party services on your server and provide an endpoint configured with CSP to allow
connect-src.
To verify that the login is working, select Try now. Results may take a while. The Try now result pane should display each screen that your test navigated to on the target page, plus the message Success.
Multifactor authentication through email
Configure your browser test with multifactor authentication through email.
If your test target sends a one-time passcode (OTP) through email for multifactor authentication, your browser test must retrieve the OTP from the email message and enter it into the input field on the target’s page. To do this, configure your browser test as follows.
You must have an email service that supports connecting to your email account and managing your emails through an API. The steps below feature an example using the Nylas service . For detailed information on how to retrieve messages from this service, refer to its API documentation .
Additionally, the steps below demonstrate the use of GitHub to send an authorization email, which is essential for extracting the OTP from it.
- Limitations
-
Your email service must be accessible through an API. Some services may not be accessible during Synthetics tests due to violations of Content-Security-Policy (CSP). In such instances, a workaround is to implement third-party services on your server and provide an endpoint configured with CSP to allow connect-src.
To verify that the login is working, select Try now. Results may take a while. The Try now result pane should display each screen that your test navigated to on the target page, plus the message Success.
Multifactor authentication through SSO and Active Directory
Configure your test with multifactor authentication through SSO and Active Directory.
Authentication through Single Sign-On (SSO) is similar to basic authentication. To create a test that uses SSO or Active Directory (AD), you must configure a series of steps that include opening the webpage, selecting the SSO authentication link, and entering the required information for SSO authentication. Additional webpages may load during this process, so it’s crucial that you include steps to confirm that all of the components of each webpage have fully loaded before proceeding.
SSO authentication frequently involves additional authentication factors. If the identity provider (such as Google, Microsoft, Okta, Duo, and so on) does not mandate an extra login factor, your test might only need the authentication steps that are illustrated in the example below.
- Limitations
-
Identity providers often require various additional factors for login, such as verification via email, SMS, or TOTP. In such cases, it is essential to modify or add steps to accommodate these additional login factors.
- Add a step for selecting the webpage.
- Add a step for selecting the SSO authentication link.
- Enter the required information for SSO authentication.
- Add steps to confirm that all of the components of each webpage have fully loaded before proceeding.
Multifactor authentication through TOTP
Configure your browser test with multifactor authentication through TOTP.
If your test needs to send a time-based one-time passcode (TOTP) to its test target, configure your test as follows.
mTLS authentication
Configure your test for mTLS authentication.
Mutual TLS (mTLS) authentication is a method for a client (your private or public runner) and a web server (your test target) to both validate their connection. In mTLS, both the client and the server have a certificate, and both sides authenticate using their certificate's public/private key pair. Follow these steps to make sure that the mTLS authentication succeeds:
-
Save the client certificate in a global variable of type
CERT. -
Configure your test to reference the
CERTvariable.
Step 1: Save the client certificate in a global variable of type CERT
These steps assume that you've already downloaded the client certificate that matches the one on the test target.
There are two ways to create a global variable:
-
From the Splunk Synthetic Monitoring landing page:
-
From the Splunk Synthetic Monitoring landing page, select the settings icon, and then select Global variables.
-
Select Create variable.
-
-
From an existing test’s page:
-
Select Edit test.
-
Expand the Variables panel on the right, scroll to Certificates and select Add.
-
In the Add variable dialog box, enter the following:
-
In the Variable type pull-down menu, select CERT.
-
In the Variable name field, enter the name of the variable. You will use this name to access your variable within a test.
-
In the Domain field, enter the exact domain of the test target. For example, if the test target is
client.badssl.com, set Domain toclient.badssl.com. If you set Domain tobadssl.comthe mTLS authentication will fail with a timeout error in browser tests. The error might take up to two minutes to appear.You can use wildcards in Domain, such as:
*.example.comexample.**.example.**.*.**.*.*.example/**.*.*/*
-
If your client certificate is in PCKS#12 format, convert it into .pem format first:
-
Install OpenSSL on your system:
-
On Linux, it's typically pre-installed. If not, use your package manager to install it. For example, on Ubuntu, run the command
apt install openssl -
On macOS, run the command
brew install openssl -
On Windows, download the OpenSSL binary or use a package manager like Chocolatey.
-
-
Run the command below that matches your certificate's encryption algorithm:
-
If your certificate was encrypted with a standard (non-legacy) algorithm, run this command:
CODEopenssl pkcs12 -in input.p12 -out output.pem -aes256 -passin pass:your-p12-passwordwhere:
- input.p12 is the input PKCS#12 file.
- output.pem is the output PEM file.
- new-password is the password that was generated when the .p12 file was created.
For example:
CODEopenssl pkcs12 -in in-cert.p12 -out out-cert.pem -aes256 -passin pass:ABC123@GL -
If you're using OpenSSL 3.0+ but your certificate was encrypted with a legacy algorithm such as RC2-40-CBC, run the
opensslcommand with the-legacyoption. This option enables support for older encryption algorithms which are deactivated by default in OpenSSL 3.0 and later:CODEopenssl pkcs12 -legacy -in input.p12 -out output.pem -nodeswhere:
- input.p12 is the input PEM file.
- output.pem is the output PEM file.
The resulting .pem file contains both the private key and the certificate.
-
-
If you need to save the private key and the certificate separately, run these commands to extract them:
-
To extract the private key:
CODEopenssl pkey -in output.pem -out private-key.pem -
To extract the certificate:
CODEopenssl x509 -in output.pem -out certificate.pem
-
-
-
Upload the client certificate using the method that matches your certificate:
-
If your certificate has separate files for its public key and private key, select the Upload Public Key tab and drag the public key file into the widget. Then select Upload Private Key and drag the private key file into the widget.
-
If your certificate is a combined file containing both its public and private keys, select the Upload Combined Key tab and drag the combined file into the widget.
-
-
If the combined file or private key that you uploaded in the previous step was encrypted, you must paste its decryption password into the Private key password field. Splunk Synthetics uses this password to open the file once; it does not retain your decryption password.
-
(Optional) In the Description field, enter a description to explain the purpose of the variable for future reference. A description is particularly helpful when you conceal the variable.
-
Select Add.
The client certificate is securely stored in the Splunk Synthetics database in an encrypted format.
Step 2: Configure your private runner
-
Use the tmpfs mount command (or similar) to mount the following folders which are used by the private runner to store the client certificate temporarily while it's running a test:
-
/tmpfs/certificates (used during uptime and API tests)
-
/home/geppetto/.pki (used during browser tests)
Using the tmpfs file system for these folders helps you to avoid storing the client certificates on the instance disk. By not storing the certificates on disk you avoid accidentally including them in a disk drive backup if one were to occur while a test is running.
-
-
If your private runner is on Docker, add the following environment variable to your docker run command:
CODE-e "ENABLE_CLIENT_CERTS=true" -
If your private runner is on Docker Compose, add the following environment variable to your docker-compose.yml:
CODEenvironment: ... ENABLE_CLIENT_CERTS: true
Step 3: Configure your test to reference the CERT variable
- Browser
-
Note: Make sure that the domain of the selected certificate matches the domain of the page being tested
-
On the browser test’s configuration page, select the Advanced toggle.
-
Scroll down to the Security section.
-
Set the TLS/SSL validation toggle to On.
-
In the Certificate pull-down menu, select the
CERTglobal variable you created for the client certificate. For example,{{cert.Badssl_com-test2}}.
-
- Uptime (HTTP)
-
-
On the HTTP test’s configuration page, scroll down to the Security section.
-
Set the TLS/SSL validation toggle to On.
-
In the Certificate pull-down menu, select the
CERTglobal variable you created for the client certificate. For example,{{env.est1_base64_auth}}. To see the list of allCERTvariables, expand the pane on the right. -
Select Submit.
-
- API
-
You can add a client certificate to each API request that needs one. To do this, follow these steps:
-
On the API test’s configuration page, select an existing request in the test or select Add requests.
-
Expand the Request section.
-
Select Add request header.
-
In the Select certificate drop-down menu, select a
CERTvariable you've already created. For example,{{env.est1_base64_auth}}. To see the list of allCERTvariables, expand the pane on the right. -
Select Submit.
-
NTLM authentication
Configure your browser test with NTLM authentication.
NTLM (NT LAN Manager) is a challenge-response authentication protocol used in Windows environments. It allows browser tests to authenticate against web servers that require Windows credentials without needing special infrastructure.
NTLM authentication is supported on both public runners and private runners.
- Limitations
-
-
HTTP/2 not supported: NTLM requires a persistent TCP connection for the multi-step handshake. HTTP/2 multiplexing breaks this requirement. If your web server uses HTTP/2, NTLM authentication will fail. Ensure your server supports HTTP/1.1 fallback.
-
Browser tests only: NTLM authentication is not available for API or Uptime (HTTP) tests.
-
HAR capture: The initial 401 authentication response may not appear in the HAR file. The final authenticated response is captured normally.
-
-
A concealed global variable containing the username
-
A concealed global variable containing the password
-
The target website must use HTTP/1.1 (NTLM is not compatible with HTTP/2)
To configure a browser test with NTLM authentication:
- Create or edit a browser test.
- In the Advanced section, find the Authentication configuration.
- Enter your username in the format DOMAIN\username or username@domain.com
- Enter your password.
- Use concealed global variables for both username and password to keep credentials secure.
The Synthetics runner automatically passes these credentials to the Chromium browser, which handles the NTLM challenge-response handshake transparently.
Kerberos authentication
Configure your browser test with Kerberos authentication.
Kerberos is a ticket-based authentication protocol that uses a central key distribution center (KDC) to issue authentication tickets. It provides stronger security than NTLM but requires more infrastructure.
- Why Kerberos requires a private runner
- Kerberos authentication requires network access to your organization's Key Distribution Center (KDC), typically an Active Directory domain controller. Since the KDC is inside your organization's network and not accessible from the internet, public runners cannot reach it. Only private runners deployed within your network can access the KDC.
- Limitations
-
-
Private runner only: Kerberos cannot work on public runners because the KDC is not accessible from the internet.
-
Custom Docker image required: The standard Synthetics runner image does not include Kerberos client libraries.
-
Browser tests only: Kerberos authentication is not available for API or uptime (HTTP) tests.
-
Ticket expiration: Kerberos tickets expire (typically 8-24 hours). Ensure your runner has a mechanism to renew tickets before they expire.
-
Time synchronization: Clock skew between the runner and KDC must be less than 5 minutes. Configure NTP on your runner host.
-
Not officially supported as a custom build: Splunk supports the standard runner image. Custom images with Kerberos are a customer-managed configuration.
-
To use Kerberos authentication with a private runner, you need:
-
A private runner deployed within your network, with access to:
-
Your KDC (typically port 88/TCP and 88/UDP)
-
DNS servers that can resolve your Kerberos realm
-
-
A custom runner Docker image with Kerberos client libraries installed
-
A krb5.conf configuration file mapping your Kerberos realm to your KDC
-
Credentials for obtaining Kerberos tickets:
-
A keytab file (recommended for automated use), or
-
A username and password for
kinit
-
-
NTP synchronization: The runner's clock must be synchronized within 5 minutes of the KDC's clock