Common headers or authentication settings can be configured in an environment and applied to all requests within a test. When specified, default headers and auth settings will be automatically included in each request step for your test. Variables can be used, but will only be evaluated at the beginning of the test run, before the first step is executed.
Default Headers
Default headers are useful for specifying header values like user agents, content types, and OAuth 2.0 bearer tokens that apply to all requests within a test. If a header is specified in an environment but also a request, the request-specific value will take precedence when the test is executed. This setting is also inherited from a parent environment if specified, but can be overridden on a per-test basis.
Client Certificates
Custom client certificates can be stored to be used by requests within a test.
Note: Client Certificates file or the Key file must be in PEM format.
You can create:
- A PEM-encoded, password protected certificate file that you upload. See Upload Certificate Files.
- A PEM-formatted, non password protected certificate that you paste into the text area. See Add Certificate Contents via Text.
Client Certificate support requires a qualifying plan. Contact sales to get started.
Note: To use this feature to test internal APIs, you must download the latest version of the radar agent.
Upload Certificate Files
We support password-protected encrypted client certificates with the following specifics:
- A PEM-encoded certificate file. The max file size is 1 MB.
- A PEM private key file for the certificate (optional). The max file size is 1 MB.
- A Passphrase for the certificate (optional). The max length is 128 characters.
Note: For an even higher level of security, you can use a Team Secret or a Bucket Secret for the Passphrase.
Follow these steps:
- In API Monitoring, select one of your existing tests.
- From the menu on the left, select Editor.
- Expand Test Settings.
- Click Authentication.
- In the Client Certificates section, select Upload File.
- Upload a certificate file. Click Choose File.
Note: The max file size is 1 MB.
- (Optional) Upload a key file. Click Choose File.
Note: The max file size is 1 MB.
If you choose to upload a key file, your certificate has to be already uploaded.
- (Optional) Enter a passphrase.
If you choose to enter a passphrase, your certificate and key have to be already uploaded. - Click Upload Certificate.
You are now able to add the certificate to requests in your test by selecting Add Client Certificate under the Authentication options of an individual request or environment.
To delete the certificate, go to Test Settings, Authentication, Client Certificates section and click the delete icon. The certificate, key and passphrase will be deleted. Clear authentication by clicking Clear Default Authentication under Authentication Methods, if enabled.
Add Certificate Contents via Text
The text needs to be a PEM-formatted certificate which has the CERTIFICATE section, and PRIVATE KEY, both are required.
Follow these steps:
- In API Monitoring, select one of your existing tests.
- From the menu on the left, select Editor.
- Expand Test Settings.
- Click Authentication.
- In the Client Certificates section, select Add Certificates Via Text.
- Copy and paste the contents of a certificate.
Example:
-----BEGIN CERTIFICATE-----CERTIFICATETXTCOMESHERE-----END CERTIFICATE-----\n-----BEGIN PRIVATE KEY-----PRIVATEKEYCONTENTSCOMESHERE-----END PRIVATE KEY----- - Click Save.
Once saved, you will be able to add the certificate to requests in your test by selecting Add Client Certificate under the Authentication options of an individual request or environment.
To delete the certificate, go to Test Settings, Authentication, Client Certificates section and delete the certificate from the text box. Clear authentication by clicking Clear Default Authentication under Authentication Methods, if enabled.
0 Comments