Running Authenticated DAST Scans
SOOS currently supports 5 options of running authenticated DAST scans. Always make sure to properly protect the credentials used to authenticate by ensuring they are stored in a secure key store.
The examples below are specific to calling the Docker script directly, but are supported for all DAST CI/CD integrations.
To perform DAST scans against OAuth applications use the following parameters to allow SOOS to perform a request to get the access_token before executing the analysis.
To perform DAST scans for applications using bearer tokens, pass a valid bearer token using the --bearerToken parameter. This will pass “Authorization: Bearer <token>” on each request.
Do not include the “Bearer” text, only the token value.
To perform DAST scans for applications using non-bearer token authentication, such as custom authentication header/value, pass the custom header use the --requestHeaders parameter.
Single Header:
Multiple Headers:
To perform DAST scans for applications using cookie based authentication, use the --requestCookies parameter.
Single Cookie:
Multiple Cookies:
To perform DAST scans for applications that use form based authentication, use the following approaches to fill out and submit a login form before each test is performed.
For this type of authentication there are 3 login form variants that are can be configured through the parameter --authFormType.
Please note that forms that use a captcha as well as 2FA/MFA based workflows are not supported with this approach.
--authFormType=simple - all login related fields are displayed at once, on one form.
--authFormType=wait_for_password - the password field is only displayed once the username is provided.
--authFormType=multi_page- the password field is only displayed after the username has been entered and submit/next button has been clicked to navigate to a second form.
Parameter | Description |
---|---|
--authLoginURL | URL to the login page. |
--authFormType | Login form flow type simple, wait_for_password, or multi_page. |
--authUsername | The username that will be used to login (it will be used to populated the authUsernameFormField). |
--authUsernameField | The form field that will be populated with the authUsername value. |
--authPassword | The password that will be used to login (it will be used to populate the authPasswordField). |
--authPasswordField | The form field that will be populated with the authPassword value. |
--authSubmitField | The form element name/ID which is used to submit the form. |
--authSecondSubmitField | The second submit button element name/ID to use with multi_page login flows. |
--authDelayTime | The delay time (in seconds) to wait for the page to load after performing actions in the form. Use with wait_for_password and multi_page login flows. |
Example: