Login endpoint provides too much information when authentication fails with SAF provider
Open
Nobody has claimed this yet.
bug
Priority: High
size/S
V3
- Dominant language
- Java
- Stars
- 92
- Forks
- 81
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 46
Description
Describe the bug
Request:
http -a user:user post https://hostname.net:7554/gateway/api/v1/auth/login
Response - 401:
{
"messages": [
{
"messageAction": "Provide correct user name.",
"messageContent": "The platform returned error: ESRCH: The identity that was specified is not defined to the security product",
"messageKey": "org.zowe.apiml.security.platform.errno.ESRCH",
"messageNumber": "ZWEAT415E",
"messageReason": "The user name does not exist in the system.",
"messageType": "ERROR"
}
]
}
Expected behavior
401 stating that the credentials are invalid
Version:
v2.10
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 tracing the /gateway/api/v1/auth/login endpoint and the SAF-provider authentication failure handling. Inspect any existing login or authentication tests for the 401 response shape. Done means failed authentication returns only a generic invalid-credentials message rather than exposing the provider's identity or ESRCH details.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, authentication, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100