View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0006120 | SOGo | Backend Calendar | public | 2025-05-05 07:31 | 2025-07-04 13:48 |
Reporter | dgeo | Assigned To | qhivert | ||
Priority | normal | Severity | minor | Reproducibility | sometimes |
Status | feedback | Resolution | open | ||
Platform | sogo 5.12.1 | OS | FreeBSD | OS Version | 14.2 |
Product Version | 5.12.1 | ||||
Summary | 0006120: openid broken | ||||
Description | unable to parse SOGoOpenIdConfigUrl On login: client get a 501 code Server log: The json is valid, and contains a valid "authorization_endpoint"… | ||||
Steps To Reproduce | Using apereo CAS server with openid Connect support (6.6.15 here) sogo config: | ||||
Tags | No tags attached. | ||||
log file unmodified attached sogo.log (4,276 bytes)
May 5 09:39:45 tsogo1 sogod[50784]: [21717]: [ERROR] <0x0x401439592228[GSCBufferString]> json parser: Expected value while parsing array, attempting once more after unescaping... May 5 09:39:45 tsogo1 sogod[50784]: [21717]: [ERROR] <0x0x401439592228[GSCBufferString]> total failure. Original string is: e0c^M May 5 09:39:45 tsogo1 sogod[50784]: {"issuer":"https://auth.test.ec-m.fr/oidc","scopes_supported":["openid","profile","email","address","phone","offline_access","client_configuration_scope","uma_authorization","uma_protection","client_registration_scope"],"response_types_supported":["code","token","id_token","id_token token","device_code"],"response_modes_supported":["query","fragment","form_post"],"subject_types_supported":["public","pairwise"],"claim_types_supported":["normal"],"claims_supported":["sub","acr","name","preferred_username","family_name","given_name","middle_name","profile","picture","nickname","website","zoneinfo","locale","updated_at","birthdate","email","email_verified","phone_number","phone_number_verified","address","gender"],"grant_types_supported":["authorization_code","password","client_credentials","refresh_token","urn:ietf:params:oauth:grant-type:uma-ticket"],"id_token_signing_alg_values_supported":["none","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512","HS256","HS384","HS512"],"dpop_signing_alg_values_supported":["RS256","RS384","RS512","ES256","ES384","ES512"],"id_token_encryption_alg_values_supported":["RSA1_5","RSA-OAEP","RSA-OAEP-256","A128KW","A192KW","A256KW","A128GCMKW","A192GCMKW","A256GCMKW","ECDH-ES","ECDH-ES+A128KW","ECDH-ES+A192KW","ECDH-ES+A256KW"],"id_token_encryption_enc_values_supported":["A128CBC-HS256","A192CBC-HS384","A256CBC-HS512","A128GCM","A192GCM","A256GCM"],"userinfo_signing_alg_values_supported":["none","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512","HS256","HS384","HS512"],"userinfo_encryption_alg_values_supported":["RSA1_5","RSA-OAEP","RSA-OAEP-256","A128KW","A192KW","A256KW","A128GCMKW","A192GCMKW","A256GCMKW","ECDH-ES","ECDH-ES+A128KW","ECDH-ES+A192KW","ECDH-ES+A256KW"],"userinfo_encryption_enc_values_supported":["A128CBC-HS256","A192CBC-HS384","A256CBC-HS512","A128GCM","A192GCM","A256GCM"],"acr_values_supported":["mfa-simple"],"request_object_signing_alg_values_supported":["none","RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512","HS256","HS384","HS512"],"request_object_encryption_alg_values_supported":["RSA1_5","RSA-OAEP","RSA-OAEP-256","A128KW","A192KW","A256KW","A128GCMKW","A192GCMKW","A256GCMKW","ECDH-ES","ECDH-ES+A128KW","ECDH-ES+A192KW","ECDH-ES+A256KW"],"request_object_encryption_enc_values_supported":["A128CBC-HS256","A192CBC-HS384","A256CBC-HS512","A128GCM","A192GCM","A256GCM"],"introspection_endpoint_auth_methods_supported":["client_secret_basic"],"token_endpoint_auth_methods_supported":["client_secret_basic","client_secret_post","client_secret_jwt","private_key_jwt"],"code_challenge_methods_supported":["plain","S256"],"prompt_values_supported":["none","login","consent"],"claims_parameter_supported":true,"request_uri_parameter_supported":true,"request_parameter_supported":true,"backchannel_logout_supported":true,"frontchannel_logout_supported":true,"pushed_authorization_request_endpoint":"https://auth.test.ec-m.fr/oidc/oidcPushAuthorize","backchannel_logout_session_supported":true,"frontchannel_logout_session_supported":true,"authorization_endpoint":"https://auth.test.ec-m.fr/oidc/oidcAuthorize","token_endpoint":"https://auth.test.ec-m.fr/oidc/oidcAccessToken","userinfo_endpoint":"https://auth.test.ec-m.fr/oidc/oidcProfile","registration_endpoint":"https://auth.test.ec-m.fr/oidc/register","end_session_endpoint":"https://auth.test.ec-m.fr/oidc/oidcLogout","introspection_endpoint":"https://auth.test.ec-m.fr/oidc/introspect","revocation_endpoint":"https://auth.test.ec-m.fr/oidc/revoke","jwks_uri":"https://auth.test.ec-m.fr/oidc/jwks"}^M May 5 09:39:45 tsogo1 sogod[50784]: 0^M May 5 09:39:45 tsogo1 sogod[50784]: ^M May 5 09:39:45 tsogo1 sogod[50784]: May 5 09:39:45 tsogo1 sogod[50784]: [21717:102018] EXCEPTION: <NSException: 0x4014390b11c8> NAME:NSInvalidArgumentException REASON:Tried to add nil value for key 'authorization_endpoint' to dictionary INFO:{} |
|
Hello, found the problem. This header, deprecated for HTTP/2.0 (https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Transfer-Encoding) is not supported by sogo. The data received for the endpoint in this transfer mode is: As sogo don't support this, he thinks that the size of chunk is actual data meaning it will read something like this I see that your apereo CAs 6.5.15 has reach end of life (https://apereo.github.io/cas/developer/Maintenance-Policy.html#eol-schedule) |
|
Thank you, I'll try, but not very quickly… |
|
Hi Just FYI I have the same issue with Authentik and Traefik as reverse proxy (both using the latest version): Checking with curl (limiting it to HTTP 1.1) chunking is used: I suspect there will be many other reverseproxies using this encoding. Would it be possible for Sogo to use HTTP/2 instead? |
|
Hello, However, before putting this in the nightly, I want to make a custom package for you to try it and confirm/deny it works better now. |
|
I currently use Sogo from the RHEL8 nightly repo (x64). I could test the update. |
|
OK first remove sogo and change the repo url to: |
|
Here we use FreeBSD and locally-compiled packages, I just need source patches to test :) |
|
Hello, this is this branch -> https://github.com/Alinto/sogo/tree/openid_curl no change in SOPE so still master. |
|
I've updated the branch and package to show more logs with the server response |
|
I just tested: this bug is patched for us (even if oidc login is still not OK, but I have to check the IDP side on this other problem…) Thank you ! |
|
Great, let me know if there is other problems. I'll wait for some other feedback before pushing this into the nightly |
|
Thank you, the OIDC login does work now. However there seems to be strange behavior at first: The headers show: The issue could be related to the token endpoint which cannot be queried: Content: Note: This happens like 4 times in a row, after that the logs show a token being correctly issued and the login succeeding with the correct user info. Additionally there seems to be an error updating rhe OIDC session table: |
|
For the OIDC table see https://bugs.sogo.nu/view.php?id=6122#c18218 I will take a look for the first point. |
|
Hello, @sogouser123 Aldo @dgeo if you can rebuild and check that everything's ok. |
|
Sorry for the delay. Tested it with v5.12.2. Works fine now. No errors observed. |
|
I've run some more tests and observed another potential issue: When logging in with OIDC it seems the first request is not using the correct auth mechanism, it always tries to use LDAP/PLAIN: This fails and dovecot then accepts the login when trying xoauth2. The problem is the user gets locked out on LDAP after a few retries. Is this something sogo can change or is this a configuration error? Dovecot is configured as follows: With the OIDC config beeing the following: |
|
Yes dovecot does all the passdb configured. I'm assuming you have a ldap configured somewhere in your dovecot files. I'm not sure if this is possible and how to force dovecot to only make the proper passdb. You should ask their support -> https://www.dovecot.org/support |
|
Yes I have LDAP configured. I still need LDAP to authenticate Cal/CardDav connections which use regular username/pw auth. |
|
It doesn't. But dovecot will still try to do passdb ldap even with an xoauth2. I'm not sure why. From what I understand, dovecot will try each passdb until success. |
|
I managed to fix the issue with the ldap logins with a login mechanism restriction on the passdb: This works as expected and logins are using the correct passdb. Cal/CardDav use plain and Web uses oauth2. Dovecot Logs This causes the ActiveSync to fail. It would be nice if sogo could choose the correct auth mechanism with ActiveSync as it does with Cal/CardDav. Additionally I observed a DB error when logging in: The c_value column has a length of 4096 in my DB. The session seems to work however. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2025-05-05 07:31 | dgeo | New Issue | |
2025-05-05 07:40 | dgeo | Note Added: 0018205 | |
2025-05-05 07:40 | dgeo | File Added: sogo.log | |
2025-05-05 07:52 | qhivert | Steps to Reproduce Updated | |
2025-05-05 07:53 | qhivert | Assigned To | => qhivert |
2025-05-05 07:53 | qhivert | Status | new => assigned |
2025-05-05 09:07 | qhivert | Note Added: 0018206 | |
2025-05-05 09:07 | qhivert | Status | assigned => feedback |
2025-05-05 13:49 | dgeo | Note Added: 0018207 | |
2025-05-05 13:49 | dgeo | Status | feedback => assigned |
2025-05-23 14:52 | sogouser123 | Note Added: 0018220 | |
2025-05-26 15:39 | qhivert | Note Added: 0018221 | |
2025-05-26 15:39 | qhivert | Status | assigned => feedback |
2025-05-26 15:44 | sogouser123 | Note Added: 0018222 | |
2025-05-26 15:59 | qhivert | Note Added: 0018223 | |
2025-05-26 15:59 | qhivert | Note Edited: 0018223 | |
2025-05-27 07:37 | dgeo | Note Added: 0018226 | |
2025-05-27 07:37 | dgeo | Status | feedback => assigned |
2025-05-27 07:44 | qhivert | Note Added: 0018227 | |
2025-05-27 07:45 | qhivert | Status | assigned => feedback |
2025-05-27 09:15 | qhivert | Note Added: 0018230 | |
2025-05-27 13:24 | dgeo | Note Added: 0018231 | |
2025-05-27 13:24 | dgeo | Status | feedback => assigned |
2025-05-27 13:41 | qhivert | Note Added: 0018232 | |
2025-05-27 13:41 | qhivert | Status | assigned => feedback |
2025-05-27 15:01 | sogouser123 | Note Added: 0018233 | |
2025-05-27 15:08 | qhivert | Note Added: 0018234 | |
2025-06-11 08:25 | qhivert | Note Added: 0018255 | |
2025-06-11 08:25 | qhivert | Status | feedback => assigned |
2025-06-11 08:25 | qhivert | Status | assigned => feedback |
2025-06-11 08:32 | qhivert | Note Edited: 0018255 | |
2025-06-27 15:21 | sogouser123 | Note Added: 0018289 | |
2025-06-30 12:03 | sogouser123 | Note Added: 0018290 | |
2025-06-30 13:44 | qhivert | Note Added: 0018291 | |
2025-06-30 13:50 | sogouser123 | Note Added: 0018292 | |
2025-06-30 14:48 | qhivert | Note Added: 0018293 | |
2025-07-04 13:48 | sogouser123 | Note Added: 0018294 |