Skip to content

fix: user delete for usernames containing "/" - #93

Open
ReuDa wants to merge 1 commit into
mainfrom
fix/user-remove-username-query
Open

ReuDa wants to merge 1 commit into
mainfrom
fix/user-remove-username-query

Conversation

@ReuDa

@ReuDa ReuDa commented Oct 27, 2026

Copy link
Copy Markdown
Member

BusinessMap: https://steadybitgmbh.kanbanize.com/ctrl_board/2/cards/26888
Platform: https://github.com/steadybit/platform/pull/2208

Merge only after the platform release that ships steadybit/platform#2208. Until then api-compatibility fails, because the prod spec has no removeUserFromTenant.

Problem

Usernames are OIDC subjects verbatim, and ADFS subjects are base64, so they can contain /, + and =. user delete put the username into the path (DELETE /api/users/{username}). A / there splits the path, and an encoded %2F is rejected by the platform's firewall, so the platform answered 404.

Change

  • user delete calls the new DELETE /api/users?username=… (removeUserFromTenant). The platform keeps the path variant (removeUser) as deprecated, so the coverage check needs no entry for it.
  • The spec is a refresh from dev, plus the /api/users and /api/users/{username} paths taken from the platform branch, which is not on dev yet. Once the platform PR is merged, a plain fetch from dev should yield the same paths; re-running it before merging this is a good check.
  • TestDelete uses an ADFS-style username and asserts it arrives unchanged as the username query parameter; TestDeleteRefusals moves to the new route.
  • CHANGELOG entry.

Usernames are OIDC subjects verbatim, and ADFS subjects are base64, so
they can contain '/'. As a path segment such a username never reaches
DELETE /api/users/{username}; the platform answered 404. user delete now
calls DELETE /api/users?username= (removeUserFromTenant), which the
platform adds and which deprecates the path variant.

The spec is dev's plus the /api/users paths of steadybit/platform#2208,
which is not on dev yet.
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