🐛 Bug Report: Integration with EspoCRM fails due to missing KID in the jwks.json #475

Closed
opened 2025-10-08 00:10:18 +03:00 by OVERLORD · 1 comment
Owner

Originally created by @redispade on GitHub.

Reproduction steps

I added pocket-id as OIDC provider in EspoCRM. It authenticates the user but when returning to Espo then fails with a 500 error.
You can replicate this with your own selfhosted espocrm instance or reach out to me for testing.

Expected behavior

.well-known/jwks.json should have the KID value(but I don't know how exactly that works)

Actual Behavior

I enabled debugging in Espo and I get this:
[2024-10-08 11:11:05] CRITICAL: (0) Bad JWK value. :: GET /App/user :: /var/www/html/application/Espo/Core/Authentication/Jwt/Keys/Rsa.php(56)

which goes down to this line of code that checks if any of the values (KID or KTY) are missing
9613437895/application/Espo/Core/Authentication/Jwt/Keys/Rsa.php (L56)

I checked the json on my instance and indeed it's missing KID value(KTY is present as RSA)

Originally created by @redispade on GitHub. ### Reproduction steps I added pocket-id as OIDC provider in EspoCRM. It authenticates the user but when returning to Espo then fails with a 500 error. You can replicate this with your own selfhosted espocrm instance or reach out to me for testing. ### Expected behavior .well-known/jwks.json should have the KID value(but I don't know how exactly that works) ### Actual Behavior I enabled debugging in Espo and I get this: `[2024-10-08 11:11:05] CRITICAL: (0) Bad JWK value. :: GET /App/user :: /var/www/html/application/Espo/Core/Authentication/Jwt/Keys/Rsa.php(56)` which goes down to this line of code that checks if any of the values (KID or KTY) are missing https://github.com/espocrm/espocrm/blob/96134378955a47ef1359ec38e3c755eeeff9bc5f/application/Espo/Core/Authentication/Jwt/Keys/Rsa.php#L56 I checked the json on my instance and indeed it's missing KID value(KTY is present as RSA)
OVERLORD added the bug label 2025-10-08 00:10:18 +03:00
Author
Owner

@stonith404 commented on GitHub:

Thanks for reporting. This should be fixed in v0.8.1.

@stonith404 commented on GitHub: Thanks for reporting. This should be fixed in `v0.8.1`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pocket-id-pocket-id-1#475