ocis icon indicating copy to clipboard operation
ocis copied to clipboard

[QA] OCM: failing invite produces no readable error messge

Open jnweiger opened this issue 1 year ago • 3 comments

Describe the bug

A clear and concise description of what the bug is.

Steps to reproduce

Setup three machines with e.g.

env OCIS_DNSNAME=ocis1-DATE OCIS_VERSION=v6.4.0 ./deploy_ocis_bare_metal.sh
env OCIS_DNSNAME=ocis2-DATE OCIS_VERSION=v6.4.0 ./deploy_ocis_bare_metal.sh
env OCIS_DNSNAME=ocis3-DATE OCIS_VERSION=v6.4.0 ./deploy_ocis_bare_metal.sh
  • mutually register the machines in their ocmproviders.json; service ocis restart
  • user alice at ocis2 generates an invite token.
  • user bob at ocis3 tries to accept the token, but wrongly chooses ocis1 in the 'Select institution of inviter' dropdown.
  • an error appears. OK

image

  • The error has no hint what is wrong. the user should be able to understand, what he clicked wrong, without analyzing log files. BAD
  • journalctl -u ocis | grep e1039eae-a842-4154-8008-466f05788dcc does not ave a good hint either. BAD
Oct 01 15:32:28 jw-ocis-v6-4-0-oj9 ocis[49923]: {"level":"debug","service":"ocm","pkg":"rhttp","traceid":"22167da66ff7aa1d6582baa1fff08375","request-id":"e1039eae-a842-4154-8008-466f05788dcc","path":"/accept-invite","time":"2024-10-01T15:32:28Z","line":"github.com/cs3org/reva/[email protected]/internal/http/services/sciencemesh/sciencemesh.go:139","message":"sciencemesh routing"}
Oct 01 15:32:28 jw-ocis-v6-4-0-oj9 ocis[49923]: {"level":"info","service":"proxy","proto":"HTTP/1.1","request-id":"e1039eae-a842-4154-8008-466f05788dcc","traceid":"f75aa12d8850867ba4f3b0117c4525c8","remote-addr":"87.148.40.122","method":"POST","status":401,"path":"/sciencemesh/accept-invite","duration":42.635172,"bytes":74,"time":"2024-10-01T15:32:28Z","line":"github.com/owncloud/ocis/v2/services/proxy/pkg/middleware/accesslog.go:34","message":"access-log"}

Expected behavior

  • The error message could e.g. say "The invite token was not found on ~instance~ institution ocis1"

FYI: @hodyroff @nicholas-wilson-au

jnweiger avatar Oct 01 '24 15:10 jnweiger

Idea: The "institution" could be encoded in the invite token, to eliminate this problem.

jnweiger avatar Nov 26 '24 17:11 jnweiger

The above idea is implemented in 7.0.0-rc.5 / Web 11.0.6

Downside: There was a second use-case for the institution dropdown. Users could review there, which other hosts they can federate with. Now that the dropdown is gone, we don't even know if the ocmprovider setup is in place.

Next idea: A useful error message would be to enumerate the list of registered ocmprovides, in case an invite token from a different host is processed.

jnweiger avatar Dec 17 '24 17:12 jnweiger

Not only OCM Invitation falling produce no readable error, but also creating or updating the ocm share when the remote federated instance is not reachable.

2403905 avatar Feb 24 '25 09:02 2403905