You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
OCM: owner/sender sent to remote providers contain the OIDC issuer URL when an external IdP is used (breaks Nextcloud receivers) #3783
With an external OIDC provider (Keycloak, OC_OIDC_ISSUER=https://idp.example.org/realms/example, OC_EXCLUDE_RUN_SERVICES=idp), outgoing OCM shares carry owner and sender with the issuer URL inside the identifier:
LocalUserFederatedID (pkg/ocm/user) appends the user's IdP to the opaque id whenever it differs from the provider domain. With an external IdP the IdP is the issuer URL (it is also persisted per node as user.oc.owner.idp). Nextcloud splits a cloud id at the last @ before the first : or /, i.e. at the first@ here, and derives the remote server https://idp.example.org/realms/example@cloud.example.org/. Discovery fails and the share is unusable.
The OCM address format is <identifier>@<fqdn> without scheme. This looks related to #3262 and opencloud-eu/reva#774 / #3563 (normalising accepted-user ids on the invite handshake), but this report is about the owner and sender of outgoing shares (CreateOCMShare).
Steps to reproduce
OpenCloud 7.2.4 with an external IdP as above, OC_ENABLE_OCM=true, ocmproviders.json trusting a Nextcloud 35.0.2 (Contacts app 8.9.2, OCM invites enabled).
POST /sciencemesh/generate-invite, accept the invitation on the Nextcloud side – works.
Share a folder with the federated user via POST /graph/v1beta1/drives/{drive}/items/{item}/invite (role "Can edit") – returns 200.
On Nextcloud, list the pending remote share.
Expected behavior
Owner and sender are sent as <uuid>@cloud.example.org (no scheme, no issuer path), independent of the IdP in use.
Setting USERS_IDP_URL, GROUPS_IDP_URL and AUTH_BASIC_IDP_URL to the bare domain does not help for existing data, because the issuer is stored on every node.
Test only: after rewriting user.oc.owner.idp of the shared folder and the space root to cloud.example.org, Nextcloud received <uuid>@cloud.example.org and discovery worked. So the identifier format is the only cause of this step.
Suggestion: when building federated ids, use only the host of the IdP or always send <opaque>@<provider_domain>, and map back on incoming requests.
Activity