Issue Description
When using OIDC directory, it is not possible to impersonate users in Web UI with <target>%<impersonator> request (<target> and <impersonator> being emails addresses of user and admin with impersonate permission respectively), as specified in documentation (Administrators | Stalwart).
Expected Behavior
Web UI should first parse the “username” for impersonation request, and only send impersonator’s username/email to OIDC provider.
Actual Behavior
Full request, [email protected]%[email protected], is sent to OIDC provider as username; any login attempt fails since such user doesn’t exist.
Reproduction Steps
- Configure Stalwart to use OIDC provider.
- Give administrator role or specifically
impersonatepermission to user A ([email protected]). - Attempt to impersonate user B (
[email protected]) by entering[email protected]%[email protected]as username in Web UI sign-in page.
Stalwart Version
v0.16.x
Installation Method
Docker
Database Backend
PostgreSQL
Blob Storage
Filesystem
Search Engine
Elasticsearch
Directory Backend
OIDC
Additional Context
We use Keycloak 26.6.2 Docker container as our OIDC provider.
I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.
on
I have searched this support forum (open and closed topics) and confirm this is not a duplicate.
on
I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.
on