Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCM-related compatibility fixes #3962

Merged
merged 12 commits into from
Jun 20, 2023
7 changes: 7 additions & 0 deletions changelog/unreleased/ocm-compat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Bugfix: OCM-related compatibility fixes

Following analysis of OC and NC code to access a remote share,
we must expose paths and not full URIs on the /ocm-provider endpoint.
Also we fix a lookup issue with apps over OCM and update examples.

https://github.com/cs3org/reva/pull/3962
2 changes: 1 addition & 1 deletion examples/meshdirectory/meshdirectory.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@ timeout = 10
refresh = 900

[http.services.meshdirectory]
mesh_directory_url = 'http://localhost:19001/meshdir/'
mesh_directory_url = 'http://localhost:19001/meshdir/'
56 changes: 31 additions & 25 deletions examples/nextcloud-integration/revad.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ address = "0.0.0.0:19000"
[grpc.services.gateway]
authregistrysvc = "localhost:19000"
appprovidersvc = "localhost:19000"
appregistry = "localhost:19000"
appregistrysvc = "localhost:19000"
storageregistrysvc = "localhost:19000"
preferencessvc = "localhost:19000"
userprovidersvc = "localhost:19000"
Expand All @@ -21,6 +21,29 @@ commit_share_to_storage_grant = false
datagateway = "http://localhost:19001/data"
transfer_expires = 6 # give it a moment

[grpc.services.appregistry]
driver = "static"

[grpc.services.appregistry.drivers.static]
mime_types = [
{"mime_type" = "text/plain", "extension" = "txt", "name" = "Text file", "description" = "Text file", "allow_creation" = true},
{"mime_type" = "text/markdown", "extension" = "md", "name" = "Markdown file", "description" = "Markdown file", "allow_creation" = true},
{"mime_type" = "application/vnd.oasis.opendocument.text", "extension" = "odt", "name" = "OpenDocument", "description" = "OpenDocument text document", "default_app" = "Collabora", "allow_creation" = true},
{"mime_type" = "application/vnd.oasis.opendocument.spreadsheet", "extension" = "ods", "name" = "OpenSpreadsheet", "description" = "OpenDocument spreadsheet document", "default_app" = "Collabora", "allow_creation" = true},
{"mime_type" = "application/vnd.oasis.opendocument.presentation", "extension" = "odp", "name" = "OpenPresentation", "description" = "OpenDocument presentation document", "default_app" = "Collabora", "allow_creation" = true},
{"mime_type" = "application/vnd.jupyter", "extension" = "ipynb", "name" = "Jupyter Notebook", "description" = "Jupyter Notebook"}
]

[grpc.services.appprovider]
driver = "wopi"
app_provider_url = "localhost:19000"

[grpc.services.appprovider.drivers.wopi]
iop_secret = "shared-secret-with-wopiserver"
wopi_url = "http://0.0.0.0:8880/"
app_name = "Collabora"
app_url = "https://your-collabora-server.org:9980"

[grpc.services.authregistry]
driver = "static"

Expand Down Expand Up @@ -65,27 +88,6 @@ providers = "/etc/revad/providers.json"
[grpc.services.publicshareprovider]
driver = "memory"

[grpc.services.appprovider]
driver = "wopi"
custom_mime_types_json = "custom-mime-types-demo.json"

[grpc.services.appprovider.drivers.wopi]
iop_secret = "hello"
wopi_url = "http://0.0.0.0:8880/"
app_name = "Collabora"
app_url = "https://your-collabora-server.org:9980"

[grpc.services.appregistry]
driver = "static"

[grpc.services.appregistry.static.rules]
"text/plain" = "localhost:19000"
"text/markdown" = "localhost:19000"
"application/compressed-markdown" = "localhost:19000"
"application/vnd.oasis.opendocument.text" = "localhost:19000"
"application/vnd.oasis.opendocument.spreadsheet" = "localhost:19000"
"application/vnd.oasis.opendocument.presentation" = "localhost:19000"

[grpc.services.storageprovider]
driver = "nextcloud"
mount_path = "/home"
Expand All @@ -100,7 +102,6 @@ custom_mime_types_json = "custom-mime-types-demo.json"
endpoint = "http://localhost/apps/sciencemesh/"
user_layout = "{{.Username}}"


[grpc.services.authprovider]
auth_manager = "nextcloud"
[grpc.services.authprovider.drivers.nextcloud]
Expand All @@ -112,10 +113,10 @@ driver = "nextcloud"
endpoint = "http://localhost/apps/sciencemesh/"

[http]
enabled_services = ["ocmd", "ocmprovider"]
enabled_middlewares = ["providerauthorizer", "cors"]
address = "0.0.0.0:19001"

[http.services.appprovider]

[http.services.dataprovider]
driver = "nextcloud"

Expand All @@ -134,6 +135,11 @@ webdav_root = "/remote.php/dav/ocm"
enable_webapp = true
enable_datatx = true

[http.services.sciencemesh]
mesh_directory_url = 'https://sciencemesh.cesnet.cz/iop/meshdir'
provider_domain = 'your-domain.org'
ocm_mount_point = '/sciencemesh'

[http.middlewares.providerauthorizer]
driver = "json"

Expand Down
5 changes: 1 addition & 4 deletions examples/oc-phoenix/ocmd.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,10 @@ address = "0.0.0.0:13001"
[http.services.ocmd]
prefix = "ocm"

[http.services.ocmprovider]
endpoint = "http://localhost:13001"

[http.middlewares.providerauthorizer]
driver = "json"

[http.middlewares.providerauthorizer.drivers.json]
providers = "providers.demo.json"

[http.middlewares.cors]
[http.middlewares.cors]
37 changes: 34 additions & 3 deletions examples/ocmd/server-1/ocmd-server-1.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ address = "0.0.0.0:19000"

[grpc.services.gateway]
authregistrysvc = "localhost:19000"
appprovidersvc = "localhost:19000"
appregistry = "localhost:19000"
appregistrysvc = "localhost:19000"
storageregistrysvc = "localhost:19000"
preferencessvc = "localhost:19000"
userprovidersvc = "localhost:19000"
Expand All @@ -22,6 +21,29 @@ transfer_expires = 6 # give it a moment
commit_share_to_storage_grant = true
commit_share_to_storage_ref = true

[grpc.services.appregistry]
driver = "static"

[grpc.services.appregistry.drivers.static]
mime_types = [
{"mime_type" = "text/plain", "extension" = "txt", "name" = "Text file", "description" = "Text file", "allow_creation" = true},
{"mime_type" = "text/markdown", "extension" = "md", "name" = "Markdown file", "description" = "Markdown file", "allow_creation" = true},
{"mime_type" = "application/vnd.oasis.opendocument.text", "extension" = "odt", "name" = "OpenDocument", "description" = "OpenDocument text document", "default_app" = "Collabora", "allow_creation" = true},
{"mime_type" = "application/vnd.oasis.opendocument.spreadsheet", "extension" = "ods", "name" = "OpenSpreadsheet", "description" = "OpenDocument spreadsheet document", "default_app" = "Collabora", "allow_creation" = true},
{"mime_type" = "application/vnd.oasis.opendocument.presentation", "extension" = "odp", "name" = "OpenPresentation", "description" = "OpenDocument presentation document", "default_app" = "Collabora", "allow_creation" = true},
{"mime_type" = "application/vnd.jupyter", "extension" = "ipynb", "name" = "Jupyter Notebook", "description" = "Jupyter Notebook"}
]

[grpc.services.appprovider]
driver = "wopi"
appregistrysvc = "localhost:19000"

[grpc.services.appprovider.drivers.wopi]
iop_secret = "shared-secret-with-wopiserver"
wopi_url = "http://0.0.0.0:8880/"
app_name = "Collabora"
app_url = "https://your-collabora-server.org:9980"

[grpc.services.authregistry]
driver = "static"

Expand Down Expand Up @@ -111,6 +133,8 @@ users = "users.demo.json"
[http]
address = "0.0.0.0:19001"

[http.services.appprovider]

[http.services.dataprovider]
driver = "localhome"

Expand Down Expand Up @@ -141,6 +165,13 @@ prefix = "ocs"

[http.services.ocdav]

[http.services.appprovider]
[http.services.sciencemesh]
mesh_directory_url = 'https://sciencemesh.cesnet.cz/iop/meshdir'
provider_domain = 'your-domain-1.org'
ocm_mount_point = '/sciencemesh'

[http.middlewares.cors]

