Skip to content

fix: Encode user ids and names as single URL path segments in UIF - #909

Open
lfrancke wants to merge 2 commits into
mainfrom
fix/uif-url-path-segments
Open

lfrancke wants to merge 2 commits into
mainfrom
fix/uif-url-path-segments

Conversation

@lfrancke

Copy link
Copy Markdown
Member

Description

The Keycloak and Entra backends joined request-supplied user ids and names onto the base URL as text, so /, ?, # and .. in them changed which URL was requested. It was all spec compliant but just not the expected behavior when we just want "simple" joining of URL segments. Both now append them as one percent-encoded path segment through append_path_segments, and the Keycloak backend sends the username as a query parameter.

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes

Author

  • Changes are OpenShift compatible
  • CRD changes approved
  • CRD documentation for all fields, following the style guide.
  • Helm chart can be installed and deployed operator works
  • Integration tests passed (for non trivial changes)
  • Changes need to be "offline" compatible
  • Links to generated (nightly) docs added
  • Release note snippet added

Reviewer

  • Code contains useful comments
  • Code contains useful logging statements
  • (Integration-)Test cases added
  • Documentation added or updated. Follows the style guide.
  • Changelog updated
  • Cargo.toml only contains references to git tags (not specific commits or branches)

Acceptance

  • Feature Tracker has been updated
  • Proper release label has been added
  • Links to generated (nightly) docs added
  • Release note snippet added
  • Add type/deprecation label & add to the deprecation schedule
  • Add type/experimental label & add to the experimental features tracker

The Keycloak and Entra backends joined request-supplied user ids and
names onto the base URL as text, so `/`, `?`, `#` and `..` in them
changed which URL was requested. Both now append them as one
percent-encoded path segment through `append_path_segments`, and the
Keycloak backend sends the username as a query parameter.

An empty, `.` or `..` segment and one containing a line break are
rejected with `400`, as the url crate would drop or strip them and look
up a different user.

A Keycloak `rootPath` without a trailing slash is now kept, which
`Url::join` dropped.
@lfrancke lfrancke self-assigned this Oct 22, 2026
@lfrancke lfrancke moved this to Development: Waiting for Review in Stackable Engineering Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Development: Waiting for Review

Development

Successfully merging this pull request may close these issues.

1 participant