Hello,
What do I have?
- I have a modern web application.
- A working Zest authentication Script.
- A working Zap Context that is properly configured as follows:
- Authentication : Script Based (using the above Zest script)
- Verification Strategy: Poll for a specific URL and check for correct logged in and logged out indicators
- Users : Username and Password
- Session Management: Cookie Based
So in forced user mode when I poll for the home URL of my website, I get a successful login into the website if I am logged out.
What is the problem ?
If there is a reset in Username or Password, since the Zest script and the ZAP context is hardcoded with username and password, I need to make changes everywhere. I don't need any other tokens, just the Username and Password.
What have I done currently?
For the Zest script I am using a variable for Username and Password and defining it at the start of the script and passing those variables as values to the Body of the Requests made in the Login POST request of the website URL.
What do I want to achieve?
I want to provide the Username and Password to the Zest Script variables defined at the start of the script and the Zap Context through an env file from outside as my final goal is to automate the entire scan process using either the automation framework or the ZAP API and integrate this tool into the website's CI/CD Pipeline.
How can I achieve this??
Why am I using a Zest Script?
That is coz my website has username and password on different pages and there are multiple redirects in between so it was recommended that I record a Zest Script for authentication.
Have I tried the authentication tester tool?
Yes, I have tried and it for some reason does not work well for my application even while giving the correct logged in and logged out indicators that work well with the above Zest script-based authentication context.
Thank You
Lax