Redirects are not followed when using Form-based Authentication
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 15.8k
- Forks
- 2.6k
- Avg merge
- 13h 16m
- Merged PRs (30d)
- 17
Description
What steps will reproduce the problem?
- Choose a test site using redirects during authentication such as WebGoat
- Create a context with a Form-based Authentication method and a Cookie-based Session Management method
- Use the User Forced Mode to test authentication and session management
What is the expected output? What do you see instead?
In the ZAP history, we can see that the server sends a Set-Cookie header with a Location header. ZAP does not process the Location header. Authentication is not correctly performed.
What version of the product are you using?
2.4.3
Please provide any additional information below.
Proposing something to the user like a checkbox in the Authentication panel of Session Properties, allowing the Form-based authentication process to follow redirects, could maybe solve this issue.
Or should we change the current behaviour of Form-based authetication to automatically follow redirects ? (The user won't have the choice, then).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the flow with WebGoat, Form-based Authentication, Cookie-based Session Management, and User Forced Mode. Inspect the authentication panel and ZAP history to trace the Set-Cookie and Location headers. Done means authentication succeeds when the server responds with both headers, with the redirect behavior decided and covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- authentication, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100