Repository navigation
Closed
Copy link
Labels
Priority:p2-highHigh priority
Description
Trying login to latest server, deployed via "docker compose" using keycloak as IDP (according to https://docs.opencloud.eu/docs/admin/configuration/authentication-and-user-management/keycloak), fails with "Malformed server configuration" error.
Client version: OpenCloud release version 1.0.0 (98dd03e06)
Steps to reproduce:
- Setup a new connection e.g. https://demo.opencloud.eu
- Connect
- Login using the (test) credentials
- Once redirected from IDP back to client, the error is shown.
Login via web and iOS client to the same instance (demo.opencloud.eu) works fine.
Server logs from another test instance contain:
opencloud-1 | {"level":"info","service":"storage-system","host.name":"3f524f9bb0c7","pkg":"rgrpc","traceid":"6de567771c18b659bc350c4447c22473","time":"2025-10-06T13:42:26Z","line":"github.com/opencloud-eu/reva/[email protected]/internal/grpc/services/authprovider/authprovider.go:146","message":"user idp:\"internal\" opaque_id:\"90245829-6f2e-4235-9a3e-83d66d576676\" type:USER_TYPE_PRIMARY authenticated"}
opencloud-1 | {"level":"info","service":"proxy","proto":"HTTP/1.1","request-id":"aefaf177-5be7-42a7-aad6-9c910e5bd3d6","traceid":"e4c67ee036d2f2161485111fb3e54d3a","remote-addr":"80.139.15.167","method":"GET","status":200,"path":"/.well-known/webfinger","duration":4.008038,"bytes":162,"time":"2025-10-06T13:43:21Z","line":"github.com/opencloud-eu/opencloud/services/proxy/pkg/middleware/accesslog.go:34","message":"access-log"}
keycloak-1 | 2025-10-06 13:43:22,217 WARN [org.keycloak.services] (executor-thread-12) KC-SERVICES0101: Failed to verify remote host : 80.139.15.167
keycloak-1 | 2025-10-06 13:43:22,218 WARN [org.keycloak.services] (executor-thread-12) KC-SERVICES0099: Operation 'before register client' rejected. Policy 'Block Client Registration' rejected request to client-registration service. Details: Host not trusted.
keycloak-1 | 2025-10-06 13:43:22,221 WARN [org.keycloak.events] (executor-thread-12) type="CLIENT_REGISTER_ERROR", realmId="openCloud", realmName="openCloud", clientId="null", userId="null", ipAddress="80.139.15.167", error="not_allowed", client_registration_policy="Block Client Registration"
opencloud-1 | {"level":"info","service":"storage-system","host.name":"3f524f9bb0c7","pkg":"rgrpc","traceid":"b9e7eedaff68e1860dd92a2a51240f5b","time":"2025-10-06T13:43:26Z","line":"github.com/opencloud-eu/reva/[email protected]/internal/grpc/services/authprovider/authprovider.go:146","message":"user idp:\"internal\" opaque_id:\"90245829-6f2e-4235-9a3e-83d66d576676\" type:USER_TYPE_PRIMARY authenticated"}
ldap-server-1 | 68e3c78b.145516ad 0x7783b49fe6c0 conn=1083 fd=16 ACCEPT from IP=172.18.0.9:44898 (IP=0.0.0.0:1389)
ldap-server-1 | 68e3c78b.145d6b61 0x7783aeafd6c0 conn=1083 op=0 BIND dn="cn=admin,dc=opencloud,dc=eu" method=128
ldap-server-1 | 68e3c78b.145e6a95 0x7783aeafd6c0 conn=1083 op=0 BIND dn="cn=admin,dc=opencloud,dc=eu" mech=SIMPLE bind_ssf=0 ssf=0
ldap-server-1 | 68e3c78b.145fa564 0x7783aeafd6c0 conn=1083 op=0 RESULT tag=97 err=0 qtime=0.000019 etime=0.000216 text=
ldap-server-1 | 68e3c78b.146c422b 0x7783acdfa6c0 conn=1083 op=1 SRCH base="ou=users,dc=opencloud,dc=eu" scope=1 deref=3 filter="(&(entryUUID=2b609528-3703-1040-931f-7735e1834eea)(objectClass=inetOrgPerson))"
ldap-server-1 | 68e3c78b.146d2617 0x7783acdfa6c0 conn=1083 op=1 SRCH attr=entryUUID uid mail sn cn pwdChangedTime objectclass krb5PrincipalName createTimestamp modifyTimestamp
ldap-server-1 | 68e3c78b.1470e780 0x7783acdfa6c0 conn=1083 op=1 SEARCH RESULT tag=101 err=0 qtime=0.000027 etime=0.000397 nentries=1 text=
ldap-server-1 | 68e3c78b.147e126a 0x7783b49fe6c0 conn=1083 op=2 UNBIND
ldap-server-1 | 68e3c78b.14807083 0x7783b49fe6c0 conn=1083 fd=16 closed
ldap-server-1 | 68e3c78b.14eb5652 0x7783aeafd6c0 conn=1084 fd=16 ACCEPT from IP=172.18.0.9:44904 (IP=0.0.0.0:1389)
ldap-server-1 | 68e3c78b.14f141d9 0x7783acdfa6c0 conn=1084 op=0 BIND dn="uid=albert_einstein,ou=users,dc=opencloud,dc=eu" method=128
ldap-server-1 | 68e3c78b.14f35094 0x7783acdfa6c0 conn=1084 op=0 BIND dn="uid=albert_einstein,ou=users,dc=opencloud,dc=eu" mech=SIMPLE bind_ssf=0 ssf=0
ldap-server-1 | 68e3c78b.14f4e9aa 0x7783acdfa6c0 conn=1084 op=0 RESULT tag=97 err=0 qtime=0.000018 etime=0.000300 text=
ldap-server-1 | 68e3c78b.14fbbd63 0x7783b49fe6c0 conn=1084 op=1 UNBIND
ldap-server-1 | 68e3c78b.14feee9e 0x7783b49fe6c0 conn=1084 fd=16 closed
opencloud-1 | {"level":"info","service":"proxy","proto":"HTTP/1.1","request-id":"35b6f291-96b8-4b5f-9615-333b7e7f75b9","traceid":"e7310ca211b8f1fe170b5319577954a2","remote-addr":"80.139.15.167","method":"GET","status":200,"path":"/.well-known/webfinger","duration":57.817902,"bytes":190,"time":"2025-10-06T13:43:40Z","line":"github.com/opencloud-eu/opencloud/services/proxy/pkg/middleware/accesslog.go:34","message":"access-log"}
opencloud-1 | {"level":"error","service":"proxy","error":"claim path 'uuid' not set or empty","time":"2025-10-06T13:43:40Z","line":"github.com/opencloud-eu/opencloud/services/proxy/pkg/middleware/account_resolver.go:120","message":"could not read user id claim"}
opencloud-1 | {"level":"info","service":"proxy","proto":"HTTP/1.1","request-id":"92147612-1998-465d-a429-7e77b791af12","traceid":"34989866ccd37dedf80476269bd97ef3","remote-addr":"80.139.15.167","method":"PROPFIND","status":500,"path":"/remote.php/dav/files/","duration":26.84778,"bytes":0,"time":"2025-10-06T13:43:40Z","line":"github.com/opencloud-eu/opencloud/services/proxy/pkg/middleware/accesslog.go:34","message":"access-log"}
According to the logs it looks like the client is trying to do DCR and fails. It should fall back to the public client id then.
Metadata
Metadata
Assignees
Labels
Priority:p2-highHigh priority
Type
Projects
- StatusShow more project fieldsDone
Activity
schweigisito commentedon Oct 22, 2025
The issue does not happen if the built-in IDP is used.
schweigisito commentedon Oct 22, 2025
Meanwhile I have setup an OC instance using an external Keycloak with autoprovisioning with latest compose stack. All clients (web, android and ios) work correctly.
fix(auth): handle empty client secret and honor OIDC methods
zerox80 commentedon Oct 23, 2025
opencloud-eu/android@49a2374
Should fix it, can u try it out? Try to build it wiht Android Studio please.
zerox80 commentedon Oct 24, 2025
Das problem liegt am backend von opencloud
die android app ruft nach der keycloak anmeldung /ocs/v2.php/cloud/user auf, bekommt dort vom demo backend einen http 500 und wandelt das per RemoteOperationResult.ResultCode.INSTANCE_NOT_CONFIGURED in die Meldung "malformed server configuration" um
Auf Android seite läuft der flow korrekt : Login -> Token -> UserInfo
Das problem liegt wahrscheinlich im Backend / Proxy (z.b falscher OIDC claim oder fehlende Machine Auth Konfiguration) nicht im code der App
Dass es bei weboberfläche klappt: Die Weboberfläche geht zwar auch über denselben Proxy, ruft aber in ihrem normalen Startpfad keine OCS-User-Info ab. Sie lebt mit den Session claims im Browser und spricht vor allem WebDAV/Graph/Spaces, deshalb merkt man dort von der fehlerhaften OCS konfiguration nichts
schweigisito commentedon Oct 24, 2025
The problem is that the generated token for the
OpenCloudAndroidclient doesn't get auuidattribute, while theOpenCloudIOSclient gets one:iOS
Android
And finally the server throws:
schweigisito commentedon Oct 24, 2025
Found the issue. The ClientScope of
OpenCloudAndroidmisses theOpenCloudUnique_IDrole.https://github.com/opencloud-eu/opencloud/blob/main/devtools/deployments/opencloud_full/config/keycloak/opencloud-realm.dist.json#L665
fix: fix #122 -OIDC login fails with "malformed server configuration"
fix: fix #122 - OIDC login fails with "malformed server configuration"
fix: fix #122 - OIDC login fails with "malformed server configuration"
zerox80 commentedon Oct 24, 2025
damn well done!! so it's a backend issue as i assumed, glad u found a fix.
fix: fix #122 - OIDC login fails with "malformed server configuration"