OIDC with Pocket ID, several problems #3028
Replies: 5 comments 2 replies
-
|
A note on the OIDC directory setup on the server side. There are two ways to configure an external OIDC directory:
v0.16.1 (releasing in the next few days) adds domain extraction from standard JWT claims ( |
Beta Was this translation helpful? Give feedback.
-
|
Just released: Stalwart Server v0.16.1Added
Fixed
Stalwart WebUI v1.0.1Added
Fixed
Stalwart CLI v1.0.1Fixed
|
Beta Was this translation helpful? Give feedback.
-
|
Unfortunately v0.16.1 didn't solve my issues. The directory was always configured as default. The first issues are completely in stalwart webui, there should be a way for the webui to get configured scopes and client id from the backend. Maybe /api/discover/xxxx can be extended. I worked around that by creating my own webui.zip If I stop the IDM container and restart stalwart, I get the following log messages: 2026-04-28T12:18:52Z ERROR Configuration build error (registry.build-error) source = "Directory", id = 302912829873192970, reason = "Network error: Discovery fetch failed: error sending request for url (https://xxxxxx/.well-known/openid-configuration)" → default directory is set P.S. the new domain extraction feature won't work with pocket id (and also kanidm) because the access token does not include the mentioned claims. |
Beta Was this translation helpful? Give feedback.
-
|
Stalwart v0.16.2 will fallback to the |
Beta Was this translation helpful? Give feedback.
-
|
I still have to create my own webui.zip with scopes and client_id, but it works now. Thank you! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Issue Description
I'm trying to use Pocket ID as OIDC Provider for Stalwart, but can't get it to work. Unfortunately recovery mode seems broken now, so I currently cant go back...
Expected Behavior
Actual Behavior
When setting directoryId to an external OIDC the old internal Bearer token is still in use. Stalwart tries to request userinfo from Pocket ID, which fails with HTTP 500.
userinfo is also requested after logging in with recovery admin, triggering the browser to display user/password window. No login possible.
After clearing the browser session/cookies I am correctly forwarded to Pocket ID, but get a "record not found" error. Probably because Pocket ID generates client ids itself but stalwart uses "stalwart-webui".
After changing the client_id parameter in the url and adding &scope=profile+email+openid, I am redirected back to stalwart, with the following error from stalwart:
"Token exchange failed: 404"
Pocket ID:
Apr 21 21:16:31 WRN Client not found app=pocket-id version=2.6.0 client=stalwart-webui
Apr 21 21:16:31 WRN Request with errors: Error #1: client not found
Reproduction Steps
Relevant Log Output
No response
Stalwart Version
v0.16.x
Installation Method
Docker
Database Backend
RocksDB
Blob Storage
RocksDB
Search Engine
Internal
Directory Backend
OIDC
Additional Context
No response
I acknowledge that:
traceand included relevant log output if applicable.Beta Was this translation helpful? Give feedback.
All reactions