Skip to content

feat(ocm): add wayf specific /discover and /federations endpoints to sciencemesh package - #5385

Merged
glpatcern merged 9 commits into
cs3org:masterfrom
MahdiBaghbani:reva/feature-ocm-wayf
Nov 7, 2025
Merged

glpatcern merged 9 commits into
cs3org:masterfrom
MahdiBaghbani:reva/feature-ocm-wayf

Conversation

@MahdiBaghbani

Copy link
Copy Markdown
Member

This PR is a part of cs3org/OCM-STA#1

Description

This PR implements WAYF (Where Are You From) specific discovery endpoints for the ScienceMesh package, enabling dynamic OCM provider discovery and federation management.

Technical

Things I've added to Reva

  • /sciencemesh/federations endpoint: Lists available federations and their associated servers
  • /sciencemesh/federations endpoint: Enables active discovery of OCM providers and their capabilities
  • Automatic InviteAcceptDialog discovery: Dynamically retrieves invitation handling URLs from remote providers
  • Federation configuration support: Loads federation data from configurable JSON files

Code changes

  • WAYF Handler internal/http/services/sciencemesh/wayf.go: Core logic for federation management and provider discovery
  • Updated routing internal/http/services/sciencemesh/sciencemesh.go: Added new endpoints and configuration options
  • OCM Discovery 1.2 compliance internal/http/services/wellknown/ocm.go: Changed the default path of InviteAcceptDialog for the new GUI chnages

@MahdiBaghbani MahdiBaghbani changed the title feat(ocm): add wayf specific /discover and /federations endpoint to sciencemesh package feat(ocm): add wayf specific /discover and /federations endpoints to sciencemesh package Oct 26, 2025
Signed-off-by: Mahdi Baghbani <[email protected]>

@glpatcern glpatcern left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this contribution, very good, just a couple of comments

Comment thread internal/http/services/wellknown/ocm.go Resolved
Comment thread internal/http/services/wellknown/ocm.go Resolved
glpatcern and others added 5 commits October 31, 2025 12:28
Co-authored-by: Jörn Friedrich Dreyer <[email protected]>
Signed-off-by: Mahdi Baghbani <[email protected]>
Instead of creating a client each time a function is called, create client once

Signed-off-by: Mahdi Baghbani <[email protected]>
@glpatcern recommendations
moved types to spec.go
used directory urls instead of a file

Signed-off-by: Mahdi Baghbani <[email protected]>

@glpatcern glpatcern left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned, this is all good to go to QA except for a mini fix you could do

as per @glpatcern recommendations

Also return 404 if the remote EFSS doesn't provide an
inviteAcceptDialog

Signed-off-by: Mahdi Baghbani <[email protected]>

@glpatcern glpatcern left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, looking forward to the corresponding web frontend code!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants