Skip to content

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

Open
MahdiBaghbani wants to merge 15 commits intoowncloud:stable-7.1from
MahdiBaghbani:feature-ocm-wayf
Open

feat(ocm): add wayf specific /discover and /federations endpoints to sciencemesh package#432
MahdiBaghbani wants to merge 15 commits intoowncloud:stable-7.1from
MahdiBaghbani:feature-ocm-wayf

Conversation

@MahdiBaghbani
Copy link

@MahdiBaghbani MahdiBaghbani commented Oct 26, 2025

Although this PR is referenced under cs3org/OCM-STA#1, it is not directly part of the STA funded work. However, since the changes are closely related and beneficial to OCM, I decided to port them here as well for consistency.

This PR also follows the commit history from this PR #429

Description

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

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
  • Legacy endpoint fallback: Maintains compatibility with older OCM discovery implementations

Code changes

  • New OCM Client internal/http/services/ocmd/client.go: HTTP client for OCM provider discovery with timeout and TLS configuration
  • 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: Updated API version and added InviteAcceptDialog support
  • Example configuration examples/ocmd/federations.demo.json: Sample federations file demonstrating the expected format

@MahdiBaghbani MahdiBaghbani force-pushed the feature-ocm-wayf branch 2 times, most recently from dce786a to 523c62a Compare October 26, 2025 21:42
@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
@MahdiBaghbani MahdiBaghbani marked this pull request as draft October 28, 2025 13:15
2403905 and others added 8 commits October 30, 2025 11:01
…sciencemesh package

update(ocm): OCM discovery to 1.2

feat(ocm): InviteAcceptDialog to OCM Discovery

feat(ocm): add new ocm client to ocmd package for active discovery

add: federations.json example

add: changelog

Signed-off-by: Mahdi Baghbani <mahdi-baghbani@azadehafzar.io>
Signed-off-by: Mahdi Baghbani <mahdi-baghbani@azadehafzar.io>
Co-authored-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Mahdi Baghbani <mahdi-baghbani@azadehafzar.io>
Instead of creating a client each time a function is called, create client once

Signed-off-by: Mahdi Baghbani <mahdi-baghbani@azadehafzar.io>
Co-authored-by: Giuseppe Lo Presti <giuseppe.lopresti@cern.ch>
Signed-off-by: Mahdi Baghbani <mahdi-baghbani@azadehafzar.io>
@glpatcern recommendations
moved types to spec.go
used directory urls instead of a file

Signed-off-by: Mahdi Baghbani <mahdi-baghbani@azadehafzar.io>
as per @glpatcern recommendations

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

Signed-off-by: Mahdi Baghbani <mahdi-baghbani@azadehafzar.io>
@MahdiBaghbani MahdiBaghbani marked this pull request as ready for review November 18, 2025 11:44
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.

2 participants