[http.middlewares.auth]
credential_chain = ["publicshares", "ocmshares", "basic", "bearer"]

35 changes: 35 additions & 0 deletions examples/ocmd/server-2/ocmd-server-2.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ address = "0.0.0.0:17000"

[grpc.services.gateway]
authregistrysvc = "localhost:17000"
appregistrysvc = "localhost:17000"
storageregistrysvc = "localhost:17000"
preferencessvc = "localhost:17000"
userprovidersvc = "localhost:17000"
Expand All @@ -20,6 +21,29 @@ transfer_expires = 6 # give it a moment
commit_share_to_storage_grant = true
commit_share_to_storage_ref = true

[grpc.services.appregistry]
driver = "static"

[grpc.services.appregistry.drivers.static]
mime_types = [
{"mime_type" = "text/plain", "extension" = "txt", "name" = "Text file", "description" = "Text file", "allow_creation" = true},
{"mime_type" = "text/markdown", "extension" = "md", "name" = "Markdown file", "description" = "Markdown file", "allow_creation" = true},
{"mime_type" = "application/vnd.oasis.opendocument.text", "extension" = "odt", "name" = "OpenDocument", "description" = "OpenDocument text document", "default_app" = "Collabora", "allow_creation" = true},
{"mime_type" = "application/vnd.oasis.opendocument.spreadsheet", "extension" = "ods", "name" = "OpenSpreadsheet", "description" = "OpenDocument spreadsheet document", "default_app" = "Collabora", "allow_creation" = true},
{"mime_type" = "application/vnd.oasis.opendocument.presentation", "extension" = "odp", "name" = "OpenPresentation", "description" = "OpenDocument presentation document", "default_app" = "Collabora", "allow_creation" = true},
{"mime_type" = "application/vnd.jupyter", "extension" = "ipynb", "name" = "Jupyter Notebook", "description" = "Jupyter Notebook"}
]

[grpc.services.appprovider]
driver = "wopi"
app_provider_url = "localhost:17000"

[grpc.services.appprovider.drivers.wopi]
iop_secret = "shared-secret-with-wopiserver"
wopi_url = "http://0.0.0.0:8880/"
app_name = "Collabora"
app_url = "https://your-collabora-server.org:9980"

[grpc.services.authregistry]
driver = "static"

Expand Down Expand Up @@ -102,6 +126,8 @@ users = "users.demo.json"
[http]
address = "0.0.0.0:17001"

[http.services.appprovider]

[http.services.dataprovider]
driver = "localhome"

Expand Down Expand Up @@ -130,4 +156,13 @@ prefix = "ocs"

[http.services.ocdav]

[http.services.sciencemesh]
mesh_directory_url = 'https://sciencemesh.cesnet.cz/iop/meshdir'
provider_domain = 'your-domain.org'
ocm_mount_point = '/sciencemesh'

[http.middlewares.cors]

[http.middlewares.auth]
credential_chain = ["publicshares", "ocmshares", "basic", "bearer"]

1 change: 0 additions & 1 deletion examples/oidc-mapping-tpc/server-1.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ driver = "localhome"
[http.services.datagateway]
[http.services.prometheus]
[http.services.ocmd]
[http.services.ocmprovider]
[http.services.ocs]
[http.services.ocdav]
enable_http_tpc = true
1 change: 0 additions & 1 deletion examples/oidc-mapping-tpc/server-2.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ driver = "localhome"
[http.services.datagateway]
[http.services.prometheus]
[http.services.ocmd]
[http.services.ocmprovider]
[http.services.ocs]
[http.services.ocdav]
enable_http_tpc = true
15 changes: 13 additions & 2 deletions examples/storage-references/gateway.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ appauth = "localhost:15000"
[grpc.services.ocmproviderauthorizer]

[grpc.services.appregistry]
driver = "static"

[grpc.services.appregistry.drivers.static]
mime_types = [
{"mime_type" = "text/plain", "extension" = "txt", "name" = "Text file", "description" = "Text file", "allow_creation" = true},
Expand All @@ -41,13 +43,23 @@ mime_types = [
{"mime_type" = "application/vnd.jupyter", "extension" = "ipynb", "name" = "Jupyter Notebook", "description" = "Jupyter Notebook"}
]

[grpc.services.appprovider]
driver = "wopi"
appregistrysvc = "localhost:19000"
custom_mime_types_json = "/etc/revad/custom-mime-types-demo.json"

[grpc.services.appprovider.drivers.wopi]
iop_secret = "shared-secret-with-wopiserver"
wopi_url = "http://0.0.0.0:8880/"
app_name = "Collabora"
app_url = "https://your-collabora-server.org:9980"

[http.services.datagateway]
[http.services.prometheus]
[http.services.ocmd]
[http.services.ocmprovider]
[http.services.ocdav]
[http.services.ocs]
[http.services.appprovider]

[http.services.sciencemesh]
mesh_directory_url = 'https://sciencemesh.cesnet.cz/iop/meshdir'
Expand All @@ -60,4 +72,3 @@ disable_auth = true
sender_mail = "sciencemesh@your-domain.org"
smtp_server = "your-smtp-server.your-domain.org"
smtp_port = 25

45 changes: 45 additions & 0 deletions examples/two-server-setup/gateway-1.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,51 @@
[shared]
gatewaysvc = "localhost:19000"
datagateway = "http://localhost:19001/datagateway"

[grpc]
address = "0.0.0.0:19000"

# services to enable
[grpc.services.gateway]
authregistrysvc = "localhost:19000"
appregistrysvc = "localhost:19000"
storageregistrysvc = "localhost:19000"
preferencessvc = "localhost:19000"
userprovidersvc = "localhost:19000"
groupprovidersvc = "localhost:19000"
usershareprovidersvc = "localhost:19000"
publicshareprovidersvc = "localhost:19000"
ocmcoresvc = "localhost:19000"
ocmshareprovidersvc = "localhost:19000"
ocminvitemanagersvc = "localhost:19000"
ocmproviderauthorizersvc = "localhost:19000"
datagateway = "http://localhost:19001/data"
commit_share_to_storage_grant = true
commit_share_to_storage_ref = true

[grpc.services.appregistry]
driver = "static"

[grpc.services.appregistry.drivers.static]
mime_types = [
{"mime_type" = "text/plain", "extension" = "txt", "name" = "Text file", "description" = "Text file", "allow_creation" = true},
{"mime_type" = "text/markdown", "extension" = "md", "name" = "Markdown file", "description" = "Markdown file", "allow_creation" = true},
{"mime_type" = "application/vnd.oasis.opendocument.text", "extension" = "odt", "name" = "OpenDocument", "description" = "OpenDocument text document", "default_app" = "Collabora", "allow_creation" = true},
{"mime_type" = "application/vnd.oasis.opendocument.spreadsheet", "extension" = "ods", "name" = "OpenSpreadsheet", "description" = "OpenDocument spreadsheet document", "default_app" = "Collabora", "allow_creation" = true},
{"mime_type" = "application/vnd.oasis.opendocument.presentation", "extension" = "odp", "name" = "OpenPresentation", "description" = "OpenDocument presentation document", "default_app" = "Collabora", "allow_creation" = true},
{"mime_type" = "application/vnd.jupyter", "extension" = "ipynb", "name" = "Jupyter Notebook", "description" = "Jupyter Notebook"}
]

[grpc.services.appprovider]
driver = "wopi"
app_provider_url = "localhost:19000"

[grpc.services.appprovider.drivers.wopi]
iop_secret = "shared-secret-with-wopiserver"
wopi_url = "http://0.0.0.0:8880/"
app_name = "Collabora"
app_url = "https://your-collabora-server.org:9980"

[grpc.services.storageregistry]
[grpc.services.storageregistry.drivers.static]
home_provider = "/home"
Expand Down Expand Up @@ -51,6 +91,7 @@ providers = "providers.demo.json"
[http]
address = "0.0.0.0:19001"

[http.services.appprovider]
[http.services.datagateway]
[http.services.prometheus]
[http.services.ocmd]
Expand All @@ -62,6 +103,10 @@ enable_datatx = true

[http.services.ocdav]
[http.services.ocs]
[http.services.sciencemesh]
mesh_directory_url = 'https://sciencemesh.cesnet.cz/iop/meshdir'
provider_domain = 'your-domain.org'
ocm_mount_point = '/sciencemesh'

[http.middlewares.providerauthorizer.drivers.json]
providers = "providers.demo.json"
Loading