diff --git a/changelog/unreleased/improve-ocm-tutorial.md b/changelog/unreleased/improve-ocm-tutorial.md new file mode 100644 index 0000000000..c573a0b269 --- /dev/null +++ b/changelog/unreleased/improve-ocm-tutorial.md @@ -0,0 +1,8 @@ +Enhancement: Updated OCM tutorial + +The OCM tutorial in the doc was missing the example +on how to access the received resources. +Now the tutorial contains all the steps to access +a received resource using the WebDAV protocol. + +https://github.com/cs3org/reva/pull/3783 \ No newline at end of file diff --git a/docs/content/en/docs/config/http/services/datagateway/_index.md b/docs/content/en/docs/config/http/services/datagateway/_index.md index e293489e5d..2e70830e53 100644 --- a/docs/content/en/docs/config/http/services/datagateway/_index.md +++ b/docs/content/en/docs/config/http/services/datagateway/_index.md @@ -9,7 +9,7 @@ description: > # _struct: config_ {{% dir name="insecure" type="bool" default=false %}} -Whether to skip certificate checks when sending requests. [[Ref]](https://github.com/cs3org/reva/tree/master/internal/http/services/datagateway/datagateway.go#L61) +Whether to skip certificate checks when sending requests. [[Ref]](https://github.com/cs3org/reva/tree/master/internal/http/services/datagateway/datagateway.go#L62) {{< highlight toml >}} [http.services.datagateway] insecure = false diff --git a/docs/content/en/docs/tutorials/share-tutorial.md b/docs/content/en/docs/tutorials/share-tutorial.md index 3e67ac5cd6..9ded80828c 100644 --- a/docs/content/en/docs/tutorials/share-tutorial.md +++ b/docs/content/en/docs/tutorials/share-tutorial.md @@ -28,8 +28,8 @@ Follow the instructions in https://reva.link/docs/getting-started/install-reva/ Now we need to start two Reva daemons corresponding to two different mesh providers, thus enabling sharing of files between users belonging to these two providers. For our example, we consider the example of CERNBox deployed at localhost:19000 and the CESNET owncloud at localhost:17000. Follow these steps: ``` -cd examples/ocmd/ && mkdir -p /var/tmp/reva/data/einstein/home -../../cmd/revad/revad -c ocmd-server-1.toml & ../../cmd/revad/revad -c ocmd-server-2.toml & +mkdir -p /var/tmp/reva && cd examples/ocmd/ +../../cmd/revad/revad -dev-dir server-1 & ../../cmd/revad/revad -dev-dir server-2 & ``` This should start two Reva daemon (revad) services at the aforementioned endpoints. @@ -114,13 +114,12 @@ Call the ocm-share-create method with the required options. The user can list wh | f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c | cesnet.cz | marie@cesnet.cz | Marie Curie | +--------------------------------------+-----------+-----------------+-------------+ ->> ocm-share-create -grantee f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c -idp cesnet.cz /home/my-folder -+--------------------------------------+-----------------+--------------------------------------+--------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+-------------------+-------------+--------------------------------------+-------------------------------+-------------------------------+ -| # | OWNER.IDP | OWNER.OPAQUEID | RESOURCEID | PERMISSIONS | TYPE | GRANTEE.IDP | GRANTEE.OPAQUEID | CREATED | UPDATED | -+--------------------------------------+-----------------+--------------------------------------+--------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+-------------------+-------------+--------------------------------------+-------------------------------+-------------------------------+ -| 23498b71-363e-4804-9f22-8c35dc070a06 | cernbox.cern.ch | 4c510ada-c86b-4815-8820-42cdf82c3d51 | storage_id:"123e4567-e89b-12d3-a456-426655440000" opaque_id:"fileid-einstein%2Fmy-folder" | permissions: | GRANTEE_TYPE_USER | cesnet.cz | f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c | 2021-03-26 13:30:12 +0100 CET | 2021-03-26 13:30:12 +0100 CET | -+--------------------------------------+-----------------+--------------------------------------+--------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------+-------------------+-------------+--------------------------------------+-------------------------------+-------------------------------+ - +>> ocm-share-create -grantee f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c -idp cesnet.cz -rol editor /home/my-folder ++--------------------------------------+-----------------+--------------------------------------+--------------------------------------------------------------------------------------------+-------------------+-------------+--------------------------------------+--------------------------------+--------------------------------+ +| # | OWNER.IDP | OWNER.OPAQUEID | RESOURCEID | TYPE | GRANTEE.IDP | GRANTEE.OPAQUEID | CREATED | UPDATED | ++--------------------------------------+-----------------+--------------------------------------+--------------------------------------------------------------------------------------------+-------------------+-------------+--------------------------------------+--------------------------------+--------------------------------+ +| edc8f1c3-5f12-4430-8680-95b9034d6592 | cernbox.cern.ch | 4c510ada-c86b-4815-8820-42cdf82c3d51 | storage_id:"123e4567-e89b-12d3-a456-426655440000" opaque_id:"fileid-einstein%2Fmy-folder" | GRANTEE_TYPE_USER | cesnet.cz | f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c | 2023-04-11 11:52:08 +0200 CEST | 2023-04-11 11:52:08 +0200 CEST | ++--------------------------------------+-----------------+--------------------------------------+--------------------------------------------------------------------------------------------+-------------------+-------------+--------------------------------------+--------------------------------+--------------------------------+ ``` This would create a local share on einstein's mesh provider and call the unprotected endpoint `/ocm/shares` on the recipient's provider to create a remote share. @@ -137,12 +136,58 @@ OK ``` #### 5.2.2 Access the list of received shares -Call the ocm-share-list-received method. +Call the `ocm-share-list-received` method. ``` >> ocm-share-list-received -+--------------------------------------+-----------------+--------------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------+-------------+--------------------------------------+-------------------------------+-------------------------------+---------------------+ -| # | OWNER.IDP | OWNER.OPAQUEID | RESOURCEID | PERMISSIONS | TYPE | GRANTEE.IDP | GRANTEE.OPAQUEID | CREATED | UPDATED | STATE | -+--------------------------------------+-----------------+--------------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------+-------------+--------------------------------------+-------------------------------+-------------------------------+---------------------+ -| 48bf1892-da3f-4e18-b9af-766595683689 | cernbox.cern.ch | 4c510ada-c86b-4815-8820-42cdf82c3d51 | storage_id:"123e4567-e89b-12d3-a456-426655440000" opaque_id:"fileid-einstein%2Fmy-folder" | permissions: | GRANTEE_TYPE_USER | cesnet.cz | f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c | 2021-03-26 13:30:12 +0100 CET | 2021-03-26 13:30:12 +0100 CET | SHARE_STATE_PENDING | -+--------------------------------------+-----------------+--------------------------------------+--------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------+-------------------+-------------+--------------------------------------+-------------------------------+-------------------------------+---------------------+ ++--------------------------------------+-----------------+--------------------------------------+-------------------------------------------------------------------------------+-------------------+-------------+--------------------------------------+--------------------------------+--------------------------------+---------------------+-----------------+ +| # | OWNER.IDP | OWNER.OPAQUEID | RESOURCEID | TYPE | GRANTEE.IDP | GRANTEE.OPAQUEID | CREATED | UPDATED | STATE | SHARETYPE | ++--------------------------------------+-----------------+--------------------------------------+-------------------------------------------------------------------------------+-------------------+-------------+--------------------------------------+--------------------------------+--------------------------------+---------------------+-----------------+ +| ef05c999-8ae2-41af-ba0d-a886b061011f | cernbox.cern.ch | 4c510ada-c86b-4815-8820-42cdf82c3d51 | opaque_id:"123e4567-e89b-12d3-a456-426655440000:fileid-einstein%2Fmy-folder" | GRANTEE_TYPE_USER | cesnet.cz | f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c | 2023-04-11 11:52:08 +0200 CEST | 2023-04-11 11:52:08 +0200 CEST | SHARE_STATE_PENDING | SHARE_TYPE_USER | ++--------------------------------------+-----------------+--------------------------------------+-------------------------------------------------------------------------------+-------------------+-------------+--------------------------------------+--------------------------------+--------------------------------+---------------------+-----------------+ +``` + +The share's recipien has received the share `ef05c999-8ae2-41af-ba0d-a886b061011f`. The user can get more informations about the share using the `ocm-share-get-received` command. + +``` +ocm-share-get-received ef05c999-8ae2-41af-ba0d-a886b061011f +{"id":{"opaqueId":"ef05c999-8ae2-41af-ba0d-a886b061011f"}, "name":"my-folder", "resourceId":{"opaqueId":"123e4567-e89b-12d3-a456-426655440000:fileid-einstein%2Fmy-folder"}, "grantee":{"type":"GRANTEE_TYPE_USER", "userId":{"idp":"cesnet.cz", "opaqueId":"f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c", "type":"USER_TYPE_PRIMARY"}}, "owner":{"idp":"cernbox.cern.ch", "opaqueId":"4c510ada-c86b-4815-8820-42cdf82c3d51", "type":"USER_TYPE_FEDERATED"}, "creator":{"idp":"cernbox.cern.ch", "opaqueId":"4c510ada-c86b-4815-8820-42cdf82c3d51", "type":"USER_TYPE_FEDERATED"}, "ctime":{"seconds":"1681206728", "nanos":346009879}, "mtime":{"seconds":"1681206728", "nanos":346009879}, "shareType":"SHARE_TYPE_USER", "protocols":[{"webdavOptions":{"permissions":{"permissions":{"getPath":true, "initiateFileDownload":true, "initiateFileUpload":true, "listContainer":true, "stat":true}}, "uri":"http://localhost:19001/remote.php/dav/ocm/eSWNjTWjorFmZEGQNZVyrU3TyxdWEr1D"}}], "state":"SHARE_STATE_PENDING", "resourceType":"RESOURCE_TYPE_CONTAINER"} +``` + +In this case, the share can be accessed using the WebDAV protocol (multiple access methods are available, like WebDAV, Webapp and Datatx) using the URL `http://localhost:19001/remote.php/dav/ocm/eSWNjTWjorFmZEGQNZVyrU3TyxdWEr1D`, and every WebDAV client can be used to access the received share resource. + +For example: +``` +# curl -X PROPFIND http://localhost:19001/remote.php/dav/ocm/eSWNjTWjorFmZEGQNZVyrU3TyxdWEr1D +/remote.php/dav/ocm/eSWNjTWjorFmZEGQNZVyrU3TyxdWEr1D/home/my-folder/123e4567-e89b-12d3-a456-426655440000!fileid-einstein%2Fmy-folder123e4567-e89b-12d3-a456-426655440000!fileid-einstein%2Fmy-folder"e35fa97883e0481aabf235abb8eb6b1f"SDNVCK25Tue, 11 Apr 2023 09:56:29 GMT0HTTP/1.1 200 OK/remote.php/dav/ocm/eSWNjTWjorFmZEGQNZVyrU3TyxdWEr1D/home/my-folder/example.txt123e4567-e89b-12d3-a456-426655440000!fileid-einstein%2Fmy-folder%2Fexample.txt123e4567-e89b-12d3-a456-426655440000!fileid-einstein%2Fmy-folder%2Fexample.txt"bf73fa7d3ebf18b3cff6d64ed25a7de0"SDNVW33text/plainTue, 11 Apr 2023 09:56:29 GMT0HTTP/1.1 200 OK +``` + +In particular, reva allows an user to navigate the received shares in a more user-friendly way, exposing the shares under the `/sciencemesh` mount point. The format to access a received share is `/sciencemesh/[/]`. + +``` +>> ls /sciencemesh/ef05c999-8ae2-41af-ba0d-a886b061011f +example.txt +>> stat /sciencemesh/ef05c999-8ae2-41af-ba0d-a886b061011f/example.txt +type:RESOURCE_TYPE_FILE id: checksum:<> mime_type:"application/octet-stream" mtime: path:"/sciencemesh/ef05c999-8ae2-41af-ba0d-a886b061011f/example.txt" permission_set: size:13 owner: +>> download /sciencemesh/ef05c999-8ae2-41af-ba0d-a886b061011f/example.txt /tmp/example.txt +Downloading from: http://localhost:17011/data/simple/ef05c999-8ae2-41af-ba0d-a886b061011f/example.txt + 13 B / 13 B [====================================================================================================================================] 100.00% 0s +>> Ctrl-D +# cat /tmp/example.txt +Example file +``` + +As the share was created by Einstein with the editor role, Marie edit the resources contained in the shared folder: + +``` +# echo "Modified from Marie" >> /tmp/example.txt +# ./cmd/reva/reva -host localhost:17000 -insecure +reva-cli v1.23.0-23-gf13ffef (rev-f13ffef) +Please use `exit` or `Ctrl-D` to exit this program. +>> upload -protocol simple /tmp/example.txt /sciencemesh/ef05c999-8ae2-41af-ba0d-a886b061011f/example.txt +Local file size: 33 bytes +Data server: http://localhost:17011/data/simple/ef05c999-8ae2-41af-ba0d-a886b061011f/example.txt +Allowed checksums: [type:RESOURCE_CHECKSUM_TYPE_MD5 priority:100 type:RESOURCE_CHECKSUM_TYPE_UNSET priority:1000 ] +Checksum selected: RESOURCE_CHECKSUM_TYPE_MD5 +Local XS: RESOURCE_CHECKSUM_TYPE_MD5:b95a504e7103e0ca0e504e6f86dc36b6 +File uploaded: sciencemesh:ef05c999-8ae2-41af-ba0d-a886b061011f:/example.txt 33 /sciencemesh/ef05c999-8ae2-41af-ba0d-a886b061011f/example.txt ``` diff --git a/examples/ocmd/providers.demo.json b/examples/ocmd/providers.demo.json index 0a9b671ab4..f06e564244 100644 --- a/examples/ocmd/providers.demo.json +++ b/examples/ocmd/providers.demo.json @@ -96,103 +96,5 @@ "host": "127.0.0.1:17000" } ] - }, - { - "name": "example", - "full_name": "ownCloud@Example", - "organization": "Example", - "domain": "example.org", - "homepage": "http://example.org", - "description": "Example cloud storage.", - "services": [ - { - "endpoint": { - "type": { - "name": "OCM", - "description": "Example Open Cloud Mesh API" - }, - "name": "Example - OCM API", - "path": "http://127.0.0.1:19001/ocm/", - "is_monitored": true - }, - "api_version": "0.0.1", - "host": "127.0.0.1:19001" - }, - { - "endpoint": { - "type": { - "name": "Webdav", - "description": "Example Webdav API" - }, - "name": "Example - Webdav API", - "path": "http://127.0.0.1:19001/remote.php/webdav/", - "is_monitored": true - }, - "api_version": "0.0.1", - "host": "127.0.0.1:19001" - }, - { - "endpoint": { - "type": { - "name": "Gateway", - "description": "Example GRPC Gateway" - }, - "name": "Example - GRPC Gateway", - "path": "127.0.0.1:19000", - "is_monitored": true - }, - "api_version": "0.0.1", - "host": "127.0.0.1:19000" - } - ] - }, - { - "name": "test", - "full_name": "ownCloud@Test", - "organization": "Test", - "domain": "test.org", - "homepage": "http://test.org", - "description": "Test cloud storage.", - "services": [ - { - "endpoint": { - "type": { - "name": "OCM", - "description": "Test Open Cloud Mesh API" - }, - "name": "Test - OCM API", - "path": "http://127.0.0.1:19001/ocm/", - "is_monitored": true - }, - "api_version": "0.0.1", - "host": "127.0.0.1:19001" - }, - { - "endpoint": { - "type": { - "name": "Webdav", - "description": "Test Webdav API" - }, - "name": "Test - Webdav API", - "path": "http://127.0.0.1:19001/remote.php/webdav/", - "is_monitored": true - }, - "api_version": "0.0.1", - "host": "127.0.0.1:19001" - }, - { - "endpoint": { - "type": { - "name": "Gateway", - "description": "Test GRPC Gateway" - }, - "name": "Test - GRPC Gateway", - "path": "127.0.0.1:19000", - "is_monitored": true - }, - "api_version": "0.0.1", - "host": "127.0.0.1:19000" - } - ] } -] +] \ No newline at end of file diff --git a/examples/ocmd/server-1/ocmd-machine-auth.toml b/examples/ocmd/server-1/ocmd-machine-auth.toml new file mode 100644 index 0000000000..0fb314f986 --- /dev/null +++ b/examples/ocmd/server-1/ocmd-machine-auth.toml @@ -0,0 +1,12 @@ +[shared] +gatewaysvc = "localhost:19000" + +[grpc] +address = "localhost:19030" + +[grpc.services.authprovider] +auth_manager = "machine" + +[grpc.services.authprovider.auth_managers.machine] +api_key = "machine-api-key" +gateway_addr = "localhost:19000" diff --git a/examples/ocmd/server-1/ocmd-outcoming.toml b/examples/ocmd/server-1/ocmd-outcoming.toml new file mode 100644 index 0000000000..3461eaf242 --- /dev/null +++ b/examples/ocmd/server-1/ocmd-outcoming.toml @@ -0,0 +1,28 @@ +[shared] +gatewaysvc = "localhost:19000" + +[grpc] +address = "localhost:19020" + +[grpc.services.storageprovider] +driver = "ocmoutcoming" +mount_path = "/ocm" +mount_id = "ocm" +expose_data_server = true +data_server_url = "http://localhost:19021/data" + +[grpc.services.storageprovider.drivers.ocmoutcoming] +machine_secret = "machine-api-key" + +[grpc.services.authprovider] +auth_manager = "ocmshares" + + +[http] +address = "localhost:19021" + +[http.services.dataprovider] +driver = "ocmoutcoming" + +[http.services.dataprovider.drivers.ocmoutcoming] +machine_secret = "machine-api-key" diff --git a/examples/ocmd/server-1/ocmd-received-shares-1.toml b/examples/ocmd/server-1/ocmd-received-shares-1.toml new file mode 100644 index 0000000000..78f0782b4b --- /dev/null +++ b/examples/ocmd/server-1/ocmd-received-shares-1.toml @@ -0,0 +1,18 @@ +[shared] +gatewaysvc = "localhost:19000" + +[grpc] +address = "localhost:19010" + +[grpc.services.storageprovider] +driver = "ocmreceived" +mount_path = "/sciencemesh" +mount_id = "sciencemesh" +expose_data_server = true +data_server_url = "http://localhost:19011/data" + +[http] +address = "localhost:19011" + +[http.services.dataprovider] +driver = "ocmreceived" diff --git a/examples/ocmd/ocmd-server-1.toml b/examples/ocmd/server-1/ocmd-server-1.toml similarity index 81% rename from examples/ocmd/ocmd-server-1.toml rename to examples/ocmd/server-1/ocmd-server-1.toml index b8e2b9a968..8f6132d29c 100644 --- a/examples/ocmd/ocmd-server-1.toml +++ b/examples/ocmd/server-1/ocmd-server-1.toml @@ -1,17 +1,6 @@ [shared] gatewaysvc = "localhost:19000" -# [registry] -# driver = "static" -# -# [registry.static] -# services = ["authprovider","userprovider"] -# -# [registry.static.authprovider] -# bearer = ["localhost:0123"] -# basic = ["localhost:1234"] -# publiclink = ["localhost:9876"] - [grpc] address = "0.0.0.0:19000" @@ -29,7 +18,7 @@ ocmshareprovidersvc = "localhost:19000" ocminvitemanagersvc = "localhost:19000" ocmproviderauthorizersvc = "localhost:19000" datagateway = "http://localhost:19001/data" -transfer_expires = 6 # give it a moment +transfer_expires = 6 # give it a moment commit_share_to_storage_grant = true commit_share_to_storage_ref = true @@ -38,6 +27,8 @@ driver = "static" [grpc.services.authregistry.drivers.static.rules] basic = "localhost:19000" +machine = "localhost:19030" +ocmshares = "localhost:19020" [grpc.services.storageregistry] driver = "static" @@ -46,8 +37,12 @@ driver = "static" home_provider = "/home" [grpc.services.storageregistry.drivers.static.rules] -"/home" = {"address" = "localhost:19000"} -"123e4567-e89b-12d3-a456-426655440000" = {"address" = "localhost:19000"} +"/home" = { "address" = "localhost:19000" } +"123e4567-e89b-12d3-a456-426655440000" = { "address" = "localhost:19000" } +"/sciencemesh" = { "address" = "localhost:19010" } +"sciencemesh" = { "address" = "localhost:19010" } +"/ocm" = { "address" = "localhost:19020" } +"ocm" = { "address" = "localhost:19020" } [grpc.services.usershareprovider] driver = "memory" @@ -61,9 +56,15 @@ file = "/var/tmp/reva/shares_server_1.json" [grpc.services.ocminvitemanager] driver = "json" +provider_domain = "cernbox.cern.ch" + +[grpc.services.ocminvitemanager.drivers.json] +file = "/var/tmp/reva/invites_server_1.json" [grpc.services.ocmshareprovider] driver = "json" +webdav_endpoint = "http://localhost:19001" +provider_domain = "cernbox.cern.ch" [grpc.services.ocmshareprovider.drivers.json] file = "/var/tmp/reva/shares_server_1.json" diff --git a/examples/ocmd/server-2/ocmd-machine-auth.toml b/examples/ocmd/server-2/ocmd-machine-auth.toml new file mode 100644 index 0000000000..dc4854b472 --- /dev/null +++ b/examples/ocmd/server-2/ocmd-machine-auth.toml @@ -0,0 +1,12 @@ +[shared] +gatewaysvc = "localhost:17000" + +[grpc] +address = "localhost:17030" + +[grpc.services.authprovider] +auth_manager = "machine" + +[grpc.services.authprovider.auth_managers.machine] +api_key = "machine-api-key" +gateway_addr = "localhost:17000" diff --git a/examples/ocmd/server-2/ocmd-outcoming.toml b/examples/ocmd/server-2/ocmd-outcoming.toml new file mode 100644 index 0000000000..7bf1a59f32 --- /dev/null +++ b/examples/ocmd/server-2/ocmd-outcoming.toml @@ -0,0 +1,28 @@ +[shared] +gatewaysvc = "localhost:17000" + +[grpc] +address = "localhost:17020" + +[grpc.services.storageprovider] +driver = "ocmoutcoming" +mount_path = "/ocm" +mount_id = "ocm" +expose_data_server = true +data_server_url = "http://localhost:17021/data" + +[grpc.services.storageprovider.drivers.ocmoutcoming] +machine_secret = "machine-api-key" + +[grpc.services.authprovider] +auth_manager = "ocmshares" + + +[http] +address = "localhost:17021" + +[http.services.dataprovider] +driver = "ocmoutcoming" + +[http.services.dataprovider.drivers.ocmoutcoming] +machine_secret = "machine-api-key" diff --git a/examples/ocmd/server-2/ocmd-received-shares-2.toml b/examples/ocmd/server-2/ocmd-received-shares-2.toml new file mode 100644 index 0000000000..05cb2ee22c --- /dev/null +++ b/examples/ocmd/server-2/ocmd-received-shares-2.toml @@ -0,0 +1,18 @@ +[shared] +gatewaysvc = "localhost:17000" + +[grpc] +address = "localhost:17010" + +[grpc.services.storageprovider] +driver = "ocmreceived" +mount_path = "/sciencemesh" +mount_id = "sciencemesh" +expose_data_server = true +data_server_url = "http://localhost:17011/data" + +[http] +address = "localhost:17011" + +[http.services.dataprovider] +driver = "ocmreceived" diff --git a/examples/ocmd/ocmd-server-2.toml b/examples/ocmd/server-2/ocmd-server-2.toml similarity index 80% rename from examples/ocmd/ocmd-server-2.toml rename to examples/ocmd/server-2/ocmd-server-2.toml index 86bdbfd593..99eac947f8 100644 --- a/examples/ocmd/ocmd-server-2.toml +++ b/examples/ocmd/server-2/ocmd-server-2.toml @@ -16,7 +16,7 @@ ocmshareprovidersvc = "localhost:17000" ocminvitemanagersvc = "localhost:17000" ocmproviderauthorizersvc = "localhost:17000" datagateway = "http://localhost:17001/data" -transfer_expires = 6 # give it a moment +transfer_expires = 6 # give it a moment commit_share_to_storage_grant = true commit_share_to_storage_ref = true @@ -25,6 +25,8 @@ driver = "static" [grpc.services.authregistry.drivers.static.rules] basic = "localhost:17000" +machine = "localhost:17030" +ocmshares = "localhost:17020" [grpc.services.storageregistry] driver = "static" @@ -33,8 +35,12 @@ driver = "static" home_provider = "/home" [grpc.services.storageregistry.drivers.static.rules] -"/home" = {"address" = "localhost:17000"} -"123e4567-e89b-12d3-a456-426655440000" = {"address" = "localhost:17000"} +"/home" = { "address" = "localhost:17000" } +"123e4567-e89b-12d3-a456-426655440000" = { "address" = "localhost:17000" } +"/sciencemesh" = { "address" = "localhost:17010" } +"sciencemesh" = { "address" = "localhost:17010" } +"/ocm" = { "address" = "localhost:17020" } +"ocm" = { "address" = "localhost:17020" } [grpc.services.usershareprovider] driver = "memory" @@ -48,9 +54,15 @@ file = "/var/tmp/reva/shares_server_2.json" [grpc.services.ocminvitemanager] driver = "json" +provider_domain = "cesnet.cz" + +[grpc.services.ocminvitemanager.drivers.json] +file = "/var/tmp/reva/invites_server_2.json" [grpc.services.ocmshareprovider] driver = "json" +webdav_endpoint = "http://localhost:17001" +provider_domain = "cesnet.cz" [grpc.services.ocmshareprovider.drivers.json] file = "/var/tmp/reva/shares_server_2.json" diff --git a/examples/ocmd/users.demo.json b/examples/ocmd/users.demo.json index e1b52cb806..2b836ff1aa 100644 --- a/examples/ocmd/users.demo.json +++ b/examples/ocmd/users.demo.json @@ -9,18 +9,22 @@ "secret": "relativity", "mail": "einstein@cern.ch", "display_name": "Albert Einstein", - "groups": ["sailing-lovers", "violin-haters", "physics-lovers"], + "groups": [ + "sailing-lovers", + "violin-haters", + "physics-lovers" + ], "opaque": { "map": { "gid": { "_comment": "decodes to 987", - "decoder":"plain", - "value":"OTg3" - }, - "uid":{ + "decoder": "plain", + "value": "OTg3" + }, + "uid": { "_comment": "decodes to 123", - "decoder":"plain", - "value":"MTIz" + "decoder": "plain", + "value": "MTIz" } } } @@ -35,72 +39,24 @@ "secret": "radioactivity", "mail": "marie@cesnet.cz", "display_name": "Marie Curie", - "groups": ["radium-lovers", "polonium-lovers", "physics-lovers"], + "groups": [ + "radium-lovers", + "polonium-lovers", + "physics-lovers" + ], "opaque": { "map": { "gid": { "_comment": "decodes to 987", - "decoder":"plain", - "value":"OTg3" - }, - "uid":{ + "decoder": "plain", + "value": "OTg3" + }, + "uid": { "_comment": "decodes to 456", - "decoder":"plain", - "value":"NDU2" - } - } - } - }, - { - "id": { - "opaque_id": "932b4540-8d16-481e-8ef4-588e4b6b151c", - "idp": "example.org", - "type": 1 - }, - "username": "richard", - "secret": "superfluidity", - "mail": "richard@example.org", - "display_name": "Richard Feynman", - "groups": ["quantum-lovers", "philosophy-haters", "physics-lovers"], - "opaque": { - "map": { - "gid": { - "_comment": "decodes to 135", - "decoder":"plain", - "value":"MTM1" - }, - "uid":{ - "_comment": "decodes to 246", - "decoder":"plain", - "value":"MjQ2" - } - } - } - }, - { - "id": { - "opaque_id": "932b4522-139b-4815-8ef4-42cdf82c3d51", - "idp": "example.com", - "type": 1 - }, - "username": "test", - "secret": "test", - "mail": "test@example.com", - "display_name": "Test Testman", - "groups": ["quantum-lovers", "philosophy-haters", "physics-lovers"], - "opaque": { - "map": { - "gid": { - "_comment": "decodes to 135", - "decoder":"plain", - "value":"MTM1" - }, - "uid":{ - "_comment": "decodes to 468", - "decoder":"plain", - "value":"NDY4" + "decoder": "plain", + "value": "NDU2" } } } } -] +] \ No newline at end of file