I’m facing issues with the Forced User Mode in OWASP ZAP for two different applications I am testing. These applications use different authentication methods: AWS Cognito (via a custom authentication flow) and SAML-based authentication. Below are the details for each scenario:
AWS Cognito (Application 1):
SAML-based Authentication (Application 2):
Steps I’ve Followed for Both Applications:
Questions:
I'm currently working with ZAP (Zed Attack Proxy) for performing authentication tests and scans on two web applications, each using different authentication mechanisms. While forced user mode works fine for one application (App 1 using SAML), it's not working for the other application (App 2 using AWS Cognito). Here's the detailed process I am following for setting up the scan, along with the issues I'm encountering:
Steps to Perform ZAP Scan:Opening ZAP Desktop Application
Persist Session
Authentication Tester Setup
Authentication Tester Passes
Context File Creation and Update
Returning to Main Screen and Manual Exploration
Login and Logout Actions
Enabling Forced User Mode
Manual Exploration Again
After following all the steps above, when the application is opened again, it should automatically log in using the credentials from the context file due to the enabled Forced User Mode. However, the login does not occur automatically for one of the applications.
Applications and Authentication Mechanisms:App 1 – SAML-based Authentication:
App 2 – AWS Cognito Authentication:
Session Handling in AWS Cognito
Custom Authentication Flow in ZAP
Automatic Login Behavior for Multi-Step Authentication
Browser Configuration in ZAP