Skip to content

fix(security): require authentication for the credential check endpoint#323

Open
Isaries wants to merge 1 commit into
WISE-Community:developfrom
Isaries:fix/check-authentication-endpoint
Open

fix(security): require authentication for the credential check endpoint#323
Isaries wants to merge 1 commit into
WISE-Community:developfrom
Isaries:fix/check-authentication-endpoint

Conversation

@Isaries

@Isaries Isaries commented Jul 6, 2026

Copy link
Copy Markdown

Summary

The credential check endpoint required no authentication and always returned the account id and real name for any valid username, even when the password was wrong. This let anyone harvest user ids and real names by probing usernames. This requires authentication and only returns the identity fields once the correct password has been provided.

Changes

  • Add @Secured("ROLE_USER") to the credential check method.
  • Only include userId, username, firstName and lastName in the response when the password is valid.

Testing

  • Builds on JDK 17 (mvnw package).
  • The only caller in WISE-Client reads those identity fields only on a successful check, so trimming them on failure does not affect the client.

The endpoint that verifies a username and password was reachable without
authentication and returned the account's id and real name for any valid
username, letting an anonymous caller brute-force passwords and harvest
user ids and real names by probing usernames.

Require an authenticated user, and only return the account id and name
after the correct password has been supplied. The team sign-in flow, the
only caller, already runs in an authenticated session and reads those
fields only after a successful check.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant