zowe / zowe/api-layer

Login endpoint provides too much information when authentication fails with SAF provider

Open
#3,097 4 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.