mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-06 09:13:19 +03:00
🐛 Bug Report: JWT+ID token breaks Proxmox OIDC auth #257
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @nervous-inhuman on GitHub.
Reproduction steps
When trying to use PocketID with Proxmox, the login/auth flow is broken
Repro:
Expected behavior
User should get authenticated successfuly.
Actual Behavior
Configuration:

Error when trying to log-in using OIDC after configuration:

From the Proxmox logs, you can see this error:
Which seems to come from here:
57b0477657/proxmox-openid/src/lib.rs (L214)and here:
https://github.com/ramosbugs/openidconnect-rs/blob/main/src/verification/mod.rs#L248
This was previously working, and only broke after the upgrade to Pocket ID 0.46.0.
Version and Environment
Pocket ID 0.46.0
Proxmox 8.4.1
Log Output
No response
@halictuz commented on GitHub:
It seems that I have the same issue.
{"error":"Failed to verify token claims. This issue may be temporary (60 seconds max).","trace":["Unsupported: unexpected or unsupported JWT typeID+JWT"]}and
{"error":"CSRF token invalid","trace":[]}which appears after refreshing the first site/error.
@ItalyPaleAle commented on GitHub:
Do we need to include a header type? I know it was done because of #405, otherwise the introspection endpoint would accept ID tokens too and not just access tokens.
What if we used a private header, not
typ? Since the consumer for that property is Pocket ID itself only, we may not need to rely on the standard properties.@stonith404 commented on GitHub:
@ItalyPaleAle It's not really necessary to add the type to the
typheader, but that's just a recommended method.If we don't use the
typheader, wouldn't it be better to store the type inside a claim instead of a header? Working with claims is much easier than working with headers in the Jwx library.@kmendell commented on GitHub:
The issue is the JWT Content-Type header does not seem to be supported by that client, The spec allows custom header types, but not all clients accept them. We will need to find a way to make this a Header type that the spec allows.
@kmendell commented on GitHub:
I think this should be as easy as just changing the TokenTypes to JWT but I need to test.
@404alex commented on GitHub:
For some reason, portainer was working fine for me... I don't have Proxmox, so can't test that. My version:
Portainer Business Edition 2.27.4 LTS@RR3US commented on GitHub:
Same version:
@RR3US commented on GitHub:
Having the same issue with Proxmox and Portainer.
Also using Outline but that login is still working.
@404alex commented on GitHub:
having same issue with stirling pdf. https://github.com/Stirling-Tools/Stirling-PDF. Was working fine before 0.46.0.
@tupcakes commented on GitHub:
is there a way to rollback to a previous version until this is fixed? I tried using the v0.45 tag, but it fails with:
@RR3US commented on GitHub:
It just says authentication failure. Where can I find detailed log?
@kmendell commented on GitHub:
@stonith404 Will create a quick fix for this sometime today i think, We were talking about it last night.
@RR3US commented on GitHub:
Still not working for me in v.0.47.0.
@stonith404 commented on GitHub:
This should be fixed in
v0.47.0.@kmendell commented on GitHub:
@RR3US Are you sure pocket id has updated? What are the logs from portainer?
@kmendell commented on GitHub:
Whats your username claim set to in portainer?
@kmendell commented on GitHub:
can you try fulling restarting portainer, and see if the same error happens?
@RR3US commented on GitHub:
ERR github.com/portainer/portainer-ee/api/oauth/oauth.go:48 > failed retrieving username | error="failed to extract username from oauth resource"@kmendell commented on GitHub:
I meant run
docker logs portainer -fand then try to sign in and see what the logs says sorry i should have clarified.@RR3US commented on GitHub:
You mean this one?
@RR3US commented on GitHub:
Already tried. full system reboot.
It is strange because my proxmox is working again. But portainer was also working before v0.45.0
@RR3US commented on GitHub:
I will try to spin up a new instance of PocketID tomorrow, see if it helps.