Compare commits

..
246 Commits
Author SHA1 Message Date
mmattel 7af3e7222f [docs-only] Fix typo in docs-stable-2.0 branch 2023-04-18 14:43:31 +02:00
Amrita 7d10203801 Expand tests scenario for adding multiple user at once (#5864) 2023-04-18 01:08:03 +00:00
Amrita df7f21b817 Expand tests scenario for adding multiple user at once (#5864) 2023-04-17 00:35:42 +00:00
Amrita 908355ae7b Expand tests scenario for adding multiple user at once (#5864) 2023-04-16 00:37:17 +00:00
Amrita 5ab4983290 Expand tests scenario for adding multiple user at once (#5864) 2023-04-14 01:44:34 +00:00
Amrita b0088f81fd Expand tests scenario for adding multiple user at once (#5864) 2023-04-13 01:30:21 +00:00
Amrita 9aeed2b8cc Expand tests scenario for adding multiple user at once (#5864) 2023-04-11 01:29:15 +00:00
Amrita f8bfd9de5c Expand tests scenario for adding multiple user at once (#5864) 2023-04-10 00:55:14 +00:00
Amrita b5f2d7bbc1 Expand tests scenario for adding multiple user at once (#5864) 2023-04-09 00:55:48 +00:00
Amrita 2fcb040ef0 Expand tests scenario for adding multiple user at once (#5864) 2023-04-08 00:55:41 +00:00
Amrita a459264572 Expand tests scenario for adding multiple user at once (#5864) 2023-04-07 00:56:06 +00:00
Amrita 45ced82cac Expand tests scenario for adding multiple user at once (#5864) 2023-04-06 01:08:52 +00:00
Amrita ed335beed4 Expand tests scenario for adding multiple user at once (#5864) 2023-04-05 00:57:02 +00:00
Amrita 073d7b8b71 Expand tests scenario for adding multiple user at once (#5864) 2023-04-04 00:57:57 +00:00
Amrita 6c7b5e4d6b Expand tests scenario for adding multiple user at once (#5864) 2023-04-03 00:59:49 +00:00
Amrita 1c7e426fe2 Expand tests scenario for adding multiple user at once (#5864) 2023-04-02 01:02:29 +00:00
Amrita 2d72d9cd64 Expand tests scenario for adding multiple user at once (#5864) 2023-04-01 01:03:52 +00:00
Amrita 1fc8de99e1 Expand tests scenario for adding multiple user at once (#5864) 2023-03-31 01:28:35 +00:00
Amrita d7bfc84e5b Expand tests scenario for adding multiple user at once (#5864) 2023-03-30 03:33:17 +00:00
Sagar Gurung c4b0804d4a [tests-only][full-ci] Added schema for key and value pair assertion (#5861)
* Replace the key and value paris step with the current json assertion step

* Fix red CI for undefined step
2023-03-30 01:04:43 +00:00
Phil Davis e61a1965bb Merge pull request #5933 from owncloud/backport-test-for-set-quota-for-differnt-users
[tests-only][full-ci] Backport test for set quota for differnt users
2023-03-29 04:00:49 +00:00
Sagar Gurung 42a5e443c8 [tests-only][full-ci] Added schema for key and value pair assertion (#5861)
* Replace the key and value paris step with the current json assertion step

* Fix red CI for undefined step
2023-03-29 03:27:30 +00:00
Phil Davis 992972235a Merge pull request #5933 from owncloud/backport-test-for-set-quota-for-differnt-users
[tests-only][full-ci] Backport test for set quota for differnt users
2023-03-28 06:59:23 +00:00
Martin c1495a3687 Merge pull request #5937 from kobergj/BackportTypoFix
Backport Typo Fixes
2023-03-28 00:30:43 +00:00
Martin 7a277b7a10 Merge pull request #5937 from kobergj/BackportTypoFix
Backport Typo Fixes
2023-03-27 11:32:21 +00:00
Swikriti Tripathi efbb53a52f Unskip passing tests from CI (#5936) 2023-03-27 11:14:11 +00:00
Prajwol Amatya e8e99ba7ac [tests-only][full-ci] Test for adding multiple member to a group using invalid host in host part of user-id (#5875)
* added test for admin trying to add user with wrong host

* added test for adding single user to a group with invalid hostname
2023-03-27 04:57:17 +00:00
Prajwol Amatya 35eca75d1d test for adding users to a group using invalid JSON (#5898) 2023-03-27 00:33:58 +00:00
Prajwol Amatya a028894193 test for adding users to a group using invalid JSON (#5898) 2023-03-26 00:34:11 +00:00
Prajwol Amatya 27938d36b3 test for adding users to a group using invalid JSON (#5898) 2023-03-25 01:08:07 +00:00
Prajwol Amatya ae0c4b423e test for adding users to a group using invalid JSON (#5898) 2023-03-24 09:17:37 +00:00
Prarup Gurung bb8739b2bd Merge pull request #5883 from owncloud/revert-codes-related-to-ldap-stable
[full-ci] [tests-only] Revert codes related to ldap
2023-03-24 01:04:03 +00:00
Prarup Gurung cc92d3328e Merge pull request #5883 from owncloud/revert-codes-related-to-ldap-stable
[full-ci] [tests-only] Revert codes related to ldap
2023-03-23 01:05:31 +00:00
Prarup Gurung 7287690dae Merge pull request #5883 from owncloud/revert-codes-related-to-ldap-stable
[full-ci] [tests-only] Revert codes related to ldap
2023-03-22 03:39:47 +00:00
Prarup Gurung ee1a0f346d Merge pull request #5883 from owncloud/revert-codes-related-to-ldap-stable
[full-ci] [tests-only] Revert codes related to ldap
2023-03-22 00:05:53 +00:00
Prarup Gurung b7193c48c0 Merge pull request #5883 from owncloud/revert-codes-related-to-ldap-stable
[full-ci] [tests-only] Revert codes related to ldap
2023-03-21 08:31:30 +00:00
Prarup Gurung 23ca1abd45 Merge pull request #5856 from owncloud/remove-occ-related-leftovers
[full-ci] [tests-only] Remove occ related leftovers
2023-03-21 04:01:01 +00:00
Prarup Gurung de66e54092 Merge pull request #5837 from owncloud/remove-log-file-related-codes
[full-ci] [tests-only] Remove log file related codes
2023-03-21 00:43:27 +00:00
Prarup Gurung 1f207a7fd4 Merge pull request #5837 from owncloud/remove-log-file-related-codes
[full-ci] [tests-only] Remove log file related codes
2023-03-20 00:50:05 +00:00
Prarup Gurung 8bd0dc9592 Merge pull request #5837 from owncloud/remove-log-file-related-codes
[full-ci] [tests-only] Remove log file related codes
2023-03-19 00:06:00 +00:00
Prarup Gurung 058fb5c026 Merge pull request #5837 from owncloud/remove-log-file-related-codes
[full-ci] [tests-only] Remove log file related codes
2023-03-18 00:06:14 +00:00
Prarup Gurung f79c2a3432 Merge pull request #5837 from owncloud/remove-log-file-related-codes
[full-ci] [tests-only] Remove log file related codes
2023-03-17 06:46:55 +00:00
Swikriti Tripathi d8c4952d8d [full-ci][tests-only][backport]Add tests to check the end of an expiration date (#5834)
* Add tests to check the end of an expiration date

fix style

fix style

enable group share test

skip group share test on ocis

* add correct skip tag
2023-03-17 00:46:26 +00:00
Swikriti Tripathi be2c9bfd6e [full-ci][tests-only][backport]Add tests to check the end of an expiration date (#5834)
* Add tests to check the end of an expiration date

fix style

fix style

enable group share test

skip group share test on ocis

* add correct skip tag
2023-03-16 06:18:36 +00:00
Prarup Gurung 4c5e2e4849 Merge pull request #5824 from owncloud/remove-runOcc-method-from-FeatureContext
[full-ci] [tests-only] Remove `runOcc` method from `FeatureContext`
2023-03-16 00:46:14 +00:00
Prarup Gurung eefbb3c579 Merge pull request #5824 from owncloud/remove-runOcc-method-from-FeatureContext
[full-ci] [tests-only] Remove `runOcc` method from `FeatureContext`
2023-03-15 11:31:46 +00:00
Martin 292d878777 Merge pull request #5812 from kobergj/BackportFrontendDescriptions
[docs-only] Backport Frontend descriptions
2023-03-15 00:08:42 +00:00
Martin d3d4855517 Merge pull request #5812 from kobergj/BackportFrontendDescriptions
[docs-only] Backport Frontend descriptions
2023-03-14 16:12:02 +00:00
Prarup Gurung 01a28194eb Merge pull request #5691 from owncloud/remove-runOcc-method-from-setupHelper
[full-ci] [tests-only] Remove `runOcc` method from `SetupHelper`
2023-03-14 06:26:22 +00:00
Viktor Scharf 9a542ff71f [test-only] Port tests from #5769 (#5796) 2023-03-14 00:49:39 +00:00
Viktor Scharf d42ff46db1 [test-only] Port tests from #5769 (#5796) 2023-03-13 07:54:32 +00:00
Phil Davis 91d144bb37 Merge pull request #5780 from owncloud/remove-isTestingOnOcis-method
[full-ci] [tests-only] Remove `isTestingOnOcis` method
2023-03-13 06:36:15 +00:00
Amrita 31112dd6a2 Add different scenario api test for add users to group (#5693) 2023-03-13 00:48:05 +00:00
Amrita 4d05ffe529 Add different scenario api test for add users to group (#5693) 2023-03-12 00:12:29 +00:00
Amrita 325bce2a48 Add different scenario api test for add users to group (#5693) 2023-03-11 00:08:40 +00:00
Amrita cfad95836f commit 37273b080b
Author: Amrita <54478846+amrita-shrestha@users.noreply.github.com>
Date:   Fri Mar 10 16:06:43 2023 +0545

    Add different scenario api test for add users to group (#5693)
2023-03-10 10:23:16 +00:00
Prajwol Amatya 777eb16edb commit 2cd1b49d32
Merge: 5e6313b8f 05c22c6cf
Author: Prajwol Amatya <83579989+PrajwolAmatya@users.noreply.github.com>
Date:   Fri Mar 10 15:58:54 2023 +0545

    Merge pull request #5701 from owncloud/test-for-getting-non-existing-group

    [tests-only][full-ci]Test for getting non existing group
2023-03-10 10:18:47 +00:00
Sagar Gurung 6934c4b123 commit 5e6313b8f7
Author: Sagar Gurung <46086950+SagarGi@users.noreply.github.com>
Date:   Fri Mar 10 10:53:09 2023 +0545

    [tests-only][full-ci]Json drill suite `apiSpaces` (#5651)

    * Added json schema for response check in apiSpaces suite

    Signed-off-by: sagargurung1001@gmail.com <sagargurung1001@gmail.com>

    * Review Address

    * Added schema for space management feature

    ---------

    Signed-off-by: sagargurung1001@gmail.com <sagargurung1001@gmail.com>
2023-03-10 05:09:21 +00:00
Prarup Gurung cd56dc6968 commit cd3e8ed47e
Merge: b856f6546 bcc39d9f1
Author: Prarup Gurung <grgprarup@users.noreply.github.com>
Date:   Fri Mar 10 08:55:05 2023 +0545

    Merge pull request #5722 from owncloud/remove-isTestingOnOc10-method

    [full-ci] [tests-only] Remove `isTestingOnOc10` method
2023-03-10 03:15:18 +00:00
Swikriti Tripathi ddde05f45e commit b856f6546c
Author: Swikriti Tripathi <41103328+SwikritiT@users.noreply.github.com>
Date:   Thu Mar 9 17:27:31 2023 +0545

    Refactor test for updating the share (#5775)
2023-03-10 00:49:44 +00:00
Swikriti Tripathi 09829f9f87 commit b856f6546c
Author: Swikriti Tripathi <41103328+SwikritiT@users.noreply.github.com>
Date:   Thu Mar 9 17:27:31 2023 +0545

    Refactor test for updating the share (#5775)
2023-03-09 11:44:02 +00:00
Prajwol Amatya 9462f098f0 commit 4bf90fb0c8
Merge: 53224c182 3cc016ae1
Author: Prajwol Amatya <83579989+PrajwolAmatya@users.noreply.github.com>
Date:   Thu Mar 9 16:54:43 2023 +0545

    Merge pull request #5748 from owncloud/test-for-getting-group-with-utf8-characters-in-name

    [tests-only][full-ci]Test for getting group with utf8 characters in name
2023-03-09 11:11:15 +00:00
Prarup Gurung 3f6e349dc8 commit 5a57a7c6fb
Merge: da94701dc 8e2a8521e
Author: Prarup Gurung <grgprarup@users.noreply.github.com>
Date:   Thu Mar 9 11:33:02 2023 +0545

    Merge pull request #5705 from owncloud/remove-code-only-runs-for-core

    [full-ci] [tests-only] Remove `isTestingOnOcisOrReva` method
2023-03-09 05:51:57 +00:00
Swikriti Tripathi 70fa31e17a commit da94701dca
Author: Swikriti Tripathi <41103328+SwikritiT@users.noreply.github.com>
Date:   Wed Mar 8 12:55:03 2023 +0545

    [tests-only][full-ci]Refactor test function for handeling errors (#5745)

    * Refactor test function for handeling errors

    * fix return types

    * clean up code

    * address reviews
2023-03-09 00:46:30 +00:00
Swikriti Tripathi 0887160cb1 commit da94701dca
Author: Swikriti Tripathi <41103328+SwikritiT@users.noreply.github.com>
Date:   Wed Mar 8 12:55:03 2023 +0545

    [tests-only][full-ci]Refactor test function for handeling errors (#5745)

    * Refactor test function for handeling errors

    * fix return types

    * clean up code

    * address reviews
2023-03-08 07:11:28 +00:00
Prajwol Amatya 9025d4fa13 commit 950f17543b
Author: Prajwol Amatya <83579989+PrajwolAmatya@users.noreply.github.com>
Date:   Tue Mar 7 11:27:43 2023 +0000

    Automated changelog update [skip ci]
2023-03-08 00:10:23 +00:00
Prajwol Amatya 8060a66042 commit 1ac1ed825c
Author: Prajwol Amatya <83579989+PrajwolAmatya@users.noreply.github.com>
Date:   Tue Mar 7 17:12:22 2023 +0545

    [tests-only][full-ci] test for getting details of single group (#5641)

    * added test for getting details of a single group

    * addressed reviews

    * updated steps with JSON drill-down functionality

    * reviews addressed

    * fixed linter error

    * conflicts resolved

    * fixed errors

    * addressed reviews
2023-03-07 11:29:19 +00:00
Viktor Scharf 7e9feeccd9 commit daddb63900
Author: Viktor Scharf <scharf.vi@gmail.com>
Date:   Tue Mar 7 09:06:22 2023 +0100

    [test-only] ApiTest. Disable/enable user (#5639) (#5739)

    * [test-only] ApiTest. Disable/enable user (#5639)

    * fix expected failures lines
2023-03-07 08:07:47 +00:00
Amrita ba0218b962 commit 5a97f72ad8
Author: Amrita <54478846+amrita-shrestha@users.noreply.github.com>
Date:   Tue Mar 7 12:14:05 2023 +0545

    Extend assign role test coverage (#5744)
2023-03-07 06:34:17 +00:00
Swikriti Tripathi 5ee1d5921c commit fe4195d694
Author: Swikriti Tripathi <41103328+SwikritiT@users.noreply.github.com>
Date:   Tue Mar 7 09:40:09 2023 +0545

    [tests-only][full-ci]Seperate test steps for positive and negative cases (#5733)

    * Seperate test steps for positive and negative cases

    * fix php style

    * use the correct step

    * fix other steps

    * fix other php style

    * remove unwanted param
2023-03-07 04:01:38 +00:00
Phil Davis 7662d9da4a commit 2ceab0146f
Merge: cb6f243b6 8f44c8a3a
Author: Phil Davis <phil@jankaritech.com>
Date:   Mon Mar 6 13:25:19 2023 +0545

    Merge pull request #5671 from owncloud/backport-5575

    [tests-only][full-ci] Backport test PRs
2023-03-07 01:03:40 +00:00
Phil Davis 82a86cc6be commit 2ceab0146f
Merge: cb6f243b6 8f44c8a3a
Author: Phil Davis <phil@jankaritech.com>
Date:   Mon Mar 6 13:25:19 2023 +0545

    Merge pull request #5671 from owncloud/backport-5575

    [tests-only][full-ci] Backport test PRs
2023-03-06 07:41:33 +00:00
Phil Davis 7fcb7bf19b commit cb6f243b6a
Merge: ba5770a00 1e9632652
Author: Phil Davis <phil@jankaritech.com>
Date:   Sat Mar 4 10:01:46 2023 +0545

    Merge pull request #5706 from owncloud/ci/archive-go-bin

    [ci] Cache the go/bin content as a single archive file
2023-03-06 00:10:03 +00:00
Phil Davis dce626de1c commit cb6f243b6a
Merge: ba5770a00 1e9632652
Author: Phil Davis <phil@jankaritech.com>
Date:   Sat Mar 4 10:01:46 2023 +0545

    Merge pull request #5706 from owncloud/ci/archive-go-bin

    [ci] Cache the go/bin content as a single archive file
2023-03-05 00:06:12 +00:00
Phil Davis 1f4c678874 commit cb6f243b6a
Merge: ba5770a00 1e9632652
Author: Phil Davis <phil@jankaritech.com>
Date:   Sat Mar 4 10:01:46 2023 +0545

    Merge pull request #5706 from owncloud/ci/archive-go-bin

    [ci] Cache the go/bin content as a single archive file
2023-03-04 04:20:43 +00:00
Artur Neumann 9203a834da commit ba5770a00c
Merge: 0c1006cad 5b978a510
Author: Artur Neumann <artur@jankaritech.com>
Date:   Fri Mar 3 11:28:32 2023 +0545

    Merge pull request #5717 from owncloud/ci/gh-comment-e2e-tracing-port

    [ci][ci] Enable Github comment for e2e tracing results on failure (stable-2)
2023-03-04 00:44:37 +00:00
Artur Neumann 0d2622a6b0 commit ba5770a00c
Merge: 0c1006cad 5b978a510
Author: Artur Neumann <artur@jankaritech.com>
Date:   Fri Mar 3 11:28:32 2023 +0545

    Merge pull request #5717 from owncloud/ci/gh-comment-e2e-tracing-port

    [ci][ci] Enable Github comment for e2e tracing results on failure (stable-2)
2023-03-03 05:46:05 +00:00
Amrita 969caa0c6c commit 0c1006cad2
Merge: 4bd2b2ba6 d6c08e1e5
Author: Amrita <54478846+amrita-shrestha@users.noreply.github.com>
Date:   Thu Mar 2 13:37:08 2023 +0545

    Merge pull request #5678 from owncloud/add-multiple-user-in-group

    [full-ci][tests-only] Extend tests coverage for adding users in a group with single request
2023-03-03 04:03:32 +00:00
Amrita 0f15c28cde commit 0c1006cad2
Merge: 4bd2b2ba6 d6c08e1e5
Author: Amrita <54478846+amrita-shrestha@users.noreply.github.com>
Date:   Thu Mar 2 13:37:08 2023 +0545

    Merge pull request #5678 from owncloud/add-multiple-user-in-group

    [full-ci][tests-only] Extend tests coverage for adding users in a group with single request
2023-03-03 00:46:11 +00:00
Amrita f28ce95bb9 commit 0c1006cad2
Merge: 4bd2b2ba6 d6c08e1e5
Author: Amrita <54478846+amrita-shrestha@users.noreply.github.com>
Date:   Thu Mar 2 13:37:08 2023 +0545

    Merge pull request #5678 from owncloud/add-multiple-user-in-group

    [full-ci][tests-only] Extend tests coverage for adding users in a group with single request
2023-03-02 07:53:31 +00:00
Artur Neumann 1356b06945 commit 4bd2b2ba66
Merge: e73b55c90 0ca457bd6
Author: Artur Neumann <artur@jankaritech.com>
Date:   Wed Mar 1 16:59:23 2023 +0545

    Merge pull request #5612 from owncloud/remove-occ-related-codes

    [full-ci] [tests-only] Remove occ related codes
2023-03-02 00:23:16 +00:00
Artur Neumann c799345e64 commit 4bd2b2ba66
Merge: e73b55c90 0ca457bd6
Author: Artur Neumann <artur@jankaritech.com>
Date:   Wed Mar 1 16:59:23 2023 +0545

    Merge pull request #5612 from owncloud/remove-occ-related-codes

    [full-ci] [tests-only] Remove occ related codes
2023-03-01 11:39:50 +00:00
Artur Neumann 4e5316ca6f commit 4bd2b2ba66
Merge: e73b55c90 0ca457bd6
Author: Artur Neumann <artur@jankaritech.com>
Date:   Wed Mar 1 16:59:23 2023 +0545

    Merge pull request #5612 from owncloud/remove-occ-related-codes

    [full-ci] [tests-only] Remove occ related codes
2023-03-01 11:15:58 +00:00
Sawjan Gurung 0decc7d9b6 commit e73b55c905
Author: Sawjan Gurung <saw.jan.grg3e@gmail.com>
Date:   Wed Mar 1 14:55:42 2023 +0545

    update litmus to maintained container in ci (#5688)

    Co-authored-by: Robert Kaussow <mail@thegeeklab.de>
2023-03-01 09:12:04 +00:00
Artur Neumann 2df0d52713 commit 8abf65b2db
Author: Artur Neumann <artur@jankaritech.com>
Date:   Mon Feb 27 13:44:16 2023 +0545

    [tests-only] Cache go/bin as a long term cache (#5543)
2023-03-01 03:59:31 +00:00
Artur Neumann 54e35d7df8 commit 7121ad748a
Merge: 8abf65b2d 59b7c3638
Author: Artur Neumann <artur@jankaritech.com>
Date:   Wed Mar 1 09:33:06 2023 +0545

    Merge pull request #5642 from owncloud/remove-depthinfinity-related-steps-from-occContext

    [full-ci] [tests-only] Remove depthinfinity related steps from occ context
2023-03-01 03:51:04 +00:00
Artur Neumann 593e07d3d3 commit 8abf65b2db
Author: Artur Neumann <artur@jankaritech.com>
Date:   Mon Feb 27 13:44:16 2023 +0545

    [tests-only] Cache go/bin as a long term cache (#5543)
2023-03-01 00:19:20 +00:00
Artur Neumann e321757ce8 commit 8abf65b2db
Author: Artur Neumann <artur@jankaritech.com>
Date:   Mon Feb 27 13:44:16 2023 +0545

    [tests-only] Cache go/bin as a long term cache (#5543)
2023-02-28 00:18:19 +00:00
Artur Neumann 65f1464c2e commit 8abf65b2db
Author: Artur Neumann <artur@jankaritech.com>
Date:   Mon Feb 27 13:44:16 2023 +0545

    [tests-only] Cache go/bin as a long term cache (#5543)
2023-02-27 08:00:41 +00:00
Phil Davis a7b700a5e5 commit 167bd97f1e
Merge: d6f50e67b d47a4a136
Author: Phil Davis <phil@jankaritech.com>
Date:   Mon Feb 27 13:04:27 2023 +0545

    Merge pull request #5633 from owncloud/remove-systemconfigkey-related-steps-from-occContext

    [full-ci] [tests-only] Remove systemconfigkey related steps from occ context
2023-02-27 07:21:05 +00:00
Phil Davis f725734bdd commit d6f50e67ba
Merge: 625fee3ae 5381b485a
Author: Phil Davis <phil@jankaritech.com>
Date:   Mon Feb 27 11:32:28 2023 +0545

    Merge pull request #5621 from owncloud/json_drill_ocis

    [tests-only][full-ci] Json drill for `coreApiCapabilities` Suite using library
2023-02-27 05:49:24 +00:00
Prarup Gurung 5912651102 commit 625fee3aee
Merge: 25c791c00 6bc7c6e4c
Author: Prarup Gurung <grgprarup@users.noreply.github.com>
Date:   Fri Feb 24 10:06:44 2023 +0545

    Merge pull request #5632 from owncloud/remove-invokecommand-related-steps-from-occContext

    [full-ci] [tests-only] Remove invokecommand related steps from occ context
2023-02-27 03:38:00 +00:00
Prarup Gurung 54d04047f1 commit 625fee3aee
Merge: 25c791c00 6bc7c6e4c
Author: Prarup Gurung <grgprarup@users.noreply.github.com>
Date:   Fri Feb 24 10:06:44 2023 +0545

    Merge pull request #5632 from owncloud/remove-invokecommand-related-steps-from-occContext

    [full-ci] [tests-only] Remove invokecommand related steps from occ context
2023-02-27 00:24:36 +00:00
Prarup Gurung 4e8f693e39 commit 625fee3aee
Merge: 25c791c00 6bc7c6e4c
Author: Prarup Gurung <grgprarup@users.noreply.github.com>
Date:   Fri Feb 24 10:06:44 2023 +0545

    Merge pull request #5632 from owncloud/remove-invokecommand-related-steps-from-occContext

    [full-ci] [tests-only] Remove invokecommand related steps from occ context
2023-02-26 00:23:49 +00:00
Prarup Gurung 0d70c5049e commit 625fee3aee
Merge: 25c791c00 6bc7c6e4c
Author: Prarup Gurung <grgprarup@users.noreply.github.com>
Date:   Fri Feb 24 10:06:44 2023 +0545

    Merge pull request #5632 from owncloud/remove-invokecommand-related-steps-from-occContext

    [full-ci] [tests-only] Remove invokecommand related steps from occ context
2023-02-25 00:47:55 +00:00
Prarup Gurung 2adfb31788 commit 625fee3aee
Merge: 25c791c00 6bc7c6e4c
Author: Prarup Gurung <grgprarup@users.noreply.github.com>
Date:   Fri Feb 24 10:06:44 2023 +0545

    Merge pull request #5632 from owncloud/remove-invokecommand-related-steps-from-occContext

    [full-ci] [tests-only] Remove invokecommand related steps from occ context
2023-02-24 04:24:55 +00:00
Prarup Gurung 9836afa6b7 commit 25c791c005
Merge: a04ce720d 5920e8514
Author: Prarup Gurung <grgprarup@users.noreply.github.com>
Date:   Thu Feb 23 15:30:33 2023 +0545

    Merge pull request #5631 from owncloud/remove-occ-related-steps-from-occContext

    [full-ci] [tests-only] Remove occ related steps from occ context
2023-02-24 00:46:10 +00:00
Prarup Gurung a3e68126b9 commit 25c791c005
Merge: a04ce720d 5920e8514
Author: Prarup Gurung <grgprarup@users.noreply.github.com>
Date:   Thu Feb 23 15:30:33 2023 +0545

    Merge pull request #5631 from owncloud/remove-occ-related-steps-from-occContext

    [full-ci] [tests-only] Remove occ related steps from occ context
2023-02-23 09:46:50 +00:00
Artur Neumann e507488193 commit a04ce720d0
Merge: 515f4c49c fa06c0989
Author: Artur Neumann <artur@jankaritech.com>
Date:   Thu Feb 23 12:11:50 2023 +0545

    Merge pull request #5630 from owncloud/port#5616

    [test-only] increase coverage test for creating space (#5616)
2023-02-23 06:29:30 +00:00
Phil Davis 847013d582 commit 515f4c49ce
Merge: ed57edb3f 899d43767
Author: Phil Davis <phil@jankaritech.com>
Date:   Thu Feb 23 11:13:24 2023 +0545

    Merge pull request #5626 from owncloud/fix-acceptance-test-run-sh-stable

    [tests-only] Fix command format in tests/acceptance/run.sh
2023-02-23 05:29:42 +00:00
Sagar Gurung df7824ad00 commit ed57edb3f7
Author: Sagar Gurung <46086950+SagarGi@users.noreply.github.com>
Date:   Wed Feb 22 14:52:11 2023 +0545

    [tests-only][full-ci]Added graph API test for getting all groups along with its members (#5593)
2023-02-23 00:08:13 +00:00
Sagar Gurung 8afcdfad2c commit ed57edb3f7
Author: Sagar Gurung <46086950+SagarGi@users.noreply.github.com>
Date:   Wed Feb 22 14:52:11 2023 +0545

    [tests-only][full-ci]Added graph API test for getting all groups along with its members (#5593)
2023-02-22 09:08:33 +00:00
Phil Davis ac34ca1916 commit 5da85fd69c
Merge: 6815cba92 d4ffe37ad
Author: Phil Davis <phil@jankaritech.com>
Date:   Tue Feb 21 17:21:43 2023 +0545

    Merge pull request #5608 from owncloud/allow-plain-acceptance-test-output-stable

    [tests-only] Allow plain acceptance test output stable
2023-02-22 00:27:05 +00:00
Phil Davis 1c7a39bbaa commit 5da85fd69c
Merge: 6815cba92 d4ffe37ad
Author: Phil Davis <phil@jankaritech.com>
Date:   Tue Feb 21 17:21:43 2023 +0545

    Merge pull request #5608 from owncloud/allow-plain-acceptance-test-output-stable

    [tests-only] Allow plain acceptance test output stable
2023-02-21 11:38:12 +00:00
Phil Davis f5ad17d0c6 commit 6815cba92d
Merge: fe490fd28 8c1803e30
Author: Phil Davis <phil@jankaritech.com>
Date:   Tue Feb 21 14:03:51 2023 +0545

    Merge pull request #5520 from owncloud/remove-scenarios-tagged-skiponocis

    [full-ci] [tests-only] Remove scenarios tagged skiponocis
2023-02-21 08:20:13 +00:00
Prarup Gurung 22aaef1add commit fe490fd28c
Merge: 2949b319e 8cca2acbb
Author: Prarup Gurung <grgprarup@users.noreply.github.com>
Date:   Wed Feb 15 09:34:20 2023 +0545

    Merge pull request #5491 from owncloud/remove-scenarios-tagged-notToImplementOnOcis

    [full-ci] [tests-only] Removed scenarios tagged with `notToImplementOnOcis` tag
2023-02-21 00:45:20 +00:00
Prarup Gurung 38adc5a8b2 commit fe490fd28c
Merge: 2949b319e 8cca2acbb
Author: Prarup Gurung <grgprarup@users.noreply.github.com>
Date:   Wed Feb 15 09:34:20 2023 +0545

    Merge pull request #5491 from owncloud/remove-scenarios-tagged-notToImplementOnOcis

    [full-ci] [tests-only] Removed scenarios tagged with `notToImplementOnOcis` tag
2023-02-20 00:08:31 +00:00
Prarup Gurung ae4402d665 commit fe490fd28c
Merge: 2949b319e 8cca2acbb
Author: Prarup Gurung <grgprarup@users.noreply.github.com>
Date:   Wed Feb 15 09:34:20 2023 +0545

    Merge pull request #5491 from owncloud/remove-scenarios-tagged-notToImplementOnOcis

    [full-ci] [tests-only] Removed scenarios tagged with `notToImplementOnOcis` tag
2023-02-19 00:09:20 +00:00
Prarup Gurung 2794d39115 commit fe490fd28c
Merge: 2949b319e 8cca2acbb
Author: Prarup Gurung <grgprarup@users.noreply.github.com>
Date:   Wed Feb 15 09:34:20 2023 +0545

    Merge pull request #5491 from owncloud/remove-scenarios-tagged-notToImplementOnOcis

    [full-ci] [tests-only] Removed scenarios tagged with `notToImplementOnOcis` tag
2023-02-18 00:53:20 +00:00
Prarup Gurung aa0cf3afb8 commit fe490fd28c
Merge: 2949b319e 8cca2acbb
Author: Prarup Gurung <grgprarup@users.noreply.github.com>
Date:   Wed Feb 15 09:34:20 2023 +0545

    Merge pull request #5491 from owncloud/remove-scenarios-tagged-notToImplementOnOcis

    [full-ci] [tests-only] Removed scenarios tagged with `notToImplementOnOcis` tag
2023-02-17 03:52:30 +00:00
Prarup Gurung d90d297cb3 commit fe490fd28c
Merge: 2949b319e 8cca2acbb
Author: Prarup Gurung <grgprarup@users.noreply.github.com>
Date:   Wed Feb 15 09:34:20 2023 +0545

    Merge pull request #5491 from owncloud/remove-scenarios-tagged-notToImplementOnOcis

    [full-ci] [tests-only] Removed scenarios tagged with `notToImplementOnOcis` tag
2023-02-16 04:02:28 +00:00
Prarup Gurung 0b9e969ae0 commit fe490fd28c
Merge: 2949b319e 8cca2acbb
Author: Prarup Gurung <grgprarup@users.noreply.github.com>
Date:   Wed Feb 15 09:34:20 2023 +0545

    Merge pull request #5491 from owncloud/remove-scenarios-tagged-notToImplementOnOcis

    [full-ci] [tests-only] Removed scenarios tagged with `notToImplementOnOcis` tag
2023-02-15 03:53:22 +00:00
Amrita e795de6e36 commit 2949b319e5
Author: Amrita <54478846+amrita-shrestha@users.noreply.github.com>
Date:   Tue Feb 14 10:04:08 2023 +0545

    [full-ci][tests-only]Refactor share permission in coreApiSharePublicLinkShare (#5494)

    * Refactor share permission related scenario
2023-02-15 00:50:07 +00:00
Amrita cef0bb142a commit 2949b319e5
Author: Amrita <54478846+amrita-shrestha@users.noreply.github.com>
Date:   Tue Feb 14 10:04:08 2023 +0545

    [full-ci][tests-only]Refactor share permission in coreApiSharePublicLinkShare (#5494)

    * Refactor share permission related scenario
2023-02-14 04:23:01 +00:00
Martin f9fd2472c7 commit 2c88d21519
Merge: c80dbeadb d1a69cac1
Author: Martin <github@diemattels.at>
Date:   Mon Feb 13 13:28:40 2023 +0100

    Merge pull request #5551 from wkloucek/backport-PROXY_USER_OIDC_CLAIM-improvement

    backport PROXY USER OIDC CLAIM improvement
2023-02-14 00:52:51 +00:00
Martin f5906ba210 commit 2c88d21519
Merge: c80dbeadb d1a69cac1
Author: Martin <github@diemattels.at>
Date:   Mon Feb 13 13:28:40 2023 +0100

    Merge pull request #5551 from wkloucek/backport-PROXY_USER_OIDC_CLAIM-improvement

    backport PROXY USER OIDC CLAIM improvement
2023-02-13 12:30:18 +00:00
Amrita b97e2241a1 commit c80dbeadb8
Merge: b68914b52 b06983f55
Author: Amrita <54478846+amrita-shrestha@users.noreply.github.com>
Date:   Mon Feb 13 15:44:23 2023 +0545

    Merge pull request #5502 from owncloud/refactor-share-permission-coreApiSharePublicLink3

    [tests-only][full-ci]Refactor share permission related scenario in coreApiSharePublicLink3
2023-02-13 10:01:04 +00:00
Martin fb99a14b8a commit b68914b521
Merge: cd804685b 9ddbe9168
Author: Martin <github@diemattels.at>
Date:   Fri Feb 10 13:50:31 2023 +0100

    Merge pull request #5549 from kobergj/BackportEnvDescImprovement
2023-02-13 00:13:12 +00:00
Martin ae340b12ab commit b68914b521
Merge: cd804685b 9ddbe9168
Author: Martin <github@diemattels.at>
Date:   Fri Feb 10 13:50:31 2023 +0100

    Merge pull request #5549 from kobergj/BackportEnvDescImprovement
2023-02-12 00:47:01 +00:00
Martin 276e94cc45 commit b68914b521
Merge: cd804685b 9ddbe9168
Author: Martin <github@diemattels.at>
Date:   Fri Feb 10 13:50:31 2023 +0100

    Merge pull request #5549 from kobergj/BackportEnvDescImprovement
2023-02-11 00:07:08 +00:00
Martin eee6ea4d1d commit b68914b521
Merge: cd804685b 9ddbe9168
Author: Martin <github@diemattels.at>
Date:   Fri Feb 10 13:50:31 2023 +0100

    Merge pull request #5549 from kobergj/BackportEnvDescImprovement
2023-02-10 12:55:52 +00:00
Willy Kloucek 6e59c3c513 commit cd804685b5
Merge: 9286df9a1 cc3f983e2
Author: Willy Kloucek <34452982+wkloucek@users.noreply.github.com>
Date:   Fri Feb 10 10:44:39 2023 +0100

    Merge pull request #5547 from kobergj/DescBackport

    [docs-only] Backport Description update
2023-02-10 09:46:43 +00:00
Prarup Gurung cef3214251 commit 9286df9a1c
Author: Prarup Gurung <grgprarup@users.noreply.github.com>
Date:   Wed Feb 8 14:09:13 2023 +0545

    Removed DAV tech preview steps and related code (#5526)
2023-02-10 03:55:37 +00:00
Prarup Gurung c605b57a84 commit 9286df9a1c
Author: Prarup Gurung <grgprarup@users.noreply.github.com>
Date:   Wed Feb 8 14:09:13 2023 +0545

    Removed DAV tech preview steps and related code (#5526)
2023-02-10 03:41:32 +00:00
Prarup Gurung 58dbf8f2c4 commit 9286df9a1c
Author: Prarup Gurung <grgprarup@users.noreply.github.com>
Date:   Wed Feb 8 14:09:13 2023 +0545

    Removed DAV tech preview steps and related code (#5526)
2023-02-09 03:40:28 +00:00
Prarup Gurung 4ef24ddf49 commit 9286df9a1c
Author: Prarup Gurung <grgprarup@users.noreply.github.com>
Date:   Wed Feb 8 14:09:13 2023 +0545

    Removed DAV tech preview steps and related code (#5526)
2023-02-09 00:45:05 +00:00
Prarup Gurung 236341cbe3 commit 9286df9a1c
Author: Prarup Gurung <grgprarup@users.noreply.github.com>
Date:   Wed Feb 8 14:09:13 2023 +0545

    Removed DAV tech preview steps and related code (#5526)
2023-02-08 08:27:00 +00:00
kobergj 2925278a60 commit f85d7d7e52
Author: kobergj <jkoberg@owncloud.com>
Date:   Tue Feb 7 10:20:42 2023 +0000

    Automated changelog update [skip ci]
2023-02-08 00:48:15 +00:00
kobergj 1c49944055 commit f67f7dbcd5
Author: kobergj <jkoberg@owncloud.com>
Date:   Tue Feb 7 11:20:07 2023 +0100

    [full-ci][tests-only] Backport Envvars Docu and search readme (#5523)

    * fix some envvar descriptions

    * create readme.md for seach

    ---------

    Co-authored-by: mmattel <github@diemattels.at>
2023-02-07 10:21:44 +00:00
Benedikt Kulmann ed6b92d8ac commit bdd941e93d
Merge: d0e71a6c6 85e7c64ae
Author: Benedikt Kulmann <benedikt@kulmann.biz>
Date:   Tue Feb 7 10:57:42 2023 +0100

    Merge pull request #5522 from owncloud/fixFlackyGoLint

    [tests-only] fix flacky go linting
2023-02-07 09:59:26 +00:00
Artur Neumann bab3d3a162 commit fbe05dcce0
Merge: f627499f9 15c152bd6
Author: Artur Neumann <artur@jankaritech.com>
Date:   Tue Feb 7 14:20:42 2023 +0545

    Merge pull request #5479 from roshanlc/tests-for-relative-quota-amount

    [tests-only][full-ci] Test scenarios for relative quota amount of personal space
2023-02-07 08:39:18 +00:00
Amrita 89eb9cd120 commit 4e0cdaa04f
Author: Amrita <54478846+amrita-shrestha@users.noreply.github.com>
Date:   Mon Feb 6 00:06:21 2023 +0000

    Automated changelog update [skip ci]
2023-02-07 00:08:01 +00:00
Amrita e0a013a4b3 commit d3a1c36c21
Merge: 9983aa760 388ec1f66
Author: Amrita <54478846+amrita-shrestha@users.noreply.github.com>
Date:   Thu Feb 2 15:05:17 2023 +0545

    Merge pull request #5501 from owncloud/refactor-share-permission-coreApiSharePublicLink2

    [tests-only][full-ci]Refactor share permission related scenario in coreApiSharePublicLink2
2023-02-06 03:28:20 +00:00
Amrita f6fbd5a352 commit d3a1c36c21
Merge: 9983aa760 388ec1f66
Author: Amrita <54478846+amrita-shrestha@users.noreply.github.com>
Date:   Thu Feb 2 15:05:17 2023 +0545

    Merge pull request #5501 from owncloud/refactor-share-permission-coreApiSharePublicLink2

    [tests-only][full-ci]Refactor share permission related scenario in coreApiSharePublicLink2
2023-02-06 00:06:49 +00:00
Amrita d0790c26fc commit d3a1c36c21
Merge: 9983aa760 388ec1f66
Author: Amrita <54478846+amrita-shrestha@users.noreply.github.com>
Date:   Thu Feb 2 15:05:17 2023 +0545

    Merge pull request #5501 from owncloud/refactor-share-permission-coreApiSharePublicLink2

    [tests-only][full-ci]Refactor share permission related scenario in coreApiSharePublicLink2
2023-02-05 00:45:08 +00:00
Amrita 11c7835970 commit d3a1c36c21
Merge: 9983aa760 388ec1f66
Author: Amrita <54478846+amrita-shrestha@users.noreply.github.com>
Date:   Thu Feb 2 15:05:17 2023 +0545

    Merge pull request #5501 from owncloud/refactor-share-permission-coreApiSharePublicLink2

    [tests-only][full-ci]Refactor share permission related scenario in coreApiSharePublicLink2
2023-02-04 00:45:50 +00:00
Amrita f8276e601b commit d3a1c36c21
Merge: 9983aa760 388ec1f66
Author: Amrita <54478846+amrita-shrestha@users.noreply.github.com>
Date:   Thu Feb 2 15:05:17 2023 +0545

    Merge pull request #5501 from owncloud/refactor-share-permission-coreApiSharePublicLink2

    [tests-only][full-ci]Refactor share permission related scenario in coreApiSharePublicLink2
2023-02-03 03:57:35 +00:00
Amrita cab1295649 commit d3a1c36c21
Merge: 9983aa760 388ec1f66
Author: Amrita <54478846+amrita-shrestha@users.noreply.github.com>
Date:   Thu Feb 2 15:05:17 2023 +0545

    Merge pull request #5501 from owncloud/refactor-share-permission-coreApiSharePublicLink2

    [tests-only][full-ci]Refactor share permission related scenario in coreApiSharePublicLink2
2023-02-03 00:09:32 +00:00
Amrita a7336dffee commit d3a1c36c21
Merge: 9983aa760 388ec1f66
Author: Amrita <54478846+amrita-shrestha@users.noreply.github.com>
Date:   Thu Feb 2 15:05:17 2023 +0545

    Merge pull request #5501 from owncloud/refactor-share-permission-coreApiSharePublicLink2

    [tests-only][full-ci]Refactor share permission related scenario in coreApiSharePublicLink2
2023-02-02 09:21:27 +00:00
Viktor Scharf 402d73480c commit 9983aa760d
Author: Viktor Scharf <scharf.vi@gmail.com>
Date:   Thu Feb 2 09:00:08 2023 +0100

    add checking (#5495)
2023-02-02 08:01:41 +00:00
Prarup Gurung cbb5c06a36 commit e3ddfbd4eb
Author: Prarup Gurung <grgprarup@users.noreply.github.com>
Date:   Wed Feb 1 09:28:02 2023 +0000

    Automated changelog update [skip ci]
2023-02-02 03:56:43 +00:00
Prarup Gurung 149850bcd1 commit e3ddfbd4eb
Author: Prarup Gurung <grgprarup@users.noreply.github.com>
Date:   Wed Feb 1 09:28:02 2023 +0000

    Automated changelog update [skip ci]
2023-02-02 03:51:57 +00:00
Prarup Gurung 5618b3aba3 commit e3ddfbd4eb
Author: Prarup Gurung <grgprarup@users.noreply.github.com>
Date:   Wed Feb 1 09:28:02 2023 +0000

    Automated changelog update [skip ci]
2023-02-02 00:06:57 +00:00
Prarup Gurung cf5976e4ba commit 266cbaf1f1
Merge: 9b2f3a18c 2a6e7a765
Author: Prarup Gurung <grgprarup@users.noreply.github.com>
Date:   Wed Feb 1 15:11:23 2023 +0545

    Merge pull request #5485 from owncloud/remove-core-bug-demonstration-scenarios

    [full-ci] [tests-only] Remove core bug demonstration scenarios
2023-02-01 09:29:55 +00:00
Phil Davis fc0a3b704d commit 9b2f3a18ca
Merge: d38d9a699 8f257d1d9
Author: Phil Davis <phil@jankaritech.com>
Date:   Mon Jan 30 14:06:20 2023 +0545

    Merge pull request #5456 from roshanlc/tests-for-personal-shares-report-response

    [tests-only][full-ci] Test scenarios for search/REPORT response for personal shares
2023-02-01 00:47:24 +00:00
Phil Davis 573791d3d9 commit 9b2f3a18ca
Merge: d38d9a699 8f257d1d9
Author: Phil Davis <phil@jankaritech.com>
Date:   Mon Jan 30 14:06:20 2023 +0545

    Merge pull request #5456 from roshanlc/tests-for-personal-shares-report-response

    [tests-only][full-ci] Test scenarios for search/REPORT response for personal shares
2023-01-31 00:46:59 +00:00
Phil Davis 8f381e594c commit 9b2f3a18ca
Merge: d38d9a699 8f257d1d9
Author: Phil Davis <phil@jankaritech.com>
Date:   Mon Jan 30 14:06:20 2023 +0545

    Merge pull request #5456 from roshanlc/tests-for-personal-shares-report-response

    [tests-only][full-ci] Test scenarios for search/REPORT response for personal shares
2023-01-30 08:23:15 +00:00
Phil Davis 655a1216ea commit d38d9a6991
Merge: 72de54312 54d442cf9
Author: Phil Davis <phil@jankaritech.com>
Date:   Fri Jan 27 16:38:37 2023 +0545

    Merge pull request #5468 from kobergj/BackportDeprecationFixes

    [docs-only] Backport Deprecation Fixes
2023-01-30 03:55:05 +00:00
Phil Davis 718dfdb56d commit d38d9a6991
Merge: 72de54312 54d442cf9
Author: Phil Davis <phil@jankaritech.com>
Date:   Fri Jan 27 16:38:37 2023 +0545

    Merge pull request #5468 from kobergj/BackportDeprecationFixes

    [docs-only] Backport Deprecation Fixes
2023-01-30 03:54:29 +00:00
Phil Davis 0278729fee commit d38d9a6991
Merge: 72de54312 54d442cf9
Author: Phil Davis <phil@jankaritech.com>
Date:   Fri Jan 27 16:38:37 2023 +0545

    Merge pull request #5468 from kobergj/BackportDeprecationFixes

    [docs-only] Backport Deprecation Fixes
2023-01-30 00:06:21 +00:00
Phil Davis 8b042a0d39 commit d38d9a6991
Merge: 72de54312 54d442cf9
Author: Phil Davis <phil@jankaritech.com>
Date:   Fri Jan 27 16:38:37 2023 +0545

    Merge pull request #5468 from kobergj/BackportDeprecationFixes

    [docs-only] Backport Deprecation Fixes
2023-01-29 00:06:30 +00:00
Phil Davis dd4f51f461 commit d38d9a6991
Merge: 72de54312 54d442cf9
Author: Phil Davis <phil@jankaritech.com>
Date:   Fri Jan 27 16:38:37 2023 +0545

    Merge pull request #5468 from kobergj/BackportDeprecationFixes

    [docs-only] Backport Deprecation Fixes
2023-01-28 00:07:26 +00:00
Phil Davis 334fe16d98 commit d38d9a6991
Merge: 72de54312 54d442cf9
Author: Phil Davis <phil@jankaritech.com>
Date:   Fri Jan 27 16:38:37 2023 +0545

    Merge pull request #5468 from kobergj/BackportDeprecationFixes

    [docs-only] Backport Deprecation Fixes
2023-01-27 10:55:01 +00:00
Phil Davis edf5b95dfe commit 72de543124
Merge: 318f146de dc3416906
Author: Phil Davis <phil@jankaritech.com>
Date:   Sun Jan 22 18:29:46 2023 +0545

    Merge pull request #5440 from roshanlc/backport-public-link-role-change-to-internal

    [tests-only][full-ci] Backport test scenarios for changing role of public link to internal to stable-2.0
2023-01-27 00:07:34 +00:00
Phil Davis 001a0bd188 commit 72de543124
Merge: 318f146de dc3416906
Author: Phil Davis <phil@jankaritech.com>
Date:   Sun Jan 22 18:29:46 2023 +0545

    Merge pull request #5440 from roshanlc/backport-public-link-role-change-to-internal

    [tests-only][full-ci] Backport test scenarios for changing role of public link to internal to stable-2.0
2023-01-26 04:46:28 +00:00
Phil Davis 8bba41ac09 commit 72de543124
Merge: 318f146de dc3416906
Author: Phil Davis <phil@jankaritech.com>
Date:   Sun Jan 22 18:29:46 2023 +0545

    Merge pull request #5440 from roshanlc/backport-public-link-role-change-to-internal

    [tests-only][full-ci] Backport test scenarios for changing role of public link to internal to stable-2.0
2023-01-26 00:08:15 +00:00
Phil Davis f9f3a32a22 commit 72de543124
Merge: 318f146de dc3416906
Author: Phil Davis <phil@jankaritech.com>
Date:   Sun Jan 22 18:29:46 2023 +0545

    Merge pull request #5440 from roshanlc/backport-public-link-role-change-to-internal

    [tests-only][full-ci] Backport test scenarios for changing role of public link to internal to stable-2.0
2023-01-25 00:44:46 +00:00
Phil Davis b08c9477a9 commit 72de543124
Merge: 318f146de dc3416906
Author: Phil Davis <phil@jankaritech.com>
Date:   Sun Jan 22 18:29:46 2023 +0545

    Merge pull request #5440 from roshanlc/backport-public-link-role-change-to-internal

    [tests-only][full-ci] Backport test scenarios for changing role of public link to internal to stable-2.0
2023-01-24 00:42:38 +00:00
Phil Davis 00e356a59b commit 72de543124
Merge: 318f146de dc3416906
Author: Phil Davis <phil@jankaritech.com>
Date:   Sun Jan 22 18:29:46 2023 +0545

    Merge pull request #5440 from roshanlc/backport-public-link-role-change-to-internal

    [tests-only][full-ci] Backport test scenarios for changing role of public link to internal to stable-2.0
2023-01-23 03:08:23 +00:00
Phil Davis 2b7582fdbf commit 72de543124
Merge: 318f146de dc3416906
Author: Phil Davis <phil@jankaritech.com>
Date:   Sun Jan 22 18:29:46 2023 +0545

    Merge pull request #5440 from roshanlc/backport-public-link-role-change-to-internal

    [tests-only][full-ci] Backport test scenarios for changing role of public link to internal to stable-2.0
2023-01-22 12:48:09 +00:00
Martin 7db860020b commit 318f146de3
Merge: a4a6c4bf7 d0d0517b4
Author: Martin <github@diemattels.at>
Date:   Fri Jan 20 13:09:27 2023 +0100

    Merge pull request #5437 from owncloud/changeDocTestingSection

    [docs-only] Change Testing section in the doc (#5430)
2023-01-22 00:34:27 +00:00
Martin 92be19436f commit 318f146de3
Merge: a4a6c4bf7 d0d0517b4
Author: Martin <github@diemattels.at>
Date:   Fri Jan 20 13:09:27 2023 +0100

    Merge pull request #5437 from owncloud/changeDocTestingSection

    [docs-only] Change Testing section in the doc (#5430)
2023-01-20 12:13:48 +00:00
Sawjan Gurung 3041ea299b commit a4a6c4bf79
Author: Sawjan Gurung <saw.jan.grg3e@gmail.com>
Date:   Thu Jan 19 13:32:25 2023 +0545

    [tests-only][full-ci] Added version author tests (#5425)

    * update version author tests

    * update expected falure list

    * update file versions features

    * refactor version author assertion
2023-01-20 04:20:45 +00:00
Sawjan Gurung 6e72560e56 commit a4a6c4bf79
Author: Sawjan Gurung <saw.jan.grg3e@gmail.com>
Date:   Thu Jan 19 13:32:25 2023 +0545

    [tests-only][full-ci] Added version author tests (#5425)

    * update version author tests

    * update expected falure list

    * update file versions features

    * refactor version author assertion
2023-01-20 00:05:30 +00:00
Sawjan Gurung c82e17bf26 commit a4a6c4bf79
Author: Sawjan Gurung <saw.jan.grg3e@gmail.com>
Date:   Thu Jan 19 13:32:25 2023 +0545

    [tests-only][full-ci] Added version author tests (#5425)

    * update version author tests

    * update expected falure list

    * update file versions features

    * refactor version author assertion
2023-01-19 07:51:11 +00:00
Swikriti Tripathi c4a2bdba32 commit 0d0f296b76
Author: Swikriti Tripathi <41103328+SwikritiT@users.noreply.github.com>
Date:   Mon Jan 16 13:06:51 2023 +0545

    Check herf of the public link file (#5401)
2023-01-19 03:27:32 +00:00
Swikriti Tripathi d94637883e commit 0d0f296b76
Author: Swikriti Tripathi <41103328+SwikritiT@users.noreply.github.com>
Date:   Mon Jan 16 13:06:51 2023 +0545

    Check herf of the public link file (#5401)
2023-01-18 00:05:59 +00:00
Swikriti Tripathi 4d9cdfa3a3 commit 0d0f296b76
Author: Swikriti Tripathi <41103328+SwikritiT@users.noreply.github.com>
Date:   Mon Jan 16 13:06:51 2023 +0545

    Check herf of the public link file (#5401)
2023-01-17 00:05:41 +00:00
Swikriti Tripathi cf5382f3a3 commit 0d0f296b76
Author: Swikriti Tripathi <41103328+SwikritiT@users.noreply.github.com>
Date:   Mon Jan 16 13:06:51 2023 +0545

    Check herf of the public link file (#5401)
2023-01-16 07:24:11 +00:00
Martin 9526a86351 commit bcb2159cb3
Merge: 176272d8a d5d9640d4
Author: Martin <github@diemattels.at>
Date:   Fri Jan 13 10:26:26 2023 +0100

    Merge pull request #5402 from kobergj/BackportDocsReadme

    [docs-only] Backport docs README
2023-01-16 00:07:08 +00:00
Martin ac434cea78 commit bcb2159cb3
Merge: 176272d8a d5d9640d4
Author: Martin <github@diemattels.at>
Date:   Fri Jan 13 10:26:26 2023 +0100

    Merge pull request #5402 from kobergj/BackportDocsReadme

    [docs-only] Backport docs README
2023-01-15 00:09:45 +00:00
Martin 5cc11111fa commit bcb2159cb3
Merge: 176272d8a d5d9640d4
Author: Martin <github@diemattels.at>
Date:   Fri Jan 13 10:26:26 2023 +0100

    Merge pull request #5402 from kobergj/BackportDocsReadme

    [docs-only] Backport docs README
2023-01-14 00:46:17 +00:00
Martin b131bc675e commit bcb2159cb3
Merge: 176272d8a d5d9640d4
Author: Martin <github@diemattels.at>
Date:   Fri Jan 13 10:26:26 2023 +0100

    Merge pull request #5402 from kobergj/BackportDocsReadme

    [docs-only] Backport docs README
2023-01-13 09:27:59 +00:00
Sawjan Gurung a03dfff1b5 commit 176272d8ae
Author: Sawjan Gurung <saw.jan.grg3e@gmail.com>
Date:   Thu Jan 12 10:07:35 2023 +0545

    [tests-only][full-ci] Added tests for checking version of file uploaded with same mtime twice (#5379)
2023-01-13 00:44:51 +00:00
Sawjan Gurung f9f8d8cf04 commit 176272d8ae
Author: Sawjan Gurung <saw.jan.grg3e@gmail.com>
Date:   Thu Jan 12 10:07:35 2023 +0545

    [tests-only][full-ci] Added tests for checking version of file uploaded with same mtime twice (#5379)
2023-01-12 04:24:26 +00:00
kobergj b13929515d commit 348dc74550
Author: kobergj <jkoberg@owncloud.com>
Date:   Wed Jan 11 14:57:40 2023 +0100

    [docs-only] Backport Docs Helpers to 2.0 (#5378)

    * backport docs/helpers

    Signed-off-by: jkoberg <jkoberg@owncloud.com>

    * backport docs/templates

    Signed-off-by: jkoberg <jkoberg@owncloud.com>

    * backport Makefile

    Signed-off-by: jkoberg <jkoberg@owncloud.com>

    * backport docs/Makefile

    Signed-off-by: jkoberg <jkoberg@owncloud.com>

    Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-01-12 00:45:21 +00:00
kobergj 0cd8387a37 commit 348dc74550
Author: kobergj <jkoberg@owncloud.com>
Date:   Wed Jan 11 14:57:40 2023 +0100

    [docs-only] Backport Docs Helpers to 2.0 (#5378)

    * backport docs/helpers

    Signed-off-by: jkoberg <jkoberg@owncloud.com>

    * backport docs/templates

    Signed-off-by: jkoberg <jkoberg@owncloud.com>

    * backport Makefile

    Signed-off-by: jkoberg <jkoberg@owncloud.com>

    * backport docs/Makefile

    Signed-off-by: jkoberg <jkoberg@owncloud.com>

    Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-01-11 13:59:18 +00:00
Phil Davis e1b0cd273c commit 1b3b9527f8
Merge: 3c544707e 6d3a411e5
Author: Phil Davis <phil@jankaritech.com>
Date:   Fri Jan 6 17:09:34 2023 +0545

    Merge pull request #5350 from owncloud/tests/port-async-php-codes

    [tests-only][full-ci] Port async upload php codes
2023-01-11 00:45:50 +00:00
Phil Davis 80747b62e5 commit 1b3b9527f8
Merge: 3c544707e 6d3a411e5
Author: Phil Davis <phil@jankaritech.com>
Date:   Fri Jan 6 17:09:34 2023 +0545

    Merge pull request #5350 from owncloud/tests/port-async-php-codes

    [tests-only][full-ci] Port async upload php codes
2023-01-10 00:45:21 +00:00
Phil Davis 3f672f9daf commit 1b3b9527f8
Merge: 3c544707e 6d3a411e5
Author: Phil Davis <phil@jankaritech.com>
Date:   Fri Jan 6 17:09:34 2023 +0545

    Merge pull request #5350 from owncloud/tests/port-async-php-codes

    [tests-only][full-ci] Port async upload php codes
2023-01-09 00:47:07 +00:00
Phil Davis 88651afa4f commit 1b3b9527f8
Merge: 3c544707e 6d3a411e5
Author: Phil Davis <phil@jankaritech.com>
Date:   Fri Jan 6 17:09:34 2023 +0545

    Merge pull request #5350 from owncloud/tests/port-async-php-codes

    [tests-only][full-ci] Port async upload php codes
2023-01-08 00:07:57 +00:00
Phil Davis bd015082f6 commit 1b3b9527f8
Merge: 3c544707e 6d3a411e5
Author: Phil Davis <phil@jankaritech.com>
Date:   Fri Jan 6 17:09:34 2023 +0545

    Merge pull request #5350 from owncloud/tests/port-async-php-codes

    [tests-only][full-ci] Port async upload php codes
2023-01-07 00:07:31 +00:00
Phil Davis c4941a7caa commit 1b3b9527f8
Merge: 3c544707e 6d3a411e5
Author: Phil Davis <phil@jankaritech.com>
Date:   Fri Jan 6 17:09:34 2023 +0545

    Merge pull request #5350 from owncloud/tests/port-async-php-codes

    [tests-only][full-ci] Port async upload php codes
2023-01-06 11:26:45 +00:00
Martin 4d8842161a Merge pull request #5352 from owncloud/mmattel-patch-1
Backport of STORAGE_USERS_DRIVER description changes to docs-stable-2.0
2023-01-06 10:57:49 +01:00
Martin 535db19596 Backport of STORAGE_USERS_DRIVER description changes to docs-stable-2.0
References: #5345 (Complete description of STORAGE_USERS_DRIVER)

Backports the above PR to the `docs-stable-2.0` branch
2023-01-06 10:56:44 +01:00
Viktor Scharf 3300498eb2 commit 3c544707ef
Author: Viktor Scharf <scharf.vi@gmail.com>
Date:   Fri Jan 6 08:59:02 2023 +0100

    ApiTest. Change test create new tus resource (#5315)
2023-01-06 08:01:28 +00:00
Artur Neumann 9d81f1129e commit af74785eba
Merge: 7c269633b da7c2ebdd
Author: Artur Neumann <artur@jankaritech.com>
Date:   Fri Jan 6 13:43:41 2023 +0545

    Merge pull request #5338 from owncloud/tests/propfind-public-link-stable

    [tests-only][full-ci] Add PROPFIND tests for public link endpoint
2023-01-06 08:01:10 +00:00
Artur Neumann 007b1c7c1d commit 7c269633bc
Merge: bf9598147 faa9c6f8c
Author: Artur Neumann <artur@jankaritech.com>
Date:   Thu Jan 5 13:55:53 2023 +0545

    Merge pull request #5334 from owncloud/remove-HEAD-from-expected-failures

    [tests-only] [full-ci] Remove accidental HEAD line from expected-failures
2023-01-06 00:34:55 +00:00
Artur Neumann 9cbff746b9 commit 7c269633bc
Merge: bf9598147 faa9c6f8c
Author: Artur Neumann <artur@jankaritech.com>
Date:   Thu Jan 5 13:55:53 2023 +0545

    Merge pull request #5334 from owncloud/remove-HEAD-from-expected-failures

    [tests-only] [full-ci] Remove accidental HEAD line from expected-failures
2023-01-05 08:14:37 +00:00
Phil Davis 46c98182b7 commit bf95981478
Merge: 13a7065f3 b1c0ea672
Author: Phil Davis <phil@jankaritech.com>
Date:   Thu Jan 5 09:22:18 2023 +0545

    Merge pull request #5306 from owncloud/remove-ownCloud-core-test-dependency-stable

    [tests-only][full-ci] copy test dependencies from ownCloud/core (stable-2.0)
2023-01-05 03:44:11 +00:00
Swikriti Tripathi d5a80d1ef4 commit 13a7065f3a
Author: Swikriti Tripathi <41103328+SwikritiT@users.noreply.github.com>
Date:   Wed Jan 4 16:53:01 2023 +0545

    [tests-only][full-ci]Adds tests for sending PATCH request to other user's space (#5320)

    * Adds tests for sending PATCH request to other user's space

    Signed-off-by: Swikriti Tripathi <swikriti808@gmail.com>

    * address reviews

    Signed-off-by: Swikriti Tripathi <swikriti808@gmail.com>
2023-01-05 00:08:24 +00:00
Swikriti Tripathi 50dacbf6b6 commit 13a7065f3a
Author: Swikriti Tripathi <41103328+SwikritiT@users.noreply.github.com>
Date:   Wed Jan 4 16:53:01 2023 +0545

    [tests-only][full-ci]Adds tests for sending PATCH request to other user's space (#5320)

    * Adds tests for sending PATCH request to other user's space

    Signed-off-by: Swikriti Tripathi <swikriti808@gmail.com>

    * address reviews

    Signed-off-by: Swikriti Tripathi <swikriti808@gmail.com>
2023-01-04 11:12:04 +00:00
Sawjan Gurung 748c741d38 commit ef99674ad7
Author: Sawjan Gurung <saw.jan.grg3e@gmail.com>
Date:   Wed Jan 4 09:21:08 2023 +0545

    [tests-only][full-ci] Bump core commitid (stable) (#5316)

    * bump core commit id

    * update expected failure list
2023-01-04 03:40:01 +00:00
Phil Davis 058b74e9a6 commit 11d43172ee
Merge: 261cf0b84 62ef3c024
Author: Phil Davis <phil@jankaritech.com>
Date:   Sun Jan 1 07:35:18 2023 +0545

    Merge pull request #5311 from owncloud/getUserWithGraph-stable

    [tests-only][full-ci]Added test for getting user information by admin or normal user using Graph API (stable-2.0)
2023-01-04 00:44:18 +00:00
Phil Davis 74986a9fff commit 11d43172ee
Merge: 261cf0b84 62ef3c024
Author: Phil Davis <phil@jankaritech.com>
Date:   Sun Jan 1 07:35:18 2023 +0545

    Merge pull request #5311 from owncloud/getUserWithGraph-stable

    [tests-only][full-ci]Added test for getting user information by admin or normal user using Graph API (stable-2.0)
2023-01-03 00:44:31 +00:00
Phil Davis dea5912588 commit 11d43172ee
Merge: 261cf0b84 62ef3c024
Author: Phil Davis <phil@jankaritech.com>
Date:   Sun Jan 1 07:35:18 2023 +0545

    Merge pull request #5311 from owncloud/getUserWithGraph-stable

    [tests-only][full-ci]Added test for getting user information by admin or normal user using Graph API (stable-2.0)
2023-01-02 06:58:35 +00:00
Phil Davis ca400cb128 commit 11d43172ee
Merge: 261cf0b84 62ef3c024
Author: Phil Davis <phil@jankaritech.com>
Date:   Sun Jan 1 07:35:18 2023 +0545

    Merge pull request #5311 from owncloud/getUserWithGraph-stable

    [tests-only][full-ci]Added test for getting user information by admin or normal user using Graph API (stable-2.0)
2023-01-02 00:10:40 +00:00
Phil Davis 9d723bce12 commit 11d43172ee
Merge: 261cf0b84 62ef3c024
Author: Phil Davis <phil@jankaritech.com>
Date:   Sun Jan 1 07:35:18 2023 +0545

    Merge pull request #5311 from owncloud/getUserWithGraph-stable

    [tests-only][full-ci]Added test for getting user information by admin or normal user using Graph API (stable-2.0)
2023-01-01 01:53:54 +00:00
Sagar Gurung b12c646d46 commit 261cf0b848
Merge: b36c2e6db fcccd31c1
Author: Sagar Gurung <46086950+SagarGi@users.noreply.github.com>
Date:   Fri Dec 30 12:34:02 2022 +0545

    Merge pull request #5238 from owncloud/bumpcoreid

    [tests-only][full-ci]Bump commit id
2023-01-01 00:35:59 +00:00
Sagar Gurung 2eaf097a67 commit 261cf0b848
Merge: b36c2e6db fcccd31c1
Author: Sagar Gurung <46086950+SagarGi@users.noreply.github.com>
Date:   Fri Dec 30 12:34:02 2022 +0545

    Merge pull request #5238 from owncloud/bumpcoreid

    [tests-only][full-ci]Bump commit id
2022-12-31 00:33:18 +00:00
Sagar Gurung e9ce8b8439 commit 261cf0b848
Merge: b36c2e6db fcccd31c1
Author: Sagar Gurung <46086950+SagarGi@users.noreply.github.com>
Date:   Fri Dec 30 12:34:02 2022 +0545

    Merge pull request #5238 from owncloud/bumpcoreid

    [tests-only][full-ci]Bump commit id
2022-12-30 06:51:34 +00:00
Phil Davis e8ddd77e66 commit b36c2e6dbf
Merge: e5e1cbd54 55948da48
Author: Phil Davis <phil@jankaritech.com>
Date:   Thu Dec 29 12:44:09 2022 +0545

    Merge pull request #5304 from owncloud/bump-middleware-v1.8.3

    [tests-only][full-ci] Bump middleware v1.8.3
2022-12-30 00:35:39 +00:00
Phil Davis aa3cd464e1 commit b36c2e6dbf
Merge: e5e1cbd54 55948da48
Author: Phil Davis <phil@jankaritech.com>
Date:   Thu Dec 29 12:44:09 2022 +0545

    Merge pull request #5304 from owncloud/bump-middleware-v1.8.3

    [tests-only][full-ci] Bump middleware v1.8.3
2022-12-29 07:01:42 +00:00
Sagar Gurung fada7109eb commit e5e1cbd545
Author: Sagar Gurung <46086950+SagarGi@users.noreply.github.com>
Date:   Thu Dec 29 00:20:25 2022 +0545

    [tests-only][full-ci]Extend Propfind of space to space-member (#5252)

    * Extend Propfind of space to space-member

    * Addressed review

    * Rebase and review address
2022-12-29 00:32:17 +00:00
Sagar Gurung 36a42bf296 commit e5e1cbd545
Author: Sagar Gurung <46086950+SagarGi@users.noreply.github.com>
Date:   Thu Dec 29 00:20:25 2022 +0545

    [tests-only][full-ci]Extend Propfind of space to space-member (#5252)

    * Extend Propfind of space to space-member

    * Addressed review

    * Rebase and review address
2022-12-28 18:42:51 +00:00
kobergj fc08c74513 Merge pull request #5298 from owncloud/mmattel-patch-1
Create extended_configvars.adoc
2022-12-28 16:00:25 +01:00
Michael Barz ff4327c412 commit 75482c2dcd
Merge: 30a744ea1 489b3f8dc
Author: Michael Barz <mbarz@owncloud.com>
Date:   Wed Dec 28 14:58:34 2022 +0100

    Merge pull request #5275 from owncloud/sendInvalidUuid

    [test-only] ApiTest. sending invalid data to graph API
2022-12-28 14:03:51 +00:00
Michael Barz c03921daf5 commit 30a744ea13
Merge: b275bd8bf fb3d7b7bf
Author: Michael Barz <mbarz@owncloud.com>
Date:   Wed Dec 28 14:50:21 2022 +0100

    Merge pull request #5263 from owncloud/copyRequestTest

    [test-only] Apitest. check Copy response headers test
2022-12-28 13:57:30 +00:00
Martin 5e705b4050 Create extended_configvars.adoc
This file has been created in the docs branch and needs to be availabe in docs-stable-2.0
It is part of the documentation but has been created post this branch was made.
Neccessary for the docs-ocis repo showing the file as part of the 2.0 version.
2022-12-28 12:37:35 +01:00
Phil Davis 8cf2850882 commit b275bd8bf4
Merge: dcc65b09e 061d25a1f
Author: Phil Davis <phil@jankaritech.com>
Date:   Thu Dec 22 14:54:44 2022 +0545

    Merge pull request #5266 from owncloud/refactor-theResponseShouldContain

    [tests-only] [full-ci] Refactor the response should contain
2022-12-28 00:37:24 +00:00
Phil Davis 1e0cda18af commit b275bd8bf4
Merge: dcc65b09e 061d25a1f
Author: Phil Davis <phil@jankaritech.com>
Date:   Thu Dec 22 14:54:44 2022 +0545

    Merge pull request #5266 from owncloud/refactor-theResponseShouldContain

    [tests-only] [full-ci] Refactor the response should contain
2022-12-27 03:58:25 +00:00
Phil Davis 9ff93f5bf4 commit b275bd8bf4
Merge: dcc65b09e 061d25a1f
Author: Phil Davis <phil@jankaritech.com>
Date:   Thu Dec 22 14:54:44 2022 +0545

    Merge pull request #5266 from owncloud/refactor-theResponseShouldContain

    [tests-only] [full-ci] Refactor the response should contain
2022-12-26 00:49:41 +00:00
Phil Davis 2efb6a6314 commit b275bd8bf4
Merge: dcc65b09e 061d25a1f
Author: Phil Davis <phil@jankaritech.com>
Date:   Thu Dec 22 14:54:44 2022 +0545

    Merge pull request #5266 from owncloud/refactor-theResponseShouldContain

    [tests-only] [full-ci] Refactor the response should contain
2022-12-25 00:35:10 +00:00
Phil Davis 0e804a95a1 commit b275bd8bf4
Merge: dcc65b09e 061d25a1f
Author: Phil Davis <phil@jankaritech.com>
Date:   Thu Dec 22 14:54:44 2022 +0545

    Merge pull request #5266 from owncloud/refactor-theResponseShouldContain

    [tests-only] [full-ci] Refactor the response should contain
2022-12-24 00:33:35 +00:00
Phil Davis 4c1cd1264f commit b275bd8bf4
Merge: dcc65b09e 061d25a1f
Author: Phil Davis <phil@jankaritech.com>
Date:   Thu Dec 22 14:54:44 2022 +0545

    Merge pull request #5266 from owncloud/refactor-theResponseShouldContain

    [tests-only] [full-ci] Refactor the response should contain
2022-12-23 00:31:28 +00:00
Phil Davis 1c20e6c39c commit b275bd8bf4
Merge: dcc65b09e 061d25a1f
Author: Phil Davis <phil@jankaritech.com>
Date:   Thu Dec 22 14:54:44 2022 +0545

    Merge pull request #5266 from owncloud/refactor-theResponseShouldContain

    [tests-only] [full-ci] Refactor the response should contain
2022-12-22 09:12:10 +00:00
Swikriti Tripathi 5a89c61886 commit dcc65b09ea
Author: Swikriti Tripathi <41103328+SwikritiT@users.noreply.github.com>
Date:   Wed Dec 21 10:52:01 2022 +0545

    [tests-only][full-ci]Bump commit id for tests (#5241)

    * Run with core branch

    * update commit i

    * update expected to fail

    * update commit id
2022-12-22 03:52:59 +00:00
Swikriti Tripathi 7f6b946641 commit dcc65b09ea
Author: Swikriti Tripathi <41103328+SwikritiT@users.noreply.github.com>
Date:   Wed Dec 21 10:52:01 2022 +0545

    [tests-only][full-ci]Bump commit id for tests (#5241)

    * Run with core branch

    * update commit i

    * update expected to fail

    * update commit id
2022-12-21 05:09:09 +00:00
Artur Neumann 284c8d0c61 commit 8109997289
Merge: 5c8c9cf8e 8426eb5e3
Author: Artur Neumann <artur@jankaritech.com>
Date:   Tue Dec 20 14:32:11 2022 +0545

    Merge pull request #5208 from owncloud/moveTestUnrestrictedQuotaToStableBranch

    check unrestricted quota (#5173)
2022-12-21 00:35:29 +00:00
Artur Neumann fbd460952f commit 8109997289
Merge: 5c8c9cf8e 8426eb5e3
Author: Artur Neumann <artur@jankaritech.com>
Date:   Tue Dec 20 14:32:11 2022 +0545

    Merge pull request #5208 from owncloud/moveTestUnrestrictedQuotaToStableBranch

    check unrestricted quota (#5173)
2022-12-20 08:50:46 +00:00
Phil Davis fe501daa0e commit 5c8c9cf8e6
Merge: 883ed8a2b d1a20549c
Author: Phil Davis <phil@jankaritech.com>
Date:   Tue Dec 20 12:49:04 2022 +0545

    Merge pull request #5232 from owncloud/add-api-tests-public-link-folder-download

    [tests-only][full-ci]Add api tests public link folder download
2022-12-20 07:10:35 +00:00
Swikriti Tripathi 3e5d9fe712 commit 883ed8a2b4
Author: Swikriti Tripathi <41103328+SwikritiT@users.noreply.github.com>
Date:   Mon Dec 19 14:21:18 2022 +0545

    Extended public link tests to have more checks (#5235)
2022-12-20 00:34:08 +00:00
Swikriti Tripathi 34642b8b25 commit 883ed8a2b4
Author: Swikriti Tripathi <41103328+SwikritiT@users.noreply.github.com>
Date:   Mon Dec 19 14:21:18 2022 +0545

    Extended public link tests to have more checks (#5235)
2022-12-19 08:41:15 +00:00
Artur Neumann 347f3d80ce commit 748f1747e0
Merge: c86407132 1c662ed4d
Author: Artur Neumann <artur@jankaritech.com>
Date:   Mon Dec 19 13:32:32 2022 +0545

    Merge pull request #5138 from owncloud/add-api-tests-propfind-req

    [tests-only][full-ci]Add api test for propfind
2022-12-19 07:49:33 +00:00
Artur Neumann dd7765fd2c commit c864071328
Merge: 70e41d709 c8a9304c5
Author: Artur Neumann <artur@jankaritech.com>
Date:   Fri Dec 16 15:24:11 2022 +0545

    Merge pull request #5220 from owncloud/test-with-core-branch

    [tests-only][full-ci] Bump commit id for tests
2022-12-19 00:19:17 +00:00
Artur Neumann eef17e4e8c commit c864071328
Merge: 70e41d709 c8a9304c5
Author: Artur Neumann <artur@jankaritech.com>
Date:   Fri Dec 16 15:24:11 2022 +0545

    Merge pull request #5220 from owncloud/test-with-core-branch

    [tests-only][full-ci] Bump commit id for tests
2022-12-18 00:18:17 +00:00
Artur Neumann 90316118d8 commit c864071328
Merge: 70e41d709 c8a9304c5
Author: Artur Neumann <artur@jankaritech.com>
Date:   Fri Dec 16 15:24:11 2022 +0545

    Merge pull request #5220 from owncloud/test-with-core-branch

    [tests-only][full-ci] Bump commit id for tests
2022-12-17 00:18:56 +00:00
Artur Neumann 9babb2d676 commit c864071328
Merge: 70e41d709 c8a9304c5
Author: Artur Neumann <artur@jankaritech.com>
Date:   Fri Dec 16 15:24:11 2022 +0545

    Merge pull request #5220 from owncloud/test-with-core-branch

    [tests-only][full-ci] Bump commit id for tests
2022-12-16 09:42:24 +00:00
Michael Barz d2f8c45ed0 commit 70e41d709d
Merge: 2f202c70b abff14331
Author: Michael Barz <mbarz@owncloud.com>
Date:   Fri Dec 16 08:22:52 2022 +0100

    Merge pull request #5237 from owncloud/fix-stable2-nightly-ci

    [tests-only][full-ci] Fix stable2 nightly CI trigger
2022-12-16 07:25:52 +00:00
Sawjan Gurung 457bca97da commit 2f202c70bb
Author: Sawjan Gurung <saw.jan.grg3e@gmail.com>
Date:   Thu Dec 15 14:19:31 2022 +0545

    [tests-only][full-ci] Add CORS API tests (#5187)
2022-12-16 00:54:53 +00:00
Sawjan Gurung a0473e3dfc commit 2f202c70bb
Author: Sawjan Gurung <saw.jan.grg3e@gmail.com>
Date:   Thu Dec 15 14:19:31 2022 +0545

    [tests-only][full-ci] Add CORS API tests (#5187)
2022-12-15 08:39:16 +00:00
Artur Neumann 00407c4a2a commit 2644700859
Merge: ff571ec8b 218ef2b4d
Author: Artur Neumann <artur@jankaritech.com>
Date:   Thu Dec 15 14:17:18 2022 +0545

    Merge pull request #5226 from owncloud/port-api-test

    [full-ci] [tests-only] Port api test
2022-12-15 08:37:47 +00:00
Sawjan Gurung b1c2fc105d commit ff571ec8b1
Merge: e81bbd775 eb656a67e
Author: Sawjan Gurung <saw.jan.grg3e@gmail.com>
Date:   Thu Dec 15 11:04:14 2022 +0545

    Merge pull request #5228 from owncloud/bump-commitid-20221215-stable

    [tests-only][full-ci] Bump core commit id
2022-12-15 05:21:28 +00:00
Michael Barz 25f3084082 commit e81bbd775e
Author: Michael Barz <mbarz@owncloud.com>
Date:   Sat Dec 10 00:46:46 2022 +0000

    Automated changelog update [skip ci]
2022-12-15 01:14:48 +00:00
Michael Barz 10692eb1d1 commit e81bbd775e
Author: Michael Barz <mbarz@owncloud.com>
Date:   Sat Dec 10 00:46:46 2022 +0000

    Automated changelog update [skip ci]
2022-12-14 04:28:58 +00:00
Michael Barz d5fb5f3e07 commit e81bbd775e
Author: Michael Barz <mbarz@owncloud.com>
Date:   Sat Dec 10 00:46:46 2022 +0000

    Automated changelog update [skip ci]
2022-12-13 00:38:03 +00:00
Michael Barz 6ccd545907 commit e81bbd775e
Author: Michael Barz <mbarz@owncloud.com>
Date:   Sat Dec 10 00:46:46 2022 +0000

    Automated changelog update [skip ci]
2022-12-12 01:13:54 +00:00
Michael Barz db69e1c4fc commit e81bbd775e
Author: Michael Barz <mbarz@owncloud.com>
Date:   Sat Dec 10 00:46:46 2022 +0000

    Automated changelog update [skip ci]
2022-12-11 00:10:56 +00:00
Michael Barz 6ae49d28fd commit 42b4ca60b3
Merge: cee9043e7 bdbb86dd8
Author: Michael Barz <mbarz@owncloud.com>
Date:   Tue Dec 6 20:23:50 2022 +0100

    Merge pull request #5188 from owncloud/fix-stable-ci-2

    [tests-only] Fix stable ci 2
2022-12-10 00:48:32 +00:00
Michael Barz 3567869588 commit 42b4ca60b3
Merge: cee9043e7 bdbb86dd8
Author: Michael Barz <mbarz@owncloud.com>
Date:   Tue Dec 6 20:23:50 2022 +0100

    Merge pull request #5188 from owncloud/fix-stable-ci-2

    [tests-only] Fix stable ci 2
2022-12-09 00:51:34 +00:00
Michael Barz bcffdcf90b commit 42b4ca60b3
Merge: cee9043e7 bdbb86dd8
Author: Michael Barz <mbarz@owncloud.com>
Date:   Tue Dec 6 20:23:50 2022 +0100

    Merge pull request #5188 from owncloud/fix-stable-ci-2

    [tests-only] Fix stable ci 2
2022-12-08 04:32:25 +00:00
Michael Barz b70394905c commit 42b4ca60b3
Merge: cee9043e7 bdbb86dd8
Author: Michael Barz <mbarz@owncloud.com>
Date:   Tue Dec 6 20:23:50 2022 +0100

    Merge pull request #5188 from owncloud/fix-stable-ci-2

    [tests-only] Fix stable ci 2
2022-12-07 00:45:23 +00:00
Michael Barz 43d2b31815 commit 42b4ca60b3
Merge: cee9043e7 bdbb86dd8
Author: Michael Barz <mbarz@owncloud.com>
Date:   Tue Dec 6 20:23:50 2022 +0100

    Merge pull request #5188 from owncloud/fix-stable-ci-2

    [tests-only] Fix stable ci 2
2022-12-06 19:27:27 +00:00
Michael Barz 6621a4b86f commit cee9043e7d
Merge: add7bda89 8262aa371
Author: Michael Barz <mbarz@owncloud.com>
Date:   Fri Dec 2 09:43:01 2022 +0100

    Merge pull request #5175 from owncloud/fix-stable-ci

    fix changelog pipeline
2022-12-06 07:04:56 +00:00
Michael Barz 66daba7739 commit cee9043e7d
Merge: add7bda89 8262aa371
Author: Michael Barz <mbarz@owncloud.com>
Date:   Fri Dec 2 09:43:01 2022 +0100

    Merge pull request #5175 from owncloud/fix-stable-ci

    fix changelog pipeline
2022-12-05 00:23:33 +00:00
Michael Barz 7f4b85a03d initial commit 2022-12-02 09:18:36 +01:00
674 changed files with 37094 additions and 51224 deletions

No files matched your search

+3 -14
View File
@@ -4,23 +4,12 @@ title: ownCloud
{{< toc >}}
## Admin Documentation
Before you start reading, if you are interested in:
- learning ocis from an admin perspective,
- different deployment scenarios,
- deployment examples,
- detailed settings and more
we would recommend to continue with the [ownCloud Admin Documentation for Infinite Scale](https://doc.owncloud.com/ocis/latest/).
## Developer Documentation
Welcome to our developer documentation. Here you find documentation with focus for *developers*:
Welcome to our developer documentation. Here you can find developer documentation on:
- [oCIS]({{< ref "./ocis" >}}) server
- oCIS Services
- oCIS extensions
- Clients like:
- [ownCloud Web](https://github.com/owncloud/web) - the new web frontend for oCIS and ownCloud
- [ownCloud Android app](https://github.com/owncloud/android)
@@ -39,7 +28,7 @@ You can also find all client sources on [GitHub](https://github.com/owncloud/).
The [server repository](https://github.com/owncloud/ocis) on [GitHub](https://www.github.com) is a good entry point to the oCIS project. In addition to that there are also ownCloud projects for clients for [iOS](https://github.com/owncloud/ios-app), [Android](https://github.com/owncloud/android), the major [Desktop](https://github.com/owncloud/desktop) platforms and [ownCloud Web](https://github.com/owncloud/web).
To chat about development, join our public chat on [matrix: ownCloud Infinite Scale](https://matrix.to/#/#ocis:matrix.org).
To chat about development, [join our public chat](https://talk.owncloud.com/channel/ocis)
If you want to help and improve ownCloud or oCIS, start coding or open issues on GitHub in the related repository.
-53
View File
@@ -1,53 +0,0 @@
---
title: APIs
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/apis/
geekdocFilePath: _index.md
geekdocCollapseSection: true
---
{{< toc-tree >}}
Infinite Scale provides a large set of different **application programming interfaces (APIs)**. Infinite Scale is built by microservices. That means many calls to "functions" in the code are remote calls.
Basically we have two different API "universes": [HTTP](http) and [gRPC](grpc_apis).
{{< columns >}} <!-- begin columns block -->
{{< figure src="/ocis/static/http-logo.png" width="70%" alt="Image sourced from https://commons.wikimedia.org/ free of licenses" >}}
<--->
{{< figure src="/ocis/static/grpc-logo.png" width="70%" alt="Image sourced from https://grpc.io/ under CC 4.0 BY license" >}}
{{< /columns >}}
For inter-service-communication we are using mostly gRPC calls because it has some advantages. In the future, clients may decide to use gRPC directly to make use of these advantages.
{{< figure src="/ocis/static/ocis-apis.drawio.svg" class="page-image">}}
## [HTTP](http)
HTTP APIs are mostly used for client <-> server communication. Modern applications are embracing a [RESTful](https://en.wikipedia.org/wiki/Representational_state_transfer) software architecture style. REST APIs are using the HTTP protocol to transfer data between clients and servers. All our clients talk to the Server using HTTP APIs. This has legacy reasons and is well-supported across many platforms and technologies. Infinite Scale uses an [HTTP API gateway](../services/proxy) to route client requests to the correct service.
### OpenAPI
It is best practise to define APIs and their behavior by a spec. We are using the OpenAPI standard for all new APIs. The [OpenAPI Specification](https://swagger.io/specification/), previously known as the Swagger Specification, is a specification for a machine-readable interface definition language for describing, producing, consuming and visualizing RESTful web services. Previously part of the Swagger framework, it became a separate project in 2016, overseen by the OpenAPI Initiative, an open-source collaboration project of the Linux Foundation. Swagger and some other tools can generate code, documentation and test cases from interface files.
### RFC
Some APIs have become a de facto standard and are additionally covered by an [RFC](https://en.wikipedia.org/wiki/Request_for_Comments).
## [gRPC](grpc_apis)
In gRPC, a client application can directly call methods on a server application on a different machine as if it was a local object. This makes it easier to create distributed applications based on microservices. In gRPC we can define a service and specify the methods that can be called remotely. A gRPC client has a stub that provides the same methods and types as the server.
Infinite Scale uses a [gRPC API Gateway](../services/gateway) to route the requests to the correct service.
### Protobuf
gRPC APIs are typically defined by [Protocol buffers](https://developers.google.com/protocol-buffers/docs/overview). The different client and server stubs are created from ``*.proto`` files by code generation tools.
## Versioning
There are different standards for API versioning: Through URL, through request parameter, through custom header and through content negotiation. Ocis uses the versioning by URL concept although this creates a big code footprint. The versioning follows [SemVer](https://semver.org). We update the major version number when breaking changes are needed. Clients can decide which major version they use through the request URL. The specific implementation is documented on each API.
-63
View File
@@ -1,63 +0,0 @@
---
title: gRPC
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/apis/grpc_apis/
geekdocFilePath: _index.md
geekdocCollapseSection: true
---
{{< toc-tree >}}
## **R**emote &nbsp; **P**rocedure &nbsp; **C**alls
[gRPC](https://grpc.io) is a modern open source high performance Remote Procedure Call (RPC) framework that can run in any environment. It can efficiently connect services in and across data centers with pluggable support for load balancing, tracing, health checking and authentication. It is also applicable in last mile of distributed computing to connect devices, mobile applications and browsers to backend services.
## Advantages of gRPC
{{< columns >}}
### {{< icon "gauge-high" >}} &nbsp; Performance
gRPC uses http/2 by default and is faster than REST. When using protocol buffers for encoding, the information comes on and off the wire much faster than JSON. Latency is an important factor in distributed systems. JSON encoding creates a noticeable factor of latency. For distributed systems and high data loads, gRPC can actually make an important difference. Other than that, gRPC supports multiple calls via the same channel and the connections are bidirectional. A single connection can transmit requests and responses at the same time. gRPC keeps connections open to reuse the same connection again which prevents latency and saves bandwidth.
<--->
### {{< icon "helmet-safety" >}} &nbsp; Robustness
gRPC empowers better relationships between clients and servers. The rules of communication are strictly enforced. That is not the case in REST calls, where the client and the server can send and receive anything they like and hopefully the other end understands what to do with it. In gRPC, to make changes to the communication, both client and server need to change accordingly. This prevents mistakes specially in microservice architectures.
{{< /columns >}}
{{< columns >}}
### {{< icon "magnifying-glass-plus" >}} &nbsp; Debuggability
gRPC requests are re-using the same context and can be tracked or traced across multiple service boundaries.
This helps to identify slow calls and see what is causing delays. It is possible to cancel requests which cancels
them on all involved services.
<--->
### {{< icon "boxes-stacked" >}} &nbsp; Microservices
gRPC has been evolving and has become the best option for communication between microservices because of its unmatched
performance and its polyglot nature. One of the biggest strengths of microservices is the freedom of programming
languages and technologies. By using gRPC we can leverage all the advantages of strictly enforced communication
standards combined with freedom of choice between different programming languages - whichever would fit best.
{{< /columns >}}
{{< hint type=info title="gRPC Advantages" >}}
- http/2
- protocol buffers
- reusable connections
- multi language support
{{< /hint >}}
## CS3 APIs
{{< figure src="/ocis/static/cs3org.png" >}}
The [CS3 APIs](https://github.com/cs3org/cs3apis) connect storages and application providers.
The CS3 APIs follow Google and Uber API design guidelines, specially on error handling and naming convention. You can read more about these
guidelines at https://cloud.google.com/apis/design/ and https://github.com/uber/prototool/blob/dev/style/README.md.
The CS3 APIs use [Protocol Buffers version 3 (proto3)](https://github.com/protocolbuffers/protobuf) as their
Interface Definition Language (IDL) to define the API interface and the structure of the payload messages.
@@ -1,45 +0,0 @@
---
title: "ocis.messages.eventhistory.v0"
url: /apis/grpc_apis/ocis_messages_eventhistory_v0
date: 2026-03-23T00:10:32Z
weight: 50
geekdocRepo: https://github.com/owncloud/ocis
---
{{< toc >}}
## ocis/messages/eventhistory/v0/eventhistory.proto
### Event
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| type | [string](#string) | | REQUIRED. |
| id | [string](#string) | | REQUIRED. |
| event | [bytes](#bytes) | | REQUIRED |
## Scalar Value Types
| .proto Type | Notes | C++ | Java |
| ----------- | ----- | --- | ---- |
| {{< div id="double" content="double" >}} | | double | double |
| {{< div id="float" content="float" >}} | | float | float |
| {{< div id="int32" content="int32" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int |
| {{< div id="int64" content="int64" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long |
| {{< div id="uint32" content="uint32" >}} | Uses variable-length encoding. | uint32 | int |
| {{< div id="uint64" content="uint64" >}} | Uses variable-length encoding. | uint64 | long |
| {{< div id="sint32" content="sint32" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int |
| {{< div id="sint64" content="sint64" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long |
| {{< div id="fixed32" content="fixed32" >}} | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int |
| {{< div id="fixed64" content="fixed64" >}} | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long |
| {{< div id="sfixed32" content="sfixed32" >}} | Always four bytes. | int32 | int |
| {{< div id="sfixed64" content="sfixed64" >}} | Always eight bytes. | int64 | long |
| {{< div id="bool" content="bool" >}} | | bool | boolean |
| {{< div id="string" content="string" >}} | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String |
| {{< div id="bytes" content="bytes" >}} | May contain any arbitrary sequence of bytes. | string | ByteString |
@@ -1,104 +0,0 @@
---
title: "ocis.messages.policies.v0"
url: /apis/grpc_apis/ocis_messages_policies_v0
date: 2026-03-23T00:10:32Z
weight: 50
geekdocRepo: https://github.com/owncloud/ocis
---
{{< toc >}}
## ocis/messages/policies/v0/policies.proto
### Environment
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| stage | [Stage](#stage) | | |
| user | [User](#user) | | |
| request | [Request](#request) | | |
| resource | [Resource](#resource) | | |
### Request
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| method | [string](#string) | | |
| path | [string](#string) | | |
### Resource
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| id | [Resource.ID](#resourceid) | | |
| name | [string](#string) | | |
| size | [uint64](#uint64) | | |
| url | [string](#string) | | |
### Resource.ID
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| storage_id | [string](#string) | | |
| opaque_id | [string](#string) | | |
| space_id | [string](#string) | | |
### User
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| id | [User.ID](#userid) | | |
| username | [string](#string) | | |
| mail | [string](#string) | | |
| display_name | [string](#string) | | |
| groups | [string](#string) | repeated | |
### User.ID
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| opaque_id | [string](#string) | | |
### Stage
| Name | Number | Description |
| ---- | ------ | ----------- |
| STAGE_PP | 0 | |
| STAGE_HTTP | 1 | |
## Scalar Value Types
| .proto Type | Notes | C++ | Java |
| ----------- | ----- | --- | ---- |
| {{< div id="double" content="double" >}} | | double | double |
| {{< div id="float" content="float" >}} | | float | float |
| {{< div id="int32" content="int32" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int |
| {{< div id="int64" content="int64" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long |
| {{< div id="uint32" content="uint32" >}} | Uses variable-length encoding. | uint32 | int |
| {{< div id="uint64" content="uint64" >}} | Uses variable-length encoding. | uint64 | long |
| {{< div id="sint32" content="sint32" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int |
| {{< div id="sint64" content="sint64" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long |
| {{< div id="fixed32" content="fixed32" >}} | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int |
| {{< div id="fixed64" content="fixed64" >}} | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long |
| {{< div id="sfixed32" content="sfixed32" >}} | Always four bytes. | int32 | int |
| {{< div id="sfixed64" content="sfixed64" >}} | Always eight bytes. | int64 | long |
| {{< div id="bool" content="bool" >}} | | bool | boolean |
| {{< div id="string" content="string" >}} | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String |
| {{< div id="bytes" content="bytes" >}} | May contain any arbitrary sequence of bytes. | string | ByteString |
@@ -1,147 +0,0 @@
---
title: "ocis.messages.search.v0"
url: /apis/grpc_apis/ocis_messages_search_v0
date: 2026-03-23T00:10:32Z
weight: 50
geekdocRepo: https://github.com/owncloud/ocis
---
{{< toc >}}
## ocis/messages/search/v0/search.proto
### Audio
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| album | [string](#string) | optional | |
| albumArtist | [string](#string) | optional | |
| artist | [string](#string) | optional | |
| bitrate | [int64](#int64) | optional | |
| composers | [string](#string) | optional | |
| copyright | [string](#string) | optional | |
| disc | [int32](#int32) | optional | |
| discCount | [int32](#int32) | optional | |
| duration | [int64](#int64) | optional | |
| genre | [string](#string) | optional | |
| hasDrm | [bool](#bool) | optional | |
| isVariableBitrate | [bool](#bool) | optional | |
| title | [string](#string) | optional | |
| track | [int32](#int32) | optional | |
| trackCount | [int32](#int32) | optional | |
| year | [int32](#int32) | optional | |
### Entity
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| ref | [Reference](#reference) | | |
| id | [ResourceID](#resourceid) | | |
| name | [string](#string) | | |
| etag | [string](#string) | | |
| size | [uint64](#uint64) | | |
| last_modified_time | [google.protobuf.Timestamp](#googleprotobuftimestamp) | | |
| mime_type | [string](#string) | | |
| permissions | [string](#string) | | |
| type | [uint64](#uint64) | | |
| deleted | [bool](#bool) | | |
| shareRootName | [string](#string) | | |
| parent_id | [ResourceID](#resourceid) | | |
| tags | [string](#string) | repeated | |
| highlights | [string](#string) | | |
| audio | [Audio](#audio) | | |
| location | [GeoCoordinates](#geocoordinates) | | |
| remote_item_id | [ResourceID](#resourceid) | | |
| image | [Image](#image) | | |
| photo | [Photo](#photo) | | |
### GeoCoordinates
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| altitude | [double](#double) | optional | |
| latitude | [double](#double) | optional | |
| longitude | [double](#double) | optional | |
### Image
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| width | [int32](#int32) | optional | |
| height | [int32](#int32) | optional | |
### Match
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| entity | [Entity](#entity) | | the matched entity |
| score | [float](#float) | | the match score |
### Photo
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| cameraMake | [string](#string) | optional | |
| cameraModel | [string](#string) | optional | |
| exposureDenominator | [float](#float) | optional | |
| exposureNumerator | [float](#float) | optional | |
| fNumber | [float](#float) | optional | |
| focalLength | [float](#float) | optional | |
| iso | [int32](#int32) | optional | |
| orientation | [int32](#int32) | optional | |
| takenDateTime | [google.protobuf.Timestamp](#googleprotobuftimestamp) | optional | |
### Reference
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| resource_id | [ResourceID](#resourceid) | | |
| path | [string](#string) | | |
### ResourceID
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| storage_id | [string](#string) | | |
| opaque_id | [string](#string) | | |
| space_id | [string](#string) | | |
## Scalar Value Types
| .proto Type | Notes | C++ | Java |
| ----------- | ----- | --- | ---- |
| {{< div id="double" content="double" >}} | | double | double |
| {{< div id="float" content="float" >}} | | float | float |
| {{< div id="int32" content="int32" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int |
| {{< div id="int64" content="int64" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long |
| {{< div id="uint32" content="uint32" >}} | Uses variable-length encoding. | uint32 | int |
| {{< div id="uint64" content="uint64" >}} | Uses variable-length encoding. | uint64 | long |
| {{< div id="sint32" content="sint32" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int |
| {{< div id="sint64" content="sint64" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long |
| {{< div id="fixed32" content="fixed32" >}} | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int |
| {{< div id="fixed64" content="fixed64" >}} | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long |
| {{< div id="sfixed32" content="sfixed32" >}} | Always four bytes. | int32 | int |
| {{< div id="sfixed64" content="sfixed64" >}} | Always eight bytes. | int64 | long |
| {{< div id="bool" content="bool" >}} | | bool | boolean |
| {{< div id="string" content="string" >}} | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String |
| {{< div id="bytes" content="bytes" >}} | May contain any arbitrary sequence of bytes. | string | ByteString |
@@ -1,322 +0,0 @@
---
title: "ocis.messages.settings.v0"
url: /apis/grpc_apis/ocis_messages_settings_v0
date: 2026-03-23T00:10:32Z
weight: 50
geekdocRepo: https://github.com/owncloud/ocis
---
{{< toc >}}
## ocis/messages/settings/v0/settings.proto
### Bool
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| default | [bool](#bool) | | @gotags: yaml:"default" |
| label | [string](#string) | | @gotags: yaml:"label" |
### Bundle
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| id | [string](#string) | | @gotags: yaml:"id" |
| name | [string](#string) | | @gotags: yaml:"name" |
| type | [Bundle.Type](#bundletype) | | @gotags: yaml:"type" |
| extension | [string](#string) | | @gotags: yaml:"extension" |
| display_name | [string](#string) | | @gotags: yaml:"display_name" |
| settings | [Setting](#setting) | repeated | @gotags: yaml:"settings" |
| resource | [Resource](#resource) | | @gotags: yaml:"resource" |
### CollectionOption
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| key | [string](#string) | | required<br><br>@gotags: yaml:"key" |
| int_value | [int64](#int64) | | @gotags: yaml:"int_value" |
| string_value | [string](#string) | | @gotags: yaml:"string_value" |
| bool_value | [bool](#bool) | | @gotags: yaml:"bool_value" |
### CollectionValue
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| values | [CollectionOption](#collectionoption) | repeated | @gotags: yaml:"values" |
### Identifier
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| extension | [string](#string) | | |
| bundle | [string](#string) | | |
| setting | [string](#string) | | |
### Int
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| default | [int64](#int64) | | @gotags: yaml:"default" |
| min | [int64](#int64) | | @gotags: yaml:"min" |
| max | [int64](#int64) | | @gotags: yaml:"max" |
| step | [int64](#int64) | | @gotags: yaml:"step" |
| placeholder | [string](#string) | | @gotags: yaml:"placeholder" |
### ListOption
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| value | [ListOptionValue](#listoptionvalue) | | @gotags: yaml:"value" |
| default | [bool](#bool) | | @gotags: yaml:"default" |
| display_value | [string](#string) | | @gotags: yaml:"display_value" |
### ListOptionValue
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| string_value | [string](#string) | | @gotags: yaml:"string_value" |
| int_value | [int64](#int64) | | @gotags: yaml:"int_value" |
| bool_value | [bool](#bool) | | @gotags: yaml:"bool_value" |
### ListValue
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| values | [ListOptionValue](#listoptionvalue) | repeated | @gotags: yaml:"values" |
### MultiChoiceCollection
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| options | [MultiChoiceCollectionOption](#multichoicecollectionoption) | repeated | @gotags: yaml:"options" |
### MultiChoiceCollectionOption
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| value | [MultiChoiceCollectionOptionValue](#multichoicecollectionoptionvalue) | | @gotags: yaml:"value" |
| key | [string](#string) | | @gotags: yaml:"key" |
| attribute | [string](#string) | | @gotags: yaml:"attribute" |
| display_value | [string](#string) | | @gotags: yaml:"display_value" |
### MultiChoiceCollectionOptionValue
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| int_value | [Int](#int) | | @gotags: yaml:"int_value" |
| string_value | [String](#string) | | @gotags: yaml:"string_value" |
| bool_value | [Bool](#bool) | | @gotags: yaml:"bool_value" |
### MultiChoiceList
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| options | [ListOption](#listoption) | repeated | @gotags: yaml:"options" |
### Permission
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| operation | [Permission.Operation](#permissionoperation) | | @gotags: yaml:"operation" |
| constraint | [Permission.Constraint](#permissionconstraint) | | @gotags: yaml:"constraint" |
### Resource
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| type | [Resource.Type](#resourcetype) | | |
| id | [string](#string) | | |
### Setting
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| id | [string](#string) | | @gotags: yaml:"id" |
| name | [string](#string) | | @gotags: yaml:"name" |
| display_name | [string](#string) | | @gotags: yaml:"display_name" |
| description | [string](#string) | | @gotags: yaml:"description" |
| int_value | [Int](#int) | | @gotags: yaml:"int_value" |
| string_value | [String](#string) | | @gotags: yaml:"string_value" |
| bool_value | [Bool](#bool) | | @gotags: yaml:"bool_value" |
| single_choice_value | [SingleChoiceList](#singlechoicelist) | | @gotags: yaml:"single_choice_value" |
| multi_choice_value | [MultiChoiceList](#multichoicelist) | | @gotags: yaml:"multi_choice_value" |
| permission_value | [Permission](#permission) | | @gotags: yaml:"permission_value" |
| multi_choice_collection_value | [MultiChoiceCollection](#multichoicecollection) | | @gotags: yaml:"multi_choice_collection_value" |
| resource | [Resource](#resource) | | @gotags: yaml:"resource" |
### SingleChoiceList
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| options | [ListOption](#listoption) | repeated | @gotags: yaml:"options" |
### String
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| default | [string](#string) | | @gotags: yaml:"default" |
| required | [bool](#bool) | | @gotags: yaml:"required" |
| min_length | [int32](#int32) | | @gotags: yaml:"min_length" |
| max_length | [int32](#int32) | | @gotags: yaml:"max_length" |
| placeholder | [string](#string) | | @gotags: yaml:"placeholder" |
### UserRoleAssignment
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| id | [string](#string) | | id is generated upon saving the assignment |
| account_uuid | [string](#string) | | |
| role_id | [string](#string) | | the role_id is a bundle_id internally |
### UserRoleAssignmentFilter
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| type | [UserRoleAssignmentFilter.Type](#userroleassignmentfiltertype) | | |
| account_uuid | [string](#string) | | |
| role_id | [string](#string) | | |
### Value
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| id | [string](#string) | | id is the id of the Value. It is generated on saving it.<br><br>@gotags: yaml:"id" |
| bundle_id | [string](#string) | | @gotags: yaml:"bundle_id" |
| setting_id | [string](#string) | | setting_id is the id of the setting from within its bundle.<br><br>@gotags: yaml:"setting_id" |
| account_uuid | [string](#string) | | @gotags: yaml:"account_uuid" |
| resource | [Resource](#resource) | | @gotags: yaml:"resource" |
| bool_value | [bool](#bool) | | @gotags: yaml:"bool_value" |
| int_value | [int64](#int64) | | @gotags: yaml:"int_value" |
| string_value | [string](#string) | | @gotags: yaml:"string_value" |
| list_value | [ListValue](#listvalue) | | @gotags: yaml:"list_value" |
| collection_value | [CollectionValue](#collectionvalue) | | @gotags: yaml:"collection_value" |
### ValueWithIdentifier
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| identifier | [Identifier](#identifier) | | |
| value | [Value](#value) | | |
### Bundle.Type
| Name | Number | Description |
| ---- | ------ | ----------- |
| TYPE_UNKNOWN | 0 | |
| TYPE_DEFAULT | 1 | |
| TYPE_ROLE | 2 | |
### Permission.Constraint
| Name | Number | Description |
| ---- | ------ | ----------- |
| CONSTRAINT_UNKNOWN | 0 | |
| CONSTRAINT_OWN | 1 | |
| CONSTRAINT_SHARED | 2 | |
| CONSTRAINT_ALL | 3 | |
### Permission.Operation
| Name | Number | Description |
| ---- | ------ | ----------- |
| OPERATION_UNKNOWN | 0 | |
| OPERATION_CREATE | 1 | |
| OPERATION_READ | 2 | |
| OPERATION_UPDATE | 3 | |
| OPERATION_DELETE | 4 | |
| OPERATION_WRITE | 5 | WRITE is a combination of CREATE and UPDATE |
| OPERATION_READWRITE | 6 | READWRITE is a combination of READ and WRITE |
### Resource.Type
| Name | Number | Description |
| ---- | ------ | ----------- |
| TYPE_UNKNOWN | 0 | |
| TYPE_SYSTEM | 1 | |
| TYPE_FILE | 2 | |
| TYPE_SHARE | 3 | |
| TYPE_SETTING | 4 | |
| TYPE_BUNDLE | 5 | |
| TYPE_USER | 6 | |
| TYPE_GROUP | 7 | |
### UserRoleAssignmentFilter.Type
| Name | Number | Description |
| ---- | ------ | ----------- |
| TYPE_UNKNOWN | 0 | |
| TYPE_ACCOUNT | 1 | |
| TYPE_ROLE | 2 | |
## Scalar Value Types
| .proto Type | Notes | C++ | Java |
| ----------- | ----- | --- | ---- |
| {{< div id="double" content="double" >}} | | double | double |
| {{< div id="float" content="float" >}} | | float | float |
| {{< div id="int32" content="int32" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int |
| {{< div id="int64" content="int64" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long |
| {{< div id="uint32" content="uint32" >}} | Uses variable-length encoding. | uint32 | int |
| {{< div id="uint64" content="uint64" >}} | Uses variable-length encoding. | uint64 | long |
| {{< div id="sint32" content="sint32" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int |
| {{< div id="sint64" content="sint64" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long |
| {{< div id="fixed32" content="fixed32" >}} | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int |
| {{< div id="fixed64" content="fixed64" >}} | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long |
| {{< div id="sfixed32" content="sfixed32" >}} | Always four bytes. | int32 | int |
| {{< div id="sfixed64" content="sfixed64" >}} | Always eight bytes. | int64 | long |
| {{< div id="bool" content="bool" >}} | | bool | boolean |
| {{< div id="string" content="string" >}} | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String |
| {{< div id="bytes" content="bytes" >}} | May contain any arbitrary sequence of bytes. | string | ByteString |
@@ -1,120 +0,0 @@
---
title: "ocis.messages.store.v0"
url: /apis/grpc_apis/ocis_messages_store_v0
date: 2026-03-23T00:10:32Z
weight: 50
geekdocRepo: https://github.com/owncloud/ocis
---
{{< toc >}}
## ocis/messages/store/v0/store.proto
### DeleteOptions
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| database | [string](#string) | | |
| table | [string](#string) | | |
### Field
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| type | [string](#string) | | type of value e.g string, int, int64, bool, float64 |
| value | [string](#string) | | the actual value |
### ListOptions
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| database | [string](#string) | | |
| table | [string](#string) | | |
| prefix | [string](#string) | | |
| suffix | [string](#string) | | |
| limit | [uint64](#uint64) | | |
| offset | [uint64](#uint64) | | |
### ReadOptions
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| database | [string](#string) | | |
| table | [string](#string) | | |
| prefix | [bool](#bool) | | |
| suffix | [bool](#bool) | | |
| limit | [uint64](#uint64) | | |
| offset | [uint64](#uint64) | | |
| where | [ReadOptions.WhereEntry](#readoptionswhereentry) | repeated | |
### ReadOptions.WhereEntry
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| key | [string](#string) | | |
| value | [Field](#field) | | |
### Record
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| key | [string](#string) | | key of the recorda |
| value | [bytes](#bytes) | | value in the record |
| expiry | [int64](#int64) | | time.Duration (signed int64 nanoseconds) |
| metadata | [Record.MetadataEntry](#recordmetadataentry) | repeated | the associated metadata |
### Record.MetadataEntry
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| key | [string](#string) | | |
| value | [Field](#field) | | |
### WriteOptions
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| database | [string](#string) | | |
| table | [string](#string) | | |
| expiry | [int64](#int64) | | time.Time |
| ttl | [int64](#int64) | | time.Duration |
## Scalar Value Types
| .proto Type | Notes | C++ | Java |
| ----------- | ----- | --- | ---- |
| {{< div id="double" content="double" >}} | | double | double |
| {{< div id="float" content="float" >}} | | float | float |
| {{< div id="int32" content="int32" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int |
| {{< div id="int64" content="int64" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long |
| {{< div id="uint32" content="uint32" >}} | Uses variable-length encoding. | uint32 | int |
| {{< div id="uint64" content="uint64" >}} | Uses variable-length encoding. | uint64 | long |
| {{< div id="sint32" content="sint32" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int |
| {{< div id="sint64" content="sint64" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long |
| {{< div id="fixed32" content="fixed32" >}} | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int |
| {{< div id="fixed64" content="fixed64" >}} | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long |
| {{< div id="sfixed32" content="sfixed32" >}} | Always four bytes. | int32 | int |
| {{< div id="sfixed64" content="sfixed64" >}} | Always eight bytes. | int64 | long |
| {{< div id="bool" content="bool" >}} | | bool | boolean |
| {{< div id="string" content="string" >}} | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String |
| {{< div id="bytes" content="bytes" >}} | May contain any arbitrary sequence of bytes. | string | ByteString |
@@ -1,65 +0,0 @@
---
title: "ocis.messages.thumbnails.v0"
url: /apis/grpc_apis/ocis_messages_thumbnails_v0
date: 2026-03-23T00:10:32Z
weight: 50
geekdocRepo: https://github.com/owncloud/ocis
---
{{< toc >}}
## ocis/messages/thumbnails/v0/thumbnails.proto
### CS3Source
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| path | [string](#string) | | |
| authorization | [string](#string) | | |
### WebdavSource
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| url | [string](#string) | | REQUIRED. |
| is_public_link | [bool](#bool) | | REQUIRED. |
| webdav_authorization | [string](#string) | | OPTIONAL. |
| reva_authorization | [string](#string) | | OPTIONAL. |
| public_link_token | [string](#string) | | OPTIONAL. |
### ThumbnailType
The file types to which the thumbnail can be encoded to.
| Name | Number | Description |
| ---- | ------ | ----------- |
| PNG | 0 | Represents PNG type |
| JPG | 1 | Represents JPG type |
| GIF | 2 | Represents GIF type |
## Scalar Value Types
| .proto Type | Notes | C++ | Java |
| ----------- | ----- | --- | ---- |
| {{< div id="double" content="double" >}} | | double | double |
| {{< div id="float" content="float" >}} | | float | float |
| {{< div id="int32" content="int32" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int |
| {{< div id="int64" content="int64" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long |
| {{< div id="uint32" content="uint32" >}} | Uses variable-length encoding. | uint32 | int |
| {{< div id="uint64" content="uint64" >}} | Uses variable-length encoding. | uint64 | long |
| {{< div id="sint32" content="sint32" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int |
| {{< div id="sint64" content="sint64" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long |
| {{< div id="fixed32" content="fixed32" >}} | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int |
| {{< div id="fixed64" content="fixed64" >}} | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long |
| {{< div id="sfixed32" content="sfixed32" >}} | Always four bytes. | int32 | int |
| {{< div id="sfixed64" content="sfixed64" >}} | Always eight bytes. | int64 | long |
| {{< div id="bool" content="bool" >}} | | bool | boolean |
| {{< div id="string" content="string" >}} | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String |
| {{< div id="bytes" content="bytes" >}} | May contain any arbitrary sequence of bytes. | string | ByteString |
@@ -1,68 +0,0 @@
---
title: "ocis.services.eventhistory.v0"
url: /apis/grpc_apis/ocis_services_eventhistory_v0
date: 2026-03-23T00:10:32Z
weight: 50
geekdocRepo: https://github.com/owncloud/ocis
---
{{< toc >}}
## ocis/services/eventhistory/v0/eventhistory.proto
### GetEventsForUserRequest
A request to retrieve events belonging to a userID
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| userID | [string](#string) | | the userID of the events we want to get |
### GetEventsRequest
A request to retrieve events
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| ids | [string](#string) | repeated | the ids of the events we want to get |
### GetEventsResponse
The service response
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| events | [ocis.messages.eventhistory.v0.Event](/apis/grpc_apis/ocis_messages_eventhistory_v0/#event) | repeated | |
### EventHistoryService
A Service for storing events
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
| GetEvents | [GetEventsRequest](#geteventsrequest) | [GetEventsResponse](#geteventsresponse) | returns the specified events |
| GetEventsForUser | [GetEventsForUserRequest](#geteventsforuserrequest) | [GetEventsResponse](#geteventsresponse) | returns all events for the specified userID |
## Scalar Value Types
| .proto Type | Notes | C++ | Java |
| ----------- | ----- | --- | ---- |
| {{< div id="double" content="double" >}} | | double | double |
| {{< div id="float" content="float" >}} | | float | float |
| {{< div id="int32" content="int32" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int |
| {{< div id="int64" content="int64" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long |
| {{< div id="uint32" content="uint32" >}} | Uses variable-length encoding. | uint32 | int |
| {{< div id="uint64" content="uint64" >}} | Uses variable-length encoding. | uint64 | long |
| {{< div id="sint32" content="sint32" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int |
| {{< div id="sint64" content="sint64" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long |
| {{< div id="fixed32" content="fixed32" >}} | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int |
| {{< div id="fixed64" content="fixed64" >}} | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long |
| {{< div id="sfixed32" content="sfixed32" >}} | Always four bytes. | int32 | int |
| {{< div id="sfixed64" content="sfixed64" >}} | Always eight bytes. | int64 | long |
| {{< div id="bool" content="bool" >}} | | bool | boolean |
| {{< div id="string" content="string" >}} | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String |
| {{< div id="bytes" content="bytes" >}} | May contain any arbitrary sequence of bytes. | string | ByteString |
@@ -1,60 +0,0 @@
---
title: "ocis.services.policies.v0"
url: /apis/grpc_apis/ocis_services_policies_v0
date: 2026-03-23T00:10:32Z
weight: 50
geekdocRepo: https://github.com/owncloud/ocis
---
{{< toc >}}
## ocis/services/policies/v0/policies.proto
### EvaluateRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| query | [string](#string) | | |
| environment | [ocis.messages.policies.v0.Environment](/apis/grpc_apis/ocis_messages_policies_v0/#environment) | | |
### EvaluateResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| result | [bool](#bool) | | |
### policiesProvider
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
| Evaluate | [EvaluateRequest](#evaluaterequest) | [EvaluateResponse](#evaluateresponse) | |
## Scalar Value Types
| .proto Type | Notes | C++ | Java |
| ----------- | ----- | --- | ---- |
| {{< div id="double" content="double" >}} | | double | double |
| {{< div id="float" content="float" >}} | | float | float |
| {{< div id="int32" content="int32" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int |
| {{< div id="int64" content="int64" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long |
| {{< div id="uint32" content="uint32" >}} | Uses variable-length encoding. | uint32 | int |
| {{< div id="uint64" content="uint64" >}} | Uses variable-length encoding. | uint64 | long |
| {{< div id="sint32" content="sint32" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int |
| {{< div id="sint64" content="sint64" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long |
| {{< div id="fixed32" content="fixed32" >}} | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int |
| {{< div id="fixed64" content="fixed64" >}} | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long |
| {{< div id="sfixed32" content="sfixed32" >}} | Always four bytes. | int32 | int |
| {{< div id="sfixed64" content="sfixed64" >}} | Always eight bytes. | int64 | long |
| {{< div id="bool" content="bool" >}} | | bool | boolean |
| {{< div id="string" content="string" >}} | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String |
| {{< div id="bytes" content="bytes" >}} | May contain any arbitrary sequence of bytes. | string | ByteString |
@@ -1,108 +0,0 @@
---
title: "ocis.services.search.v0"
url: /apis/grpc_apis/ocis_services_search_v0
date: 2026-03-23T00:10:32Z
weight: 50
geekdocRepo: https://github.com/owncloud/ocis
---
{{< toc >}}
## ocis/services/search/v0/search.proto
### IndexSpaceRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| space_id | [string](#string) | | |
| user_id | [string](#string) | | |
### IndexSpaceResponse
### SearchIndexRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| page_size | [int32](#int32) | | Optional. The maximum number of entries to return in the response |
| page_token | [string](#string) | | Optional. A pagination token returned from a previous call to `Get`<br>that indicates from where search should continue |
| query | [string](#string) | | |
| ref | [ocis.messages.search.v0.Reference](/apis/grpc_apis/ocis_messages_search_v0/#reference) | | |
### SearchIndexResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| matches | [ocis.messages.search.v0.Match](/apis/grpc_apis/ocis_messages_search_v0/#match) | repeated | |
| next_page_token | [string](#string) | | Token to retrieve the next page of results, or empty if there are no<br>more results in the list |
| total_matches | [int32](#int32) | | |
### SearchRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| page_size | [int32](#int32) | | Optional. The maximum number of entries to return in the response |
| page_token | [string](#string) | | Optional. A pagination token returned from a previous call to `Get`<br>that indicates from where search should continue |
| query | [string](#string) | | |
| ref | [ocis.messages.search.v0.Reference](/apis/grpc_apis/ocis_messages_search_v0/#reference) | | |
### SearchResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| matches | [ocis.messages.search.v0.Match](/apis/grpc_apis/ocis_messages_search_v0/#match) | repeated | |
| next_page_token | [string](#string) | | Token to retrieve the next page of results, or empty if there are no<br>more results in the list |
| total_matches | [int32](#int32) | | |
### IndexProvider
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
| Search | [SearchIndexRequest](#searchindexrequest) | [SearchIndexResponse](#searchindexresponse) | |
### SearchProvider
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
| Search | [SearchRequest](#searchrequest) | [SearchResponse](#searchresponse) | |
| IndexSpace | [IndexSpaceRequest](#indexspacerequest) | [IndexSpaceResponse](#indexspaceresponse) | |
## Scalar Value Types
| .proto Type | Notes | C++ | Java |
| ----------- | ----- | --- | ---- |
| {{< div id="double" content="double" >}} | | double | double |
| {{< div id="float" content="float" >}} | | float | float |
| {{< div id="int32" content="int32" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int |
| {{< div id="int64" content="int64" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long |
| {{< div id="uint32" content="uint32" >}} | Uses variable-length encoding. | uint32 | int |
| {{< div id="uint64" content="uint64" >}} | Uses variable-length encoding. | uint64 | long |
| {{< div id="sint32" content="sint32" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int |
| {{< div id="sint64" content="sint64" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long |
| {{< div id="fixed32" content="fixed32" >}} | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int |
| {{< div id="fixed64" content="fixed64" >}} | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long |
| {{< div id="sfixed32" content="sfixed32" >}} | Always four bytes. | int32 | int |
| {{< div id="sfixed64" content="sfixed64" >}} | Always eight bytes. | int64 | long |
| {{< div id="bool" content="bool" >}} | | bool | boolean |
| {{< div id="string" content="string" >}} | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String |
| {{< div id="bytes" content="bytes" >}} | May contain any arbitrary sequence of bytes. | string | ByteString |
@@ -1,312 +0,0 @@
---
title: "ocis.services.settings.v0"
url: /apis/grpc_apis/ocis_services_settings_v0
date: 2026-03-23T00:10:32Z
weight: 50
geekdocRepo: https://github.com/owncloud/ocis
---
{{< toc >}}
## ocis/services/settings/v0/settings.proto
### AddSettingToBundleRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| bundle_id | [string](#string) | | |
| setting | [ocis.messages.settings.v0.Setting](/apis/grpc_apis/ocis_messages_settings_v0/#setting) | | |
### AddSettingToBundleResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| setting | [ocis.messages.settings.v0.Setting](/apis/grpc_apis/ocis_messages_settings_v0/#setting) | | |
### AssignRoleToUserRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| account_uuid | [string](#string) | | |
| role_id | [string](#string) | | the role_id is a bundle_id internally |
### AssignRoleToUserResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| assignment | [ocis.messages.settings.v0.UserRoleAssignment](/apis/grpc_apis/ocis_messages_settings_v0/#userroleassignment) | | |
### GetBundleRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| bundle_id | [string](#string) | | |
### GetBundleResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| bundle | [ocis.messages.settings.v0.Bundle](/apis/grpc_apis/ocis_messages_settings_v0/#bundle) | | |
### GetPermissionByIDRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| permission_id | [string](#string) | | |
### GetPermissionByIDResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| permission | [ocis.messages.settings.v0.Permission](/apis/grpc_apis/ocis_messages_settings_v0/#permission) | | |
### GetValueByUniqueIdentifiersRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| account_uuid | [string](#string) | | |
| setting_id | [string](#string) | | |
### GetValueRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| id | [string](#string) | | |
### GetValueResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| value | [ocis.messages.settings.v0.ValueWithIdentifier](/apis/grpc_apis/ocis_messages_settings_v0/#valuewithidentifier) | | |
### ListBundlesRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| bundle_ids | [string](#string) | repeated | |
| locale | [string](#string) | | |
### ListBundlesResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| bundles | [ocis.messages.settings.v0.Bundle](/apis/grpc_apis/ocis_messages_settings_v0/#bundle) | repeated | |
### ListPermissionsByResourceRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| resource | [ocis.messages.settings.v0.Resource](/apis/grpc_apis/ocis_messages_settings_v0/#resource) | | |
### ListPermissionsByResourceResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| permissions | [ocis.messages.settings.v0.Permission](/apis/grpc_apis/ocis_messages_settings_v0/#permission) | repeated | |
### ListPermissionsRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| account_uuid | [string](#string) | | |
### ListPermissionsResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| permissions | [string](#string) | repeated | |
### ListRoleAssignmentsFilteredRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| filters | [ocis.messages.settings.v0.UserRoleAssignmentFilter](/apis/grpc_apis/ocis_messages_settings_v0/#userroleassignmentfilter) | repeated | |
### ListRoleAssignmentsRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| account_uuid | [string](#string) | | |
### ListRoleAssignmentsResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| assignments | [ocis.messages.settings.v0.UserRoleAssignment](/apis/grpc_apis/ocis_messages_settings_v0/#userroleassignment) | repeated | |
### ListValuesRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| bundle_id | [string](#string) | | |
| account_uuid | [string](#string) | | |
### ListValuesResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| values | [ocis.messages.settings.v0.ValueWithIdentifier](/apis/grpc_apis/ocis_messages_settings_v0/#valuewithidentifier) | repeated | |
### RemoveRoleFromUserRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| id | [string](#string) | | |
### RemoveSettingFromBundleRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| bundle_id | [string](#string) | | |
| setting_id | [string](#string) | | |
### SaveBundleRequest
---
requests and responses for settings bundles
---
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| bundle | [ocis.messages.settings.v0.Bundle](/apis/grpc_apis/ocis_messages_settings_v0/#bundle) | | |
### SaveBundleResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| bundle | [ocis.messages.settings.v0.Bundle](/apis/grpc_apis/ocis_messages_settings_v0/#bundle) | | |
### SaveValueRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| value | [ocis.messages.settings.v0.Value](/apis/grpc_apis/ocis_messages_settings_v0/#value) | | |
### SaveValueResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| value | [ocis.messages.settings.v0.ValueWithIdentifier](/apis/grpc_apis/ocis_messages_settings_v0/#valuewithidentifier) | | |
### BundleService
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
| SaveBundle | [SaveBundleRequest](#savebundlerequest) | [SaveBundleResponse](#savebundleresponse) | |
| GetBundle | [GetBundleRequest](#getbundlerequest) | [GetBundleResponse](#getbundleresponse) | |
| ListBundles | [ListBundlesRequest](#listbundlesrequest) | [ListBundlesResponse](#listbundlesresponse) | |
| AddSettingToBundle | [AddSettingToBundleRequest](#addsettingtobundlerequest) | [AddSettingToBundleResponse](#addsettingtobundleresponse) | |
| RemoveSettingFromBundle | [RemoveSettingFromBundleRequest](#removesettingfrombundlerequest) | [.google.protobuf.Empty](#googleprotobufempty) | |
### PermissionService
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
| ListPermissions | [ListPermissionsRequest](#listpermissionsrequest) | [ListPermissionsResponse](#listpermissionsresponse) | |
| ListPermissionsByResource | [ListPermissionsByResourceRequest](#listpermissionsbyresourcerequest) | [ListPermissionsByResourceResponse](#listpermissionsbyresourceresponse) | |
| GetPermissionByID | [GetPermissionByIDRequest](#getpermissionbyidrequest) | [GetPermissionByIDResponse](#getpermissionbyidresponse) | |
### RoleService
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
| ListRoles | [ListBundlesRequest](#listbundlesrequest) | [ListBundlesResponse](#listbundlesresponse) | |
| ListRoleAssignments | [ListRoleAssignmentsRequest](#listroleassignmentsrequest) | [ListRoleAssignmentsResponse](#listroleassignmentsresponse) | |
| ListRoleAssignmentsFiltered | [ListRoleAssignmentsFilteredRequest](#listroleassignmentsfilteredrequest) | [ListRoleAssignmentsResponse](#listroleassignmentsresponse) | |
| AssignRoleToUser | [AssignRoleToUserRequest](#assignroletouserrequest) | [AssignRoleToUserResponse](#assignroletouserresponse) | |
| RemoveRoleFromUser | [RemoveRoleFromUserRequest](#removerolefromuserrequest) | [.google.protobuf.Empty](#googleprotobufempty) | |
### ValueService
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
| SaveValue | [SaveValueRequest](#savevaluerequest) | [SaveValueResponse](#savevalueresponse) | |
| GetValue | [GetValueRequest](#getvaluerequest) | [GetValueResponse](#getvalueresponse) | |
| ListValues | [ListValuesRequest](#listvaluesrequest) | [ListValuesResponse](#listvaluesresponse) | |
| GetValueByUniqueIdentifiers | [GetValueByUniqueIdentifiersRequest](#getvaluebyuniqueidentifiersrequest) | [GetValueResponse](#getvalueresponse) | |
## Scalar Value Types
| .proto Type | Notes | C++ | Java |
| ----------- | ----- | --- | ---- |
| {{< div id="double" content="double" >}} | | double | double |
| {{< div id="float" content="float" >}} | | float | float |
| {{< div id="int32" content="int32" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int |
| {{< div id="int64" content="int64" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long |
| {{< div id="uint32" content="uint32" >}} | Uses variable-length encoding. | uint32 | int |
| {{< div id="uint64" content="uint64" >}} | Uses variable-length encoding. | uint64 | long |
| {{< div id="sint32" content="sint32" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int |
| {{< div id="sint64" content="sint64" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long |
| {{< div id="fixed32" content="fixed32" >}} | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int |
| {{< div id="fixed64" content="fixed64" >}} | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long |
| {{< div id="sfixed32" content="sfixed32" >}} | Always four bytes. | int32 | int |
| {{< div id="sfixed64" content="sfixed64" >}} | Always eight bytes. | int64 | long |
| {{< div id="bool" content="bool" >}} | | bool | boolean |
| {{< div id="string" content="string" >}} | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String |
| {{< div id="bytes" content="bytes" >}} | May contain any arbitrary sequence of bytes. | string | ByteString |
@@ -1,138 +0,0 @@
---
title: "ocis.services.store.v0"
url: /apis/grpc_apis/ocis_services_store_v0
date: 2026-03-23T00:10:32Z
weight: 50
geekdocRepo: https://github.com/owncloud/ocis
---
{{< toc >}}
## ocis/services/store/v0/store.proto
### DatabasesRequest
### DatabasesResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| databases | [string](#string) | repeated | |
### DeleteRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| key | [string](#string) | | |
| options | [ocis.messages.store.v0.DeleteOptions](/apis/grpc_apis/ocis_messages_store_v0/#deleteoptions) | | |
### DeleteResponse
### ListRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| options | [ocis.messages.store.v0.ListOptions](/apis/grpc_apis/ocis_messages_store_v0/#listoptions) | | |
### ListResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| keys | [string](#string) | repeated | |
### ReadRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| key | [string](#string) | | |
| options | [ocis.messages.store.v0.ReadOptions](/apis/grpc_apis/ocis_messages_store_v0/#readoptions) | | |
### ReadResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| records | [ocis.messages.store.v0.Record](/apis/grpc_apis/ocis_messages_store_v0/#record) | repeated | |
### TablesRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| database | [string](#string) | | |
### TablesResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| tables | [string](#string) | repeated | |
### WriteRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| record | [ocis.messages.store.v0.Record](/apis/grpc_apis/ocis_messages_store_v0/#record) | | |
| options | [ocis.messages.store.v0.WriteOptions](/apis/grpc_apis/ocis_messages_store_v0/#writeoptions) | | |
### WriteResponse
### Store
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
| Read | [ReadRequest](#readrequest) | [ReadResponse](#readresponse) | |
| Write | [WriteRequest](#writerequest) | [WriteResponse](#writeresponse) | |
| Delete | [DeleteRequest](#deleterequest) | [DeleteResponse](#deleteresponse) | |
| List | [ListRequest](#listrequest) | [ListResponse](#listresponse) stream | |
| Databases | [DatabasesRequest](#databasesrequest) | [DatabasesResponse](#databasesresponse) | |
| Tables | [TablesRequest](#tablesrequest) | [TablesResponse](#tablesresponse) | |
## Scalar Value Types
| .proto Type | Notes | C++ | Java |
| ----------- | ----- | --- | ---- |
| {{< div id="double" content="double" >}} | | double | double |
| {{< div id="float" content="float" >}} | | float | float |
| {{< div id="int32" content="int32" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int |
| {{< div id="int64" content="int64" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long |
| {{< div id="uint32" content="uint32" >}} | Uses variable-length encoding. | uint32 | int |
| {{< div id="uint64" content="uint64" >}} | Uses variable-length encoding. | uint64 | long |
| {{< div id="sint32" content="sint32" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int |
| {{< div id="sint64" content="sint64" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long |
| {{< div id="fixed32" content="fixed32" >}} | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int |
| {{< div id="fixed64" content="fixed64" >}} | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long |
| {{< div id="sfixed32" content="sfixed32" >}} | Always four bytes. | int32 | int |
| {{< div id="sfixed64" content="sfixed64" >}} | Always eight bytes. | int64 | long |
| {{< div id="bool" content="bool" >}} | | bool | boolean |
| {{< div id="string" content="string" >}} | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String |
| {{< div id="bytes" content="bytes" >}} | May contain any arbitrary sequence of bytes. | string | ByteString |
@@ -1,67 +0,0 @@
---
title: "ocis.services.thumbnails.v0"
url: /apis/grpc_apis/ocis_services_thumbnails_v0
date: 2026-03-23T00:10:32Z
weight: 50
geekdocRepo: https://github.com/owncloud/ocis
---
{{< toc >}}
## ocis/services/thumbnails/v0/thumbnails.proto
### GetThumbnailRequest
A request to retrieve a thumbnail
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| filepath | [string](#string) | | The path to the source image |
| thumbnail_type | [ocis.messages.thumbnails.v0.ThumbnailType](/apis/grpc_apis/ocis_messages_thumbnails_v0/#thumbnailtype) | | The type to which the thumbnail should get encoded to. |
| width | [int32](#int32) | | The width of the thumbnail |
| height | [int32](#int32) | | The height of the thumbnail |
| processor | [string](#string) | | Indicates which image processor to use |
| webdav_source | [ocis.messages.thumbnails.v0.WebdavSource](/apis/grpc_apis/ocis_messages_thumbnails_v0/#webdavsource) | | |
| cs3_source | [ocis.messages.thumbnails.v0.CS3Source](/apis/grpc_apis/ocis_messages_thumbnails_v0/#cs3source) | | |
### GetThumbnailResponse
The service response
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| data_endpoint | [string](#string) | | The endpoint where the thumbnail can be downloaded. |
| transfer_token | [string](#string) | | The transfer token to be able to download the thumbnail. |
| mimetype | [string](#string) | | The mimetype of the thumbnail |
### ThumbnailService
A Service for handling thumbnail generation
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
| GetThumbnail | [GetThumbnailRequest](#getthumbnailrequest) | [GetThumbnailResponse](#getthumbnailresponse) | Generates the thumbnail and returns it. |
## Scalar Value Types
| .proto Type | Notes | C++ | Java |
| ----------- | ----- | --- | ---- |
| {{< div id="double" content="double" >}} | | double | double |
| {{< div id="float" content="float" >}} | | float | float |
| {{< div id="int32" content="int32" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int |
| {{< div id="int64" content="int64" >}} | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long |
| {{< div id="uint32" content="uint32" >}} | Uses variable-length encoding. | uint32 | int |
| {{< div id="uint64" content="uint64" >}} | Uses variable-length encoding. | uint64 | long |
| {{< div id="sint32" content="sint32" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int |
| {{< div id="sint64" content="sint64" >}} | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long |
| {{< div id="fixed32" content="fixed32" >}} | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int |
| {{< div id="fixed64" content="fixed64" >}} | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long |
| {{< div id="sfixed32" content="sfixed32" >}} | Always four bytes. | int32 | int |
| {{< div id="sfixed64" content="sfixed64" >}} | Always eight bytes. | int64 | long |
| {{< div id="bool" content="bool" >}} | | bool | boolean |
| {{< div id="string" content="string" >}} | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String |
| {{< div id="bytes" content="bytes" >}} | May contain any arbitrary sequence of bytes. | string | ByteString |
-11
View File
@@ -1,11 +0,0 @@
---
title: Http
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/apis/http/
geekdocFilePath: _index.md
geekdocCollapseSection: true
---
The [Hypertext Transfer Protocol (HTTP)](https://www.rfc-editor.org/rfc/rfc2616) is a stateless application-level protocol for distributed, collaborative, hypertext information systems. HTTP is the foundation of data communication for the World Wide Web, where hypertext documents include hyperlinks to other resources that the user can easily access, for example by a mouse click or by tapping the screen in a web browser.
Development of HTTP was initiated by Tim Berners-Lee at CERN in 1989 and summarized in a simple document describing the behavior of a client and a server using the first HTTP protocol version that was named 0.9. That first version of HTTP protocol soon evolved into a more elaborated version that was the first draft toward a far future version 1.0
-142
View File
@@ -1,142 +0,0 @@
---
title: Authorization
weight: 40
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/apis/http/
geekdocFilePath: authorization.md
---
In its default configuration, Infinite Scale supports three authentication methods as outlined on the [OIDC official site](https://openid.net/specs/openid-connect-core-1_0.html#rfc.section.3):
1. Authorization Code Flow
2. Implicit Flow
3. Hybrid Flow
For detailed information on Infinite Scale's support for OpenID Connect (OIDC), please consult the [OIDC section](https://owncloud.dev/ocis/identity-provider/oidc).
To authenticate a client app using OIDC, both `client_id` and `client_secret` are essential. Infinite Scale does not offer dynamic registration. The required data for the default [ownCloud clients](https://doc.owncloud.com/server/next/admin_manual/configuration/user/oidc/oidc.html#client-ids-secrets-and-redirect-uris) can be found in the link and are availble for the following apps:
- Desktop
- Android
- iOS
While selecting an ownCloud client for authentication, take note of specific limitations such as the `Redirect URI`:
| Source | Redirect URI |
|------|--------|
|Android|oc://android.owncloud.com|
|iOS|oc://ios.owncloud.com|
|Desktop|http://127.0.0.1 <br> http://localhost |
In this example, the desktop app's `client_id` and `client_secret` are being used.
```bash
client_id=xdXOt13JKxym1B1QcEncf2XDkLAexMBFwiT9j6EfhhHFJhs2KM9jbjTmf8JBXE69
client_secret=UBntmLjC2yYCeHwsyj73Uwo9TAaecAetRwMw0xYcvNL9yRdLSUi0hUAHfvCHFeFh
```
## Authorization Code Flow
1. Requesting authorization
To initiate the OIDC Code Flow, you can use tools like curl and a web browser.
The user should be directed to a URL to authenticate and give their consent (bypassing consent is against the standard):
```plaintext
https://ocis.test/signin/v1/identifier/_/authorize?client_id=client_id&scope=openid+profile+email+offline_access&response_type=code&redirect_uri=http://path-to-redirect-uri
```
After a successful authentication, the browser will redirect to a URL that looks like this:
```plaintext
http://path-to-redirect-uri?code=mfWsjEL0mc8gx0ftF9LFkGb__uFykaBw&scope=openid%20profile%20email%20offline_access&session_state=32b08dd...&state=
```
For the next step extract the code from the URL.
In the above example,
the code is `mfWsjEL0mc8gx0ftF9LFkGb__uFykaBw`
2. Requesting an access token
The next step in the OIDC Code Flow involves an HTTP POST request
to the token endpoint of the **Infinite Scale Identity Server**.
```bash
curl -vk -X POST https://ocis.test/konnect/v1/token \
-d "grant_type=authorization_code" \
-d "code=3a3PTcO-WWXfN3l1mDN4u7G5PzWFxatU" \
-d "redirect_uri=http:path-to-redirect-uri" \
-d "client_id=client_id" \
-d "client_secret=client_secret"
```
Response looks like this:
```json
{
"access_token": "eyJhbGciOid...",
"token_type": "Bearer",
"id_token": "eyJhbGciOi...",
"refresh_token": "eyJhbGciOiJ...",
"expires_in": 300
}
```
3. Refreshing an access token
If the access token has expired, you can get a new one using the refresh token.
```bash
curl -vk -X POST https://ocis.test/konnect/v1/token \
-d "grant_type=refresh_token" \
-d "refresh_token=eyJhbGciOiJ..." \
-d "redirect_uri=http://path-to-redirect-uri" \
-d "client_id=client_id" \
-d "client_secret=client_secret"
```
Response looks like this:
```json
{
"access_token": "eyJhbGciOi...",
"token_type": "Bearer",
"expires_in": 300
}
```
## Implicit Code Flow
When using the implicit flow, tokens are provided in a URI fragment of the redirect URL.
Valid values for the `response_type` request parameter are:
- token
- id_token token
{{< hint type=warning title="Important Warning" >}}
If you are using the implicit flow, `nonce` parameter is required in the initial `/authorize` request.
`nonce=pL3UkpAQPZ8bTMGYOmxHY/dQABin8yrqipZ7iN0PY18=`
bash command to generate cryptographically random value
```bash
openssl rand -base64 32
```
{{< /hint >}}
The user should be directed to a URL to authenticate and give their consent (bypassing consent is against the standard):
```bash
https://ocis.test/signin/v1/identifier/_/authorize?client_id=client_id&scope=openid+profile+email+offline_access&response_type=id_token+token&redirect_uri=http://path-to-redirect-uri&nonce=pL3UkpAQPZ8bTMGYOmxHY/dQABin8yrqipZ7iN0PY18=
```
After a successful authentication, the browser will redirect to a URL that looks like this:
```bash
http://path-to-redirect-uri#access_token=eyJhbGciOiJQUzI...&expires_in=300&id_token=eyJhbGciOiJ...&scope=email%20openid%20profile&session_state=c8a1019f5e054d...&state=&token_type=Bearer
```
For the next step, extract the access_token from the URL.
```bash
access_token = 'eyJhbGciOiJQ...'
```
## Hybrid Flow
The Hybrid Flow in OpenID Connect melds features from both the Implicit and Authorization Code flows. It allows clients to directly retrieve certain tokens from the Authorization Endpoint, yet also offers the option to acquire additional tokens from the Token Endpoint.
The Authorization Server redirects back to the client with appropriate parameters in the response, based on the value of the response_type request parameter:
- code token
- code id_token
- code id_token token
-72
View File
@@ -1,72 +0,0 @@
---
title: "LibreGraph"
date: 2018-05-02T00:00:00+00:00
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/apis/http/graph
geekdocFilePath: _index.md
geekdocCollapseSection: true
---
The LibreGraph API is a REST Api which is inspired by the [Microsoft Graph API](https://developer.microsoft.com/en-us/graph). It tries to stay compliant with the Microsoft Graph API and aims to be the Next Generation Api in Infinite Scale where we want to support most of the features of the platform.
The [API specification](https://github.com/owncloud/libre-graph-api) is available in the OpenApi 3 standard and there are generated client and server [SDKs](https://github.com/owncloud/libre-graph-api#clients) available. You can browse the API with the [Swagger UI](https://owncloud.dev/libre-graph-api/).
## Calling the LibreGraph API
```sh
{HTTP method} https://ocis.url/graph/{version}/{resource}?{query-parameters}
```
The request component consists of:
| Component | Description |
|--------------------|-------------------------------------------------------------------------|
| {HTTP method} | The HTTP method which is used in the request. |
| {version} | The version of the LibreGraph API used by the client. |
| {resource} | The LibreGraph Resource which the client is referencing in the request. |
| {query-parameters} | Optional parameters for the request to customize the response. |
### HTTP methods
| Method | Description |
|--------|-------------------------------|
| GET | Read data from a resource. |
| POST | Create a new resource. |
| PATCH | Update an existing resource. |
| PUT | Replace an existing resource. |
| DELETE | Delete an existing resource. |
The methods `GET` and `DELETE` need no request body. The methods `POST`, `PATCH` and `PUT` require a request body, normally in JSON format to provide the needed values.
### Version
Infinite Scale currently provides the version `v1.0`.
### Resource
A resource could be an entity or a complex type and is usually defined by properties. Entities are always recognizable by an `Id` property. The URL contains the resource which you are interacting with e.g. `/me/drives` or `/groups/{group-id}`.
Each resource could possibly require different permissions. Usually you need permissions on a higher level for creating or updating an existing resource than for reading.
### Query parameters
Query parameters can be OData system query options, or other strings that a method accepts to customize its response.
You can use optional OData system query options to include more or fewer properties than the default response, filter the response for items that match a custom query, or provide additional parameters for a method.
For example, adding the following filter parameter restricts the drives returned to only those with the driveType property of `project`.
```shell
GET https://ocis.url/graph/v1.0/drives?$filter=driveType eq 'project'
```
For more information about OData query options please check the [API specification](https://github.com/owncloud/libre-graph-api) and the provided examples.
### Authorization
For development purposes the examples in the developer documentation use Basic Auth. It is disabled by default and should only be enabled by setting `PROXY_ENABLE_BASIC_AUTH` in [the proxy](../../../services/proxy/configuration/#environment-variables) for development or test instances.
To authenticate with a Bearer token or OpenID Connect access token replace the `-u user:password` Basic Auth option of curl with a `-H 'Authorization: Bearer <token>'` header. A `<token>` can be obtained by copying it from a request in the browser, although it will time out within minutes. To automatically refresh the OpenID Connect access token an ssh-agent like solution like [oidc-agent](https://github.com/indigo-dc/oidc-agent) should be used. The graph endpoints that support a preconfigured token can be found in the [API specification](https://github.com/owncloud/libre-graph-api)
## Resources
{{< toc-tree >}}
-184
View File
@@ -1,184 +0,0 @@
---
title: Permissions
weight: 50
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/apis/http/graph
geekdocFilePath: permissions.md
---
{{< toc >}}
## Permissions API
The Permissions API is implementing a subset of the functionality of the
[MS Graph Permission resource](https://learn.microsoft.com/en-us/graph/api/resources/permission?view=graph-rest-1.0).
### Example Permissions
The JSON representation of a Drive, as handled by the Spaces API, looks like this:
````json
{
"@libre.graph.permissions.roles.allowedValues": [
{
"id": "b1e2218d-eef8-4d4c-b82d-0f1a1b48f3b5",
"description": "Allows reading the shared file or folder",
"displayName": "Viewer",
"@libre.graph.weight": 1
},
{
"id": "fb6c3e19-e378-47e5-b277-9732f9de6e21",
"description": "Allows reading and writing the shared file or folder",
"displayName": "Editor",
"@libre.graph.weight": 2
},
{
"id": "312c0871-5ef7-4b3a-85b6-0e4074c64049",
"description": "Allows managing a space",
"displayName": "Manager",
"@libre.graph.weight": 3
},
{
"id": "4916f47e-66d5-49bb-9ac9-748ad00334b",
"description": "Allows creating new files",
"displayName": "File Drop",
"@libre.graph.weight": 4
}
],
"@libre.graph.permissions.actions.allowedValues": [
"libre.graph/driveItem/basic/read",
"libre.graph/driveItem/permissions/read",
"libre.graph/driveItem/upload/create",
"libre.graph/driveItem/standard/allTasks",
"libre.graph/driveItem/upload/create"
],
"value": [
{
"id": "67445fde-a647-4dd4-b015-fc5dafd2821d",
"link": {
"type": "view",
"webUrl": "https://cloud.example.org/s/fhGBMIkKFEHWysj"
}
},
{
"id": "34646ab6-be32-43c9-89e6-987e0c237e9b",
"roles": [
"b1e2218d-eef8-4d4c-b82d-0f1a1b48f3b5"
],
"grantedToV2": [
{
"user": {
"id": "4c510ada-c86b-4815-8820-42cdf82c3d51",
"displayName": "Albert Einstein"
}
}
]
},
{
"id": "81d5bad3-3eff-410a-a2ea-eda2d14d4474",
"roles": [
"b1e2218d-eef8-4d4c-b82d-0f1a1b48f3b5"
],
"grantedToV2": [
{
"user": {
"id": "4c510ada-c86b-4815-8820-42cdf82c3d51",
"displayName": "Albert Einstein"
}
}
]
},
{
"id": "b470677e-a7f5-4304-8ef5-f5056a21fff1",
"roles": [
"b1e2218d-eef8-4d4c-b82d-0f1a1b48f3b5"
],
"grantedToV2": [
{
"user": {
"id": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c",
"displayName": "Marie Skłodowska Curie"
}
}
]
},
{
"id": "453b02be-4ec2-4e7d-b576-09fc153de812",
"roles": [
"fb6c3e19-e378-47e5-b277-9732f9de6e21"
],
"grantedToV2": [
{
"user": {
"id": "4c510ada-c86b-4815-8820-42cdf82c3d51",
"displayName": "Albert Einstein"
}
}
],
"expirationDateTime": "2018-07-15T14:00:00.000Z"
},
{
"id": "86765c0d-3905-444a-9b07-76201f8cf7df",
"roles": [
"312c0871-5ef7-4b3a-85b6-0e4074c64049"
],
"grantedToV2": [
{
"group": {
"id": "167cbee2-0518-455a-bfb2-031fe0621e5d",
"displayName": "Philosophy Haters"
}
}
]
},
{
"id": "c42b5cbd-2d65-42cf-b0b6-fb6d2b762256",
"grantedToV2": [
{
"user": {
"id": "4c510ada-c86b-4815-8820-42cdf82c3d51",
"displayName": "Albert Einstein"
}
}
],
"@libre.graph.permissions.actions": [
"libre.graph/driveItem/basic/read",
"libre.graph/driveItem/path/update"
]
}
]
}
````
## Creating Share Invitation / Link
### Create a link share `POST /drives/{drive-id}/items/{item-id}/createLink`
https://owncloud.dev/libre-graph-api/#/drives.permissions/CreateLink
### Create a user/group share `POST /drives/{drive-id}/items/{item-id}/invite`
https://owncloud.dev/libre-graph-api/#/drives.permissions/Invite
## Reading Permissions
### List the effective sharing permissions on a driveitem `GET /drives/{drive-id}/items/{item-id}/permissions`
https://owncloud.dev/libre-graph-api/#/drives.permissions/ListPermissions
### List Get sharing permission for a file or folder `GET /drives/{drive-id}/items/{item-id}/permissions/{perm-id}`
https://owncloud.dev/libre-graph-api/#/drives.permissions/GetPermission
## Updating Permissions
### Updating sharing permission `POST /drives/{drive-id}/items/{item-id}/permissions/{perm-id}`
https://owncloud.dev/libre-graph-api/#/drives.permissions/UpdatePermission
### Set password of permission `POST /drives/{drive-id}/items/{item-id}/permissions/{perm-id}/setPassword`
https://owncloud.dev/libre-graph-api/#/drives.permissions/SetPermissionPassword
### Deleting permission `DELETE /drives/{drive-id}/items/{item-id}/permissions/{perm-id}`
https://owncloud.dev/libre-graph-api/#/drives.permissions/DeletePermission
-38
View File
@@ -1,38 +0,0 @@
---
title: Role
weight: 60
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/apis/http/graph
geekdocFilePath: permissions.md
---
{{< toc >}}
## Role API
The Roles API is implementing a subset of the functionality of the
[MS Graph Role Management](https://learn.microsoft.com/en-us/graph/api/resources/rolemanagement?view=graph-rest-1.0).
## Role Management
### List roleDefinitions `GET /v1beta1/roleManagement/permissions/roleDefinitions`
https://owncloud.dev/libre-graph-api/#/roleManagement/ListPermissionRoleDefinitions
### Get unifiedRoleDefinition `GET /drives/{drive-id}/items/{item-id}/permissions/{perm-id}`
https://owncloud.dev/libre-graph-api/#/roleManagement/GetPermissionRoleDefinition
## Role Assignment
### Get appRoleAssignments of a user `GET /v1.0/users/{user-id}/appRoleAssignments`
https://owncloud.dev/libre-graph-api/#/user.appRoleAssignment/user.ListAppRoleAssignments
### Grant an appRoleAssignment to a user `POST /v1.0/users/{user-id}/appRoleAssignments`
https://owncloud.dev/libre-graph-api/#/user.appRoleAssignment/user.CreateAppRoleAssignments
### Delete the appRoleAssignment from a user `DELETE /v1.0/users/{user-id}/appRoleAssignments/{appRoleAssignment-id}`
https://owncloud.dev/libre-graph-api/#/user.appRoleAssignment/user.DeleteAppRoleAssignments
-494
View File
@@ -1,494 +0,0 @@
---
title: Spaces
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/apis/http/graph
geekdocFilePath: spaces.md
---
{{< toc >}}
## Spaces API
The Spaces API is implementing a subset of the functionality of the
[MS Graph Drives resource](https://learn.microsoft.com/en-us/graph/api/resources/drive?view=graph-rest-1.0).
### Example Space
The JSON representation of a Drive, as handled by the Spaces API, looks like this:
````json
{
"driveAlias": "project/mars",
"driveType": "project",
"id": "storage-users-1$89ad5ad2-5fdb-4877-b8c9-601a9670b925",
"lastModifiedDateTime": "2023-01-24T21:19:26.417055+01:00",
"name": "Mars",
"owner": {
"user": {
"displayName": "",
"id": "89ad5ad2-5fdb-4877-b8c9-601a9670b925"
}
},
"quota": {
"remaining": 999853685,
"state": "normal",
"total": 1000000000,
"used": 146315
},
"root": {
"eTag": "\"910af0061161c42d8d1224df6c4a2527\"",
"id": "storage-users-1$89ad5ad2-5fdb-4877-b8c9-601a9670b925",
"permissions": [
{
"grantedToIdentities": [
{
"user": {
"displayName": "Admin",
"id": "some-admin-user-id-0000-000000000000"
}
}
],
"roles": [
"manager"
]
}
],
"webDavUrl": "https://localhost:9200/dav/spaces/storage-users-1$89ad5ad2-5fdb-4877-b8c9-601a9670b925"
},
"special": [
{
"eTag": "\"f97829324f63ce778095334cfeb0097b\"",
"file": {
"mimeType": "image/jpeg"
},
"id": "storage-users-1$89ad5ad2-5fdb-4877-b8c9-601a9670b925!40171bea-3263-47a8-80ef-0ca20c37f45a",
"lastModifiedDateTime": "2022-02-15T17:11:50.000000496+01:00",
"name": "Mars_iStock-MR1805_20161221.jpeg",
"size": 146250,
"specialFolder": {
"name": "image"
},
"webDavUrl": "https://localhost:9200/dav/spaces/storage-users-1$89ad5ad2-5fdb-4877-b8c9-601a9670b925%2189ad5ad2-5fdb-4877-b8c9-601a9670b925/.space/Mars_iStock-MR1805_20161221.jpeg"
},
{
"eTag": "\"ff38b31d8f109a4fbb98ab34499a3379\"",
"file": {
"mimeType": "text/markdown"
},
"id": "storage-users-1$89ad5ad2-5fdb-4877-b8c9-601a9670b925!e2167612-7578-46e2-8ed7-971481037bc1",
"lastModifiedDateTime": "2023-01-24T21:10:23.661841+01:00",
"name": "readme.md",
"size": 65,
"specialFolder": {
"name": "readme"
},
"webDavUrl": "https://localhost:9200/dav/spaces/storage-users-1$89ad5ad2-5fdb-4877-b8c9-601a9670b925%2189ad5ad2-5fdb-4877-b8c9-601a9670b925/.space/readme.md"
}
],
"webUrl": "https://localhost:9200/f/storage-users-1$89ad5ad2-5fdb-4877-b8c9-601a9670b925"
}
````
## Creating Spaces
### Create a single space `POST /drives`
https://owncloud.dev/libre-graph-api/#/drives/CreateDrive
### Create a space item (Enable sync) `POST /drives/{drive-id}/root/children`
https://owncloud.dev/libre-graph-api/#/drives.root/CreateDriveItem
## Reading Spaces
```shell
GET https://ocis.url/graph/{version}/{me/}drives/?{query-parameters}
```
| Component | Description |
|--------------------|------------------------------------------------------------------------------------------------------------------------|
| {version} | The version of the LibreGraph API used by the client. |
| {/me} | The `me` component of the part is optional. If used, you only see spaces where the acting user is a regular member of. |
| {query-parameters} | Optional parameters for the request to customize the response. |
### List all spaces `GET /drives`
Returns a list of all available spaces, even ones where the acting user is not a regular member of. You need elevated permissions to do list all spaces. If you don't have the elevated permissions, the result is the same like `GET /me/drives`.
{{< hint type=info title="Multiple Administration Personas" >}}
The ownCloud spaces concept draws a strict line between users which can work with the content of a space and others who have the permission to manage the space. A user which is able to manage quota and space metadata does not necessarily need to be able to access the content of a space.
**Space Admin**\
There is a global user role "Space Admin" which grants users some global permissions to manage space quota and some space metadata. This Role enables the user also to disable, restore and delete spaces. He cannot manage space members.
**Space Manager**\
The "Space Manager" is a user which is a regular member of a space because he has been invited. In addition to being part of a space the user can also manage the memberships of the space.
{{< /hint >}}
### List My Spaces `GET /me/drives`
https://owncloud.dev/libre-graph-api/#/me.drives/ListMyDrives
## Modifying Spaces
Modify the properties of a space. You need elevated permissions to execute this request.
### Set the space quota to 5GB `PATCH /drives/{drive-id}`
To limit the quota of a space you need to set the `quota.total` value. The API response will give back all actual quota properties.
````json
{
"quota": {
"remaining": 5368709120,
"state": "normal",
"total": 5368709120,
"used": 0
}
}
````
| Attribute | Description |
|-----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| remaining | The remaining disk space in `bytes`. If the quota is not limited, this will show the total available disk space. |
| state | The state of the space in regards to quota usage. This can be used for visual indicators. It can be `normal`(<75%), `nearing`(between 75% and 89%), `critical`(between 90% and 99%) and `exceeded`(100%). |
| total | The space id. The value needs to be a space ID. |
| used | The used disk space in bytes. |
{{< tabs "set-space-quota" >}}
{{< tab "Request" >}}
```shell
curl -L -k -X PATCH 'https://localhost:9200/graph/v1.0/drives/storage-users-1$535aa42d-a3c7-4329-9eba-5ef48fcaa3ff' \
-H 'Content-Type: application/json' \
--data-raw '{
"quota": {
"total": 5368709120
}
}'
```
{{< /tab >}}
{{< tab "Response - 200 OK" >}}
````json {hl_lines=[17]}
{
"description": "Marketing team resources",
"driveAlias": "project/marketing",
"driveType": "project",
"id": "storage-users-1$535aa42d-a3c7-4329-9eba-5ef48fcaa3ff",
"lastModifiedDateTime": "2023-01-18T17:13:48.385204589+01:00",
"name": "Marketing",
"owner": {
"user": {
"displayName": "",
"id": "535aa42d-a3c7-4329-9eba-5ef48fcaa3ff"
}
},
"quota": {
"remaining": 5368709120,
"state": "normal",
"total": 5368709120,
"used": 0
},
"root": {
"eTag": "\"f91e56554fd9305db81a93778c0fae96\"",
"id": "storage-users-1$535aa42d-a3c7-4329-9eba-5ef48fcaa3ff",
"permissions": [
{
"grantedToIdentities": [
{
"user": {
"displayName": "Admin",
"id": "some-admin-user-id-0000-000000000000"
}
}
],
"roles": [
"manager"
]
}
],
"webDavUrl": "https://localhost:9200/dav/spaces/storage-users-1$535aa42d-a3c7-4329-9eba-5ef48fcaa3ff"
},
"webUrl": "https://localhost:9200/f/storage-users-1$535aa42d-a3c7-4329-9eba-5ef48fcaa3ff"
}
````
{{< /tab >}}
{{< /tabs >}}
### Change the space name, subtitle and alias `PATCH /drives/{drive-id}`
You can change multiple space properties in one request as long as you submit a valid JSON body. Please be aware that some properties need different permissions.
{{< tabs "change-space-props" >}}
{{< tab "Request" >}}
```shell
curl -L -k -X PATCH 'https://localhost:9200/graph/v1.0/drives/storage-users-1$535aa42d-a3c7-4329-9eba-5ef48fcaa3ff' \
-H 'Content-Type: application/json' \
--data-raw '{
"name": "Mars",
"description": "Mission to mars",
"driveAlias": "project/mission-to-mars"
}'
```
{{< /tab >}}
{{< tab "Response - 200 OK" >}}
````json {hl_lines=[2,3,7]}
{
"description": "Mission to mars",
"driveAlias": "project/mission-to-mars",
"driveType": "project",
"id": "storage-users-1$535aa42d-a3c7-4329-9eba-5ef48fcaa3ff",
"lastModifiedDateTime": "2023-01-19T14:17:36.094283+01:00",
"name": "Mars",
"owner": {
"user": {
"displayName": "",
"id": "535aa42d-a3c7-4329-9eba-5ef48fcaa3ff"
}
},
"quota": {
"remaining": 15,
"state": "normal",
"total": 15,
"used": 0
},
"root": {
"eTag": "\"f5fee4fdfeedd6f98956500779eee15e\"",
"id": "storage-users-1$535aa42d-a3c7-4329-9eba-5ef48fcaa3ff",
"permissions": [
{
"grantedToIdentities": [
{
"user": {
"displayName": "Admin",
"id": "some-admin-user-id-0000-000000000000"
}
}
],
"roles": [
"manager"
]
}
],
"webDavUrl": "https://localhost:9200/dav/spaces/storage-users-1$535aa42d-a3c7-4329-9eba-5ef48fcaa3ff"
},
"webUrl": "https://localhost:9200/f/storage-users-1$535aa42d-a3c7-4329-9eba-5ef48fcaa3ff"
}
````
{{< /tab >}}
{{< /tabs >}}
## Disabling / Deleting Spaces
### Disable a space `DELETE /drives/{drive-id}`
This operation will make the space content unavailable for all space members. No data will be deleted.
{{< tabs "disable-space" >}}
{{< tab "Request" >}}
```shell
curl -L -k -X DELETE 'https://localhost:9200/graph/v1.0/drives/storage-users-1$535aa42d-a3c7-4329-9eba-5ef48fcaa3ff/'
```
{{< /tab >}}
{{< tab "Response - 204 No Content" >}}
This response has no body value.
A disabled space will appear in listings with a `root.deleted.state=trashed` property. The space description and the space image will not be readable anymore.
```json {hl_lines=[18,19,20]}
{
"description": "Marketing team resources",
"driveAlias": "project/marketing",
"driveType": "project",
"id": "storage-users-1$535aa42d-a3c7-4329-9eba-5ef48fcaa3ff",
"lastModifiedDateTime": "2023-01-19T14:17:36.094283+01:00",
"name": "Marketing",
"owner": {
"user": {
"displayName": "",
"id": "535aa42d-a3c7-4329-9eba-5ef48fcaa3ff"
}
},
"quota": {
"total": 15
},
"root": {
"deleted": {
"state": "trashed"
},
"eTag": "\"f5fee4fdfeedd6f98956500779eee15e\"",
"id": "storage-users-1$535aa42d-a3c7-4329-9eba-5ef48fcaa3ff",
"permissions": [
{
"grantedToIdentities": [
{
"user": {
"displayName": "Admin",
"id": "some-admin-user-id-0000-000000000000"
}
}
],
"roles": [
"manager"
]
}
],
"webDavUrl": "https://localhost:9200/dav/spaces/storage-users-1$535aa42d-a3c7-4329-9eba-5ef48fcaa3ff"
},
"webUrl": "https://localhost:9200/f/storage-users-1$535aa42d-a3c7-4329-9eba-5ef48fcaa3ff"
}
```
{{< /tab >}}
{{< /tabs >}}
### Restore a space `PATCH /drives/{drive-id}`
This operation will make the space content available again to all members. No content will be changed.
To restore a space, the Header `Restore: T` needs to be set.
{{< tabs "restore-space" >}}
{{< tab "Request" >}}
```shell
curl -L -X PATCH 'https://localhost:9200/graph/v1.0/drives/storage-users-1$535aa42d-a3c7-4329-9eba-5ef48fcaa3ff/' \
-H 'Restore: T' \
-H 'Content-Type: text/plain' \
--data-raw '{}'
```
{{< hint type=info title="Body value" >}}
This request needs an empty body (--data-raw '{}') to fulfil the standard libregraph specification even when the body is not needed.
{{< /hint >}}
{{< /tab >}}
{{< tab "Response - 200 OK" >}}
```json
{
"description": "Marketing team resources",
"driveAlias": "project/marketing",
"driveType": "project",
"id": "storage-users-1$535aa42d-a3c7-4329-9eba-5ef48fcaa3ff",
"lastModifiedDateTime": "2023-01-19T14:17:36.094283+01:00",
"name": "Marketing",
"owner": {
"user": {
"displayName": "",
"id": "535aa42d-a3c7-4329-9eba-5ef48fcaa3ff"
}
},
"quota": {
"remaining": 15,
"state": "normal",
"total": 15,
"used": 0
},
"root": {
"eTag": "\"f5fee4fdfeedd6f98956500779eee15e\"",
"id": "storage-users-1$535aa42d-a3c7-4329-9eba-5ef48fcaa3ff",
"permissions": [
{
"grantedToIdentities": [
{
"user": {
"displayName": "Admin",
"id": "some-admin-user-id-0000-000000000000"
}
}
],
"roles": [
"manager"
]
}
],
"webDavUrl": "https://localhost:9200/dav/spaces/storage-users-1$535aa42d-a3c7-4329-9eba-5ef48fcaa3ff"
},
"webUrl": "https://localhost:9200/f/storage-users-1$535aa42d-a3c7-4329-9eba-5ef48fcaa3ff"
}
```
{{< /tab >}}
{{< /tabs >}}
### Permanently delete a space `DELETE /drives/{drive-id}`
This operation will delete a space and all its data permanently. This is restricted to spaces which are already disabled.
To delete a space, the Header `Purge: T` needs to be set.
{{< tabs "delete-space" >}}
{{< tab "Request" >}}
```shell {hl_lines=[2]}
curl -L -X DELETE 'https://localhost:9200/graph/v1.0/drives/storage-users-1$535aa42d-a3c7-4329-9eba-5ef48fcaa3ff' \
-H 'Purge: T'
```
{{< hint type=warning title="Data will be deleted" >}}
This request will delete a space and all its content permanently. This operation cannot be reverted.
{{< /hint >}}
{{< /tab >}}
{{< tab "Response - 204 No Content" >}}
This response has no body value.
{{< /tab >}}
{{< tab "Response - 400 Bad Request" >}}
The space to be deleted was not disabled before.
```json
{
"error": {
"code": "invalidRequest",
"innererror": {
"date": "2023-01-24T19:57:19Z",
"request-id": "f62af40f-bc18-475e-acd7-e9008d6bd326"
},
"message": "error: bad request: can't purge enabled space"
}
}
```
{{< /tab >}}
{{< /tabs >}}
## Sharing Space
### Add member to space `POST /drives/{drive-id}/root/invite`
https://owncloud.dev/libre-graph-api/#/drives.permissions/Invite
### Sharing space as a link `POST /drives/{drive-id}/root/createLink`
https://owncloud.dev/libre-graph-api/#/drives.root/CreateLinkSpaceRoot
## Reading Space Permissions
### Listing permissions of a space `GET /drives/{drive-id}/root/permissions`
https://owncloud.dev/libre-graph-api/#/drives.root/ListPermissionsSpaceRoot
## Modifying / Deleting Space Permissions
### Update permissions of a drive `PATCH /drives/{drive-id}/root/permissions/{perm-id}`
https://owncloud.dev/libre-graph-api/#/drives.root/UpdatePermissionSpaceRoot
### Set password of a link share `POST /drives/{drive-id}/root/permissions/{perm-id}/setPassword`
https://owncloud.dev/libre-graph-api/#/drives.root/SetPermissionPasswordSpaceRoot
### Removing acess to a space `DELETE /drives/{drive-id}/root/permissions/{perm-id}`
https://owncloud.dev/libre-graph-api/#/drives.root/DeletePermissionSpaceRoot
-247
View File
@@ -1,247 +0,0 @@
---
title: "Resumable Upload"
date: 2023-10-10T00:00:00+00:00
weight: 21
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/apis/http
geekdocFilePath: tus_upload.md
geekdocCollapseSection: true
---
Infinite Scale supports the tus resumable-upload protocol, which is a robust, modular, and open protocol designed to resume large file uploads reliably over HTTP.
In situations where file uploads might be interrupted due to network issues, browser crashes, or other unforeseen interruptions,
tus ensures that uploads can be resumed from the point of failure without losing data.
This documentation shows some basic examples, refer [tus official site](https://tus.io/protocols/resumable-upload) for more details.
## Supported tus Features
The backend announces certain tus features to clients. WebDAV responses come with tus HTTP headers for the offical tus features, and additional, ownCloud specific features are announced via the capabilities endpoint (e.g. `https://localhost:9200/ocs/v1.php/cloud/capabilities?format=json`).
The following snippet shows the relevant part of the server capabilities of Infinite Scale that concerns the tus upload:
```json
{
"ocs": {
"data": {
"capabilities": {
"files": {
"tus_support": {
"version": "1.0.0",
"resumable": "1.0.0",
"extension": "creation,creation-with-upload",
"max_chunk_size": 10000000,
"http_method_override": ""
}
}
}
}
}
}
}
```
| Parameter | Environment Variable | Default Value | Description |
| -------------- | ------------------------------ | ------------- | ------------------------------------------------------------------- |
| max_chunk_size | FRONTEND_UPLOAD_MAX_CHUNK_SIZE | 10000000 | Announces the max chunk sizes in bytes for uploads via the clients. |
## Upload in Chunks
### Create an Upload URL
The client must send a POST request against a known upload creation URL to request a new upload resource.
The filename has to be provided in base64-encoded format.
Example:
```shell
# base64 encoded filename 'tustest.txt' is 'dHVzdGVzdC50eHQ='
echo -n 'tustest.txt' | base64
```
{{< tabs "create-upload-url" >}}
{{< tab "Request" >}}
```shell
curl -ks -XPOST https://ocis.test/remote.php/dav/spaces/8d72036d-14a5-490f-889e-414064156402$196ac304-7b88-44ce-a4db-c4becef0d2e0 \
-H "Authorization: Bearer eyJhbGciOiJQUzI..."\
-H "Tus-Resumable: 1.0.0" \
-H "Upload-Length: 10" \
-H "Upload-Metadata: filename dHVzdGVzdC50eHQ="
```
{{< /tab >}}
{{< tab "Response - 201 Created" >}}
```
< HTTP/1.1 201 Created
< Access-Control-Allow-Headers: Tus-Resumable, Upload-Length, Upload-Metadata, If-Match
< Access-Control-Allow-Origin: *
< Access-Control-Expose-Headers: Tus-Resumable, Upload-Offset, Location
< Content-Length: 0
< Content-Security-Policy: default-src 'none';
< Date: Mon, 16 Oct 2023 08:49:39 GMT
< Location: https://ocis.test/data/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJyZXZhIiwiZXhwIjoxNjk3NTMyNTc5LCJpYXQiOjE2OTc0NDYxNzksInRhcmdldCI6Imh0dHA6Ly9sb2NhbGhvc3Q6OTE1OC9kYXRhL3R1cy8zYTU3ZWZlMS04MzE0LTQ4MGEtOWY5Ny04N2Q1YzBjYTJhMTgifQ.FbrlY7mdOfsbFgMrP8OtcHlCEq72a2ZVnPD2iBo9MfM
< Tus-Extension: creation,creation-with-upload,checksum,expiration
< Tus-Resumable: 1.0.0
< Vary: Origin
< X-Content-Type-Options: nosniff
< X-Download-Options: noopen
< X-Frame-Options: SAMEORIGIN
< X-Permitted-Cross-Domain-Policies: none
< X-Request-Id: xxxxxxxxxxxxxxxxxxxxxx
< X-Robots-Tag: none
<
* Connection #0 to host localhost left intact
```
{{< /tab >}}
{{< /tabs >}}
The server will return a temporary upload URL in the location header of the response:
```
< Location: https://ocis.test/data/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJyZXZhIiwiZXhwIjoxNjk3NTMyNTc5LCJpYXQiOjE2OTc0NDYxNzksInRhcmdldCI6Imh0dHA6Ly9sb2NhbGhvc3Q6OTE1OC9kYXRhL3R1cy8zYTU3ZWZlMS04MzE0LTQ4MGEtOWY5Ny04N2Q1YzBjYTJhMTgifQ.FbrlY7mdOfsbFgMrP8OtcHlCEq72a2ZVnPD2iBo9MfM
```
### Upload the First Chunk
Once a temporary upload URL has been created, a client can send a PATCH request to upload a file. The file content should be sent in the body of the request:
{{< tabs "upload-the-first-chunk" >}}
{{< tab "Request" >}}
```shell
curl -ks -XPATCH https://temporary-upload-url \
-H "Authorization: Bearer eyJhbGciOiJQUzI..." \
-H "Tus-Resumable: 1.0.0" \
-H "Upload-Offset: 0" \
-H "Content-Type: application/offset+octet-stream" -d "01234"
```
{{< /tab >}}
{{< tab "Response - 204 No Content" >}}
```
< HTTP/1.1 204 No Content
< Date: Tue, 17 Oct 2023 04:10:52 GMT
< Oc-Fileid: 8d72036d-14a5-490f-889e-414064156402$73bb5450-816b-4cae-90aa-1f96adc95bd4!84e319e4-de1d-4dd8-bbd0-e51d933cdbcd
< Tus-Resumable: 1.0.0
< Upload-Expires: 1697602157
< Upload-Offset: 5
< Vary: Origin
< X-Content-Type-Options: nosniff
< X-Request-Id: xxxxxxxxxxxxxxxxxxxxxx
<
* Connection #0 to host localhost left intact
```
{{< /tab >}}
{{< /tabs >}}
### Upload Further Chunks
After the first chunk is uploaded, the second chunk can be uploaded by pointing `Upload-Offset` to exact position that was returned in the first response.
Upload process will not be marked as complete until the total uploaded content size matches the `Upload-Length` specified during the creation of the temporary URL.
{{< tabs "upload-the-second-chunk" >}}
{{< tab "Request" >}}
```shell
curl -ks -XPATCH https://temporary-upload-url \
-H "Authorization: Bearer eyJhbGciOiJQUzI..." \
-H "Tus-Resumable: 1.0.0" \
-H "Upload-Offset: 5" \
-H "Content-Type: application/offset+octet-stream" -d "56789"
```
{{< /tab >}}
{{< tab "Response - 204 No Content" >}}
```
< HTTP/1.1 204 No Content
< Date: Tue, 17 Oct 2023 04:11:00 GMT
< Oc-Fileid: 8d72036d-14a5-490f-889e-414064156402$73bb5450-816b-4cae-90aa-1f96adc95bd4!84e319e4-de1d-4dd8-bbd0-e51d933cdbcd
< Tus-Resumable: 1.0.0
< Upload-Expires: 1697602157
< Upload-Offset: 10
< Vary: Origin
< X-Content-Type-Options: nosniff
< X-Request-Id: xxxxxxxxxxxxxxxxxxxxxx
<
* Connection #0 to host localhost left intact
```
{{< /tab >}}
{{< /tabs >}}
{{< hint type=warning title="Important Warning" >}}
`Upload-Offset` header indicates the byte position in the target file where the server should start writing the upload content.
It ensures data integrity and order during the upload process.
{{< /hint >}}
## Creation with Upload
{{< tabs "creation-with-upload" >}}
{{< tab "Request" >}}
```shell
curl -ks -XPOST https://ocis.test/remote.php/dav/spaces/{space-id} \
-H "Authorization: Bearer eyJhbGciOiJQUzI..." \
-H "Tus-Resumable: 1.0.0" \
-H "Upload-Length: 14" \
-H "Content-Type: application/offset+octet-stream" \
-H "Upload-Metadata: filename dGVzdC50eHQ=" \
-H "Tus-Extension: creation-with-upload" \
-d "upload content"
```
{{< /tab >}}
{{< tab "Response - 201 Created" >}}
```shell
< HTTP/1.1 201 Created
< Access-Control-Allow-Headers: Tus-Resumable, Upload-Length, Upload-Metadata, If-Match
< Access-Control-Allow-Origin: *
< Access-Control-Expose-Headers: Tus-Resumable, Upload-Offset, Location
< Content-Length: 0
< Content-Security-Policy: default-src 'none';
< Content-Type: text/plain
< Date: Mon, 16 Oct 2023 04:18:25 GMT
< Etag: "372c96743f68bc40e789124d30567371"
< Last-Modified: Mon, 16 Oct 2023 04:18:25 +0000
< Location: https://ocis.test/data/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJhdWQiOiJyZXZhIiwiZXhwIjoxNjk3NTE2MzA1LCJpYXQiOjE2OTc0Mjk5MDUsInRhcmdldCI6Imh0dHA6Ly9sb2NhbGhvc3Q6OTE1OC9kYXRhL3R1cy82NjlhODBlZi1hN2VjLTQwYTAtOGNmOS05MTgwNTVhYzlkZjAifQ.yq-ofJYnJ9FLML7Z_jki1FJQ7Ulbt9O_cmLe6V411A4
< Oc-Etag: "372c96743f68bc40e789124d30567371"
< Oc-Fileid: 44d3e1e0-6c01-4b94-9145-9d0068239fcd$446bdad4-4b27-41f1-afce-0881f202a214!d7c292a6-c395-4e92-bf07-2c1663aec8dd
< Oc-Perm: RDNVWZP
< Tus-Extension: creation,creation-with-upload,checksum,expiration
< Tus-Resumable: 1.0.0
< Upload-Expires: 1697516305
< Upload-Offset: 14
< Vary: Origin
< X-Content-Type-Options: nosniff
< X-Download-Options: noopen
< X-Frame-Options: SAMEORIGIN
* TLSv1.2 (IN), TLS header, Supplemental data (23):
{ [5 bytes data]
< X-Permitted-Cross-Domain-Policies: none
< X-Request-Id: xxxxxxxxxxxxxxxxxxxxxx
< X-Robots-Tag: none
<
* Connection #0 to host localhost left intact
```
{{< /tab >}}
{{< /tabs >}}
{{< hint type=warning title="Important Warning" >}}
The `Upload-Length` header of the request has to contain the exact size of the upload content in byte.
{{< /hint >}}
## Supported Upload-Metadata
Upload-metadata key-value pairs aren't specified in the general tus docs. The following ones are supported in the ownCloud ecosystem:
| Parameter (key) | Example (value, MUST be Base64 encoded) | Description |
| -------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| `name` OR `filename` (mandatory) | example.pdf | Filename |
| `mtime` (recommended) | 1701708712 | Modification time (Unix time format) |
| `checksum` (recommended) | SHA1 a330de5886e5a92d78fb3f8d59fe469857759e72 | Checksum, computed from the client |
| `type` OR `filetype` | application/pdf | MIME Type, sent by the web UI |
| `relativePath` | undefined | File path relative to the folder that is being uploaded, including the filename. Sent by the web UI |
| `spaceId` | 8748cddf-66b7-4b85-91a7-e6d08d8e1639$a9778d63-21e7-4d92-9b47-1b81144b9993 | Sent by the web UI |
| `spaceName` | Personal | Sent by the web UI |
| `driveAlias` | personal/admin | Sent by the web UI |
| `driveType` | personal | Sent by the web UI |
| `currentFolder` | / | Sent by the web UI |
| `currentFolderId` | 8748cddf-66b7-4b85-91a7-e6d08d8e1639$a9778d63-21e7-4d92-9b47-1b81144b9993!a9778d63-21e7-4d92-9b47-1b81144b9993 | Sent by the web UI |
| `uppyId` | uppy-example/pdf-1e-application/pdf-238300 | Sent by the web UI |
| `relativeFolder` | | File path relative to the folder that is being uploaded, without filename. Sent by the web UI. |
| `tusEndpoint` | https://ocis.ocis-traefik.latest.owncloud.works/remote.php/dav/spaces/8748cddf-66b7-4b85-91a7-e6d08d8e1639$a9778d63-21e7-4d92-9b47-1b81144b9993 | Sent by the web UI |
| `uploadId` | 71d5f878-a96c-4d7b-9627-658d782c93d7 | Sent by the web UI |
| `topLevelFolderId` | undefined | Sent by the web UI |
| `routeName` | files-spaces-generic | Sent by the web UI |
| `routeDriveAliasAndItem` | cGVyc29uYWwvYWRtaW4= | Sent by the web UI |
| `routeShareId` | | Share ID when uploading into a received folder share. Sent by the web UI |
-547
View File
@@ -1,547 +0,0 @@
---
title: "WebDAV"
date: 2023-07-02T00:00:00+00:00
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/apis/http/webdav
geekdocFilePath: _index.md
geekdocCollapseSection: true
---
{{< toc >}}
**Web** **D**istributed **A**uthoring and **V**ersioning (WebDAV) consists of a set of methods, headers, and content-types extending HTTP/1.1 for the management of resources and -properties, creation and management of resource collections, URL namespace manipulation, and resource locking (collision avoidance). WebDAV is one of the central APIs that ownCloud uses for handling file resources, metadata and locks.
{{< hint type=info title="RFC" >}}
**WebDAV RFCs**
RFC 2518 was published in February 1999. [RFC 4918](https://datatracker.ietf.org/doc/html/rfc4918), published in June 2008 obsoletes RFC 2518 with minor revisions mostly due to interoperability experience.
{{< /hint >}}
## Calling the WebDAV API
### Request URI
```sh
{HTTP method} https://ocis.url/{webdav-base}/{resourceID}/{path}
```
The request URI consists of:
| Component | Description |
|---------------|--------------------------------------------------------------------------------------------------------|
| {HTTP method} | The HTTP method which is used in the request. |
| {webdav-base} | The WebDAV base path component. Possible options are |
| | `dav/spaces/` This is the default and optimized endpoint for all WebDAV requests. |
| | `remote.php/dav/spaces/`* |
| | `remote.php/webdav/`* |
| | `webdav/`* |
| | `dav/`* |
| {resourceID} | This resourceID is used as the WebDAV root element. All children are accessed by their relative paths. |
| {path} | The relative path to the WebDAV root. In most of the casese, this is the space root. |
\* these dav endpoints are implemented for legacy reasons and should not be used. Note: The legacy endpoints **do not take the resourceID as an argument.**
### HTTP methods
| Method | Description |
|-----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| PROPFIND | Retrieve properties as XML from a web resource. It is also overloaded to retrieve the collection structure (a.k.a. directory hierarchy) of a remote system. |
| PROPPATCH | Process instructions specified in the request body to set and/or remove properties defined on the resource identified by the request uri. |
| MKCOL | Create a WebDAV collection (folder) at the location specified by the request uri. |
| GET | Retrieve a WebDAV resource. |
| HEAD | Retrieve a WebDAV resource without reading the body. |
| PUT | A PUT performed on an existing resource replaces the GET response entity of the resource. |
| POST | Not part of the WebDAV rfc and has no effect on a WebDAV resource. However, this method is used in the TUS protocol for uploading resources. |
| PATCH | Not part of the WebDAV rfc and has no effect on a WebDAV resource. However, this method is used in the TUS protocol for uploading resources. |
| COPY | Creates a duplicate of the source resource identified by the Request-URI, in the destination resource identified by the URI in the Destination header. |
| MOVE | The MOVE operation on a non-collection resource is the logical equivalent of a copy (COPY), followed by consistency maintenance processing, followed by a delete of the source, where all three actions are performed in a single operation. | |
| DELETE | Delete the resource identified by the Request-URI. |
| LOCK | A LOCK request to an existing resource will create a lock on the resource identified by the Request-URI, provided the resource is not already locked with a conflicting lock. |
| UNLOCK | The UNLOCK method removes the lock identified by the lock token in the Lock-Token request header. The Request-URI must identify a resource within the scope of the lock. |
The methods `MKCOL`, `GET`, `HEAD`, `LOCK`, `COPY`, `MOVE`, `UNLOCK` and `DELETE` need no request body.
The methods `PROPFIND`, `PROPPATCH`, `PUT` require a request body, normally in XML format to provide the needed values.
{{< hint type=tip title="Tooling" >}}
**WebDAV is not REST**
The WebDAV protocol was created before the REST paradigm has become the de-facto standard for API design. WebDAV uses http methods which are not part of REST. Therefore all the tooling around API design and documentation is not usable (like OpenApi 3.0 / Swagger or others).
{{< /hint >}}
### Authentication
For development purposes the examples in the developer documentation use Basic Auth. It is disabled by default and should only be enabled by setting `PROXY_ENABLE_BASIC_AUTH` in [the proxy](../../../services/proxy/configuration/#environment-variables) for development or test instances.
To authenticate with a Bearer token or OpenID Connect access token replace the `-u user:password` Basic Auth option of curl with a `-H 'Authorization: Bearer <token>'` header. A `<token>` can be obtained by copying it from a request in the browser, although it will time out within minutes. To automatically refresh the OpenID Connect access token an ssh-agent like solution like [oidc-agent](https://github.com/indigo-dc/oidc-agent) should be used.
## Listing Properties
This method is used to list the properties of a resource in xml. This method can also be used to retrieve the listing of a WebDAV collection which means the content of a remote directory.
{{< tabs "list-properties" >}}
{{< tab "Curl" >}}
```shell
curl -L -X PROPFIND 'https://localhost:9200/dav/spaces/storage-users-1%24some-admin-user-id-0000-000000000000/' \
-H 'Depth: 1' \
-d '<?xml version="1.0"?>
<d:propfind xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns">
<d:prop>
<oc:permissions />
<oc:favorite />
<oc:fileid />
<oc:owner-id />
<oc:owner-display-name />
<oc:share-types />
<oc:privatelink />
<d:getcontentlength />
<oc:size />
<d:getlastmodified />
<d:getetag />
<d:getcontenttype />
<d:resourcetype />
<oc:downloadURL />
</d:prop>
</d:propfind>'
```
{{< /tab >}}
{{< tab "HTTP" >}}
```shell
PROPFIND /dav/spaces/storage-users-1%24some-admin-user-id-0000-000000000000/ HTTP/1.1
Host: localhost:9200
Origin: https://localhost
Access-Control-Request-Method: PROPFIND
Depth: 1
Content-Type: application/xml
Authorization: Basic YWRtaW46YWRtaW4=
Content-Length: 436
<?xml version="1.0"?>
<d:propfind xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns">
<d:prop>
<oc:permissions />
<oc:favorite />
<oc:fileid />
<oc:owner-id />
<oc:owner-display-name />
<oc:share-types />
<oc:privatelink />
<d:getcontentlength />
<oc:size />
<d:getlastmodified />
<d:getetag />
<d:getcontenttype />
<d:resourcetype />
<oc:downloadURL />
</d:prop>
</d:propfind>
```
{{< /tab >}}
{{< /tabs >}}
The request consists of a request body and an optional `Depth` Header.
{{< hint type=tip title="PROPFIND usage" >}}
**Metadata and Directory listings**
Clients can use the `PROPFIND` method to retrieve properties of resources (metadata) and to list the content of a directories.
{{< /hint >}}
### Response
{{< tabs "response list properties" >}}
{{< tab "207 - Multistatus" >}}
#### Multi Status Response
A Multi-Status response conveys information about multiple resources
in situations where multiple status codes might be appropriate. The
default Multi-Status response body is an application/xml
HTTP entity with a `multistatus` root element. Further elements
contain `200`, `300`, `400`, and `500` series status codes generated during
the method invocation.
Although `207` is used as the overall response status code, the
recipient needs to consult the contents of the multistatus response
body for further information about the success or failure of the
method execution. The response MAY be used in success, partial
success and also in failure situations.
The `multistatus` root element holds zero or more `response` elements
in any order, each with information about an individual resource.
#### Body
```xml
<d:multistatus xmlns:s="http://sabredav.org/ns" xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns">
<d:response>
<d:href>/dav/spaces/storage-users-1$some-admin-user-id-0000-000000000000/</d:href>
<d:propstat>
<d:prop>
<oc:permissions>RDNVCKZP</oc:permissions>
<oc:favorite>0</oc:favorite>
<oc:fileid>storage-users-1$some-admin-user-id-0000-000000000000!some-admin-user-id-0000-000000000000</oc:fileid>
<oc:id>storage-users-1$some-admin-user-id-0000-000000000000!some-admin-user-id-0000-000000000000</oc:id>
<oc:owner-id>admin</oc:owner-id>
<oc:owner-display-name>Admin</oc:owner-display-name>
<oc:privatelink>https://localhost:9200/f/storage-users-1$some-admin-user-id-0000-000000000000%21some-admin-user-id-0000-000000000000</oc:privatelink>
<oc:size>10364682</oc:size>
<d:getlastmodified>Mon, 04 Sep 2023 20:10:09 GMT</d:getlastmodified>
<d:getetag>"c4d3610dfe4fac9b44e1175cfc44b12b"</d:getetag>
<d:resourcetype>
<d:collection/>
</d:resourcetype>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
<d:propstat>
<d:prop>
<oc:checksums></oc:checksums>
<oc:share-types></oc:share-types>
<d:getcontentlength></d:getcontentlength>
<d:getcontenttype></d:getcontenttype>
</d:prop>
<d:status>HTTP/1.1 404 Not Found</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/dav/spaces/storage-users-1$some-admin-user-id-0000-000000000000/New%20file.txt</d:href>
<d:propstat>
<d:prop>
<oc:permissions>RDNVWZP</oc:permissions>
<oc:checksums>
<oc:checksum>SHA1:1c68ea370b40c06fcaf7f26c8b1dba9d9caf5dea MD5:2205e48de5f93c784733ffcca841d2b5 ADLER32:058801ab</oc:checksum>
</oc:checksums>
<oc:favorite>0</oc:favorite>
<oc:fileid>storage-users-1$some-admin-user-id-0000-000000000000!90cc3e73-0c6c-4346-9c4d-f529976d4990</oc:fileid>
<oc:id>storage-users-1$some-admin-user-id-0000-000000000000!90cc3e73-0c6c-4346-9c4d-f529976d4990</oc:id>
<oc:owner-id>admin</oc:owner-id>
<oc:owner-display-name>Admin</oc:owner-display-name>
<oc:share-types>
<oc:share-type>0</oc:share-type>
<oc:share-type>1</oc:share-type>
<oc:share-type>3</oc:share-type>
</oc:share-types>
<oc:privatelink>https://localhost:9200/f/storage-users-1$some-admin-user-id-0000-000000000000%2190cc3e73-0c6c-4346-9c4d-f529976d4990</oc:privatelink>
<d:getcontentlength>5</d:getcontentlength>
<oc:size>5</oc:size>
<d:getlastmodified>Mon, 28 Aug 2023 20:45:03 GMT</d:getlastmodified>
<d:getetag>"75115347c74701a3be9c635ddebbf5c4"</d:getetag>
<d:getcontenttype>text/plain</d:getcontenttype>
<d:resourcetype></d:resourcetype>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
</d:response>
<d:response>
<d:href>/dav/spaces/storage-users-1$some-admin-user-id-0000-000000000000/NewFolder/</d:href>
<d:propstat>
<d:prop>
<oc:permissions>RDNVCKZP</oc:permissions>
<oc:favorite>0</oc:favorite>
<oc:fileid>storage-users-1$some-admin-user-id-0000-000000000000!5c73ecd9-d9f4-44f4-b685-ca4cb40aa6b7</oc:fileid>
<oc:id>storage-users-1$some-admin-user-id-0000-000000000000!5c73ecd9-d9f4-44f4-b685-ca4cb40aa6b7</oc:id>
<oc:owner-id>admin</oc:owner-id>
<oc:owner-display-name>Admin</oc:owner-display-name>
<oc:privatelink>https://localhost:9200/f/storage-users-1$some-admin-user-id-0000-000000000000%215c73ecd9-d9f4-44f4-b685-ca4cb40aa6b7</oc:privatelink>
<oc:size>0</oc:size>
<d:getlastmodified>Mon, 28 Aug 2023 20:45:10 GMT</d:getlastmodified>
<d:getetag>"e83367534cc595a45d706857fa5f03d8"</d:getetag>
<d:resourcetype>
<d:collection/>
</d:resourcetype>
</d:prop>
<d:status>HTTP/1.1 200 OK</d:status>
</d:propstat>
<d:propstat>
<d:prop>
<oc:checksums></oc:checksums>
<oc:share-types></oc:share-types>
<d:getcontentlength></d:getcontentlength>
<d:getcontenttype></d:getcontenttype>
</d:prop>
<d:status>HTTP/1.1 404 Not Found</d:status>
</d:propstat>
</d:response>
</d:multistatus>
```
{{< /tab >}}
{{< tab "400 - Bad Request" >}}
#### Body
```xml
<?xml version="1.0" encoding="UTF-8"?>
<d:error xmlns:d="DAV" xmlns:s="http://sabredav.org/ns">
<s:exception>Sabre\DAV\Exception\BadRequest</s:exception>
<s:message>Invalid Depth header value: 3</s:message>
</d:error>
```
This can occur if the request is malformed e.g. due to an invalid xml request body or an invalid depth header value.
{{< /tab >}}
{{< tab "404 - Not Found" >}}
#### Body
```xml
<?xml version="1.0" encoding="UTF-8"?>
<d:error xmlns:d="DAV" xmlns:s="http://sabredav.org/ns">
<s:exception>Sabre\DAV\Exception\NotFound</s:exception>
<s:message>Resource not found</s:message>
</d:error>
```
{{< /tab >}}
{{< /tabs >}}
### Request Body
The `PROPFIND` Request can include an XML request body containing a list of namespaced property names.
### Namespaces
When building the body of your DAV request, you will request properties that are available under a specific namespace URI. It is usual to declare prefixes for those namespace in the `d:propfind` element of the body.
Available namespaces:
| URI | Prefix |
|-------------------------------------------|--------|
| DAV: | d |
| http://sabredav.org/ns | s |
| http://owncloud.org/ns | oc |
| http://open-collaboration-services.org/ns | ocs |
| http://open-cloud-mesh.org/ns | ocm |
### Request Example with declared namespaces
```xml
<?xml version="1.0"?>
<d:propfind xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns">
</d:propfind>
```
### Supported WebDAV Properties
| Property | Desription | Example |
| ----------------------------------- | -------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `<d:getlastmodified />` | The latest modification time. | `Fri, 30 Dec 2022 14:22:43 GMT` |
| `<d:getetag />` | The file's etag. | `"c3a1ee4a0c28edc15b9635c3bf798013"` |
| `<d:getcontenttype />` | The mime type of the file. | `image/jpeg` |
| `<d:resourcetype />` | Specifies the nature of the resource. | `<d:collection />` for a folder |
| `<d:getcontentlength />` | The size if it is a file in bytes. | `5` bytes |
| `<d:lockdiscovery />` | Describes the active locks on a resource. | Detailed Example in [Locking]() |
| `<oc:id />` | The globally unique ID of the resource. | `storage-1$27475553-7fb7-4689-b4cf-bbb635daff79!27475553-7fb7-4689-b4cf-bbb635daff79` |
| `<oc:fileid />` | The globally unique ID of the resource. | `storage-1$27475553-7fb7-4689-b4cf-bbb635daff79!27475553-7fb7-4689-b4cf-bbb635daff79` |
| `<oc:downloadURL />` | Direct URL to download a file from. | Not implemented. |
| `<oc:permissions />` | Determines the actions a user can take on the resource. | The value is a string containing letters that clients can use to determine available actions. |
| | | `S`: Shared |
| | | `M`: Mounted |
| | | `D`: Deletable |
| | | `NV`: Updateable, Renameable, Moveable |
| | | `W`: Updateable (file) |
| | | `CK`: Creatable (folders only) |
| | | `Z`: Deniable |
| | | `P`: Trashbin Purgable |
| | | `X`: Securely Viewable |
| | | In the early stages this was indeed a list of permissions. Over time, more flags were added and the term permissions no longer really fits well. |
| `<oc:tags />` | List of user specified tags. | `<oc:tag>test</oc:tag>` |
| `<oc:favorite /> ` | The favorite state. | `0` for not favourited, `1` for favourited |
| `<oc:owner-id />` | The user id of the owner of a resource. Project spaces have no owner. | `einstein` |
| `<oc:owner-display-name />` | The display name of the owner of a resource. Project spaces have no owner. | `Albert Einstein` |
| `<oc:share-types />` | List of share types. | `0` = User Share |
| | | `1` = Group Share |
| | | `2` = Public Link |
| `<oc:checksums />` | | `<oc:checksum>`<br/>`SHA1:1c68ea370b40c06fcaf7f26c8b1dba9d9caf5dea MD5:2205e48de5f93c784733ffcca841d2b5 ADLER32:058801ab`<br /> `</oc:checksum>` |
| | | Due to a bug in the very early development of ownCloud, this value is not an array, but a string separated by whitespaces. |
| `<oc:size />` | Similar to `getcontentlength` but it also works for folders. | `10` bytes |
| `<oc:shareid />` | The ID of the share if the resource is part of such. | `storage-1$27475553-7fb7-4689-b4cf-bbb635daff79!27475553-7fb7-4689-b4cf-bbb635daff79` |
| `<oc:shareroot />` | The root path of the shared resource if the resource is part of such. | `/shared-folder` |
| `<oc:remoteItemId />` | The ID of the shared resource if the resource is part of such. | `storage-1$27475553-7fb7-4689-b4cf-bbb635daff79!27475553-7fb7-4689-b4cf-bbb635daff79` |
| `<oc:public-link-item-type />` | The type of the resource if it's a public link. | `folder` |
| `<oc:public-link-permission />` | The share permissions of the resource if it's a public link. | `1` |
| `<oc:public-link-expiration />` | The expiration date of the public link. | `Tue, 14 May 2024 12:44:29 GMT` |
| `<oc:public-link-share-datetime />` | The date the public link was created. | `Tue, 14 May 2024 12:44:29 GMT` |
| `<oc:public-link-share-owner />` | The username of the user who created the public link. | `admin` |
| `<oc:trashbin-original-filename />` | The original name of the resource before it was deleted. | `some-file.txt` |
| `<oc:trashbin-original-location />` | The original location of the resource before it was deleted. | `some-file.txt` |
| `<oc:trashbin-delete-datetime />` | The date the resource was deleted. | `Tue, 14 May 2024 12:44:29 GMT` |
| `<oc:audio />` | Audio meta data if the resource contains such. | `<oc:artist>Metallica</oc:artist><oc:album>Metallica</oc:album><oc:title>Enter Sandman</oc:title>` |
| `<oc:location />` | Location meta data if the resource contains such. | `<oc:latitude>51.504106</oc:latitude><oc:longitude>-0.074575</oc:latitude>` |
### Request Headers
A client executing a `PROPFIND` request MUST submit a Depth Header value. In practice, support for infinite-depth requests MAY be disabled, due to the performance and security concerns associated with this behavior. Servers SHOULD treat a
request without a Depth header as if a `Depth: infinity` header was included. Infinite depth requests are disabled by default in ocis.
| Name | Value |
|-------------------------------------------|---------------------------------------------------------------------------------------|
| Depth | `0` = Only return the desired resource. |
| | `1` = Return the desired resource and all resources one level below in the hierarchy. |
| | `infinity` = Return all resources below the root. |
{{< hint type=caution title="Use the Depth header with caution" >}}
**Depth: infinity**
Using the `Depth: infinity` header value can cause heavy load on the server, depending on the size of the file tree.
The request can run into a timeout and the server performance could be affected for other users.
{{< /hint >}}
## Create a Directory
Clients create directories (WebDAV collections) by executing a `MKCOL` request at the location specified by the request url.
{{< tabs "create-folder" >}}
{{< tab "Curl" >}}
```shell
curl -L -X MKCOL 'https://localhost:9200/dav/spaces/storage-users-1%24some-admin-user-id-0000-000000000000/NewFolder/' \
-H 'Authorization: Basic YWRtaW46YWRtaW4='
```
{{< /tab >}}
{{< tab "HTTP" >}}
```shell
MKCOL /dav/spaces/storage-users-1%24some-admin-user-id-0000-000000000000/NewFolder/ HTTP/1.1
Host: localhost:9200
Authorization: Basic YWRtaW46YWRtaW4=
```
{{< /tab >}}
{{< /tabs >}}
### Response
{{< tabs "response create folder" >}}
{{< tab "201 - Created" >}}
This indicates that the Resource has been created successfully.
#### Body
The response has no body.
{{< /tab >}}
{{< tab "403 - Forbidden" >}}
#### Body
```xml
<?xml version="1.0" encoding="UTF-8"?>
<d:error xmlns:d="DAV" xmlns:s="http://sabredav.org/ns">
<s:exception>Sabre\DAV\Exception\Forbidden</s:exception>
<s:message></s:message>
</d:error>
```
{{< /tab >}}
{{< tab "405 - Method not allowed" >}}
#### Body
```xml
<?xml version="1.0" encoding="UTF-8"?>
<d:error xmlns:d="DAV" xmlns:s="http://sabredav.org/ns">
<s:exception>Sabre\DAV\Exception\MethodNotAllowed</s:exception>
<s:message>The resource you tried to create already exists</s:message>
</d:error>
```
{{< /tab >}}
{{< /tabs >}}
## Upload File
To upload files to the remote server, clients can use the `PUT` method to create or fully replace the content of the remote file.
### Request Headers
| Name | Usage |
|---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `X-OC-Mtime` | Send the last modified <br> time of the file to the server in unixtime format. The server applies this mtime to the resource rather than the actual time. |
| `OC-Checksum` | Provide the checksum of the <br> file content to the server. <br> This is used to prevent corrupted data transfers. |
| `If-Match` | The If-Match request-header field is used with a method to make it <br> conditional. A client that has one or more entities previously <br> obtained from the resource can verify that one of those entities is <br> current by including a list of their associated entity tags in the <br> If-Match header field. |
{{< tabs "upload-file" >}}
{{< tab "Curl" >}}
```shell
curl -L -X PUT 'https://localhost:9200/dav/spaces/storage-users-1%24some-admin-user-id-0000-000000000000/test.txt' \
-H 'X-OC-Mtime: 1692369418' \
-H 'OC-Checksum: SHA1:40bd001563085fc35165329ea1ff5c5ecbdbbeef' \
-H 'If-Match: "4436aef907f41f1ac7dfd1ac3d0d455f"' \
-H 'Content-Type: text/plain' \
-H 'Authorization: Basic YWRtaW46YWRtaW4=' \
-d '123'
```
{{< /tab >}}
{{< tab "HTTP" >}}
```shell
PUT /dav/spaces/storage-users-1%24some-admin-user-id-0000-000000000000/test.txt HTTP/1.1
Host: localhost:9200
X-OC-Mtime: 1692369418
OC-Checksum: SHA1:40bd001563085fc35165329ea1ff5c5ecbdbbeef
If-Match: "4436aef907f41f1ac7dfd1ac3d0d455f"
Content-Type: text/plain
Authorization: Basic YWRtaW46YWRtaW4=
Content-Length: 3
123
```
{{< /tab >}}
{{< /tabs >}}
### Response
{{< tabs "response upload file" >}}
{{< tab "201 - Created" >}}
This indicates that the Resource has been created successfully.
#### Body
The response has no body.
#### Headers
```yaml
Oc-Etag: "4436aef907f41f1ac7dfd1ac3d0d455f"
Oc-Fileid: storage-users-1$some-admin-user-id-0000-000000000000!07452b22-0ba9-4539-96e1-3511aff7fd2f
Last-Modified: Fri, 18 Aug 2023 14:36:58 +0000
X-Oc-Mtime: accepted
```
{{< /tab >}}
{{< tab "204 - No Content" >}}
This indicates that the Resource has been updated successfully.
#### Body
The response has no body.
#### Headers
```yaml
Oc-Etag: "4436aef907f41f1ac7dfd1ac3d0d455f"
Oc-Fileid: storage-users-1$some-admin-user-id-0000-000000000000!07452b22-0ba9-4539-96e1-3511aff7fd2f
Last-Modified: Fri, 18 Aug 2023 14:36:58 +0000
X-Oc-Mtime: accepted
```
{{< /tab >}}
{{< tab "400 - Bad Request" >}}
This indicates that the checksum, which was sent by the client, does not match the computed one after all bytes have been received by the server.
#### Body
```xml
<?xml version="1.0" encoding="UTF-8"?>
<d:error xmlns:d="DAV" xmlns:s="http://sabredav.org/ns">
<s:exception>Sabre\DAV\Exception\BadRequest</s:exception>
<s:message>The computed checksum does not match the one received from the client.</s:message>
</d:error>
```
{{< /tab >}}
{{< tab "403 - Forbidden" >}}
The user cannot create files in that remote location.
{{< /tab >}}
{{< tab "404 - Not Found" >}}
The remote target space cannot be found.
{{< /tab >}}
{{< tab "409 - Conflict" >}}
This error can occur when the request cannot be executed due to a missing precondition. One example is a PUT into a non-existing remote folder. It can also happen when the client sends the wrong etag in the `If-Match` header.
{{< /tab >}}
{{< /tabs >}}
+3 -4
View File
@@ -1,11 +1,10 @@
---
title: Architecture
date: 2023-12-06T13:00:00+01:00
weight: 10
title: "Architecture"
date: 2020-03-03T10:34:00+01:00
weight: 25
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/architecture
geekdocFilePath: _index.md
geekdocCollapseSection: true
---
In the architecture part of the documentation we collect useful developer documentation on different aspects of the architecture. We are using mermaid.js to collaborate on the necessary diagrams.
-111
View File
@@ -1,111 +0,0 @@
---
title: "Collaborative Storage"
date: 2023-11-09T12:35:00+01:00
weight: 30
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/storage-backends/
geekdocFilePath: collaborative-storage.md
---
{{< toc >}}
One of the envisioned design goals of Infinite Scale is to work with so called _collaborative storage_, which means that the file system it is running on is not exclusive for Infinite Scale, but can be manipulated in parallel through third party tools. Infinite Scale is expected to monitor the changes that happen independently and react in a consistent and user friendly way.
A real world example of that would be a third party "data producer" that submits data directly into a file system path, not going through Infinite Scale APIs.
This document outlines a few challenges and design concepts for collaborative storage. It is also the base "checklist" for custom storage provider implementations for certain storages, ie. for Ceph- or IBM Storage Scale which provide features that allow more sophisticated and efficient implementations of this goal.
# Storage Driver Components
This discusses a few components and sub functions of the storage driver that have relevance for the collaborative storage.
## Path Locations
What is called "the oCIS file system" is defined as the entire filetree underneath a special path in the local POSIX file system, which might either be a real local file system or a mounted net filesystem. It is expected that oCIS is the only consumer of that file tree, except what is expected behaviour with a collaborative file system, that adds and edits files in that tree.
Underneath the oCIS file system root, there is an collection of different folders containing oCIS specific data. Specific storage driver data is in the directory `storage/users`, organized by spaces.
(TODO: Check again how different storage drivers work together without overwriting data of each other)
## Spaces
Infinite Scale provides spaces as an additional organization organizational unit for data. Each space is a separate entity with its own attributes such as access patterns and quota.
A storage driver has to model the separation of spaces and provide a list of spaces in general and also a list of spaces a user can access. Furthermore, it needs to be able to create different types of spaces (Home- or Project space).
On POSIX, each space could for example be mapped to it's own directory in a special spaces folder under the oCIS root folder.
## ID to Path Lookup
Infinite Scale uses file IDs to efficiently identify files within a file tree. The lookup from a given ID to a path within the oCIS file tree is a very basic function that more or less defines the Infinite Scale performance. The functionality to for example query the file path for a given Inode number (which is the nearest equivalent for the Infinite Scale file ID) can not be done with standard POSIX system calls.
The interface defining the collaborative storage needs an abstraction for this particular function, returning the file id for a given path, and returning the path for given id.
## Change Notification
When a file is changed by a process outside of oCIS, this needs to be monitored by oCIS to quickly maintain internal caches and data structures as required.
The collaborative storage driver needs a way to achieve that. The easiest way for an POSIX based collaborative storage is inotify, that needs to be set up recursively on a file tree to record changes. Additional it is a challenge to destinguish between changes that were done from external activity and the ones that oCIS creates by its own file operations.
For GPFS, there is a subsystem called delivering that:
https://www.ibm.com/docs/en/storage-scale/5.1.9?topic=reference-clustered-watch-folder]
## ETag Propagation
ownCloud requires that changes which happen "down" in a tree, can be detected in the root element of the tree. That happens through the change of the ETag metadata of each file and/or directory. An ETag is a random, text based tag, that only has one requirement: It has to change its content if a resource further down in the file tree has changed either its content or its metadata. (See [this issue](https://github.com/owncloud/ocis/issues/3782) for further discussion about the ETag/CTag).
POSIX file systems do not maintain a change flag like the ETag by default. The file time stamps (atime, ctime, mtime) in general are not fine granular enough (only seconds for some file systems) and depend on the server time, which renders them useless in a distributed environment.
Infinite Scale needs to implement ETag propagation "up". For the collaborative storage, that needs to be combined with the change notification described above.
Certain file systems implement this functionality either independently from Infinite Scale (EOS) or at least support proper change notifications (Ceph, GPFS?).
## Metadata Management
Metadata are data "snippets" that are as tightly attached to files as ever possible. In best case, a rename of a file silently keeps the metadata as well. In POSIX, this can be achieved by extended file attributes with certain limitations.
## Quota
Each space has it's own quota, thus a storage driver implementation needs to consider that.
For GPFS for example, there is support for quota handling in the file system.
https://www.ibm.com/docs/en/gpfs/4.1.0.4?topic=interfaces-gpfs-quotactl-subroutine
Other systems store quota data in the metadata storage and implement propagation of used quota similar to the ETag propagation.
## User Management
With user management it is meant how to handle the users and groups within oCIS and how that reflects to the file system where data is stored.
### Exclusive Environment
In exclusive environments (aka. decomposedFS) all files of oCIS (ie. the entire oCIS filetree) belongs to a system user with the name `ocis` typically.
### Collaborative Storage
For collaborative storages, the approach described above does not longer work because users are supposed to be able to manipulate data in "their" file tree parts, and that is identified by ACLs and the owner of the files.
That requires a few prerequisites that have to be fulfilled:
1. oCIS as one "client" changing data and the system that allows to access the file tree directly have to use the same user provider, to ensure that each user that is available on a shell is also available in oCIS. That ensures that changes are authenticated through system ACLs and users. LDAP based authentication on the system via PAM and the same LDAP as source for the oCIS IDP should be a sufficient setup.
2. oCIS must be able to write as a "different" user than the ocis system user. That means that we somehow have to impersonate file changing ooperations and run these as the user that is authenticated in oCIS.
Example: There is a user ben. It has to have an entry in the LDAP that is used by IDP which oCIS is running "behind". With that, ben is able to authenticate through the IDP and work in the oCIS web app. The oCIS linux process will do writes and other changes impersonated as user ben.
For the access of data on the commandline, the logins to the linux system must be authenticated against the same LDAP - so that ben can authenticate on a terminal using username and password. With that, the user can interactively change data that belongs to user ben (simplified said).
To give permissions to groups, the linux group management must work accordingly. The same is true for file permissions.
## Trashbin
When a user deletes a file in oCIS it is moved to a so called trashbin that allows to restore the file if the deletion was accidentailly.
## Versions
When an existing file is changed, the former file state is to be preserved with data and metadata by oCIS. Some file system types provide this functionality via snapshots on partition or even file level. Other do not and have to implement that via a hidden directory keeping old file versions.
-207
View File
@@ -1,207 +0,0 @@
---
title: "PosixFS Storage Driver"
date: 2024-05-27T14:31:00+01:00
weight: 30
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/architecture
geekdocFilePath: posixfs-storage-driver.md
---
{{< toc >}}
The Posix FS Storage Driver is a new storage driver for Infinite Scale.
The scope of this document is to give a high level overview to the technical aspects of the Posix FS Storage Driver and guide the setup.
## Introduction
The Posix FS Storage Driver is a backend component that manages files on the server utilizing a "real" file tree that represents the data with folders and files in the file system as users are used to it. That is the big difference compared to Decomposed FS which is the default storage driver in Infinite Scale.
This does not mean that Infinite Scale is trading any of its benefits to this new feature: It still implements simplicity by running without a database, it continues to store metadata in the file system and adds them transparently to caches and search indexes, and it also features the full spaces concept as before, just to name a few examples.
The architecture of Infinite Scale allows configuring different storage drivers for specific storage types and purposes on a space granularity. The Posix FS Storage Driver is an alternative to the default driver called Decomposed FS.
However, the clarity of the file structure in the underlying file system is not the only benefit of the Posix FS Storage Driver. This new technology allows users to manipulate the data directly in the file system, and any changes made to files outside of Infinite Scale are monitored and directly reflected in Infinite Scale. For example, a scanner could store its output directly to the Infinite Scale file system, which immediately gets picked up in Infinite Scale.
For the first time ever with feature rich open source file sync & share systems, users can either choose to work with their data through the clients of the system, its APIs or even directly in the underlying file system on the server.
That is another powerful vector for integration and enables a new spectrum of use cases across all domains.
## Technical Aspects
The Posix FS Storage Driver uses a few features of the underlying file system, which are mandatory and directly contributing to the performance of the system.
While the simplest form of Posix FS Storage Driver runs with default file systems of every modern Linux system which are directly mounted and thus support inotify, the full power of this unfolds with more capable file systems such as IBM Storage Scale or Ceph. These are recommended as reliable foundations for big installations of Infinite Scale.
This chapter describes some technical aspects of this storage driver.
### Path Locations
The file tree that is used as storage path for both data and metadata is located under the local path on the machine that is running Infinite Scale. That might either be a real local file system or a mounted net filesystem. It is expected that oCIS is the only consumer of that file tree, except what is expected behaviour with a collaborative file system, that works with files in that tree.
Underneath the Infinite Scale file system root, there is a collection of different folders containing Infinite Scale specific data storing personal spaces, project spaces and indexes.
### Metadata
Infinite Scale is highly dependent on the efficient usage of meta data which are attached to file resources, but also logical elements such as spaces.
Metadata is stored in extended attributes (as also supported by decompsed FS) which poses the benefit that metadata is always directly attached to the actual resources. As a result, care has to be taken that extended attributes are considered when working with the file tree however, e.g. when creating or restoring backups.
Note: The maximum number and size of extended attributes are limited depending on the filesystem and block size. See [GPFS Specifics](#gpfs-specifics) for more details on GPFS file systems.
All indexing and caching of metadata is implemented in higher system levels than the storage driver, and thus are not different to the components used with other storage drivers like the decomposed FS.
### Monitoring
To get information about changes such as new files added, files edited or removed, Infinite Scale uses a monitoring system to directly watch the file system. This starts with the Linux inotify system and ranges to much more sophisticated services as for example in Spectrum Scale (see [GPFS Specifics](#gpfs-specifics) for more details on GPFS file systems).
Based on the information transmitted by the watching service, Infinite Scale is able to "register" new or changed files into its own caches and internal management structures. This enables Infinite Scale to deliver resource changes through the "traditional" channels such as APIs and clients.
Since the most important metadata is the file tree structure itself, it is impossible for the "split brain" situation between data and metadata to cause trouble.
### Automatic ETag Propagation
The ETag of a resource can be understood as a content fingerprint of any file- or folder resource in Infinite Scale. It is mainly used by clients to detect changes of resources. The rule is, that if the content of a file changed the ETag has to change as well, as well as the ETag of all parent folders up to the root of the space.
Infinite Scale uses a built in mechanism to maintain the ETag for each resource in the file meta data, and also propagates it automatically.
A sophisticated underlying file system could provide an attribute that fulfills this requirement and changes whenever content or metadata of a resource changes, and - which is most important - also changes the attribute of the parent resource and the parent of the parent etc.
### Automatic Tree Size Propagation
Similar to the ETag propagation described before, Infinite Scale also tracks the accumulated tree size in all nodes of the file tree. A change to any file requires a re-calculation of the size attribute in all parent folders.
Infinite Scale would benefit from file systems with native tree size propagation.
### Quota
Each space has it's own quota, thus every storage driver implementation needs to consider that.
For example, IBM Spectrum Scale supports quota handling directly in the file system.
Other systems store quota data in the metadata storage and implement propagation of used quota similar to the tree size propagation.
### File ID Resolution
Infinite Scale uses an ID based approach to work with resources, rather than a file path based mechanism. The reason for that is, that ID based lookups can be done way more efficiently compared to tree traversals, just to name one reason.
The most important component of the ID is a unique file ID that identifies the resource within a space. Ideally the Inode of a file could be used here. However, some file systems re-use inodes which must be avoided. Infinite Scale thus does not use the file Inode, but generates a UUID instead.
ID based lookups utilize an ID cache which needs to be shared between all storageprovider and dataprovider instances. During startup a scan of the whole file tree is performed to detect and cache new entities.
In the future a powerful underlying file system could support Infinite Scale by providing an API that
1. Provides the ID for a given file path referenced resource
2. Provides the path for a given ID.
These two operations are very crucial for the performance of the entire system.
### User Management
With the requirement that data can be manipulated either through the filesystem or the Infinite Scale system, the question under which UID the manipulation happens is important.
There are a few possible ways for user management:
1. Changes can either be only accepted by the same user that Infinite Scale is running under, for example the user `ocis`. All manipulations in the filesystem have to be done by, and only by this user.
2. Group based: All users who should be able to manipulate files have to be in a unix group. The Infinite Scale user has also to be member of that group. The default umask in the directory used has to allow group writing all over the place.
3. Impersonation: Infinite Scale impersonates the user who owns the folder on the file system to mimic the access as the user.
All possibilities have pros and cons for operations.
One for all, it seems reasonable to use LDAP to manage users which is the base for the Infinite Scale IDP as well as the system login system via PAM.
### GID Based Space Access
The Posix FS Storage Driver supports GID based space access to support the problem that project spaces might have to be accessible by multiple users on disk. In order to enable this feature the `ocis` binary needs to have the `setgid` capability and `STORAGE_USERS_POSIX_USE_SPACE_GROUPS` needs to be set to `true`. Inifinite Scale will then use the space GID (the gid of the space root) for all file system access using the `setfsgid` syscall, i.e. all files and directories created by Infinite Scale will belong to the same group as the space root.
## Advanced Features
Depending on the capabilities of the underlying file system, the Posix FS Storage Driver can benefit from more advanced functionality described here.
### Versioning
If the underlying file system is able to create versions of single resources (imagine a git based file system) this functionality could directly be used by Infinite Scale.
In the current state of the Posix FS Storage Driver, versioning is not supported.
### Trashbin
If the underlying file system handles deleted files in a trash bin that allows restoring of previously removed files, this functionality could directly be used by Infinite Scale.
If not available it will follow the [the Free Desktop Trash specificaton](https://specifications.freedesktop.org/trash-spec/trashspec-latest.html).
## Limitations
As of Q2/2024 the Posix FS Storage Driver is not officially supported and in technical preview state.
The tech preview comes with the following limitations:
1. Only inotify and GPFS file system change notification methods are supported
1. Versioning is not supported yet
1. The space/project folders in the filesystem are named after the UUID, not the real space name
1. No CephFS support yet
1. Postprocessing (ie. anti virus check) does not happen for file actions outside of Infinite Scale
## Setup
This describes the steps to use the Posix FS Storage Driver storage driver with Infinite Scale.
It is possible to use different storage drivers in the same Infinite Scale installation. For example it is possible to set up one space running on Posix FS Storage Driver while others run Decomposed FS.
### Prerequisites
To use the Posix FS Storage Driver, the following prerequisites have to be fulfilled:
1. There must be storage available to store meta data and blobs, available under a root path.
1. When using inotify, the storage must be local on the same machine. Network mounts do not work with inotify. `inotifywait` needs to be installed.
1. The storage root path must be writeable and executable by the same user Infinite Scale is running under.
1. An appropiate version of Infinite Scale is installed, version number 5.0.5 and later.
1. `nats-js-kv` as cache service
### Setup Configuration
This is an example configuration with environment variables that configures Infinite Scale to use Posix FS Storage Driver for all spaces it works with, ie. Personal and Project Spaces:
```
export STORAGE_USERS_DRIVER="posix"
export STORAGE_USERS_POSIX_ROOT="/home/kf/tmp/posix-storage"
export STORAGE_USERS_POSIX_WATCH_TYPE="inotifywait"
export STORAGE_USERS_ID_CACHE_STORE="nats-js-kv"
export STORAGE_USERS_ID_CACHE_STORE_NODES="localhost:9233"
# Optionally enable gid based space access
export STORAGE_USERS_POSIX_USE_SPACE_GROUPS="true"
```
## GPFS Specifics
When using GPFS as the underlying filesystem the machine running the according `storage-users` service needs to have the GPFS filesystem mounted locally. The mount path is given to ocis as the `STORAGE_USERS_POSIX_ROOT` path.
Other than that there a few other points to consider:
### Extended Attributes
As described above metadata is stored as extended attributes of the according entities and thus is suspect to their limitations. In GPFS extended attributes are first stored in the inode itself but can then also use an overflow block which is at least 64KB and up to the metadata block size. Inode and metadata block size should be chosen accordingly.
### FS Watcher
The Posix FS Storage Driver supports two different watchers for detecting changes to the filesystem. The watchfolder watcher is better tested and supported at that point.
#### GPFS File Audit Logging
The `gpfsfileauditlogging` watcher tails a GPFS file audit log and parses the JSON events to detect relevant changes.
```
export STORAGE_USERS_POSIX_WATCH_TYPE="gpfsfileauditlogging"
export STORAGE_USERS_POSIX_WATCH_PATH="/path/to/current/audit/log"
```
#### GPFS Watchfolder
The `gpfswatchfolder` watcher connects to a kafka cluster which is being filled with filesystem events by the GPFS watchfolder service.
```
export STORAGE_USERS_POSIX_WATCH_TYPE="gpfswatchfolder"
export STORAGE_USERS_POSIX_WATCH_PATH="fs1_audit" # the kafka topic to watch
export STORAGE_USERS_POSIX_WATCH_FOLDER_KAFKA_BROKERS="192.168.1.180:29092"
```
+29 -41
View File
@@ -7,7 +7,7 @@ geekdocEditPath: edit/master/docs/architecture
geekdocFilePath: upload-processing.md
---
Uploads are handled by a dedicated service that uses TUS.io for resumable uploads. When all bytes have been transferred the upload is finalized by making the file available in file listings and for download.
Uploads are handled by a dedicated service that uses TUS.io for rusumable uploads. When all bytes have been transferred the upload is finalized by making the file available in file listings and for download.
The finalization may be asynchronous when mandatory workflow steps are involved.
@@ -27,10 +27,9 @@ sequenceDiagram
Client->>+ocdav: PUT /dav/spaces/{spaceid}/newfile.bin
ocdav->>+storageprovider: InitiateFileUpload
storageprovider-->>-ocdav: OK, Protocol simple, UploadEndpoint: /data, Token: {jwt}
Note right of ocdav: The {jwt} contains the internal actual target, eg.: http://localhost:9158/data/simple/91cc9882-db71-4b37-b694-a522850fcee1
ocdav->>+dataprovider: PUT /data
Note right of dataprovider: X-Reva-Transfer: {jwt}
dataprovider-->>-ocdav: 201 Created
Note right of ocdav: The {jwt} contains the internal actual target, eg.:<br>http://localhost:9158/data/simple/91cc9882-db71-4b37-b694-a522850fcee1
ocdav->>+dataprovider: PUT /data<br>X-Reva-Transfer: {jwt}
dataprovider-->>-ocdav: 201 Created
ocdav-->>-Client: 201 Created
{{</mermaid>}}
@@ -49,18 +48,19 @@ sequenceDiagram
participant datagateway
participant dataprovider
Client->>+ocdav: POST /dav/spaces/{spaceid}\nUpload-Metadata: {base64 encoded filename etc}\nTUS-Resumable: 1.0.0
Client->>+ocdav: POST /dav/spaces/{spaceid}<br>Upload-Metadata: {base64 encoded filename etc}<br>TUS-Resumable: 1.0.0
ocdav->>+storageprovider: InitiateFileUpload
storageprovider-->>-ocdav: OK, Protocol tus, UploadEndpoint: /data, Token: {jwt}
Note right of ocdav: The {jwt} contains the internal actual target, eg.:\nhttp://localhost:9158/data/tus/24d893f5-b942-4bc7-9fb0-28f49f980160
ocdav-->>-Client: 201 Created\nLocation: /data/{jwt}\nTUS-Resumable: 1.0.0
Note right of ocdav: The {jwt} contains the internal actual target, eg.:<br>http://localhost:9158/data/tus/24d893f5-b942-4bc7-9fb0-28f49f980160
ocdav-->>-Client: 201 Created<br>Location: /data/{jwt}<br>TUS-Resumable: 1.0.0
Client->>+datagateway: PATCH /data/{jwt}\nTUS-Resumable: 1.0.0\nUpload-Offset: 0
Client->>+datagateway: PATCH /data/{jwt}<br>TUS-Resumable: 1.0.0<br>Upload-Offset: 0
Note over datagateway: unwrap the {jwt} target
datagateway->>+dataprovider: PATCH /data/tus/24d893f5-b942-4bc7-9fb0-28f49f980160\nX-Reva-Transfer: {jwt}
Note over dataprovider: storage driver\nhandles request
dataprovider-->>-datagateway: 204 No Content\nTUS-Resumable: 1.0.0\nUpload-Offset: 363976
datagateway-->>-Client: 204 No Content\nTUS-Resumable: 1.0.0\nUpload-Offset: 363976
datagateway->>+dataprovider: PATCH /data/tus/24d893f5-b942-4bc7-9fb0-28f49f980160<br>X-Reva-Transfer: {jwt}
Note over dataprovider: storage driver<br>handles request
dataprovider-->>-datagateway: 204 No Content<br>TUS-Resumable: 1.0.0<br>Upload-Offset: 363976
datagateway-->>-Client: 204 No Content<br>TUS-Resumable: 1.0.0<br>Upload-Offset: 363976
{{</mermaid>}}
@@ -81,47 +81,35 @@ sequenceDiagram
participant datagateway
participant dataprovider
participant nats
participant processing
Client->>+ocdav: POST /dav/spaces/{spaceid}
Note left of Client: Upload-Metadata: {base64 encoded filename etc}\nTUS-Resumable: 1.0.0
Client->>+ocdav: POST /dav/spaces/{spaceid}<br>Upload-Metadata: {base64 encoded filename etc}<br>TUS-Resumable: 1.0.0
ocdav->>+storageprovider: InitiateFileUpload
storageprovider-->>-ocdav: OK, Protocol tus, UploadEndpoint: /data, Token: {jwt}
Note right of ocdav: The {jwt} contains the internal actual target, eg.: http://localhost:9158/data/tus/24d893f5-b942-4bc7-9fb0-28f49f980160
ocdav-->>-Client: 201 Created
Note right of Client: Location: /data/{jwt}
Note right of Client: TUS-Resumable: 1.0.0
Note right of ocdav: The {jwt} contains the internal actual target, eg.:<br>http://localhost:9158/data/tus/24d893f5-b942-4bc7-9fb0-28f49f980160
ocdav-->>-Client: 201 Created<br>Location: /data/{jwt}<br>TUS-Resumable: 1.0.0
Client->>+datagateway: PATCH /data/{jwt}
Note right of datagateway: TUS-Resumable: 1.0.0\nUpload-Offset: 0
Client->>+datagateway: PATCH /data/{jwt}<br>TUS-Resumable: 1.0.0<br>Upload-Offset: 0
Note over datagateway: unwrap the {jwt} target
datagateway->>+dataprovider: PATCH /data/tus/24d893f5-b942-4bc7-9fb0-28f49f980160
Note over dataprovider: X-Reva-Transfer: {jwt}
Note over dataprovider: storage driver
Note over dataprovider: handles request
datagateway->>+dataprovider: PATCH /data/tus/24d893f5-b942-4bc7-9fb0-28f49f980160<br>X-Reva-Transfer: {jwt}
Note over dataprovider: storage driver<br>handles request
dataprovider-)nats: emit all-bytes-received event
nats-)processing: all-bytes-received({uploadid}) event
Note over dataprovider: TODO: A lot of time may pass here, we could use the `Prefer: respond-async` header to return early with a 202 Accepted status and a Location header to a websocket endpoint
alt success
processing-)nats: emit processing-finished({uploadid}) event
Note over dataprovider: TODO: A lot of time may pass here, we could use<br> the `Prefer: respond-async` header to return early<br>with a 202 Accepted status and a Location header<br>to a websocket endpoint
alt success
processing-)nats: emit processing-finished({uploadid}) event
nats-)dataprovider: processing-finished({uploadid}) event
dataprovider-->>-datagateway: 204 No Content
Note over datagateway: TUS-Resumable: 1.0.0\nUpload-Offset: 363976
datagateway-->>-Client: 204 No Content
Note over Client: TUS-Resumable: 1.0.0\nUpload-Offset: 363976
dataprovider-->>-datagateway: 204 No Content<br>TUS-Resumable: 1.0.0<br>Upload-Offset: 363976
datagateway-->>-Client: 204 No Content<br>TUS-Resumable: 1.0.0<br>Upload-Offset: 363976
else failure
activate dataprovider
activate datagateway
processing-)nats: emit processing-aborted({uploadid}) event
nats-)dataprovider: processing-aborted({uploadid}) event
Note over dataprovider: FIXME: What HTTP status code should we report?
Note over dataprovider: 422 Unprocessable Content is just a proposal
Note over dataprovider: see https://httpwg.org/specs/rfc9110.html#status.422
dataprovider-->>-datagateway: 422 Unprocessable Content
Note over datagateway: TUS-Resumable: 1.0.0\nUpload-Offset: 363976
datagateway-->>-Client: 422 Unprocessable Content
Note over Client: TUS-Resumable: 1.0.0\nUpload-Offset: 363976
Note over dataprovider: FIXME: What HTTP status code should we report?<br>422 Unprocessable Content is just a proposal, see<br>https://httpwg.org/specs/rfc9110.html#status.422
dataprovider-->>-datagateway: 422 Unprocessable Content<br>TUS-Resumable: 1.0.0<br>Upload-Offset: 363976
datagateway-->>-Client: 422 Unprocessable Content<br>TUS-Resumable: 1.0.0<br>Upload-Offset: 363976
end
{{</mermaid>}}
@@ -130,4 +118,4 @@ sequenceDiagram
## Async TUS upload with postprocessing
This might be a TUS extension or a misunderstanding on our side of what tus can do for us. Clients should send a `Prefer: respond-async` header to allow the server to return early when postprocessing might take longer. The PATCH requests can then return status `202 Accepted` and a `Location` header to a websocket that clients can use to track the processing / upload progress.
TODO there is a conflict with the TUS.io POST request with the creation extension, as that also returns a `Location` header which carries the upload URL. We would need another header to transport the websocket location. Maybe `Websocket-Location` or `Progress-Location`?
TODO there is a conflict with the TUS.io POST request with the creation extension, as that also returns a `Location` header which carries the upload URL. We would need another header to transport the websocket location. Maybe `Websocket-Location` or `Progress-Location`?
-14
View File
@@ -1,14 +0,0 @@
---
title: oCIS CLI Commands
date: 2025-11-13T00:00:00+00:00
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/cli-commands/
geekdocFilePath: _index.md
geekdocCollapseSection: true
weight: 20
---
{{< toc-tree >}}
CLI commands can either be embedded in a service or operate independently.
-22
View File
@@ -1,22 +0,0 @@
---
title: Create a New CLI Command
date: 2025-11-13T00:00:00+00:00
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/cli-commands/
geekdocFilePath: create-new-cli-command.md
weight: 20
---
{{< toc >}}
{{< hint info >}}
Existing commands should be checked for commonly used options whenever a new CLI command is created, regardless of whether it is embedded in a service or not. For an example you can see the [Service Independent CLI]({{< ref "./service_independent_cli.md" >}}) documentation.
{{< /hint >}}
## CLI Embedded in a Service
These commands are usually located in the `<service-name>/pkg/command` subfolder.
## CLI Independent of a Service
These commands are located in the `ocis/pkg/command` subfolder.
-33
View File
@@ -1,33 +0,0 @@
---
title: Document CLI Commands
date: 2025-11-13T00:00:00+00:00
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/cli-commands/
geekdocFilePath: document-cli-commands.md
weight: 20
---
{{< toc >}}
Any CLI command that is added to Infinite Scale must be documented here in the dev docs and the [admin docs](https://doc.owncloud.com/ocis/latest/maintenance/commands/commands.html). Note that the admin docs primarily distinguish between online and offline commands because the structure of the documentation is different. Typically, any command documented in the developer documentation is integrated into the admin documentation and adapted according to the target audience. The description here is for developers; the admin docs are derived from it.
{{< hint info >}}
Note that any CLI command requires documentation. However, it may be decided that a CLI command will not be included in the admin documentation. In such a case, the reasons should be valid.
{{< /hint >}}
## Type of CLI Commands
There are three types of CLI commands that require different documentation locations:
1. Commands that are embedded in a service such as:\
`ocis storage-users uploads`
2. Commands that are service independent such as:\
`ocis trash purge-empty-dirs` or `ocis revisions purge`
3. `curl` commands that can be one of the above.
## Rules
* **Service dependent** CLI commands:\
Add any CLI command into the repsective `README.md` **of the service**. Use as "template" an existing one such as in `services/storage-users/README.md` or `services/auth-app/README.md`. The content created will be transferred automatically to the service in the [Services]({{< ref "../services/" >}}) section.
* **Service independent** CLI commands:\
Add any CLI command into the [Service Independent CLI]({{< ref "./service_independent_cli.md" >}}) documentation. See the link for an example how to do so.
-41
View File
@@ -1,41 +0,0 @@
---
title: Service Dependent CLI
date: 2025-11-13T00:00:00+00:00
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/cli-commands/
geekdocFilePath: service_dependent_cli.md
---
This document describes ocis CLI commands that are **embedded in a service**.
{{< toc >}}
## Common Parameters
The ocis package offers a variety of CLI commands for monitoring or repairing ocis installations. Most of these commands have common parameters such as:
* `--help` (or `-h`)\
Use to print all available options.
* `--basePath` (or `-p`)\
Needs to point to a storage provider, paths can vary depending on your ocis installation. Example paths are:
```bash
.ocis/storage/users # bare metal installation
/var/tmp/ocis/storage/users # docker installation
...
```
* `--dry-run`\
This parameter, when available, defaults to `true` and must explicitly set to `false`.
* `--verbose` (or `-v`)\
Get a more verbose output.
## List of CLI Commands
For CLI commands that are **embedded in a service**, see the following services:
* [Auth-App]({{< ref "../services/auth-app/" >}})
* [Graph]({{< ref "../services/graph/" >}})
* [Postprocessing]({{< ref "../services/postprocessing/" >}})
* [Storage-Users]({{< ref "../services/storage-users/" >}})
-226
View File
@@ -1,226 +0,0 @@
---
title: Service Independent CLI
date: 2025-11-13T00:00:00+00:00
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/cli-commands/
geekdocFilePath: service_independent_cli.md
---
This document describes ocis CLI commands that are **service independent**.
{{< toc >}}
For **service dependent** CLI commands, see the following services:
* [Auth-App]({{< ref "../services/auth-app/" >}})
* [Graph]({{< ref "../services/graph/" >}})
* [Postprocessing]({{< ref "../services/postprocessing/" >}})
* [Storage-Users]({{< ref "../services/storage-users/" >}})
## Common Parameters
The ocis package offers a variety of CLI commands for monitoring or repairing ocis installations. Most of these commands have common parameters such as:
* `--help` (or `-h`)\
Use to print all available options.
* `--basePath` (or `-p`)\
Needs to point to a storage provider, paths can vary depending on your ocis installation. Example paths are:
```bash
.ocis/storage/users # bare metal installation
/var/tmp/ocis/storage/users # docker installation
...
```
* `--dry-run`\
This parameter, when available, defaults to `true` and must explicitly set to `false`.
* `--verbose` (or `-v`)\
Get a more verbose output.
## List of CLI Commands
### Backup CLI
The backup command allows inspecting the consistency of an ocis storage:
```bash
ocis backup consistency -p /base/path/storage/users
```
This will check the consistency of the storage and output a list of inconsistencies. Inconsistencies can be:
* **Orphaned Blobs**\
A blob in the blobstore that is not referenced by any file metadata.
* **Missing Blobs**\
A blob referenced by file metadata that is not present in the blobstore.
* **Missing Nodes**\
A node that is referenced by a symlink but doesn't exist.
* **Missing Link**\
A node that is not referenced by any symlink but should be.
* **Missing Files**\
A node that is missing essential files (such as the `.mpk` metadata file).
* **Missing/Malformed Metadata**\
A node that doesn't have any (or malformed) metadata.
This command provides additional options:
* `-b` / `--blobstore`\
Allows specifying the blobstore to use. Defaults to `ocis`. Empty blobs will not be checked. Can also be switched to `s3ng`, but needs addtional envvar configuration (see the `storage-users` service for more details).
* `--fail`\
Exits with non-zero exit code if inconsistencies are found. Useful for automation.
### Cleanup Orphaned Grants
Detect and optionally delete storage grants that have no corresponding share-manager entry.
Sharing in ocis relies on two truths. The share manager and the grants. When a share is created, ocis will
1. Create a grant for the specific file or folder.\
This grant is _checked when access to the file is requested_.
2. Create an entry in the `created.json`/`received.json` files of the specific user.\
These files are _checked whenever shares are listed_.
The process for creating a share is as follows: first, ocis creates the grant, and then adds the share entry. The reverse order is followed when deleting a share. This means that if the second step fails, the grant will still be present. This can be visually confirmed in the webUI. The webUI details of the "share" section will show an error fetching information for orphan grants.
The following command fixes the problem of orhaned grants.
Usage:
```bash
ocis shares clean-orphaned-grants \
--service-account-id "<id>" \
--service-account-secret "<secret>" \
[--force] \
[--space-id "<space-opaque-id>"] \
[--dry-run=false]
```
Notes:
- `--dry-run`\
Defaults to `true` (no deletions). Set to `false` to remove orphaned grants.
- `--space-id`\
Limit the scan to a specific storage space (opaque ID).
- `--force`\
Force removal of suspected orphans even when listing shares fails.
- Public links are not touched.
### Cleanup Orphaned Shares
When a shared space or directory got deleted, use the `shares cleanup` command to remove those share orphans. This can't be done automatically at the moment.
```bash
ocis shares cleanup
```
### List Unified Roles
This command simplifies the process of finding out which UID belongs to which role. The command using markdown as output format is:
```bash
ocis graph list-unified-roles --output-format md
```
The output of this command includes the following information for each role:
* `Name`\
The human readable name of the role.
* `UID`\
The unique identifier of the role.
* `Enabled`\
Whether the role is enabled or not.
* `Description`\
A short description of the role.
* `Condition`
* `Allowed Resource Actions`
**Example output (shortned)**
| # | LABEL | UID | ENABLED | DESCRIPTION | CONDITION | ALLOWED RESOURCE ACTIONS |
|:--:|:--------------------------------:|:------------------------------------:|:--------:|:------------------------------------------------------------------------------------:|:---------------------------------------------------------:|:----------------------------------------:|
| 1 | Viewer | b1e2218d-eef8-4d4c-b82d-0f1a1b48f3b5 | enabled | View and download. | exists @Resource.File | libre.graph/driveItem/path/read |
| | | | | | exists @Resource.Folder | libre.graph/driveItem/quota/read |
| | | | | | exists @Resource.File && @Subject.UserType=="Federated" | libre.graph/driveItem/content/read |
| | | | | | exists @Resource.Folder && @Subject.UserType=="Federated" | libre.graph/driveItem/children/read |
| | | | | | | libre.graph/driveItem/deleted/read |
| | | | | | | libre.graph/driveItem/basic/read |
| 2 | ViewerListGrants | d5041006-ebb3-4b4a-b6a4-7c180ecfb17d | disabled | View, download and show all invite
### Move Stuck Uploads
In some cases of saturated disk usage, Infinite Scale metadata may become stuck. This can occur when file metadata is being moved to its final destination after file operations. This issue was primarily seen with shares, where uploaded files could not be accessed. The required filename parameter aligns with Infinite Scale's internal processes and is used to complete the formerly stuck move action.
```bash
ocis shares move-stuck-upload-blobs [--dry-run=false] -p /base/path/storage/users
```
This command provides additional options:
* `--dry-run` (default: `true`)\
Only print found files stuck in transition.\
Note: This is a safety measure. You must specify `--dry-run=false` for the command to be effective.
* `--filename` value (default: "received.json")\
File to move from `uploads/` to share manager metadata `blobs/`
### Revisions CLI
The revisions command allows removing the revisions of files in the storage.
```bash
ocis revisions purge -p /base/path/storage/users
```
It takes the `--resource-id` (or `--r`) parameter which specify the scope of the command:
* An empty string (default) removes all revisions from all spaces.
* A spaceID (like `d419032c-65b9-4f4e-b1e4-0c69a946181d\$44b5a63b-540c-4002-a674-0e9c833bbe49`) removes all revisions in that space.
* A resourceID (e.g. `d419032c-65b9-4f4e-b1e4-0c69a946181d\$44b5a63b-540c-4002-a674-0e9c833bbe49\!e8a73d49-2e00-4322-9f34-9d7f178577b2`) removes all revisions from that specific file.
This command provides additional options:
* `--dry-run` (default: `true`)\
Do not remove any revisions but print the revisions that would be removed.
* `-b` / `--blobstore`\
Allows specifying the blobstore to use. Defaults to `ocis`. Can be switched to `s3ng` but needs addtional envvar configuration (see the `storage-users` service for more details).
* `-v` / `--verbose`\
Prints additional information about the revisions that are removed.
* `--glob-mechanism` (default: `glob`\
(advanced) Allows specifying the mechanism to use for globbing. Can be `glob`, `list` or `workers`. In most cases the default `glob` does not need to be changed. If large spaces need to be purged, `list` or `workers` can be used to improve performance at the cost of higher cpu and ram usage. `list` will spawn 10 threads that list folder contents in parallel. `workers` will use a special globbing mechanism and multiple threads to achieve the best performance for the highest cost.
### Service Health
The service health CLI command allows checking the health status of a service. If there are no issues found, nothing health related will get printed.
```bash
ocis <service-name> health
```
**Examples**
* The `collaboration` service has been started but not configured and is therefore not in a healthy state:
```bash
ocis collaboration health
The WOPI secret has not been set properly in your config for collaboration. Make sure your /root/.ocis/config config contains the proper values (e.g. by using 'ocis init --diff' and applying the patch or setting a value manually in the config/corresponding environment variable).
```
* The `antivirus` service has not been started, the health check responds accordingly:
```bash
ocis antivirus health
{"level":"fatal","service":"antivirus","error":"Get \"http://127.0.0.1:9277/healthz\": dial tcp 127.0.0.1:9277: connect: connection refused","time":"2024-10-28T17:47:54+01:00","message":"Failed to request health check"}
```
### Trash CLI
The trash cli allows removing empty folders from the trashbin. This should be used to speed up trash bin operations.
```bash
ocis trash purge-empty-dirs -p /base/path/storage/users
```
This command provides additional options:
* `--dry-run` (default: `true`)\
Do not remove any empty folders but print the empty folders that would be removed.
+1 -12
View File
@@ -35,18 +35,7 @@ oidc-gen \
If you have dynamic client registration enabled on your OpenID Connect identity provider, you can skip the `--client-id`, `--client-secret` and `--pub` options.
If you're using a dedicated OpenID Connect client for the OIDC-agent, we recommend a public one with the following two redirect URIs: `http://127.0.0.1:*` and `http://localhost:*`. Alternatively you also may use the already existing OIDC client of the ownCloud Desktop Client (`--client-id=xdXOt13JKxym1B1QcEncf2XDkLAexMBFwiT9j6EfhhHFJhs2KM9jbjTmf8JBXE69` and `--client-secret=UBntmLjC2yYCeHwsyj73Uwo9TAaecAetRwMw0xYcvNL9yRdLSUi0hUAHfvCHFeFh`, no `--pub` set, request specific scope for offline access), e.g.:
``` bash
oidc-gen \
--client-id=xdXOt13JKxym1B1QcEncf2XDkLAexMBFwiT9j6EfhhHFJhs2KM9jbjTmf8JBXE69 \
--client-secret=UBntmLjC2yYCeHwsyj73Uwo9TAaecAetRwMw0xYcvNL9yRdLSUi0hUAHfvCHFeFh \
--issuer https://cloud.ocis.test \
--redirect-uri=http://localhost:12345 \
--scope="openid offline_access profile email" \
my-client
```
When using a self signed certificate you have to provide the certificate chain using `--cp /etc/ssl/certs/test.cert.pem`. In case oidc-gen cannot determine the flow try with `--flow=code`.
If you're using a dedicated OpenID Connect client for the OIDC-agent, we recommend a public one with the following two redirect URIs: `http://127.0.0.1:*` and `http://localhost:*`. Alternatively you also may use the already existing OIDC client of the ownCloud Desktop Client (`--client-id=xdXOt13JKxym1B1QcEncf2XDkLAexMBFwiT9j6EfhhHFJhs2KM9jbjTmf8JBXE69` and `--client-secret=UBntmLjC2yYCeHwsyj73Uwo9TAaecAetRwMw0xYcvNL9yRdLSUi0hUAHfvCHFeFh`, no `--pub` set)
Please also note that the OIDC-agent will listen on your localhost interface on port 12345 for the time of the initial authentication. If that port is already occupied on your machine, you can easily change that by setting the `--redirect-uri` parameter to a different value.
+35
View File
@@ -0,0 +1,35 @@
---
title: ownCloud
---
{{< toc >}}
## Developer Documentation
Welcome to our developer documentation. Here you can find developer documentation on:
- [oCIS]({{< ref "./ocis" >}}) server
- oCIS extensions
- Clients like:
- [ownCloud Web](https://github.com/owncloud/web) - the new web frontend for oCIS and ownCloud
- [ownCloud Android app](https://github.com/owncloud/android)
- [ownCloud iOS app](https://github.com/owncloud/ios-app)
- [ownCloud Desktop Syncing Client](https://github.com/owncloud/client)
- Integrations
## We love open source
The oCIS server is Apache v2 licensed.
The lower storage layer of oCIS is defined by the CS3 APIs and implemented in the REVA project. Our goal is to develop the CS3 APIs to an open standard and collaborate on the open source REVA reference implementation for CS3 APIs.
You can also find all client sources on [GitHub](https://github.com/owncloud/).
## Join the oCIS Community
The [server repository](https://github.com/owncloud/ocis) on [GitHub](https://www.github.com) is a good entry point to the oCIS project. In addition to that there are also ownCloud projects for clients for [iOS](https://github.com/owncloud/ios-app), [Android](https://github.com/owncloud/android), the major [Desktop](https://github.com/owncloud/desktop) platforms and [ownCloud Web](https://github.com/owncloud/web).
To chat about development, [join our public chat](https://talk.owncloud.com/channel/ocis)
If you want to help and improve ownCloud or oCIS, start coding or open issues on GitHub in the related repository.
We are very happy to hear your feedback and ideas!
+12
View File
@@ -0,0 +1,12 @@
---
title: "Architecture"
date: 2020-03-03T10:34:00+01:00
weight: 25
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/architecture
geekdocFilePath: _index.md
---
In the architecture part of the documentation we collect useful developer documentation on different aspects of the architecture. We are using mermaid.js to collaborate on the necessary diagrams.
*Pictures tell more than a thousand words.*
@@ -0,0 +1,202 @@
---
title: "Efficient Stat Polling"
date: 2020-03-03T10:31:00+01:00
weight: 30
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/architecture
geekdocFilePath: efficient-stat-polling.md
---
The fallback sync mechanism uses the ETag to determine which part of a sync tree needs to be checked by recursively descending into folders whose ETag has changed. The ETag can be calculated using a `stat()` call in the filesystem and we are going to explore how many `stat()` calls are necessary and how the number might be reduced.
## ETag propagation
What does ETag propagation mean? Whenever a file changes its content or metadata the ETag or "entity tag" changes. In the early days of ownCloud it was decided to extend this behavior to folders as well, which is outside of any WebDAV RFC specification. Nevertheless, here we are, using the ETag to reflect changes, not only on WebDAV resources but also WebDAV collections. The server will propagate the ETag change up to the root of the tree.
{{<mermaid class="text-center">}}
graph TD
linkStyle default interpolate basis
subgraph final ETag propagation
ert3(( etag:N )) --- el3(( etag:O )) & er3(( etag:N ))
er3 --- erl3(( etag:O )) & err3(( etag:N ))
end
subgraph first ETag propagation
ert2(( etag:O )) --- el2(( etag:O )) & er2(( etag:N ))
er2 --- erl2(( etag:O )) & err2(( etag:N ))
end
subgraph initial file change
ert(( etag:O )) --- el(( etag:O )) & er(( etag:O ))
er --- erl(( etag:O )) & err(( etag:N ))
end
{{</mermaid>}}
The old `etag:O` is replaced by propagating the new `etag:N` up to the root, where the client will pick it up and explore the tree by comparing the old ETags known to him with the state of the current ETags on the server. This form of sync is called *state based sync*.
## Single user sync
To let the client detect changes in the drive (a tree of files and folders) of a user, we rely on the ETag of every node in the tree. The discovery phase starts at the root of the tree and checks if the ETag has changed since the last discovery:
- if it is still the same nothing has changed inside the tree
- if it changed the client will compare the ETag of all immediate children and recursively descend into every node that changed
This works, because the server side will propagate ETag changes in the tree up to the root.
{{<mermaid class="text-center">}}
graph TD
linkStyle default interpolate basis
ec( client ) -->|"stat()"|ert
subgraph
ert(( )) --- el(( )) & er(( ))
er --- erl(( )) & err(( ))
end
{{</mermaid>}}
## Multiple users
On an ocis server there is not one user but many. Each of them may have one or more clients running. In the worst case all of them polling the ETag of his home root node every 30 seconds.
Keep in mind that etags are only propagated inside each distinct tree. No sharing is considered yet.
{{<mermaid class="text-center">}}
graph TD
linkStyle default interpolate basis
ec( client ) -->|"stat()"|ert
subgraph
ert(( )) --- el(( )) & er(( ))
er --- erl(( )) & err(( ))
end
mc( client ) -->|"stat()"|mrt
subgraph
mrt(( )) --- ml(( )) & mr(( ))
mr --- mrl(( )) & mrr(( ))
end
fc( client ) -->|"stat()"|frt
subgraph
frt(( )) --- fl(( )) & fr(( ))
fr --- frl(( )) & frr(( ))
end
{{</mermaid>}}
## Sharing
*Storage providers* are responsible for persisting shares as close to the storage as possible.
One implementation may persist shares using ACLs, another might use custom extended attributes. The chosen implementation is storage specific and always a tradeoff between various requirements. Yet, the goal is to treat the storage provider as the single source of truth for all metadata.
If users can bypass the storage provider using e.g. `ssh` additional mechanisms needs to make sure no inconsistencies arise:
- the ETag must still be propagated in a tree, eg using inotify, a policy engine or workflows triggered by other means
- deleted files should land in the trash (e.g. `rm` could be wrapped to move files to trash)
- overwriting files should create a new version ... other than a fuse fs I see no way of providing this for normal posix filesystems. Other storage backends that use the s3 protocol might provide versions natively.
The storage provider is also responsible for keeps track of references e.g. using a shadow tree that users normally cannot see or representing them as symbolic links in the filesystem (Beware of symbolic link cycles. The clients are currently unaware of them and would flood the filesystem).
To prevent write amplification ETags must not propagate across references. When a file that was shared by einstein changes the ETag must not be propagated into any share recipients tree.
{{<mermaid class="text-center">}}
graph TD
linkStyle default interpolate basis
ec( einsteins client ) -->|"stat()"|ert
subgraph
ml --- mlr(( ))
mrt(( )) --- ml(( )) & mr(( ))
mr --- mrl(( )) & mrr(( ))
end
mlr -. reference .-> er
subgraph
ert(( )) --- el(( )) & er(( ))
er --- erl(( )) & err(( ))
end
mc( maries client ) -->|"stat()"|mrt
{{</mermaid>}}
But how can Marie's client detect the change?
We are trading writes for reads: the client needs to stat the own tree & all shares or entry points into other storage trees.
It would require client changes that depend on the server side actually having an endpoint that can efficiently list all entry points into storages a user has access to including their current etag.
But having to list n storages might become a bottleneck anyway, so we are going to have the gateway calculate a virtual root ETag for all entry points a user has access to and cache that.
## Server Side Stat Polling
Every client polls the virtual root ETag (every 30 sec). The gateway will cache the virtual root ETag of every storage for 30 sec as well. That way every storage provider is only stated once every 30 sec (can be throttled dynamically to adapt to storage io load).
{{<mermaid class="text-center">}}
graph TD
linkStyle default interpolate basis
ec( client ) -->|"stat()"|evr
subgraph gateway caching virtual etags
evr(( ))
mvr(( ))
fvr(( ))
end
evr --- ert
mvr --- mrt
fvr --- frt
subgraph
ert(( )) --- el(( )) & er(( ))
er --- erl(( )) & err(( ))
end
mc( client ) -->|"stat()"|mvr
subgraph
mrt(( )) --- ml(( )) & mr(( ))
ml --- mlm(( ))
mr --- mrl(( )) & mrr(( ))
end
mlm -.- er
mvr -.- er
fc( client ) -->|"stat()"|fvr
subgraph
frt(( )) --- fl(( )) & fr(( ))
fr --- frl(( )) & frr(( ))
end
{{</mermaid>}}
Since the active clients will poll the etag for all active users the gateway will have their ETag cached. This is where sharing comes into play: The gateway also needs to stat the ETag of all other entry points ... or mount points. That may increase the number of stat like requests to storage providers by an order of magnitude.
### Ram considerations
For a single machine using a local posix storage the linux kernel already caches the inodes that contain the metadata that is necessary to calculate the ETag (even extended attributes are supported). With 4k inodes 256 nodes take 1Mb of RAM, 1k inodes take 4Mb and 1M inodes take 4Gb to completely cache the file metadata. For distributed filesystems a dedicated cache might make sense to prevent hammering it with stat like requests to calculate ETags.
### Bandwidth considerations
The bandwidth for a single machine might be another bottleneck. Consider a propfind request with roughly 500 bytes and a response with roughly 800 bytes in size:
- At 100Mbit (~10Mb/s) you can receive 20 000 PROPFIND requests
- At 1000Mbit (~100Mb/s) you can receive 200 000 PROPFIND requests
- At 10Gbit (~1Gb/s) you can receive 2 000 000 PROPFIND requests
This can be scaled by adding more gateways and sharding users because these components are stateless.
## Share mount point polling cache
What can we do to reduce the number of stat calls to storage providers. Well, the gateway queries the share manager for all mounted shares of a user (or all entry points, not only the users own root/home). The share references contain the storage provider that contains the share. If every user has its own storage provider id the gateway could check in its own cache if the storage root etag has changed. It will be up-to-date because another client likely already polled for its etag.
This would reduce the number of necessary stat requests to active storages.
### Active share node cache invalidation
We can extend the lifetime of share ETag cache entries and only invalidate them when the root of the storage that contains them changes its ETag. That would reduce the number of stat requests to the number of active users.
### Push notifications
We can further enhance this by sending push notifications when the root of a storage changes. Which is becoming increasingly necessary for mobile devices anyway.
+200
View File
@@ -0,0 +1,200 @@
---
title: "Protocol changes"
date: 2022-05-17T08:46:00+01:00
weight: 30
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/architecture
geekdocFilePath: protocol-changes.md
---
The spaces concept allows clients to look up the space endpoints a user has access to and then do individual sync discoveries. Technically, we introduce an indirection that allows clients to rely on server provided URLs instead of hardcoded `/webdav` or `/dav/files/{username}` paths, that may change over time.
## Space discovery
{{<mermaid class="text-center">}}
%%{init: {"sequence": { "showSequenceNumbers":true, "messageFontFamily":"courier", "messageFontWeight":"normal", "messageFontSize":"11"}}}%%
%% font weight is a css bug: https://github.com/mermaid-js/mermaid/issues/1976
%% edit this diagram by pasting it into eg. https://mermaid.live
sequenceDiagram
participant Client
participant Graph
participant SpaceA
participant SpaceB
links Client: {"web": "https://owncloud.dev/clients/web/", "RClone": "https://owncloud.dev/clients/rclone/"}
link Graph: Documentation @ https://owncloud.dev/extensions/graph/
Note left of Client: First, a clients looks<br/>up the spaces a user has access to
opt space lookup
Client->>+Graph: GET /me/drives
Graph-->>-Client: 200 OK JSON list of spaces, say A, B and C,<br/> each with a dedicated webDavURL, etag and quota
end
Note left of Client: Then it can do a parallel<br/>sync discovery on spaces<br/>whose etag changed
par Client to Space A
Client->>+SpaceA: PROPFIND {webDavURL for Space A}
SpaceA-->>-Client: 207 Multistatus PROPFIND response
and Client to Space B
Client->>+SpaceB: PROPFIND {webDavURL for space B}
SpaceB-->>-Client: 207 Multistatus PROPFIND response
end
{{</mermaid>}}
### New /dav/spaces/{spaceid} endpoint with spaceid and a relative path
The ocDAV service is responsible for translating ownCloud flavoured WebDAV into CS3 API calls.
**General view**
A PROPFIND finds its way to a storage provider like this:
{{<mermaid class="text-center">}}
%%{init: {"sequence": { "showSequenceNumbers":true, "messageFontFamily":"courier", "messageFontWeight":"normal", "messageFontSize":"11"}}}%%
%% font weight is a css bug: https://github.com/mermaid-js/mermaid/issues/1976
%% edit this diagram by pasting it into eg. https://mermaid.live
sequenceDiagram
participant Client
participant ocDAV
participant StorageProvider
Note right of Client: {spaceid} identifies the space<br>{relative/path} is relative to the space root
Client->>+ocDAV: PROPFIND /dav/space/{spaceid}/{relative/path}
Note right of ocDAV: translate ownCloud flavoured webdav<br>into CS3 API requests
ocDAV->>+StorageProvider: ListContainer({spaceid}, path: {relative/path})
StorageProvider-->>-ocDAV: []ResourceInfo
ocDAV-->>-Client: 207 Multistatus
{{</mermaid>}}
While the above is a simplification to get an understanding of what needs to go where, there are several places where sharding can happen.
**Proxy can do user based routing**
The ocis proxy authenticates requests and can forward requests to different backends, depending on the logged-in user or cookies. For example multiple ocdav services can be configured to shard users based on username or affiliation.
{{<mermaid class="text-center">}}
%%{init: {"sequence": { "showSequenceNumbers":true, "messageFontFamily":"courier", "messageFontWeight":"normal", "messageFontSize":"11"}}}%%
%% font weight is a css bug: https://github.com/mermaid-js/mermaid/issues/1976
%% edit this diagram by pasting it into eg. https://mermaid.live
sequenceDiagram
participant Client
participant proxy
participant ocDAV1 as ocDAV [a-k]
participant ocDAV2 as ocDAV [l-z]
Note right of Client: {spaceid} identifies the space<br>{relative/path} is relative to the space root
Client->>+proxy: PROPFIND /dav/space/{spaceid}/{relative/path}
alt username starting with a-k
proxy->>+ocDAV1: PROPFIND /dav/space/{spaceid}/{relative/path}
Note right of ocDAV1: translate ownCloud flavoured webdav<br>into CS3 API requests
ocDAV1-->>-Client: 207 Multistatus
else username starting with l-z
proxy->>+ocDAV2: PROPFIND /dav/space/{spaceid}/{relative/path}
ocDAV2-->>-Client: 207 Multistatus
end
{{</mermaid>}}
**Gateway can do path or storage provider id based routing**
The reva gateway acts as a facade to multiple storage providers that can be configured with the storage registry:
{{<mermaid class="text-center">}}
%%{init: {"sequence": { "showSequenceNumbers":true, "messageFontFamily":"courier", "messageFontWeight":"normal", "messageFontSize":"11"}}}%%
%% font weight is a css bug: https://github.com/mermaid-js/mermaid/issues/1976
%% edit this diagram by pasting it into eg. https://mermaid.live
sequenceDiagram
participant ocDAV
participant Gateway
participant StorageRegistry
participant StorageProvider1 as StorageProvider [a-k]
participant StorageProvider2 as StorageProvider [l-z]
Note right of ocDAV: translate ownCloud flavoured webdav<br>into CS3 API requests
ocDAV->>+Gateway: ListContainer({spaceid}, path: {relative/path})
Note right of Gateway: find address of the storage provider<br>that is responsible for the space
Gateway->>+StorageRegistry: ListStorageProviders({spaceid})
StorageRegistry-->>-Gateway: []ProviderInfo
Note right of Gateway: forward request to<br>correct storage provider
alt username starting with a-k
Gateway->>+StorageProvider1: ListContainer({spaceid}, path: {relative/path})
StorageProvider1-->>-Gateway: []ResourceInfo
else username starting with l-z
Gateway->>+StorageProvider2: ListContainer({spaceid}, path: {relative/path})
StorageProvider2-->>-Gateway: []ResourceInfo
end
Gateway-->>-ocDAV: []ResourceInfo
{{</mermaid>}}
### Old /dav/files/{username} endpoint with username and a path relative to the users home
**PROPFIND request against old webdav endpoints**
To route a PROPFIND request against the old webdav endpoints like `/dav/files/username`, ocdav first has to build a CS3 namespace prefix, e.g. `/users/{{.Id.OpaqueId}}` to the users home.
{{<mermaid class="text-center">}}
%%{init: {"sequence": { "showSequenceNumbers":true, "messageFontFamily":"courier", "messageFontWeight":"normal", "messageFontSize":"11"}}}%%
%% font weight is a css bug: https://github.com/mermaid-js/mermaid/issues/1976
%% edit this diagram by pasting it into eg. https://mermaid.live
sequenceDiagram
participant Client
participant ocDAV
participant Gateway
opt old /dav/files/{username} endpoint with username and a path relative to the users home
Note right of Client: translate ownCloud flavoured webdav<br>into CS3 API requests
Client->>+ocDAV: PROPFIND /dav/files/{username}/{relative/path}
Note right of ocDAV: translate ownCloud flavoured webdav<br>into CS3 API requests
ocDAV->>+Gateway: GetUser({username})
Gateway-->>-ocDAV: User
Note right of ocDAV: build path prefix to user home
ocDAV->>+ocDAV: {namespace/prefix} = ApplyLayout({path layout}, User), eg. /users/e/einstein
Note right of ocDAV: look up the space responsible for a path
ocDAV->>+Gateway: ListStorageSpaces(path: {namespace/prefix}/{relative/path})
Gateway-->>-ocDAV: []StorageSpace
Note right of ocDAV: make actual request with space and relative path
ocDAV->>+Gateway: ListContainer({spaceid}, path: {relative/path})
Gateway-->>-ocDAV: []ResourceInfo
ocDAV-->>-Client: 207 Multistatus
end
{{</mermaid>}}
**Handling legacy global namespace webdav endpoints**
The reason ocis uses a path based lookup instead of looking up the current users home using the user id and a space type filter is, because there are deployments that use a global namespace at the legacy `/webdav` endpoint. To support these use cases, the gateway allows looking up spaces using their mount path.
{{<mermaid class="text-center">}}
%%{init: {"sequence": { "showSequenceNumbers":true, "messageFontFamily":"courier", "messageFontWeight":"normal", "messageFontSize":"11"}}}%%
%% font weight is a css bug: https://github.com/mermaid-js/mermaid/issues/1976
%% edit this diagram by pasting it into eg. https://mermaid.live
sequenceDiagram
participant Client
participant ocDAV
participant Gateway
Note right of Client: translate ownCloud flavoured webdav<br>into CS3 API requests
alt old /dav/files/{username} endpoint with username and a path relative to the users home
Client->>+ocDAV: PROPFIND /dav/files/{username}/{relative/path}
Note right of ocDAV: look up {username} in URL path
ocDAV->>+Gateway: GetUser({username})
Gateway-->>-ocDAV: User
Note right of ocDAV:build namespace prefix to user home
ocDAV->>+ocDAV: {namespace/prefix} = ApplyLayout({namespace layout}, User), eg. /users/e/einstein
else legacy /webdav/ endpoint with a path relative to the users home
Client->>+ocDAV: PROPFIND /webdav/{relative/path}
Note right of ocDAV: use currently logged in user
ocDAV->>+ocDAV: ContextGetUser()
Note right of ocDAV: build namespace prefix to user home
ocDAV->>+ocDAV: {namespace/prefix} = ApplyLayout({namespace layout}, User), eg. /users/e/einstein
else legacy /webdav/ endpoint with a path relative to a global namespace
Client->>+ocDAV: PROPFIND /webdav/{relative/path}
Note right of ocDAV: omit namespace prefix by using empty layout template
ocDAV->>+ocDAV: {namespace/prefix} = ApplyLayout("/", u), always returns "/"
end
Note right of ocDAV: look up the space responsible for a path
ocDAV->>+Gateway: ListStorageSpaces(path: {namespace/prefix}/{relative/path})
Gateway-->>-ocDAV: []StorageSpace
Note right of ocDAV: make actual request with space and relative path
ocDAV->>+Gateway: ListContainer({spaceid}, path: {relative/path})
Gateway-->>-ocDAV: []ResourceInfo
ocDAV-->>-Client: 207 Multistatus
{{</mermaid>}}
@@ -0,0 +1,10 @@
---
title: "Services Communication"
date: 2022-02-15T11:26:00+01:00
weight: 30
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/architecture
geekdocFilePath: services-communication.md
---
{{< figure src="/ocis/static/ocis-services-communication.drawio.svg" >}}
+121
View File
@@ -0,0 +1,121 @@
---
title: "Upload processing"
date: 2022-07-06T12:47:00+01:00
weight: 30
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/architecture
geekdocFilePath: upload-processing.md
---
Uploads are handled by a dedicated service that uses TUS.io for rusumable uploads. When all bytes have been transferred the upload is finalized by making the file available in file listings and for download.
The finalization may be asynchronous when mandatory workflow steps are involved.
## Legacy PUT upload
{{<mermaid class="text-center">}}
%%{init: {"sequence": { "showSequenceNumbers":true, "messageFontFamily":"courier", "messageFontWeight":"normal", "messageFontSize":"11"}}}%%
%% font weight is a css bug: https://github.com/mermaid-js/mermaid/issues/1976
%% edit this diagram by pasting it into eg. https://mermaid.live
sequenceDiagram
participant Client
participant ocdav
participant storageprovider
participant dataprovider
Client->>+ocdav: PUT /dav/spaces/{spaceid}/newfile.bin
ocdav->>+storageprovider: InitiateFileUpload
storageprovider-->>-ocdav: OK, Protocol simple, UploadEndpoint: /data, Token: {jwt}
Note right of ocdav: The {jwt} contains the internal actual target, eg.:<br>http://localhost:9158/data/simple/91cc9882-db71-4b37-b694-a522850fcee1
ocdav->>+dataprovider: PUT /data<br>X-Reva-Transfer: {jwt}
dataprovider-->>-ocdav: 201 Created
ocdav-->>-Client: 201 Created
{{</mermaid>}}
## TUS upload
{{<mermaid class="text-center">}}
%%{init: {"sequence": { "showSequenceNumbers":true, "messageFontFamily":"courier", "messageFontWeight":"normal", "messageFontSize":"11"}}}%%
%% font weight is a css bug: https://github.com/mermaid-js/mermaid/issues/1976
%% edit this diagram by pasting it into eg. https://mermaid.live
sequenceDiagram
participant Client
participant ocdav
participant storageprovider
participant datagateway
participant dataprovider
Client->>+ocdav: POST /dav/spaces/{spaceid}<br>Upload-Metadata: {base64 encoded filename etc}<br>TUS-Resumable: 1.0.0
ocdav->>+storageprovider: InitiateFileUpload
storageprovider-->>-ocdav: OK, Protocol tus, UploadEndpoint: /data, Token: {jwt}
Note right of ocdav: The {jwt} contains the internal actual target, eg.:<br>http://localhost:9158/data/tus/24d893f5-b942-4bc7-9fb0-28f49f980160
ocdav-->>-Client: 201 Created<br>Location: /data/{jwt}<br>TUS-Resumable: 1.0.0
Client->>+datagateway: PATCH /data/{jwt}<br>TUS-Resumable: 1.0.0<br>Upload-Offset: 0
Note over datagateway: unwrap the {jwt} target
datagateway->>+dataprovider: PATCH /data/tus/24d893f5-b942-4bc7-9fb0-28f49f980160<br>X-Reva-Transfer: {jwt}
Note over dataprovider: storage driver<br>handles request
dataprovider-->>-datagateway: 204 No Content<br>TUS-Resumable: 1.0.0<br>Upload-Offset: 363976
datagateway-->>-Client: 204 No Content<br>TUS-Resumable: 1.0.0<br>Upload-Offset: 363976
{{</mermaid>}}
## TUS upload with async postprocessing
{{<mermaid class="text-center">}}
%%{init: {"sequence": { "showSequenceNumbers":true, "messageFontFamily":"courier", "messageFontWeight":"normal", "messageFontSize":"11"}}}%%
%% font weight is a css bug: https://github.com/mermaid-js/mermaid/issues/1976
%% edit this diagram by pasting it into eg. https://mermaid.live
sequenceDiagram
participant Client
participant ocdav
participant storageprovider
participant datagateway
participant dataprovider
participant nats
Client->>+ocdav: POST /dav/spaces/{spaceid}<br>Upload-Metadata: {base64 encoded filename etc}<br>TUS-Resumable: 1.0.0
ocdav->>+storageprovider: InitiateFileUpload
storageprovider-->>-ocdav: OK, Protocol tus, UploadEndpoint: /data, Token: {jwt}
Note right of ocdav: The {jwt} contains the internal actual target, eg.:<br>http://localhost:9158/data/tus/24d893f5-b942-4bc7-9fb0-28f49f980160
ocdav-->>-Client: 201 Created<br>Location: /data/{jwt}<br>TUS-Resumable: 1.0.0
Client->>+datagateway: PATCH /data/{jwt}<br>TUS-Resumable: 1.0.0<br>Upload-Offset: 0
Note over datagateway: unwrap the {jwt} target
datagateway->>+dataprovider: PATCH /data/tus/24d893f5-b942-4bc7-9fb0-28f49f980160<br>X-Reva-Transfer: {jwt}
Note over dataprovider: storage driver<br>handles request
dataprovider-)nats: emit all-bytes-received event
nats-)processing: all-bytes-received({uploadid}) event
Note over dataprovider: TODO: A lot of time may pass here, we could use<br> the `Prefer: respond-async` header to return early<br>with a 202 Accepted status and a Location header<br>to a websocket endpoint
alt success
processing-)nats: emit processing-finished({uploadid}) event
nats-)dataprovider: processing-finished({uploadid}) event
dataprovider-->>-datagateway: 204 No Content<br>TUS-Resumable: 1.0.0<br>Upload-Offset: 363976
datagateway-->>-Client: 204 No Content<br>TUS-Resumable: 1.0.0<br>Upload-Offset: 363976
else failure
activate dataprovider
activate datagateway
processing-)nats: emit processing-aborted({uploadid}) event
nats-)dataprovider: processing-aborted({uploadid}) event
Note over dataprovider: FIXME: What HTTP status code should we report?<br>422 Unprocessable Content is just a proposal, see<br>https://httpwg.org/specs/rfc9110.html#status.422
dataprovider-->>-datagateway: 422 Unprocessable Content<br>TUS-Resumable: 1.0.0<br>Upload-Offset: 363976
datagateway-->>-Client: 422 Unprocessable Content<br>TUS-Resumable: 1.0.0<br>Upload-Offset: 363976
end
{{</mermaid>}}
## Async TUS upload with postprocessing
This might be a TUS extension or a misunderstanding on our side of what tus can do for us. Clients should send a `Prefer: respond-async` header to allow the server to return early when postprocessing might take longer. The PATCH requests can then return status `202 Accepted` and a `Location` header to a websocket that clients can use to track the processing / upload progress.
TODO there is a conflict with the TUS.io POST request with the creation extension, as that also returns a `Location` header which carries the upload URL. We would need another header to transport the websocket location. Maybe `Websocket-Location` or `Progress-Location`?
+25
View File
@@ -0,0 +1,25 @@
---
title: Rclone
date: 2021-11-17T00:00:00+00:00
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/clients/rclone
geekdocFilePath: _index.md
geekdocCollapseSection: true
---
## About Rclone
{{< hint ok >}}
Rclone is a command line program to manage files on cloud storage. It is a feature rich alternative to cloud vendors' web storage interfaces. Over 40 cloud storage products support rclone including S3 object stores, business & consumer file storage services, as well as standard transfer protocols.
Rclone has powerful cloud equivalents to the unix commands rsync, cp, mv, mount, ls, ncdu, tree, rm, and cat. Rclone's familiar syntax includes shell pipeline support, and --dry-run protection. It is used at the command line, in scripts or via its API.
Users call rclone "The Swiss army knife of cloud storage", and "Technology indistinguishable from magic".
{{< /hint >}}
Source: [Rclone project website](https://rclone.org/)
## Table of Contents
{{< toc-tree >}}
@@ -0,0 +1,46 @@
---
title: WebDAV with Basic Authentication
date: 2021-11-17T00:00:00+00:00
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/clients/rclone
geekdocFilePath: webdav-sync-basic-auth.md
geekdocCollapseSection: true
---
## WebDAV with Basic Authentication
{{< hint danger >}}
Basic Authentication is disabled by default in oCIS because of security considerations. In order to make the following Rclone commands work the oCIS administrator needs to enable Basic Authentication e.g. by setting the environment variable `PROXY_ENABLE_BASIC_AUTH` to `true`.
Please consider to use [Rclone with OpenID Connect]({{< ref "webdav-sync-oidc.md" >}}) instead.
{{< /hint >}}
For the usage of a WebDAV remote with Rclone see also the [Rclone documentation](https://rclone.org/webdav/)
## Configure the WebDAV remote
First of all we need to set up our credentials and the WebDAV remote for Rclone. In this example we do this by setting environment variables. You might also set up a named remote or use command line options to achieve the same.
``` bash
export RCLONE_WEBDAV_VENDOR=owncloud
export RCLONE_WEBDAV_URL=https://ocis.owncloud.test/remote.php/webdav/
export RCLONE_WEBDAV_USER=einstein
export RCLONE_WEBDAV_PASS=$(rclone obscure relativity)
```
{{< hint info >}}
Please note that `RCLONE_WEBDAV_PASS` is not set to the actual password, but to the value returned by `rclone obscure <password>`.
{{< /hint >}}
We now can use Rclone to sync the local folder `/tmp/test` to `/test` in your oCIS home folder.
### Sync to the WebDAV remote
``` bash
rclone sync :local:/tmp :webdav:/test
```
If your oCIS doesn't use valid SSL certificates, you may need to use `rclone --no-check-certificate sync ...`.
@@ -0,0 +1,66 @@
---
title: WebDAV with OpenID Connect
date: 2021-11-17T00:00:00+00:00
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/clients/rclone
geekdocFilePath: webdav-sync-oidc.md
geekdocCollapseSection: true
---
## WebDAV with OpenID Connect
Rclone itself is not able to open and maintain an OpenID Connect session. But it is able to still use OpenID Connect for authentication by leveraging a so called OIDC-agent.
### Setting up the OIDC-agent
You need to install the [OIDC-agent](https://github.com/indigo-dc/oidc-agent) from your OS' package repository (e.g. [Debian](https://github.com/indigo-dc/oidc-agent#debian-packages) or [MacOS](https://github.com/indigo-dc/oidc-agent#debian-packages)).
### Configuring the OIDC-agent
Run the following command to add a OpenID Connect profile to your OIDC-agent. It will open the login page of OpenID Connect identity provider where you need to log in if you don't have an active session.
``` bash
oidc-gen \
--client-id=oidc-agent \
--client-secret="" \
--pub \
--issuer https://ocis.owncloud.test \
--redirect-uri=http://localhost:12345 \
--scope max \
einstein-ocis-owncloud-test
```
If you have dynamic client registration enabled on your OpenID Connect identity provider, you can skip the `--client-id`, `--client-secret` and `--pub` options.
If you're using a dedicated OpenID Connect client for the OIDC-agent, we recommend a public one with the following two redirect URIs: `http://127.0.0.1:*` and `http://localhost:*`. Alternatively you also may use the already existing OIDC client of the ownCloud Desktop Client (`--client-id=xdXOt13JKxym1B1QcEncf2XDkLAexMBFwiT9j6EfhhHFJhs2KM9jbjTmf8JBXE69` and `--client-secret=UBntmLjC2yYCeHwsyj73Uwo9TAaecAetRwMw0xYcvNL9yRdLSUi0hUAHfvCHFeFh`, no `--pub` set)
Please also note that the OIDC-agent will listen on your localhost interface on port 12345 for the time of the initial authentication. If that port is already occupied on your machine, you can easily change that by setting the `--redirect-uri` parameter to a different value.
After a successful login or an already existing session you will be redirected to success page of the OIDC-agent.
You will now be asked for a password for your account configuration, so that your OIDC session is secured and cannot be used by other people with access to your computer.
## Configure the WebDAV remote
First of all we need to set up our credentials and the WebDAV remote for Rclone. In this example we do this by setting environment variables. You might also set up a named remote or use command line options to achieve the same.
``` bash
export RCLONE_WEBDAV_VENDOR=owncloud
export RCLONE_WEBDAV_URL=https://ocis.owncloud.test/remote.php/webdav/
export RCLONE_WEBDAV_BEARER_TOKEN_COMMAND="oidc-token einstein-ocis-owncloud-test"
```
### Sync to the WebDAV remote
We now can use Rclone to sync the local folder `/tmp/test` to `/test` in your oCIS home folder.
``` bash
rclone sync :local:/tmp :webdav:/test
```
If your oCIS doesn't use valid SSL certificates, you may need to use `rclone --no-check-certificate sync ...`.
+3
View File
@@ -0,0 +1,3 @@
---
title: GRPC apis
---
+253
View File
@@ -0,0 +1,253 @@
package main
import (
"fmt"
"log"
"os"
"path/filepath"
"reflect"
"regexp"
"strings"
"text/template"
"sort"
{{- range $key, $value := .}}
pkg{{$key}} "{{$value}}"
{{- end}}
)
// ConfigField is the representation of one configuration field
type ConfigField struct {
EnvVars []string
DefaultValue string
Type string
Description string
VersionInfo string
DeprecationLink string
}
// DeprecationField holds information about deprecation
type DeprecationField struct {
DeprecationVersion string
DeprecationInfo string
DeprecationReplacement string
RemovalVersion string
}
// EnvVar holds information about one envvar
type EnvVar struct {
Name string
DefaultValue string
Type string
Description string
Services []string
}
type templateData struct {
ExtensionName string
Fields []ConfigField
Deprecations []DeprecationField
HasDeprecations bool
}
func main() {
fmt.Println("Generating adoc documentation for environment variables:")
adoc, err := os.ReadFile("../../docs/templates/ADOC.tmpl")
if err != nil {
log.Fatal(err)
}
dpr, err := os.ReadFile("../../docs/templates/ADOC_deprecation.tmpl")
if err != nil {
log.Fatal(err)
}
replacer := strings.NewReplacer(
"github.com/owncloud/ocis/v2/services/", "",
"/pkg/config/defaults", "",
)
var (
fields []ConfigField
deprecations []DeprecationField
adocFile *os.File
dprFile *os.File
)
adoctpl := template.Must(template.New("").Parse(string(adoc)))
dprtpl := template.Must(template.New("").Parse(string(dpr)))
m := map[string]interface{}{
{{- range $key, $value := .}}
"{{$value}}": *pkg{{$key}}.FullDefaultConfig(),
{{- end }}
}
targetFolder := "../../docs/services/_includes/adoc/"
all := make(map[string]EnvVar)
for pkg, conf := range m {
service := replacer.Replace(pkg)
fields, deprecations = GetAnnotatedVariables(conf)
var hasDeprecations bool
if len(deprecations) > 0 {
hasDeprecations = true
}
for _, f := range fields {
for _, e := range f.EnvVars {
if env, ok := all[e]; ok {
env.Services = append(env.Services, service)
sort.Slice(env.Services, func(i, j int) bool {
return env.Services[i] < env.Services[j]
})
all[e] = env
} else {
all[e] = EnvVar{
Name: e,
Description: f.Description,
Type: f.Type,
DefaultValue: f.DefaultValue,
Services: []string{service},
}
}
}
}
if len(fields) > 0 || len(deprecations) > 0 {
fmt.Printf("... %s\n", pkg)
td := templateData{
ExtensionName: service,
Fields: fields,
Deprecations: deprecations,
HasDeprecations: hasDeprecations ,
}
adocFile, err = os.Create(filepath.Join(targetFolder, service + "_configvars.adoc"))
if err != nil {
log.Fatalf("Failed to create target file: %s", err)
}
defer adocFile.Close()
if err := adoctpl.Execute(adocFile, td); err != nil {
log.Fatalf("Failed to execute template: %s", err)
}
dprFile, err = os.Create(filepath.Join(targetFolder, service + "_deprecation.adoc"))
if err != nil {
log.Fatalf("Failed to create target file: %s", err)
}
defer dprFile.Close()
if err := dprtpl.Execute(dprFile, td); err != nil {
log.Fatalf("Failed to execute template: %s", err)
}
}
}
// render global env vars
tmplValues := make([]map[string]interface{}, 0)
for _, env := range all {
if len(env.Services) > 1 {
tmplValues = append(tmplValues, map[string]interface{}{
"Name": env.Name,
"Services": env.Services,
"Description": env.Description,
"DefaultValue": env.DefaultValue,
"Type": env.Type,
})
}
}
// sort
sort.Slice(tmplValues, func(i, j int) bool {
return tmplValues[i]["Name"].(string) < tmplValues[j]["Name"].(string)
})
glc, err := os.ReadFile("../../docs/templates/ADOC_global.tmpl")
if err != nil {
log.Fatal(err)
}
gltpl := template.Must(template.New("").Parse(string(glc)))
glfile, err := os.Create(filepath.Join(targetFolder, "global_configvars.adoc"))
if err != nil {
log.Fatalf("Failed to create target file: %s", err)
}
if err := gltpl.Execute(glfile, tmplValues); err != nil {
log.Printf("Failed to execute template: %s", err)
}
fmt.Println("done")
}
func GetAnnotatedVariables(s interface{}) ([]ConfigField, []DeprecationField) {
t := reflect.TypeOf(s)
v := reflect.ValueOf(s)
var fields []ConfigField
var deprecations []DeprecationField
for i := 0; i < t.NumField(); i++ {
field := t.Field(i)
value := v.Field(i)
switch value.Kind() {
default:
desc := field.Tag.Get("desc")
env, ok := field.Tag.Lookup("env")
deprecationLink := ""
if !ok {
continue
}
deprecationVersion, _ := field.Tag.Lookup("deprecationVersion")
removalVersion, _ := field.Tag.Lookup("removalVersion")
deprecationInfo, _ := field.Tag.Lookup("deprecationInfo")
deprecationReplacement, _ := field.Tag.Lookup("deprecationReplacement")
if deprecationVersion != "" ||
removalVersion != "" ||
deprecationInfo != "" ||
deprecationReplacement != "" {
deprecationLink = "xref:deprecation-note[Deprecation Note]"
}
v := fmt.Sprintf("%v", value.Interface())
td := strings.Split(env, ";")
// re := regexp.MustCompile(`^(https?:\/\/)`)
// v = re.ReplaceAllString(v,"\\$1")
re := regexp.MustCompile(`(https?:\/\/)`)
desc = re.ReplaceAllString(desc, "\\$1")
re = regexp.MustCompile(`(\|)`)
v = re.ReplaceAllString(v, "\\$1")
typeName := value.Type().Name()
if typeName == "" {
typeName = value.Type().String()
}
fields = append(fields,
ConfigField{
EnvVars: td,
DefaultValue: v,
Description: desc,
Type: typeName,
DeprecationLink: deprecationLink,
})
if deprecationLink != "" {
deprecations = append(deprecations,
DeprecationField{
DeprecationVersion: deprecationVersion,
DeprecationInfo: deprecationInfo,
DeprecationReplacement: deprecationReplacement,
RemovalVersion: removalVersion,
})
}
case reflect.Ptr:
// PolicySelectors in the Proxy are being skipped atm
// they are not configurable via env vars, if that changes
// they are probably added to the Sanitize() function
// and this should not be an issue then
if !value.IsZero() && value.Elem().CanInterface() {
f, d := GetAnnotatedVariables(value.Elem().Interface())
fields = append(fields, f...)
deprecations = append(deprecations, d...)
}
case reflect.Struct:
f, d := GetAnnotatedVariables(value.Interface())
fields = append(fields, f...)
deprecations = append(deprecations, d...)
}
}
return fields, deprecations
}
+74
View File
@@ -0,0 +1,74 @@
package main
import (
"fmt"
"log"
"os"
"os/exec"
"path"
"path/filepath"
"strings"
"text/template"
)
var targets = map[string]string{
"adoc-generator.go.tmpl": "output/adoc/adoc-generator.go",
"example-config-generator.go.tmpl": "output/exampleconfig/example-config-generator.go",
"environment-variable-docs-generator.go.tmpl": "output/env/environment-variable-docs-generator.go",
}
// RenderTemplates does something with templates
func RenderTemplates() {
fmt.Println("Getting relevant packages")
paths, err := filepath.Glob("../../services/*/pkg/config/defaults/defaultconfig.go")
if err != nil {
log.Fatal(err)
}
replacer := strings.NewReplacer(
"../../", "github.com/owncloud/ocis/v2/",
"/defaultconfig.go", "",
)
for i := range paths {
paths[i] = replacer.Replace(paths[i])
}
for template, output := range targets {
generateIntermediateCode(template, output, paths)
runIntermediateCode(output)
}
fmt.Println("Cleaning up")
os.RemoveAll("output")
}
func generateIntermediateCode(templatePath string, intermediateCodePath string, paths []string) {
content, err := os.ReadFile(templatePath)
if err != nil {
log.Fatal(err)
}
fmt.Println("Generating intermediate go code for " + intermediateCodePath + " using template " + templatePath)
tpl := template.Must(template.New("").Parse(string(content)))
err = os.MkdirAll(path.Dir(intermediateCodePath), 0700)
if err != nil {
log.Fatal(err)
}
runner, err := os.Create(intermediateCodePath)
if err != nil {
log.Fatal(err)
}
err = tpl.Execute(runner, paths)
if err != nil {
log.Fatal(err)
}
}
func runIntermediateCode(intermediateCodePath string) {
fmt.Println("Running intermediate go code for " + intermediateCodePath)
defaultPath := "~/.ocis"
os.Setenv("OCIS_BASE_DATA_PATH", defaultPath)
os.Setenv("OCIS_CONFIG_DIR", path.Join(defaultPath, "config"))
out, err := exec.Command("go", "run", intermediateCodePath).Output()
if err != nil {
log.Fatal(err)
}
fmt.Println(string(out))
}
@@ -0,0 +1,97 @@
package main
import (
"fmt"
"html"
"log"
"os"
"path/filepath"
"reflect"
"strings"
"text/template"
{{- range $key, $value := .}}
pkg{{$key}} "{{$value}}"
{{- end}})
type ConfigField struct {
Name string
DefaultValue string
Type string
Description string
}
func main() {
fmt.Println("Generating documentation for environment variables:")
content, err := os.ReadFile("../../docs/templates/CONFIGURATION.tmpl")
if err != nil {
log.Fatal(err)
}
replacer := strings.NewReplacer(
"github.com/owncloud/ocis/v2/services/", "",
"/pkg/config/defaults", "",
)
var fields []ConfigField
var targetFile *os.File
tpl := template.Must(template.New("").Parse(string(content)))
m := map[string]interface{}{
{{- range $key, $value := .}}
"{{$value}}": *pkg{{$key}}.FullDefaultConfig(),
{{- end }}
}
targetFolder := "../../docs/services/_includes/"
for pkg, conf := range m {
fields = GetAnnotatedVariables(conf)
if len(fields) > 0 {
fmt.Printf("... %s\n", pkg)
targetFile, err = os.Create(filepath.Join(targetFolder, replacer.Replace(pkg) + "_configvars.md"))
if err != nil {
log.Fatalf("Failed to create target file: %s", err)
}
defer targetFile.Close()
if err := tpl.Execute(targetFile, fields); err != nil {
log.Fatalf("Failed to execute template: %s", err)
}
}
}
fmt.Println("done")
}
func GetAnnotatedVariables(s interface{}) []ConfigField {
t := reflect.TypeOf(s)
v := reflect.ValueOf(s)
var fields []ConfigField
for i := 0; i < t.NumField(); i++ {
field := t.Field(i)
value := v.Field(i)
switch value.Kind() {
default:
desc := field.Tag.Get("desc")
env, ok := field.Tag.Lookup("env")
if !ok {
continue
}
v := fmt.Sprintf("%v", value.Interface())
typeName := value.Type().Name()
if typeName == "" {
typeName = value.Type().String()
}
fields = append(fields, ConfigField{Name: strings.ReplaceAll(env, ";", "<br/>"), DefaultValue: html.EscapeString(strings.Replace(v, "|", "\\|", -1)), Description: desc, Type: typeName})
case reflect.Ptr:
// PolicySelectors in the Proxy are being skipped atm
// they are not configurable via env vars, if that changes
// they are probably added to the Sanitize() function
// and this should not be an issue then
if !value.IsZero() && value.Elem().CanInterface() {
fields = append(fields, GetAnnotatedVariables(value.Elem().Interface())...)
}
case reflect.Struct:
fields = append(fields, GetAnnotatedVariables(value.Interface())...)
}
}
return fields
}
@@ -0,0 +1,50 @@
package main
import (
"fmt"
"log"
"os"
"path/filepath"
"strings"
"gopkg.in/yaml.v2"
{{- range $key, $value := .}}
pkg{{$key}} "{{$value}}"
{{- end}}
)
func main() {
replacer := strings.NewReplacer(
"github.com/owncloud/ocis/v2/services/", "",
"/pkg/config/defaults", "",
)
cfg := map[string]string{
{{- range $key, $value := .}}
replacer.Replace("{{$value}}"): func() string {
fmt.Println("Generating example YAML config for {{ $value -}}")
c := pkg{{$key}}.FullDefaultConfig()
yml, err := yaml.Marshal(c)
if err != nil {
log.Fatalf("Marshalling yaml for pkg0 failed: %s\n", err)
}
return fmt.Sprintf("# Autogenerated\n# Filename: %s-config-example.yaml\n\n%s", replacer.Replace("{{ $value }}"),string(yml))
}(),
{{- end}}
}
for pkg, yml := range cfg {
targetFolders := []string{
// TODO: comment in when it is clear how to commit this to the structure of the master|main branch
// filepath.Join("../../", pkg, "/config"),
"../../docs/services/_includes/",
}
for _, targetFolder := range targetFolders {
os.MkdirAll(targetFolder, 0700)
targetYamlFile, err := os.Create(filepath.Join(targetFolder, replacer.Replace(pkg) + "-config-example.yaml"))
if err != nil {
log.Fatalf("Failed to create target file for : %s", err)
}
defer targetYamlFile.Close()
targetYamlFile.WriteString(yml)
}
}
}
+177
View File
@@ -0,0 +1,177 @@
package main
import (
"fmt"
"io/ioutil"
"log"
"os"
"os/exec"
"path/filepath"
"regexp"
"sort"
"strings"
"text/template"
"gopkg.in/yaml.v2"
)
const yamlSource = "extended_vars.yaml"
// ConfigVars is the main yaml source
type ConfigVars struct {
Variables []Variable `yaml:"variables"`
}
// Variable contains all information about one rogue envvar
type Variable struct {
// These field structs are automatically filled:
// RawName can be the name of the envvar or the name of its var
RawName string `yaml:"rawname"`
// Path to the envvar with linenumber
Path string `yaml:"path"`
// FoundInCode indicates if the variable is still found in the codebase. TODO: delete immediately?
FoundInCode bool `yaml:"foundincode"`
// Name is equal to RawName but will not be overwritten in consecutive runs
Name string `yaml:"name"`
// These field structs need manual filling:
// Type of the envvar
Type string `yaml:"type"`
// DefaultValue of the envvar
DefaultValue string `yaml:"default_value"`
// Description of what this envvar does
Description string `yaml:"description"`
// Ignore this envvar when creating docs?
Ignore bool `yaml:"do_ignore"`
// For simplicity ignored for now:
// DependendServices []Service `yaml:"dependend_services"`
}
// GetRogueEnvs extracts the rogue envs from the code
func GetRogueEnvs() {
curdir, err := os.Getwd()
if err != nil {
log.Fatal(err)
}
fullYamlPath := filepath.Join(curdir, yamlSource)
re := regexp.MustCompile(`os.Getenv\(([^\)]+)\)`)
vars := &ConfigVars{}
fmt.Printf("Reading existing variable definitions from %s\n", fullYamlPath)
yfile, err := ioutil.ReadFile(fullYamlPath)
if err == nil {
err := yaml.Unmarshal(yfile, &vars)
if err != nil {
log.Fatal(err)
}
}
if err := os.Chdir("../../"); err != nil {
log.Fatal(err)
}
fmt.Println("Gathering variable definitions from source")
out, err := exec.Command("sh", "-c", "grep -RHn os.Getenv | grep -v extendedEnv.go |grep \\.go").Output()
if err != nil {
log.Fatal(err)
}
lines := strings.Split(string(out), "\n")
// find current vars
currentVars := make(map[string]Variable)
for _, l := range lines {
fmt.Printf("Parsing %s\n", l)
r := strings.SplitN(l, ":\t", 2)
if len(r) != 2 || r[0] == "" || r[1] == "" {
continue
}
res := re.FindAllSubmatch([]byte(r[1]), -1)
if len(res) != 1 || len(res[0]) < 2 {
fmt.Printf("Error envvar not matching pattern: %s", r[1])
continue
}
path := r[0]
name := strings.Trim(string(res[0][1]), "\"")
currentVars[path+name] = Variable{
RawName: name,
Path: path,
FoundInCode: true,
Name: name,
}
}
// adjust existing vars
for i, v := range vars.Variables {
_, ok := currentVars[v.Path+v.RawName]
if !ok {
vars.Variables[i].FoundInCode = false
continue
}
vars.Variables[i].FoundInCode = true
delete(currentVars, v.Path+v.RawName)
}
// add new envvars
for _, v := range currentVars {
vars.Variables = append(vars.Variables, v)
}
less := func(i, j int) bool {
return vars.Variables[i].Name < vars.Variables[j].Name
}
sort.Slice(vars.Variables, less)
output, err := yaml.Marshal(vars)
if err != nil {
log.Fatal(err)
}
fmt.Printf("Writing new variable definitions to %s\n", fullYamlPath)
err = ioutil.WriteFile(fullYamlPath, output, 0666)
if err != nil {
log.Fatalf("could not write %s", fullYamlPath)
}
if err := os.Chdir(curdir); err != nil {
log.Fatal(err)
}
}
// RenderGlobalVarsTemplate renders the global vars template
func RenderGlobalVarsTemplate() {
curdir, err := os.Getwd()
if err != nil {
log.Fatal(err)
}
fullYamlPath := filepath.Join(curdir, yamlSource)
content, err := ioutil.ReadFile("../../docs/templates/ADOC_extended.tmpl")
if err != nil {
log.Fatal(err)
}
targetFolder := "../../docs/services/_includes/adoc/"
vars := &ConfigVars{}
fmt.Printf("Reading existing variable definitions from %s\n", fullYamlPath)
yfile, err := ioutil.ReadFile(fullYamlPath)
if err != nil {
log.Fatal(err)
}
err = yaml.Unmarshal(yfile, &vars)
if err != nil {
log.Fatal(err)
}
targetFile, err := os.Create(filepath.Join(targetFolder, "extended_configvars.adoc"))
if err != nil {
log.Fatalf("Failed to create target file: %s", err)
}
defer targetFile.Close()
tpl := template.Must(template.New("").Parse(string(content)))
if err = tpl.Execute(targetFile, *vars); err != nil {
log.Fatalf("Failed to execute template: %s", err)
}
}
+82
View File
@@ -0,0 +1,82 @@
variables:
- rawname: CS3_GATEWAY
path: services/idp/pkg/backends/cs3/bootstrap/cs3.go:76
foundincode: true
name: CS3_GATEWAY
type: ""
default_value: ""
description: ""
do_ignore: true
- rawname: CS3_MACHINE_AUTH_API_KEY
path: services/idp/pkg/backends/cs3/bootstrap/cs3.go:77
foundincode: true
name: CS3_MACHINE_AUTH_API_KEY
type: ""
default_value: ""
description: ""
do_ignore: true
- rawname: MICRO_LOG_LEVEL
path: ocis-pkg/log/log.go:34
foundincode: true
name: MICRO_LOG_LEVEL
type: string
default_value: Error
description: Set the log level for the internal go micro framework. Only change
on supervision of ownCloud Support.
do_ignore: false
- rawname: MICRO_LOG_LEVEL
path: ocis-pkg/log/log.go:30
foundincode: true
name: MICRO_LOG_LEVEL
type: ""
default_value: ""
description: ""
do_ignore: true
- rawname: registryEnv
path: ocis-pkg/registry/registry.go:44
foundincode: true
name: MICRO_REGISTRY
type: string
default_value: ""
description: 'Go micro registry type to use. Supported types are: ''nats'', ''kubernetes'',
''etcd'', ''consul'' and ''memory''. Will be selected automatically. Only change
on supervision of ownCloud Support.'
do_ignore: false
- rawname: registryAddressEnv
path: ocis-pkg/registry/registry.go:42
foundincode: true
name: MICRO_REGISTRY_ADDRESS
type: string
default_value: ""
description: The bind address of the internal go micro framework. Only change on
supervision of ownCloud Support.
do_ignore: false
- rawname: OCIS_BASE_DATA_PATH
path: ocis-pkg/config/defaults/paths.go:23
foundincode: true
name: OCIS_BASE_DATA_PATH
type: string
default_value: '''/var/lib/ocis'' or ''$HOME/.ocis/'''
description: The base directory location used by several services and for user data.
Predefined to '/var/lib/ocis' for container images (inside the container) or '$HOME/.ocis/'
for binary releases. Services can have, if available, an individual setting with
an own environment variable.
do_ignore: false
- rawname: OCIS_CONFIG_DIR
path: ocis-pkg/config/defaults/paths.go:56
foundincode: true
name: OCIS_CONFIG_DIR
type: string
default_value: '''/etc/ocis'' or ''$HOME/.ocis/config'''
description: The default directory location for config files. Predefined to '/etc/ocis'
for container images (inside the container) or '$HOME/.ocis/config' for binary
releases.
do_ignore: false
- rawname: parts[0]
path: ocis-pkg/config/envdecode/envdecode.go:382
foundincode: true
name: parts[0]
type: ""
default_value: ""
description: false positive - code that extract envvars for config structs
do_ignore: true
+7
View File
@@ -0,0 +1,7 @@
package main
func main() {
RenderTemplates()
GetRogueEnvs()
RenderGlobalVarsTemplate()
}
+66
View File
@@ -0,0 +1,66 @@
---
title: "oCIS - ownCloud Infinite Scale"
date: 2020-02-27T20:35:00+01:00
weight: -10
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs
geekdocFilePath: _index.md
---
{{< figure class="floatright" src="/media/is.png" width="70%" height="auto" >}}
## ownCloud Infinite Scale
Welcome to oCIS, the modern file-sync and share platform, which is based on our knowledge and experience with the PHP based [ownCloud server](https://owncloud.com/#server).
### The idea of federated storage
To create a truly federated storage architecture oCIS breaks down the old ownCloud 10 user specific namespace, which is assembled on the server side, and makes the individual parts accessible to clients as storage spaces and storage space registries.
The diagram below shows the core concepts that are the foundation for the new architecture:
- End user devices can fetch the list of *storage spaces* a user has access to, by querying one or multiple *storage space registries*. The list contains a unique endpoint for every *storage space*.
- [*Storage space registries*]({{< ref "./storage/terminology#storage-space-registries" >}}) manage the list of storage spaces a user has access to. They may subscribe to *storage spaces* in order to receive notifications about changes on behalf of an end users mobile or desktop client.
- [*Storage spaces*]({{< ref "./storage/terminology#storage-spaces" >}}) represent a collection of files and folders. A users personal files are contained in a *storage space*, a group or project drive is a *storage space*, and even incoming shares are treated and implemented as *storage spaces*. Each with properties like owners, permissions, quota and type.
- [*Storage providers*]({{< ref "./storage/terminology#storage-providers" >}}) can hold multiple *storage spaces*. At an oCIS instance, there might be a dedicated *storage provider* responsible for users personal storage spaces. There might be multiple, either to shard the load, provide different levels of redundancy or support custom workflows. Or there might be just one, hosting all types of *storage spaces*.
{{< figure src="/ocis/static/idea.drawio.svg" >}}
As an example, Einstein might want to share something with Marie, who has an account at a different identity provider and uses a different storage space registry. The process makes use of [OpenID Connect (OIDC)](https://openid.net/specs/openid-connect-core-1_0.html) for authentication and would look something like this:
To share something with Marie, Einstein would open `https://cloud.zurich.test`. His browser loads oCIS web and presents a login form that uses the [OpenID Connect Discovery](https://openid.net/specs/openid-connect-discovery-1_0.html#EmailSyntax) to look up the OIDC issuer. For `einstein@zurich.test` he will end up at `https://idp.zurich.test`, authenticate and get redirected back to `https://cloud.zurich.test`. Now, oCIS web will use a similar discovery to look up the *storage space registry* for the account, based on the email (or username). He will discover that `https://cloud.zurich.test` is also his *storage registry* that the web UI will use to load the list of *storage spaces* that are available to him.
After locating a folder that he wants to share with Marie he enters her email `marie@paris.test` in the sharing dialog to grant her the editor role. This, in effect, creates a new *storage space* that is registered with the *storage space registry* at `https://cloud.zurich.test`.
Einstein copies the URL in the browser (or an email with the same URL is sent automatically, or the storage registries use a back-channel mechanism). It contains the most specific `storage space id` and a path relative to it: `https://cloud.zurich.test/#/spaces/716199a6-00c0-4fec-93d2-7e00150b1c84/a/rel/path`.
When Marie enters that URL she will be presented with a login form on the `https://cloud.zurich.test` instance, because the share was created on that domain. If `https://cloud.zurich.test` trusts her OpenID Connect identity provider `https://idp.paris.test` she can log in. This time, the *storage space registry* discovery will come up with `https://cloud.paris.test` though. Since that registry is different than the registry tied to `https://cloud.zurich.test` oCIS web can look up the *storage space* `716199a6-00c0-4fec-93d2-7e00150b1c84` and register the WebDAV URL `https://cloud.zurich.test/dav/spaces/716199a6-00c0-4fec-93d2-7e00150b1c84/a/rel/path` in Marie's *storage space registry* at `https://cloud.paris.test`. When she accepts that share her clients will be able to sync the new *storage space* at `https://cloud.zurich.test`.
### oCIS microservice runtime
The oCIS runtime allows us to dynamically manage services running in a single process. We use [suture](https://github.com/thejerf/suture) to create a supervisor tree that starts each service in a dedicated goroutine. By default oCIS will start all built-in oCIS extensions in a single process. Individual services can be moved to other nodes to scale-out and meet specific performance requirements. A [go-micro](https://github.com/asim/go-micro/blob/master/registry/registry.go) based registry allows services in multiple nodes to form a distributed microservice architecture.
### oCIS extensions
Every oCIS extension uses [ocis-pkg](https://github.com/owncloud/ocis/tree/master/ocis-pkg), which implements the [go-micro](https://go-micro.dev/) interfaces for [servers](https://github.com/asim/go-micro/blob/v3.5.0/server/server.go#L17-L37) to register and [clients](https://github.com/asim/go-micro/blob/v3.5.0/client/client.go#L11-L23) to lookup nodes with a service [registry](https://github.com/asim/go-micro/blob/v3.5.0/registry/registry.go).
We are following the [12 Factor](https://12factor.net/) methodology with oCIS. The uniformity of services also allows us to use the same command, logging and configuration mechanism. Configurations are forwarded from the
oCIS runtime to the individual extensions.
### go-micro
While the [go-micro](https://go-micro.dev/) framework provides abstractions as well as implementations for the different components in a microservice architecture, it uses a more developer focused runtime philosophy: It is used to download services from a repo, compile them on the fly and start them as individual processes. For oCIS we decided to use a more admin friendly runtime: You can download a single binary and start the contained oCIS extensions with a single `bin/ocis server`. This also makes packaging easier.
We use [ocis-pkg](https://github.com/owncloud/ocis/tree/master/ocis-pkg) to configure the default implementations for the go-micro [grpc server](https://github.com/asim/go-micro/tree/v3.5.0/plugins/server/grpc), [client](https://github.com/asim/go-micro/tree/v3.5.0/plugins/client/grpc) and [mdns registry](https://github.com/asim/go-micro/blob/v3.5.0/registry/mdns_registry.go), swapping them out as needed, e.g. to use the [kubernetes registry plugin](https://github.com/asim/go-micro/tree/v3.5.0/plugins/registry/kubernetes).
### REVA
A lot of embedded services in oCIS are built upon the [REVA](https://reva.link/) runtime. We decided to bundle some of the [CS3 services](https://github.com/cs3org/cs3apis) to logically group them. A [home storage provider](https://github.com/owncloud/ocis/blob/v1.2.0/storage/pkg/command/storagehome.go#L93-L108), which is dealing with [metadata](https://cs3org.github.io/cs3apis/#cs3.storage.provider.v1beta1.ProviderAPI), and the corresponding [data provider](https://github.com/owncloud/ocis/blob/v1.2.0/storage/pkg/command/storagehome.go#L109-L123), which is dealing with [up and download](https://cs3org.github.io/cs3apis/#cs3.gateway.v1beta1.FileUploadProtocol), are one example. The [frontend](https://github.com/owncloud/ocis/blob/v1.2.0/storage/pkg/command/frontend.go) with the [oc flavoured webdav](https://github.com/owncloud/ocis/blob/v1.2.0/storage/pkg/command/frontend.go#L132-L138), [ocs handlers](https://github.com/owncloud/ocis/blob/v1.2.0/storage/pkg/command/frontend.go#L139-L148) and a [data-gateway](https://github.com/owncloud/ocis/blob/v1.2.0/storage/pkg/command/frontend.go#L126-L131) are another.
### Protocol driven development
Interacting with oCIS involves a multitude af APIs. The server and all clients rely on [OpenID Connect](https://openid.net/connect/) for authentication. The [embedded LibreGraph Connect](https://github.com/owncloud/ocis/tree/master/idp) can be replaced with any other OpenID Connect Identity Provider. Clients use the [WebDAV](http://webdav.org/) based [oc sync protocol](https://github.com/cernbox/smashbox/blob/master/protocol/protocol.md) to manage files and folders, [ocs to manage shares](https://doc.owncloud.com/server/developer_manual/core/apis/ocs-share-api.html) and [TUS](https://tus.io/protocols/resumable-upload.html) to upload files in a resumable way. On the server side [REVA](https://reva.link/) is the reference implementation of the [CS3 apis](https://github.com/cs3org/cs3apis) which is defined using [protobuf](https://developers.google.com/protocol-buffers/). By embedding [libregraph/idm](https://github.com/libregraph/idm), oCIS provides a [LDAP](https://tools.ietf.org/html/rfc2849) interface to make accounts, including guests available to firewalls and other systems. In the future, we are looking into [the Microsoft Graph API](https://docs.microsoft.com/en-us/graph/api/overview?view=graph-rest-1.0), which is based on [odata](http://docs.oasis-open.org/odata/odata/v4.0/odata-v4.0-part1-protocol.html), as a well-defined REST/JSON dialect for the existing endpoints.
### Acceptance test suite
We run a huge [test suite](https://github.com/owncloud/core/tree/master/tests), which originated in ownCloud 10 and continues to grow. A detailed description can be found in the developer docs for [testing]({{< ref "development/testing" >}}).
### Architecture Overview
Running `bin/ocis server` will start the following services, all of which can be scaled and deployed on a single node or in a cloud native environment, as needed.
{{< figure src="/ocis/static/architecture-overview.drawio.svg" >}}
@@ -0,0 +1,50 @@
---
title: "1. Introduce an accounts service"
weight: 1
date: 2020-06-15T20:21:00+01:00
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/adr
geekdocFilePath: 0001-introduce-accounts-service.md
---
* Status: superseded by [ADR-0003]({{< ref "0003-external-user-management.md" >}})
* Deciders: @butonic, @felixboehm, @micbar, @pmaier1
* Date: [2020-06-15](https://github.com/owncloud/ocis-accounts/pull/34/commits/2fd05e2b6fe2a47c687bd0c0bc5e1b5c48a585b2)
Technical Story: [persist accounts](https://github.com/owncloud/ocis-accounts/pull/34)
## Context and Problem Statement
To attach metadata like shares to users ownCloud relies on persistent, non-reassignable, unique identifiers for users (and files). Email und username can change when a user changes his name. But even the OIDC sub+iss combination may change when the IdP changes. While there is [an account porting protocol](https://openid.net/specs/openid-connect-account-porting-1_0.html) that describes how a relying party (RP) such as ownCloud should behave, it still requires the RP to maintain its own user identifiers.
## Decision Drivers
* oCIS should be a single binary that can run out of the box without external dependencies like an LDAP server.
* Time: we want to build a release candidate asap.
* Firewalls need access to guests, typically via LDAP.
* Not all external LDAPs are writeable for us to provision Guest accounts.
* We see multiple LDAP servers in deployments. Being able to handle them is important and should be covered by using OIDC + being able to query multiple LDAP servers.
## Considered Options
* Accounts service wraps LDAP
* [GLAuth](https://github.com/glauth/glauth) wraps accounts service
## Decision Outcome
Chosen option: "GLAuth wraps accounts service", because we need write access to provision guest accounts and GLAuth currently has no write support.
### Positive Consequences
* We can build a self-contained user management in the accounts service and can adjust it to our requirements.
* We do not rely on an LDAP server which would only be possible by implementing write support in the LDAP libraries used by GLAuth (hard to estimate effort, when will that be merged upstream).
### Negative Consequences
* We need to spend time on implementing user management
## Pros and Cons of the Options
### Accounts service wraps LDAP
* Bad, because not all external LDAPs are writeable for us to provision Guest accounts.
@@ -0,0 +1,36 @@
---
title: "2. Persist accounts in a CS3 storage"
weight: 2
date: 2020-08-21T20:21:00+01:00
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/adr
geekdocFilePath: 0002-persist-accounts-using-cs3-storage.md
---
* Status: accepted
* Deciders: @butonic, @felixboehm
* Date: 2020-08-21
Technical Story: [File system based indexing](https://github.com/owncloud/ocis-accounts/pull/92)
## Context and Problem Statement
To set up High Availability (HA) or a geo-replicated setup we need to persist accounts in a distributed way. To efficiently query the accounts by email or username, and not only by id, they need to be indexed. Unfortunately, the [bleve](https://github.com/blevesearch/bleve) index we currently store locally on disk cannot be shared by multiple instances, preventing a scale out deployment.
## Considered Options
* Look into distributed bleve
* Persist users in a CS3 storage
## Decision Outcome
Chosen option: "Persist users in a CS3 storage", because we have one service less running and can rely on the filesystem for geo-replication and HA.
### Positive Consequences
* We can store accounts on the storage using the CS3 API, pushing geo-distribution to the storage layer.
* Backups of users and storage can be implemented without inconsistencies between using snapshots.
### Negative Consequences
* We need to spend time on implementing a reverse index based on files, and symlinks.
@@ -0,0 +1,115 @@
---
title: "3. Use external User Management"
weight: 3
date: 2020-12-09T20:21:00+01:00
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/adr
geekdocFilePath: 0003-external-user-management.md
---
* Status: superseded by [17. Allow read only external User Management]({{< ref "0017-allow-read-only-external-user-management.md" >}})
* Deciders: @butonic, @micbar, @dragotin, @hodyroff, @pmaier1
* Date: 2022-02-08
Technical Story: [Skip account-service by talking to CS3 user-api](https://github.com/owncloud/ocis/pull/1020)
## Context and Problem Statement
To attach metadata like shares to users ownCloud relies on persistent, non-reassignable, unique identifiers for users (and files). Email and username can change when a user changes his name. But even the OIDC sub+iss combination may change when the IdP changes. While there is [an account porting protocol](https://openid.net/specs/openid-connect-account-porting-1_0.html) that describes how a relying party (RP) such as ownCloud should behave, it still requires the RP to maintain its own user identifiers.
## Decision Drivers
* oCIS should be a single binary that can run out of the box without external dependencies like an LDAP server.
* Time: we want to build a release candidate asap.
* oCIS should be able to be easily integrated with standard user management components
## Considered Options
* Accounts service wraps LDAP
* [GLAuth](https://github.com/glauth/glauth) wraps accounts service
## Decision Outcome
Chosen option: "Move accounts functionality to GLAuth and name it accounts", by moving the existing accounts service file based persistence to GLAuth and use it as a drop in replacement for an LDAP server. The reverse index and web UI existing in the accounts service will move as well in order to make GLAuth a standalone, small scale user management with write capabilities.
### Product summary
- GLAuth is a drop in user management for small scale deployments that do not rely on an actual LDAP server.
- oCIS admins can either use the web UI to manage users in GLAuth or use existing tools in their IDM.
- We hide the complexity by embedding an OpenID Provider, an LDAP server and a user management web UI.
### Resulting deployment options
- Use internal user management
- Recommended for small scale use cases and simple deployments
- Users, groups and roles are stored and managed within GLAuth
- Use external user management
- Recommended for mid and large scale use cases
- Users, groups and roles are stored and managed within an external LDAP / AD / IDM
- Separate oCIS and LDAP admin: oCIS admin relies on the LDAP admin to manage users
- User permissions for roles are always managed in oCIS (settings service) because they are specific to oCIS
### Resulting technical implications
- Make the file based reverse index a standalone library
- Contribute to GLAuth
- Add ms graph based rest API to manage users, groups and roles (the LDAP lib is currently readonly)
- Add web UI to glauth that uses the ms graph based rest API to manage users
- Add a backend that uses the file based reverse index, currently living in the oCIS accounts service
- Move fallback mechanism from ocis/glauth service to upstream GLAuth to support multiple LDAP servers
- Make it a chain to support more than two LDAP servers
- Document the implications for merging result sets when searching for recipients
- At least one writeable backend is needed to support creating guest accounts
- Make all services currently using the accounts service talk to the CS3 userprovider
- To support multiple LDAP servers we need to move the fallback mechanism in ocis/glauth service to upstream GLAuth
- The current CS3 API for user management should be enriched with pagination, field mask and a query language as needed
- properly register an [auxiliary LDAP schema that adds an ownCloudUUID attribute to users and groups](https://github.com/owncloud/ocis/blob/c8668e8cb171860c70fec29e5ae945bca44f1fb7/deployments/examples/cs3_users_ocis/config/ldap/ldif/10_owncloud_schema.ldif)
### Positive Consequences
* The accounts service (which is our drop in LDAP solution) can be dropped. The CS3 userprovider service becomes the only service dealing with users.
* No sync
### Negative Consequences
* If users want to store users in their IDM and at the same time guests in a separate user management we need to implement GLAuth backends that support more than one LDAP server.
## Pros and Cons of the Options
### GLAuth wraps accounts service
Currently, the accounts service is the source of truth and we use it to implement user management.
* Good, because it solves the problem of storing and looking up an owncloud UUID for a user (and group)
* Good, because we can manage users out of the box
* Good, because we can persist accounts in a CS3 storage provider
* Bad, because it maintains a separate user repository: it needs to either learn or sync users.
### Move accounts functionality to GLAuth and name it accounts
We should use an existing LDAP server and make GLAuth a drop in replacement for it.
* Good, because we can use an existing user repository (an LDAP server), no need to sync or learn users.
* Good, because admins can rely on existing user management tools.
* Good, because we would have a clear separation of concerns:
- users reside in whatever repository, typically an LDAP server
- could be an existing LDAP server or AD
- could be our embeddable drop in glauth server
- we use a service to wrap the LDAP server with other APIs:
- ms graph API - ODATA based restful API,
- [SCIM](http://www.simplecloud.info/) - designed to manage user identities, supported by some IDPs,
- the current accounts API (which is a protobuf spec following the ms graph API)
- our account management UI can use the ms graph based API service which can have different backends
- an existing LDAP server
- our drop in glauth server (which might serve the ms graph based API itself)
- the CS3 API + a future guest provisioning API + a future CS3 user provisioning API (or [generic space provisioning](https://github.com/cs3org/cs3apis/pull/95))
- all oCIS services can use the service registry to look up the accounts service that provides an internal API
- could be the CS3 user provider (and API)
- could be the internal protobuf accounts API
- introduce a new guest provisioning API to CS3 which properly captures our requirement to have them in the user repository
- guests need to be made available to the firewall
- storages like EOS that integrate with the os for acl based file permissions need a numeric user and group id
* Good, because we can use the CS3 user provider with the existing LDAP / rest driver.
* Bad, because oCIS admins may not have the rights to manage role assignments. (But this is handled at a different department.)
* Bad, because oCIS admins may not have the rights to disable users if an external LDAP is used instead of the drop in GLAuth.
## Links
* supersedes [ADR-0001]({{< ref "0001-introduce-accounts-service.md" >}})
* superseded by [17. Allow read only external User Management]({{< ref "0017-allow-read-only-external-user-management.md" >}})
@@ -0,0 +1,80 @@
---
title: "4. Support Hot Migration"
weight: 4
date: 2020-12-09T20:21:00+01:00
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/adr
geekdocFilePath: 0004-support-hot-migration.md
---
* Status: proposed
* Deciders: @butonic, @micbar, @dragotin, @hodyroff, @pmaier1
* Date: 2021-03-16
Technical Story: \[description | ticket/issue URL\]
## Context and Problem Statement
Migration is one of the most important topics of the oCIS story. We need to provide a concept how to migrate from oC10 to oCIS.
## Decision Drivers
- Do not lose file blob or metadata.
- To prevent a sync surge from clients the etag for files should be migrated.
- To prevent internal links from breaking or pointing to wrong files the file id of existing files needs to be migrated.
- To prevent data loss trash and version blobs should be migrated.
- Existing shares like public links and federated shares must remain functional after the migration.
- To prevent internal shares the share type, permissions and expiry needs to be migrated.
- To prevent public links from breaking the url token, permissions, expiry and password needs to be migrated.
- *What about federated shares?*
- *What about additional share permissions, e.g. comment on office files?*
- Legacy clients need to keep working
- To keep existing clients working the `remote.php/webdav` and `dav/files/<username>` webdav endpoints as well as the ocs API need to be available.
- *What about [app passwords/tokens](https://doc.owncloud.com/server/user_manual/personal_settings/security.html#app-passwords-tokens)?*
## Considered Options
1. Cold Migration: migrate data while systems are not online, so no user interaction happens in between.
2. Hot Migration: one or both systems are online during migration.
## Decision Outcome
Chosen option: "\[option 1\]", because \[justification. e.g., only option, which meets k.o. criterion decision driver | which resolves force force | … | comes out best (see below)\].
### Positive Consequences
- \[e.g., improvement of quality attribute satisfaction, follow-up decisions required, …\]
- …
### Negative Consequences
- \[e.g., compromising quality attribute, follow-up decisions required, …\]
- …
## Pros and Cons of the Options
### Cold Migration
The migration happens while the service is offline. File metadata, blobs and share data is exported from ownCloud 10 and imported in oCIS. This can happen user by user, where every user export would contain the file blobs, their metadata, trash, versions, shares and all metadata that belongs to the user's storage. To prevent group shares from breaking, users in the same groups must be migrated in batch. Depending on the actual group shares in an instance this may effectively require a complete migration in a single batch.
- Good, because oCIS can be tested in a staging system without writing to the production system.
- Good, because file layout on disk can be changed to support new storage driver capabilities.
- Bad, because the export and import might require significant amounts of storage.
- Bad, because a rollback to the state before the migration might cause data loss of the changes that happened in between.
- Bad, because the cold migration can mean significant downtime.
### Hot Migration
The migration happens in subsequent stages while the service is online.
- Good, because the admin can migrate users from old to new backend in a controlled way.
- Good, because users and admins can learn to trust the new system.
- Good, because there can be preparations even long before the migrations happens in parallel on the oC10 codebase, i.e. addition of metadata that is needed while the system operates.
- Good, because the downtime of the system can be fairly small.
- Bad, because it is more complex and might drag on for a long time.
## Links
- [Clarify responsibilities of share providers and storage providers · Issue #1377 · cs3org/reva (github.com)](https://github.com/cs3org/reva/issues/1377) because the share manager for oCIS should store share information on the storage system. And [storage provider should persist share creator · Issue #93 · cs3org/cs3apis (github.com)](https://github.com/cs3org/cs3apis/issues/93) finally: [eos: store share id in inherited xattr · Issue #543 · cs3org/reva (github.com)](https://github.com/cs3org/reva/issues/543)
@@ -0,0 +1,210 @@
---
title: "5. Account Management through CS3 API"
weight: 5
date: 2021-04-12T15:00:00+01:00
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/adr
geekdocFilePath: 0005-cs3-api-account-management.md
---
* Status: proposed
* Deciders: @refs, @butonic, @micbar, @dragotin, @pmaier1
* Date: 2021-04-12
Technical Story: [Write only management API for User and Group resources](https://github.com/cs3org/cs3apis/pull/119)
## Context and Problem Statement
What would be a more effective way of using network resources and handle account management within the oCIS-Reva ecosystem? Separating account management at the service level is pragmatic and allows for fast iterations, but also steadily accumulates inconsistencies and bloats technical debt.
## Decision Drivers
* Reduce number of network calls.
* Reduce number of services (merge Account + GLAuth from ADR-0003).
* Formalize account management at the API level.
## Considered Options
* Account management delegated to vendors.
* Add account management to the CS3 API.
## Decision Outcome
Chosen option: "Add account management to the CS3 API". Making the API declare an API for account management will not only allow a deployment to fail fast (as in: the management node is not running) but would also centralize all management operations that should happen to be constrained within the Reva context. Constrained operations *SHOULD* be by definition more secure, or at least as secure as the rest of the system.
### Positive Consequences
* More resilient API.
* Because account management is considered a "first class citizen" changes are forced to go through a more exhaustive revision process.
* Removing Accounts from search users<sup>1</sup>.
* Replace the provisioning API in favor of the new Reva Admin node.
(1) the current vendor implementation of searching a user (i.e: when sharing a resource) relies directly on the accounts service, since this is the only source of truth. Searching a user looks like:
```
┌────────────────────────────────────────┐
│user search (no LDAP) │
│ │
│ ┌──────────┐ │
│ │ │ │
│ │ proxy │ │
│ │ │ ┌ ─ ─ ─ ─ ─ ┐ │
│ └──────────┘ go-micro │
│ ▲ │ │ │
│ │ Λ │
│ ▼ │ ╱ ╲ │ │
│ ┌──────────┐ ╱ ╲ │
│ │ │ │ ╱ ╲ │ │
│ │ ocs │◀──(1)───▶registry▏ │
│ │ │ │ ╲ ╱ │ │
│ └──────────┘ ╲ ╱ │
│ ▲ │ ╲ ╱ │ │
│ │ V │
│ │ │ │ │
│ │ │
│ │ └ ─ ─ ─ ─ ─ ┘ │
│ │ │
│ │ │
│ │ ┌──────────┐ │
│ │ │ │ │
│ └─────────────▶│ accounts │ │
│ │ │ │
│ └──────────┘ │
│ │
│ │
│(1) ocs requests a connection to the │
│accounts service to the registry │
│ │
└────────────────────────────────────────┘
```
Whereas, as a result of ADR-0003 and this ADR, we can simplify and improve this design:
```
┌─────────────────────────────────────────────┐
│user search │
│ │
│ │
│ ┌──────────┐ │
│ │ │ │
│ │ proxy │ │
│ │ │ │
│ └──────────┘ │
│ │ │
│ ▼ │
│ ┌──────────┐ │
│ │ │ │
│ │ ocs │ │
│ │ │ │
│ └──────────┘ │
│ │ │
│ │ │
│ ┌ ─ ─ ─ ─ ─│─ ─ ─ ─ ┌ ─ ─ ─ ─ ─ ─ ─ ─ ┐ │
│ reva ▼ │ IDM │
│ │ ┌──────────┐ │ ┌──────────┐ │ │
│ │ │ │ │ │ │
│ │ │ users │◀─────┼──▶│ GLAuth │ │ │
│ │ │ │ │ │ │
│ │ └──────────┘ │ └──────────┘ │ │
│ │ │
│ └ ─ ─ ─ ─ ─ ─ ─ ─ ─ └ ─ ─ ─ ─ ─ ─ ─ ─ ┘ │
│ │
└─────────────────────────────────────────────┘
```
And instead rely on the already existing Reva users provider.
## Pros and Cons of the Options
### Account management delegated to vendors
* Good, because it allows for fast iterations.
* Bad, because account management happens outside of the Reva process. This can potentially end up in invalid account creation / deletion / updates.
* An example with the existing Accounts service is that any client can fire CRUD accounts requests to the Accounts service as long as the client knows where the server is running and provides with an Authorization header (only required by the proxy). This request totally bypasses Reva middlewares and therefore any security measures that should be enforced by the entire system.
* Bad, because leaves teams the task of designing and implementing a way of dealing with account management. Ideally one schema should be provided / suggested.
Creating an account using the first option looks currently is implemented in vendors as:
```
┌──────────────────────────────────────────────────┐
│ creating a user (webui) │
│ │
│ ┌──────────┐ │
│ │ │ │
│ │ proxy │ │
│ │ │ │
│ └──────────┘ │
│ │ │
│ │ │
│ /api/v0/accounts/accounts-create │
│ │ │
│ │ │
│ │ │
│ ▼ │
│ ┌──────────┐ │
│ │ │ │
│ │ accounts │ │
│ │ │ │
│ └──────────┘ │
│ │
│ note that while doing CRUD operations changes │
│ are instantly reflected for the IDP since out of │
│ the box oCIS uses an accounts backend for │
│ GLAuth. │
└──────────────────────────────────────────────────┘
```
As explained before, during this flow no Reva middlewares are run. Creating an account will only use the embedded accounts js file alongside a minted jwt token (by the oCIS proxy) to communicate with the accounts service.
### Add account management to the CS3 API
* Good, because it solidifies what the CS3 API can or cannot do, and account management should be handled at the API level since ultimately accounts would contain a mix of required CS3 and vendor-specific attributes.
* Good, because it centralizes account management and constrains it within the Reva boundaries.
* Good, because there is a clear separation of concerns on what is accounts management logic.
* Good, because we already designed [a similar API for the accounts service](https://github.com/owncloud/ocis/blob/master/accounts/pkg/proto/v0/accounts.proto#L42-L85) the only difference being we (vendors) [define their own messages](https://github.com/owncloud/ocis/blob/master/accounts/pkg/proto/v0/accounts.proto#L252-L408).
* The API would fully include CRUD methods
* Bad, because development cycles are larger.
* an example flow will be: `update api > run prototool > publish language specific packages > update dependencies to fetch latest version of the package > utilize the new changes`.
The new account management workflow will result in:
```
┌───────────────────────────────────────────────────┐
│creating a user (webui) │
│ - maintain the same route for compatibility │
│ │
│ ┌──────────┐ │
│ │ │ │
│ │ proxy │ │
│ │ │ │
│ └──────────┘ │
│ │ │
│ │ │
│ /api/v0/accounts/accounts-create │
│ │ │
│ │ │
│ ┌ ─ ─ ─ ─ ─│─ ─ ─ ─ ─ ─ ─ ─ ┐ ┌ ─ ─ ─ ─ ─ ─ ─ ─ │
│ Reva │ IDM │ │
│ │ │ │ │ │
│ ▼ │ │
│ │ ┌──────────┐ │ │ ┌──────────┐ │
│ │ │ │ │ │ │
│ │ │ admin │───────────┼──┼──▶│ GLAuth │ │
│ │ │ │ │ │ │
│ │ └──────────┘ │ │ └──────────┘ │
│ │ │
│ │ │ │ │
│ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ─ ┘ │
│ │
│ │
│ │
│ │
│ │
│ │
│ an example of a driver could be GLAuth │
│ implementing the user management portion of the │
│ GraphAPI │
└───────────────────────────────────────────────────┘
```
This flow allows Reva and oCIS Proxy to run any middleware logic in order to validate a request. The communication between the proposed Admin api (CS3 API messages) and the IDM (GLAuth) are specific to the _drivers_.
@@ -0,0 +1,58 @@
---
title: "6. Service Discovery within oCIS and Reva"
weight: 6
date: 2021-04-19T13:00:00+01:00
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/adr
geekdocFilePath: 0006-service-discovery.md
---
* Status: accepted
* Deciders: @refs, @butonic, @micbar, @dragotin, @pmaier1
* Date: 2021-04-19
Technical Story: [Introduce Named Services.](https://github.com/cs3org/reva/pull/1509)
## Context and Problem Statement
Reva relies heavily on config files. A known implication of this approach are having to know a-priori where a service is running (host + port). We want to move away from hardcoded values and rely instead on named services for service discovery. Furthermore, we would like both platforms (Reva + oCIS) to have the same source of truth at any given time, not having one to notify the other whenever a service status changes.
## Decision Drivers
* Avoid a-priori knowledge of services.
* Ease of scalability.
* Always up-to-date knowledge of the running services on a given deployment (a service registry doesn't have to necessarily be running on the same machine / network)
## Considered Options
* Hardcoded tuples of hostname + port
* Dynamic service registration
## Decision Outcome
Chosen option: "Dynamic service registration". There were some drawbacks regarding this due to introducing go-micro to Reva was from start an issue. Given the little usage of go-micro we need, we decided instead to define our very own [Registry interface](https://github.com/refs/reva/blob/58d013a7509d1941834e1bc814e9a9fa8bff00b1/pkg/registry/registry.go#L22-L35) on Reva and extended the runtime arguments to [allow for injecting a registry](https://github.com/refs/reva/blob/58d013a7509d1941834e1bc814e9a9fa8bff00b1/cmd/revad/runtime/option.go#L53-L58).
### Positive Consequences
* Having dynamic service registration delegates the entire lifecycle of finding a process to the service registry.
* Removing a-priori knowledge of hostname + port for services.
* Marrying go-micro's registry and a newly defined registry abstraction on Reva.
* We will embrace go-micro interfaces by defining a third merger interface in order to marry go-micro registry and reva registry.
* The ability to fetch a service node relying only on its name (i.e: com.owncloud.proxy) and not on a tuple hostname + port that we rely on being preconfigured during runtime.
* Conceptually speaking, a better framework to tie all the services together. Referring to services by names is less overall confusing than having to add a service name + where it is running. A registry is agnostic to "where is it running" because it, by definition, keeps track of this specific question, so when speaking about design or functionality, it will ease communication.
## Pros and Cons of the Options
### Hardcoded tuples of hostname + port
* Good, because firewalls are easier to configure since IP are static.
* Good, because the mental model required is easier to grasp as IP addresses can be easily bundled.
* Bad, because it requires thorough planning of ports.
### Dynamic service registration
* Good, because it abstracts the use of service lookup away to registry logic from the admin or developer.
* Good, because it allows for, through interfaces, registry injection
* This means we can have a service registry that we extensively use in oCIS and inject its functionality onto Reva.
* Bad, because it's yet another abstraction.
* Bad, because firewalls are harder to configure with dynamic IPs.f
+156
View File
@@ -0,0 +1,156 @@
---
title: "7. Open Graph API for oCIS File Spaces"
weight: 7
date: 2021-05-03T09:00:00+01:00
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/adr
geekdocFilePath: 0007-api-for-spaces.md
---
* Status: accepted
* Deciders: @butonic, @micbar, @dragotin, @hodyroff, @pmaier1
* Date: 2021-03-19
Technical Story: API to enable the concept of [Spaces](https://github.com/owncloud/enterprise/issues/3863)
## Context and Problem Statement
As one of the building blocks for Spaces in oCIS we plan to add an API that returns information about available spaces. This ADR discusses the API design oriented on the Microsoft Graph API.
> Note: The term "spaces" is used here in the context of "a space where files can be saved", similar to a directory. It is not to be confused with space in the sense of free file space for example.
The purpose of this new API is to give clients a very simple way to query the dynamic list of spaces, that the user has access to. Clients can provide a better user experience with that.
This API is supposed to be queried often, to give clients a condensed view of the available spaces for a user, but also their eTags and cTags. Hence the clients do not have to perform a PROPFIND for every space separately.
This API would even allow to provide (WebDAV-) endpoints depending on the kind and version of the client asking for it.
## Decision Drivers
- Make it easy to work with a dynamic list of spaces of a user for the clients.
- No longer the need to make assumptions about WebDAV- and other routes in clients.
- More meta data available about spaces for a better user experience.
- Part of the bigger spaces plan.
- Important to consider in client migration scenarios, i.e. in CERN.
## Considered Options
1. [Microsoft Graph API](https://developer.microsoft.com/en-us/graph) inspired API that provides the requested information.
## Decision Outcome
This the DRAFT for the API.
### API to Get Info about Spaces
ownCloud servers provide an API to query for available spaces of an user.
See the openAPI Specification for the [Libre Graph API](https://owncloud.dev/libre-graph-api/).
Most important, the API returns the WebDAV endpoint for each space. With that, clients do not have to make assumptions about WebDAV routes any more.
See [Drive item in Microsoft Graph API](https://docs.microsoft.com/en-us/graph/api/resources/onedrive?view=graph-rest-1.0) for an overview of `drive` and `driveItem` resources. The concrete list of drives / spaces a user has access to can be obtained on multiple endpoints.
### Get "Home folder"
Retrieve information about the home space of a user. Note: The user has access to more spaces. This call only returns the home space to provide API parity with the Graph API.
API Call: `/me/drive`: Returns the information about the users home folder.
### Get All Spaces of a User
Retrieve a list of available spaces of a user. This includes all spaces the user has access to at that moment, also the home space.
API Call: `/me/drives`: Returns a list of spaces.
There is also `/drives`, returning the list of spaces the user has access to. This endpoint is used to access any space by id using `/drives/{drive-id}`.
### Common Reply
The reply to both calls is either one or a list of [Drive representation objects](https://docs.microsoft.com/de-de/graph/api/resources/drive?view=graph-rest-1.0):
```
{
"id": "string",
"createdDateTime": "string (timestamp)",
"description": "string",
"driveType": "personal | projectSpaces | shares",
"lastModifiedDateTime": "string (timestamp)",
"name": "string",
"owner": { "@odata.type": "microsoft.graph.identitySet" },
"quota": { "@odata.type": "microsoft.graph.quota" },
"root": { "@odata.type": "microsoft.graph.driveItem" },
"webUrl": "url"
}
```
The meaning of the objects in Open Graph API context are:
1. **id** - a persistent and unique ID identifying the space, called Storage Space ID.
2. **driveType** - describing the type of the space.
3. **owner** - an owner object to whom the space belongs
4. **quota** - quota information about this space
5. **root** - the root driveItem object.
6. **webUrl** - The URL to make this space visible in the browser.
The following *driveType* values are available in the first step, but might be enhanced later:
* **personal**: The users home space
* **projectSpaces**: The project spaces available for the user (*)
* **shares**: The share jail, contains all shares for the user (*)
Other space types such as backup, hidden etc. can be added later as requested.
> Note: The *projectSpaces* and *shares* space are virtual spaces. They only contain other spaces, and no regular resources.
The (*) marked types are not defined in the official MS API. They are prefixed with `oc` to avoid namespace clashes.
The `root` object equals a [driveItem](https://docs.microsoft.com/de-de/graph/api/resources/driveitem?view=graph-rest-1.0) and contains information about the root resource (directory) of the space.
This is an example object as it can be expected as `root` element. It is not complete, as not all elements will be implemented so far.
```
{
"cTag": "string (etag)",
"webDavUrl": "string",
/* inherited from baseItem */
"id": "string (identifier)",
"createdBy": {"@odata.type": "microsoft.graph.identitySet"},
"createdDateTime": "String (timestamp)",
"eTag": "string",
"lastModifiedBy": {"@odata.type": "microsoft.graph.identitySet"},
"lastModifiedDateTime": "String (timestamp)",
"name": "string",
"webUrl": "string",
}
```
Meaningful fields of the root element in the context of the Open Graph API:
1. **id** - a persistent and unique ID identifying the root directory node.
2. **webDavUrl** - The webdav path of the top item of the space.
3. **eTag** - an identifier that changes automatically if the content *or* metadata of the node or the underlying resources changes.
4. **cTag** - an identifier that changes automatically if the content of the root node or of one of the underlying resources changes.
5. **webUrl** - The URL to make this space visible in the browser.
> Note: To indicate that only the metadata of a resource has changed, the eTag has changed, but the cTag not.
### Positive Consequences
- A well understood and mature API from Microsoft adopted to our needs.
- Prerequisite for Spaces in oCIS.
- Enables further steps in client development.
### Negative Consequences
- Migration impact on existing installations. Still to be investigated.
- Requires additional webdav endpoint that allows accessing an arbitrary storage space, either
- with an id: `/dav/spaces/<spaceid>/relative/path/to/file.ext`, or
- with a global path: `/dav/global/<accessible>/<mount>/<point>/relative/path/to/file.ext`, e.g. `/dav/global/projects/Golive 2021/Resources/slides.odt`
### Open Topics
- What are the WebDAV paths for Trashbin, Versions
+ option: additional entries in the reply struct
- The identitySet object used for "owner" and "coowner" require to implement the [https://docs.microsoft.com/de-de/graph/api/resources/identityset?view=graph-rest-1.0](IdentitySet) JSON object, which contains information that seems to be of limited benefit for oCIS. An alternative would be to implement a simpler identity object for oCIS and use that.
+194
View File
@@ -0,0 +1,194 @@
---
title: "8. Configuration"
weight: 8
date: 2021-05-03T15:00:00+01:00
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/adr
geekdocFilePath: 0008-configuration.md
---
* Status: proposed
* Deciders: @refs, @butonic, @micbar, @dragotin, @pmaier1
* Date: 2021-05-03
## Context and Problem Statement
As per urfave/cli's doc:
>The precedence for flag value sources is as follows (highest to lowest):
>
>0. Command line flag value from user
>1. Environment variable (if specified)
>2. Configuration file (if specified)
>3. Default defined on the flag
An issue arises in point 2, in the sense that configuration file refers to a single file containing the value for the env variable. The CLI framework we use for flag parsing does not support merging config structs with CLI flags. This introduces an inconsistency with the framework: config structs are not supported, and we cannot hook to the lifecycle of the flags parsing to use a file as source and conform to these rules.
Because we solely rely on [structured configuration](https://github.com/owncloud/ocis/blob/master/ocis-pkg/config/config.go) we need a way to modify values in this struct using the provided means urfave/cli gives us (flags, env variables, config files and default value), but since we have different modes of operation (supervised Vs. unsupervised) we have to define a clear line.
### Decision Drivers
- Improve experience for the end user.
- Improve experience for developers.
- Sane defaults.
- Sane overrides.
### Considered Options
- Extend [FlagInputSourceExtension interface](https://github.com/urfave/cli/blob/master/altsrc/flag.go#L12-L17)
- Feature request: support for structured configuration (urfave/cli).
- Clearly defined boundaries of what can and cannot be done.
- Expose structured field values as CLI flags
- Drop support for structure configuration
- Adapt the "structured config files have the highest priority" within oCIS
### Decision Outcome
[STILL UNDECIDED]
#### Positive Consequences
[TBD, depends on Decision Outcome]
### Pros and Cons of the Options
#### Extend FlagInputSourceExtension interface
- Good, because we could still use Viper to load from config files here and apply values to the flags in the context.
- Bad, because urfave/cli team are [actively working on v3 of altsrc](https://github.com/urfave/cli/issues/1051#issuecomment-606311923) and we don't want to maintain yet another slice of the codebase.
notes: source is [FlagInputSourceExtension interface](https://github.com/urfave/cli/blob/master/altsrc/flag.go#L12-L17)
#### Feature request: support for structured configuration (urfave/cli).
- Good, because we could remove Viper off the codebase and solely rely on urfave/cli's native code.
- Bad, because there are no plans to support this upstream.
#### Clearly defined boundaries of what can and cannot be done.
- Good, because no changes to the codebase required (not drastic changes.)
- Bad, because we're limited by the framework
#### Expose structured field values as CLI flags
- Good, because it has been already taken into account on large projects (kubernetes) [here.](https://docs.google.com/document/d/1Dvct469xfjkgy3tjWMAKvRAJo4CmGH4cgSVGTDpay6A) in point 5.
- Bad, because it requires quite a bit<sup>1</sup> of custom logic.
- Bad, because how should these flags be present in the `-h` menu of a subcommand? Probably some code generation needed.
*[1] this is a big uncertainty.
#### Drop support for structure configuration
- Good, because it makes the integration with the cli framework easier to grasp.
- Good, because it is not encouraged by the 12factor app spec.
- Bad, because we already support if and users make active use of it. At least for development.
#### Adapt the "structured config files have the highest priority" within oCIS
- Good, because that would mean little structural changes to the codebase since the Viper config parsing logic already uses the `Before` hook to parse prior to the command's action executes.
### Notes
#### Use Cases and Expected Behaviors
##### Supervised (`ocis server` or `ocis run extension`)
![grafik](https://user-images.githubusercontent.com/6905948/116872568-62b1a780-ac16-11eb-9f29-030a651ee39b.png)
- Use a global config file (ocis.yaml) to configure an entire set of services: `> ocis --config-file /etc/ocis.yaml service`
- Use a global config file (ocis.yaml) to configure a single extension: `> ocis --config-file /etc/ocis/yaml proxy`
- When running in supervised mode, config files from extensions are NOT evaluated (only when running `ocis server`, runs with `ocis run extension` do parse individual config files)
- i.e: present config files: `ocis.yaml` and `proxy.yaml`; only the contents of `ocis.yaml` are loaded<sup>1</sup>.
- Flag parsing for subcommands are not allowed in this mode, since the runtime is in control. Configuration has to be done solely using config files.
*[1] see the development section for more on this topic.
###### Known Gotchas
- `> ocis --config-file /etc/ocis/ocis.yaml server` does not work. It currently only supports reading global config values from the predefined locations.
##### Unsupervised (`ocis proxy`)
![grafik](https://user-images.githubusercontent.com/6905948/116872534-54fc2200-ac16-11eb-8267-ffe7b03177b3.png)
- `ocis.yaml` is parsed first (since `proxy` is a subcommand of `ocis`)
- `proxy.yaml` is parsed if present, overriding values from `ocis.yaml` and any cli flag or env variable present.
#### Other known use cases
- Configure via env + some configuration files like WEB_UI_CONFIG or proxy routes
- Configure via flags + some configuration files like WEB_UI_CONFIG or proxy routes
- Configure via global (single file for all extensions) config file + some configuration files like WEB_UI_CONFIG or proxy routes
- configure via per extension config file + some configuration files like WEB_UI_CONFIG or proxy routes
Each individual use case DOES NOT mix sources (i.e: when using cli flags, do not use environment variables nor cli flags).
_Limitations on urfave/cli prevent us from providing structured configuration and framework support for cli flags + env variables._
#### Use Cases for Development
#### Config Loading
Sometimes is desired to decouple the main series of services from an individual instance. We want to use the runtime to startup all services, then do work only on a single service. To achieve that one could use `ocis server && ocis kill proxy && ocis run proxy`. This series of commands will 1. load all config from `ocis.yaml`, 2. kill the supervised proxy service and 3. start the same service with the contents from `proxy.yaml`.
#### Start an extension multiple times with different configs (in Supervised mode)
Flag parsing on subcommands in supervised mode is not yet allowed. The runtime will first parse the global `ocis.yaml` (if any) and run with the loaded configuration. This use case should provide support for having 2 different proxy config files and making use of the runtime start 2 proxy services, with different values.
For this to work, services started via `Service.Start` need to forward any args as flags:
```go
if err := client.Call("Service.Start", os.Args[2], &reply); err != nil {
log.Fatal(err)
}
```
This should provide with enough flexibility for interpreting different config sources as: `> bin/ocis run proxy --config-file /etc/ocis/unexpected/proxy.yaml`
#### Developing Considered Alternatives Further
Let's develop further the following concept: Adapt the "structured config files have the highest priority" within oCIS.
Of course it directly contradicts urfave/cli priorities. When a command finished parsing its cli args and env variables, only after that `Before` is called. This mean by the time we reach a command `Before` hook, flags have already been parsed and its values loaded to their respective destinations within the `Config` struct.
This should still not prevent a developer from using different config files for a single service. Let's analyze the following use case:
1. global config file present (ocis.yaml)
2. single proxy.yaml config file
3. another proxy.yaml config file
4. running under supervision mode
The outcome of the following set of commands should be having all bootstrapped services running + 2 proxies on different addresses:
```console
> ocis server
> ocis kill proxy
> ocis run proxy --config-file proxy.yaml
> ocis run proxy --config-file proxy2.yaml
```
This is a desired use case that is yet not supported due to lacking of flags forwarding.
#### Follow-up PR's
- Variadic runtime extensions to run (development mostly)
- Arg forwarding to command (when running in supervised mode, forward any --config-file flag to supervised subcommands)
- Ability to set `OCIS_URL` from a config file (this would require to extend the ocis-pkg/config/config.go file).
#### The case for `OCIS_URL`
`OCIS_URL` is a jack-of-all trades configuration. It is meant to ease up providing defaults and ensuring dependant services are well configured. It is an override to the following env vars:
```
OCIS_IDM_ADDRESS
PROXY_OIDC_ISSUER
STORAGE_OIDC_ISSUER
STORAGE_FRONTEND_PUBLIC_URL
STORAGE_LDAP_IDP
WEB_UI_CONFIG_SERVER
WEB_OIDC_AUTHORITY
OCIS_PUBLIC_URL
```
Because this functionality is only available as an env var, there is no current way to "normalize" its usage with a config file. That is, there is no way to individually set `OCIS_URL` via config file. This is clear technical debt, and should be added functionality.
#### State of the Art
- [Kubernetes proposal on this very same topic](https://docs.google.com/document/d/1Dvct469xfjkgy3tjWMAKvRAJo4CmGH4cgSVGTDpay6A)
- [Configuration \| Pulumi](https://www.pulumi.com/docs/intro/concepts/config/)
- Configuration can be altered via setters through the CLI.
@@ -0,0 +1,71 @@
---
title: "9. Extension Template"
weight: 9
date: 2021-06-10T15:00:00+01:00
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/adr
geekdocFilePath: 0009-extension-template.md
---
* Status: proposed
* Deciders: @c0rby <!-- optional -->
* Date: 2021-06-10
Technical Story: [description | ticket/issue URL] <!-- optional -->
## Context and Problem Statement
We want to accelerate and simplify extension development by removing the necessity to type or copy the boilerplate code. Can we provide a template or a similar mechanism to aid when developing new extensions?
## Decision Drivers <!-- optional -->
* The solution should be easily maintainable.
* It should always be up-to-date.
* The solution should be easy to use.
## Considered Options
* Use [boilr](https://github.com/tmrts/boilr)
* Create a template git repository.
* Use [ocis-hello](https://github.com/owncloud/ocis-hello/) as a "template"
## Decision Outcome
Chosen option: "[option 1]", because [justification. e.g., only option, which meets k.o. criterion decision driver | which resolves force force | … | comes out best (see below)].
### Positive Consequences: <!-- optional -->
* [e.g., improvement of quality attribute satisfaction, follow-up decisions required, …]
* …
### Negative consequences: <!-- optional -->
* [e.g., compromising quality attribute, follow-up decisions required, …]
* …
## Pros and Cons of the Options <!-- optional -->
### [boilr](https://github.com/tmrts/boilr)
We have a boilr template already. [boilr-ocis-extension](https://github.com/owncloud/boilr-ocis-extension/)
This approach is nice because it provides placeholders which can be filled during the generation of a new extension from the template. It also provides prompts for the placeholder values during generation.
* Good, because with the placeholders it is hard to miss values which should be changed
* Bad, because maintaining is more complex
### Template git repository
Create a git repository with an extension containing the boilerplate code.
* Good, because we can use the usual tools for QA and dependency scanning/updating.
* Good, because it doesn't require any additional tool.
### [ocis-hello](https://github.com/owncloud/ocis-hello/) as a "template"
We have the ocis-hello repository which acts as an example extension containing a grpc and http service and a web UI. It also demonstrates the usage of the settings service.
* Good, because it contains a bit more code than just the plain boilerplate
* Good, because the integration into oCIS is already tested for the Hello extension (e.g. with Proxy and Settings). This will ensure, that the example extension is up-to-date.
* Bad, because if you don't require all features you have to delete stuff
@@ -0,0 +1,85 @@
---
title: "10. Extension Policies"
weight: 10
date: 2021-06-30T14:00:00+01:00
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/adr
geekdocFilePath: 0010-policy-enforcement.md
---
* Status: proposed
* Deciders: @butonic, @micbar, @dragotin, @hodyroff, @pmaier1, @fschade
* Date: 2021-06-30
## Context and Problem Statement
There should be a way to impose certain limitations in areas of the code that require licensing. This document researches an approach to achieve this goal, while limiting the scope to the enforcement side of it. The architecture for a policy system must be composed of 2 parts:
1. License creation and validation
2. Enforcement
It is desirable to keep both systems isolated, since the implementation of the latter has to be done within the constraints of the codebase. The alternative is running an enforcement service and have each and every single request evaluating whether the request is valid or not.
## Decision Drivers
- As a team, we want to have the licensing code concentrated in a central module
- We don't want to stop/start the extension whenever a policy is updated (hot reload). It must happen during runtime.
## Considered Options
1. Build the evaluation engine in-house.
2. Use third party libraries such as Open Policy Agent (a CNCF approved project written in Go)
## Decision Outcome
Chosen option: option 2; Use third party libraries such as Open Policy Agent (a CNCF approved project written in Go)
### Positive Consequences
- OPA is production battle tested.
- Built around performance - policies evaluations are no longer than 1ms per request.
- Middleware friendly: we use gRPC clients all over our ecosystem; wrappers (or middlewares) is a viable way to solve this problem instead of a dedicated service or its own package.
- Community support.
- Kubernetes friendly.
- Supports envoy, kong, terraform, traefik, php, node and many more.
### Negative Consequences
- More vendor code inside the binary (larger attack surface, larger footprint [to be quantified] )
## Chosen option approach
Make use of [overloading Open Policy Agent's input](https://www.openpolicyagent.org/docs/latest/external-data/#option-2-overload-input) along with an external storage source (instead of an OPA service) in conjunction with go-micro's gRPC client wrappers (a.k.a. middlewares) to leverage policy rules evaluation.
### Terminology
New terms are defined to refer to new mental models:
- Policy: self-imposed limitation of a piece of software. i.e: "after 20 users limit the use of thumbnails".
- Checkers: in the context of a middleware, a checker is in charge of defining logical conditions that prevent requests (users) from doing an action.
- Policy file: a [rego file](https://www.openpolicyagent.org/docs/latest/policy-language/).
- Policy evaluation: the act of piecing together input (from a request), data (from an external storage) and policies in order to make a decision.
#### Temporary new Interfaces part of the PoC
- IStorage: provides means of extracting data from an external source (in case of the POC an etcd storage cluster).
### External data storages
However, for this to be usable it needs state. The Rego engine works with input and data, where data is essentially a database the input is tried against, in order to expand this poc to include functionality such as counters (i.e: give access to the thumbnails only to 50 users) we need an external storage, and consequentially, Rego needs to have an option to load data from an external storage. There is an entire chapter in the documentation regarding external data: https://www.openpolicyagent.org/docs/latest/external-data/. The most "natural" option (option 5) states:
> OPA includes functionality for reaching out to external servers during evaluation. This functionality handles those cases where there is too much data to synchronize into OPA, JWTs are ineffective, or policy requires information that must be as up-to-date as possible.
This is a natural option because it requires service-to-service communication, and by definition using microservices it should come "natural to us". Another approach is using JWT (which we already use) to encode the necessary data into the JWT and handing it over to rego as "data". The issue with this approach is that depending on the features of the licenses the JWT might grow and be filled with noise and redundancy (this is, unless a new token is issued for licensing purposes).
### Future ideas
[This proof of concept](https://github.com/owncloud/ocis/pull/2236) is very rigid in the sense that the `IStorage` interface only has one implementation that ties it to etcd, meaning running an oCIS cluster without an etcd service will result in a crash. This is by far ideal and less coupled implementations should be done. There is the case of using the storage metadata as a source to store data necessary to the policies, or even using the go-micro store as a kv store to achieve the exact same, since it already runs as its own service. The implementation of this is trivial and left out of the POC since it requires more time than the allotted for this task.
#### Message Broker
This problem perfectly encompasses the use of a message broker, where services such as OCS will emit messages to a bus and only listeners react to them. In this case the following applies:
![message broker](https://i.imgur.com/sa1pANQ.jpg)
The necessary interfaces are provided to us by go-micro, only implementations are to be done.
+320
View File
@@ -0,0 +1,320 @@
---
title: "11. WebUI URL format"
weight: 11
date: 2021-07-07T14:55:00+01:00
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/adr
geekdocFilePath: 0011-global-url-format.md
---
* Status: accepted
* Deciders: @refs, @butonic, @micbar, @dragotin, @hodyroff, @pmaier1, @fschade, @tbsbdr, @kulmann
* Date: 2021-07-07
## Context and Problem Statement
When speaking about URLs we have to make a difference between browser URLs and API URLs. Only browser URLs are visible to end users and will be bookmarked. The currently existing and bookmarked ownCloud 10 URLs look something like this:
```
GET https://demo.owncloud.com/apps/files/?dir=/path/to/resource&fileid=5472225
303 Location: https://demo.owncloud.com/apps/files/?dir=/path/to/resource
```
When the URL contains a `fileid` parameter the server will look up the corresponding `dir`, overwriting whatever was set before the redirect. The `fileid` always takes precedence and the server is responsible for the lookup.
```
GET https://demo.owncloud.com/apps/files/?dir=/path/to/resource
```
The `dir` parameter is then used to make a WebDAV request against the `/dav/files` endpoint of the currently logged-in user:
```
PROPFIND https://demo.owncloud.com/remote.php/dav/files/demo/path/to/resource
```
The resulting PROPFIND response is used to render the file listing. All good so far.
For the new ocis web UI we want to clean up the user visible Browser URLs. They currently look like this:
```
https://demo.owncloud.com/#/files/list/all/path/to/resource
```
Currently, there is no `fileid` like parameter in the browser URL, making bookmarks of it fragile (they break when a bookmarked folder is renamed).
The oCIS web UI just takes the path and uses the `/webdav` endpoint of the currently logged-in user:
```
PROPFIND https://demo.owncloud.com/remote.php/webdav/path/to/resource
```
With the new ownCloud web client (owncloud/web)
needs to interpret them to make API calls. With this in mind, this is the current mapping on ownCloud Web with OC10 and OCIS backend:
| | Browser URL | API URL |
|------|----------------------------------------------------------------|----------------------------------------------------|
| OC10 + classic WebUI | `https://demo.owncloud.com/apps/files/?dir=/path/to/resource&fileid=5472225` | `https://demo.owncloud.com/remote.php/dav/files/demo/path/to/resource` |
| OC10 + OCIS WebUI| `https://web.owncloud.com/index.html#/files/list/all/path%2Fto%2Fresource` | `https://demo.owncloud.com/remote.php/webdav/path/to/resource` |
| OCIS | `https://demo.owncloud.com/#/files/list/all/path/to/resource` | `https://demo.owncloud.com/remote.php/webdav/path/to/resource` |
On an OC10 backend the `fileid` query parameter takes precedence over the `dir`. In fact if `dir` is invalid but `fileid` isn't, the resolution will succeed, as opposed to if the `fileid` is wrong (doesn't exist) and `dir` correct, resolution will fail altogether with a 404.
This ADR is limited to the scope of "how will a web client deal with the browser URL?". The API URLs will change with the spaces concept to `https://demo.owncloud.com/dav/spaces/<space_id>/relative/path/to/resource`. The Web UI can look up a space id and the mount path using the `/graph/v1.0/drives` API:
1. TODO for a given resource id as part of the URL the `https://demo.owncloud.com/v1.0/drive/items/123456A14B0A7750!359?$select=parentReference` can be used to retrieve the drive/space:
```
{
"parentReference": {
"driveId": "123456a14b0a7750",
"driveType": "personal",
"id": "123456A14B0A7750!357",
"path": "/drive/root:"
}
}
```
2. TODO to fetch the list of all spaces with their mount points we need an API endpoint that allows clients (not only the web ui) to 'sync' the list of storages a user has access to from the storage registry on the server side. This allows clients to directly talk to a storage provider on another instance, allowing true storage federation. The MS graph api has no notion of mount points, so we will need to add a `mountpath` *(or `mountpoint`? or `alias`?)* to our [`drive` resource properties in the libreGraph spec](https://github.com/owncloud/open-graph-api/blob/dc6da5359eee0345429080b5b59762fd8c57b121/api/openapi-spec/v0.0.yaml#L351-L384). Tracked in https://github.com/owncloud/open-graph-api/issues/6
{{< hint >}}
@jfd: The graph api returns a `path` in the `parentReference`, which is part of the `root` in a `drive` resource. But it contains a value in the namespace of the `graph` endpoint, e.g.: `/drive/root:/Bilder` for the `/Bilder` folder in the root of the currently logged-in users personal drive/space. Which is again relative to the drive. To give the clients a way to determine the mount point we need to add a new `mountpath/point/alias` property.
{{< /hint >}}
## Decision Drivers
* To reveal relevant context to the user URLs should either carry a path component or a meaningful alias
* To prevent bookmarks from breaking URLs should have an id component that can be used by the system to lookup the resource
## Considered Options
* Existing ownCloud 10 URLs
* ID based URLs
* Path based URLs
* Space based URLs
* Mixed Global URLs
* Configurable path component in URLs
## Decision Outcome
Chosen option: "Mixed global URLs", because it meets the requirement to contain a path and a stable identifier.
### Positive Consequences <!-- optional -->
* The path makes it "human readable"
* The URL can be bookmarked
* The bookmarked URLs remain stable even if the path changes
* All URLs can be shortened to hide any metadata like path, resource name and query parameters
### Negative Consequences <!-- optional -->
* the web UI needs to look up the space alias in a registry to build an API request for the `/dav/space` endpoint
## Pros and Cons of the Options
### Existing OwnCloud 10 URLs
The existing ownCloud 10 URLs look like this
| URL | comment |
|-----|---------|
| `https://<host>/apps/files/?dir=<path>&fileid=<fileid>` | pattern |
| `https://demo.owncloud.com/apps/files/?dir=/&fileid=18` | root of the currently logged in user |
| `https://demo.owncloud.com/index.php/apps/files/?dir=/path/to/resource&fileid=192` | sub folder `/path/to/resource` |
It contains a path and a `fileid` (which takes precedence).
* Good, because the `fileid` prevents bookmarks from breaking
* Good, because the `dir` reveals context in the form of a path
* Bad, because the web UI needs to look up the space alias in a registry to build an API request for the `/dav/space` endpoint
* Bad, because URLs still contain a long prefix `(/index.php)/apps/files`
* Bad, because the `fileid` needs to be accompanied by a `storageid` to allow efficient routing in ocis
* Bad, because if not configured properly an additional `/index.php` prefixes the route
* Bad, because power users cannot navigate by updating only the path in the URL, as the `fileid` takes precedence. They have to delete the `fileid` to navigate
### ID based URLs
MS OneDrive has URLs like this:
| URL | comment |
|-----|---------|
| `https://<host>/?id=<fileid>(&cid=<cid>)` | pattern, the `cid` is optional but added automatically |
| `https://onedrive.live.com/?id=root&cid=A12345A14B0A7750` | root of a personal drive |
| `https://onedrive.live.com/?id=A12345A14B0A7750%21359&cid=A12345A14B0A7750` | sub folder in a personal drive |
It contains only IDs but no folder names. The `fileid` is a URL encoded `<cid>!<numericid>`. Very similar to the CS3 `resourceid` which consists of `storageid` and `nodeid`.
* Good, because bookmarks cannot break
* Good, because URLs do not disclose unshared path segments
* Bad, because the web UI needs to look up the space id in a registry to build an API request for the `/dav/space` endpoint
* Bad, because URLs reveal no context to users
### Path based URLs
There is a customized ownCloud instance that uses path only based URLs:
| URL | comment |
|-----|---------|
| `https://<host>/apps/files/?dir=/&` | root of the currently logged in user |
| `https://demo.owncloud.com/apps/files/?dir=/&` | root of the currently logged in user |
| `https://demo.owncloud.com/apps/files/?dir=/path/to/resource&` | sub folder `/path/to/resource` |
* Good, because the URLs reveal the full path context to users
* Good, because power users can navigate by updating the path in the url
* Bad, because the web UI needs to look up the space id in a registry to build an API request for the `/dav/space` endpoint
* Bad, because the bookmarks break when someone renames a folder in the path
* Bad, because there is no id that can be used as a fallback lookup mechanism
* Bad, because URLs might leak too much context (parent folders of shared files)
### Space based URLs
| URL | comment |
|-----|---------|
| `https://<host>/#/s/<space_id>(/<relative/path>)(?id=<resource_id>)` | the pattern, relative `path` and `resource_id` are optional |
| `https://demo.owncloud.com/#/s/b78c2044-5b51-446f-82f6-907a664d089c:194b4a97-597c-4461-ab56-afd4f5a21607` | root of a storage space, might be the currently logged in users home |
| `https://demo.owncloud.com/#/s/b78c2044-5b51-446f-82f6-907a664d089c:194b4a97-597c-4461-ab56-afd4f5a21607/relative/path/to/resource` | sub folder `/relative/path/to/resource` in the storage with id `b78c2044-5b51-446f-82f6-907a664d089c:194b4a97-597c-4461-ab56-afd4f5a21607`, works ***only*** if path still exists |
| `https://demo.owncloud.com/#/s/b78c2044-5b51-446f-82f6-907a664d089c:194b4a97-597c-4461-ab56-afd4f5a21607/relative/path/to/resource?id=ba4c1820-df12-11eb-8dcd-ff21f12c1264:beb78dd6-df12-11eb-a05c-a395505126f6` | sub folder `/relative/path/to/resource` in the storage with id `b78c2044-5b51-446f-82f6-907a664d089c:194b4a97-597c-4461-ab56-afd4f5a21607`, lookup can fall back to the `id` |
{{< hint >}}
* `/#` is used by the current vue router.
* `/s` denotes that this is a space url.
* `<space_id>` and `<resource_id>` both consist of `<storage_id>:<node_id>`, but the `space_id` can be replaced with a shorter id or an alias. See further down below.
* `<relative/path>` takes precedence over the `<resource_id>`, both are optional
{{< /hint >}}
* Good, because the web UI does not need to look up the space id in a registry to build an API request for the `/dav/space` endpoint
* Good, because the URLs reveal a relevant path context to users
* Good, because everything after the `#` is not sent to the server, building the webdav request to list the folder is offloaded to the clients
* Good, because power users can navigate by updating the path in the url
* Bad, because the current ids are uuid based, leading to very long URLs where the path component nearly vanishes between two very long strings
* Bad, because the `#` in the URL is just a technical requirement
* Bad, because ocis web requires a `/#/files/s` at the root of the route to distinguish the files app from other apps
* Bad, while navigating using the WebUI, the URL has to be updated whenever we change spaces.
* Bad, because the technical `<space_id>` is meaningless to end users
With the above explained, let's see some use cases:
#### Example 1: UserA shares something from her Home folder with UserB
- open the browser and go to `demo.owncloud.com`
- the browser's url changes to: `https://demo.owncloud.com/#/s/b78c2044-5b51-446f-82f6-907a664d089c:194b4a97-597c-4461-ab56-afd4f5a21607`. You're now in YOUR home folder / personal space.
- you create a new folder `/relative/path/to/resource` and navigate into `/relative/path/to`
- the URL now changes to: `https://demo.owncloud.com/#/s/b78c2044-5b51-446f-82f6-907a664d089c:194b4a97-597c-4461-ab56-afd4f5a21607/relative/path/to`
- You share `resource` with some else
- You navigate into `/relative/path/to/resource`
- now the URL would look like: `https://demo.owncloud.com/#/s/b78c2044-5b51-446f-82f6-907a664d089c:3a9305da-df17-11eb-ab99-abe09d93e08a`
As you can see, even if you're the owner of `/relative/path/to/resource` and navigate into it, the URL changes due to a new space being entered. This ensures that while working in your home folder, copying URLs and giving them to the person you share the resource with, the receiver can still navigate within the new space.
In short terms, while navigating using the WebUI, the URL has to constantly change whenever we change spaces to reflect the most explicit one.
#### Example 2: UserA shares something from a Workspace
Assuming we only have one storage provider; a consequence of this, all storage spaces will start with the same storage_id.
- open the browser and go to `demo.owncloud.com`
- the browser's url changes to: `https://demo.owncloud.com/#/s/b78c2044-5b51-446f-82f6-907a664d089c:194b4a97-597c-4461-ab56-afd4f5a21607`. You're now in YOUR home folder / personal space.
- you have access to a workspace called `foo` (created by an admin)
- navigate into workspace `foo`
- the URL now changes to: `https://demo.owncloud.com/#/s/b78c2044-5b51-446f-82f6-907a664d089c:d342f9ce-df18-11eb-b319-1b6d9df4bc74`. You are now at the root of the workspace `foo`.
- because we only have one storage provider, the `space_id` section of the URL only updates the `node_id` part of it.
- had we had more than one storage provider, the `space_id` would depend on which storage provider contains the storage space.
- you create a folder `/relative/path/to/resource`
- you navigate into `/relative/path/to/resource`
- now the URL would look like: `https://demo.owncloud.com/#/s/b78c2044-5b51-446f-82f6-907a664d089c:d342f9ce-df18-11eb-b319-1b6d9df4bc74/relative/path/to/resource`
- or a more robust url: `https://demo.owncloud.com/#/s/b78c2044-5b51-446f-82f6-907a664d089c:d342f9ce-df18-11eb-b319-1b6d9df4bc74/relative/path/to/resource?id=b78c2044-5b51-446f-82f6-907a664d089c:04f1991c-df19-11eb-9cc7-3b09f04f9ca3`
#### Spaces Registry
A big drawback against this idea is that the length of the URL is increased by a lot, rendering them almost unreadable. Introducing a Spaces Registry (SR) would shorten them. Let's see how.
A URL without a SR would look like: `https://ocis.com/#/s/b78c2044-5b51-446f-82f6-907a664d089c:d342f9ce-df18-11eb-b319-1b6d9df4bc74/TEST?id=b78c2044-5b51-446f-82f6-907a664d089c:04f1991c-df19-11eb-9cc7-3b09f04f9ca3`
The same URL with a SR `https://ocis.com/#/s/workspaceFoo/TEST?id=b78c2044-5b51-446f-82f6-907a664d089c:04f1991c-df19-11eb-9cc7-3b09f04f9ca3`
Space Registry resolution can happen at the client side (i.e: the client keeps a list of space name -> space id [where space id = storageid + nodeid]; the client queries a SR) or server side. Server side is more resilient due to clients can have limited networking; for instance if they are running on a tight intranet.
### Mixed Global URLs
While ID based space URLs can be made more readable by shortening the IDs they only start to reveal context when an alias is used instead of the space id. These aliases however have to be unique identifiers. These aliases should live in namespaces like `/workspaces/marketing` and `/personal/marketing` to make phishing attacks harder (in this case a user that registered with the username `marketing`). But namespaced aliases is semantically equivalent to ... a path hierarchy.
When every space has a namespaced alias and a relative path we can build a global namespace:
| URL | comment |
|-----|---------|
| `https://<host>/files</namespaced/alias></relative/path/to/resource>?id=<resource_id>` | the pattern, `/files` might become optional |
| `https://demo.owncloud.com/files/personal/einstein/?id=b78c2044-5b51-446f-82f6-907a664d089c:194b4a97-597c-4461-ab56-afd4f5a21607` | root of user `einstein` |
| `https://demo.owncloud.com/files/personal/einstein/relative/path/to/resource?id=b78c2044-5b51-446f-82f6-907a664d089c:194b4a97-597c-4461-ab56-afd4f5a21608` | sub folder `/relative/path/to/resource` |
| `https://demo.owncloud.com/files/shares/einstein/somesharename?id=b78c2044-5b51-446f-82f6-907a664d089c:194b4a97-597c-4461-ab56-afd4f5a21608` | shared URL for `/relative/path/to/resource` |
| `https://demo.owncloud.com/files/personal/einstein/marie is stupid/and richard as well/resource?id=b78c2044-5b51-446f-82f6-907a664d089c:194b4a97-597c-4461-ab56-afd4f5a21608` | sub folder `marie is stupid/and richard as well/resource` ... something einstein might not want to reveal |
| `https://demo.owncloud.com/files/shares/einstein/resource (2)?id=b78c2044-5b51-446f-82f6-907a664d089c:194b4a97-597c-4461-ab56-afd4f5a21608` | named link URL for `/marie is stupid/and richard as well/resource`, does not disclose the actual hierarchy, has an appended counter to avoid a collision |
| `https://demo.owncloud.com/files/shares/einstein/mybestfriends?id=b78c2044-5b51-446f-82f6-907a664d089c:194b4a97-597c-4461-ab56-afd4f5a21608` | named link URL for `/marie is stupid/and richard as well/resource`, does not disclose the actual hierarchy, has a custom alias for the share |
| `https://demo.owncloud.com/files/public/kcZVYaXr7oZ66bg/relative/path/to/resource` | sub folder `/relative/path/to/resource` in public link with token `kcZVYaXr7oZ66bg` |
| `https://demo.owncloud.com/files/public/kcZVYaXr7oZ66bg/relative/path/to/resource` | sub folder `/relative/path/to/resource` in public link with token `kcZVYaXr7oZ66bg` |
| `https://demo.owncloud.com/s/kcZVYaXr7oZ66bg/` | shortened link to a resource. This is needed to be able to copy a link to a resource without leaking any metadata. |
`</namespaced/alias></relative/path/to/resource>` is the global path in the CS3 api. The CS3 Storage Registry is responsible by managing the mount points.
In order to be able to copy and paste URLs all resources must be uniquely identifiable:
* Instead of `/home` the URL always has to reflect the user: `/personal/einstein`
* Workspaces can use `/workspaces/<alias>` or `/workspaces/<additional>/<classification>/<alias>` where the hierarchy is given by the organization
* Experiments can use `/experiments/<alias>`
* Research institutes could set up `/papers/<researchgroup>/<alias>`
* Trash could be accessed by prefixing the namespace alias with `/trash`? or using `/trash/<space_id>`
* Instead of a namespaced alias a storage space id could be used with a generic `/space/<space_id>` namespace
* An url shortener can create urls like `/s/<token>` which could be used as a stable link to a resource.
* Links for anonymous users will resolve to `/public/<token>`
The alias namespace hierarchy and depth can be pre-determined by the admin. Even if aliases change the `id` parameter prevents bookmarks from breaking. A user can decide to build a different hierarchy by using his own registry.
What about shares? Similar to `/home` it must reflect the user: `/shares/einstein` would list all shares *by* einstein for the currently logged-in user. The ui needs to apply the same URL rewriting as for space based URLs: when navigating into a share the URL has to switch from `/personal/einstein/relative/path/to/shared/resource` to `/shares/einstein/<unique and potentially namespaced alias for shared resource>`. When more than one `resource` was shared a name collision would occur. To prevent this we can use ids `/shares/einstein/id/<resource_id` or namespaced aliases `/shares/einstein/files/alias`. Similar to the `/trash` prefix we could treat `/shares` as a filter for the shared resources a user has access to, but that would disclose unshared path segments in personal spaces. We could make that a feature and let users create an alias for a shared resource, similar as for public links. Then they can decide if they want to disclose the full path in their personal space (or another workspace) or if they want to use an alias which is then accessed at `/shares/einstein/<alias>`. As a default we could take the alias at creation time from the filename. That way two shares to a resource with the same name, e.g.: `/personal/einstein/project AAA/foo` and `/personal/einstein/project BBB/foo` would lead to `/shares/einstein/foo` (a CS3 internal reference to `/personal/einstein/project AAA/foo`) and `/shares/einstein/foo (2)` (a CS3 internal reference to `/personal/einstein/project BBB/foo`). `foo (2)` would keep its name even when `foo` is deleted or renamed. Well an id as the alias might be better then, because users might rename these aliases, which would break URLs if they have been bookmarked. In any case this would make end user more aware of what they share AND it would allow them to choose an arbitrary context for the links they want to send out: personal internal share URLs.
With these different namespaces the `/files` part in the URL becomes obsolete, because the files application can be registered for multiple namespaces: `/personal`, `/workspaces`, `/shares`, `/trash` ...
* Good, because it contains a global path
* Good, because spaces with namespaced aliases can be bookmarked and copied into mails or chat without disclosing unshared path segments, as the space is supposed to be shared
* Good, because the UI can detect broken paths and notify the user to update his bookmark if the resource could be found by `id`
* Good, because the `/files` part might only be required for `id` only based lookup to let the web ui know which app is responsible for the route
* Good, because it turns shares into deliberately named spaces in `/shares/<owner>/<alias>`
* Good, because all urls can be shortened to hide any metadata like path, resource name and query parameters
* Bad, because the web UI needs to look up the space alias in a registry to build an API request for the `/dav/space` endpoint
### Configurable path component in URLs
Not every deployment may have the requirement to have the path in the URL. We could use id only based URLs, similar to onedrive and make showing paths configurable.
| URL | comment |
|-----|---------|
| `https://<host>/files?id=<resource_id>` | default id based navigation |
| `https://<host>/files</namespaced/alias></relative/path/to/resource>?id=<resource_id>` | optional path based navigation with fallback to id |
In contrast to ownCloud 10 path takes precedence and the user is warned when the fileid in his bookmark no longer matches the id on the server: sth. like "The path of the resource has changed, please verify and update your bookmark!"
When a file is selected the filename also becomes part of the URL so individual files can be bookmarked.
If navigation is id based we need to look up the path for the id so we can make a webdav request, or we need to implement the graph drives and driveItem resources.
The URL `https://<host>/files?id=<resource_id>̀` is sent to the server. It has to look up the correct path and redirect the request, including the path. But that would make all bookmarks contain tha path again, even if paths were configured to not be part of the URL.
The `/meta/<fileid>` webdav endpoint can be used to look up the path with property `meta-path-for-user`.
For now, we would use path based navigation with URLs like this:
```
https://<host>/files</namespaced/alias></relative/path/to/resource>?id=<resource_id>
```
This means that only the _resource path_ is part of the URL path. Any other parameter, e.g. file `id`, `page` or sort order must be given as URL parameters.
- [ ] To make lookup by id possible we need to implement the `/meta/<fileid>` endpoint so the sdk can use it to look up the path. We should not implement a redirect on the ocis server side because the same redirect logic would need to be added to oc10. Having it in ocis web is the right place.
- [ ] The old sharing links and oc10 urls still need to be redirected by ocis/reva as in oc10.
Public links would have the same format: `https://<host>/files?id=<resource_id>` The web UI has to detect if the user is logged in or not and adjust the ui accordingly.
{{< hint warning >}}
Since there is no difference between public and private files a logged-in user cannot see the public version of a link unless he logs out.
{{< /hint >}}
+49
View File
@@ -0,0 +1,49 @@
---
title: "12. Tracing"
weight: 12
date: 2021-08-17T12:56:53+01:00
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/adr
geekdocFilePath: 0012-tracing.md
---
* Status: proposed
* Deciders: @butonic, @micbar, @dragotin, @mstingl, @pmaier1, @fschade
* Date: 2021-08-17
## Context and Problem Statement
At the time of this writing we are in a situation where our logs have too much verbosity, rendering impossible or rather difficult to debug an instance. For this reason we are giving some care to our traces by updating dependencies from OpenCensus to OpenTelemetry.
## Decision Drivers
- We don't want to rely only on logs to debug an instance.
- Logs are too verbose.
- Since we have micro-services, we want to holistically understand a request.
## Considered Options
- Trim down logs
- Use OpenCensus
- Migrate to OpenTelemetry
## Decision Outcome
Chosen option: option 3; Migrate to OpenTelemetry. OpenCensus is deprecated, and OpenTelemetry is the merger from OpenCensus and OpenTelemetry and the most recent up-to-date spec.
### Positive Consequences
- Fix the current state of the traces on Reva.
- Add more contextual information on a span for a given request.
- Per-request filtering with the `X-Request-Id` header.
- Group the supported tracing backends to support Jaeger only for simplicity.
## Chosen option approach
- A trace is a tree, and the proxy will create the root trace and propagate it downstream.
- The Root trace will log the request headers.
- The unit that ultimately does the work will log the result of the operation if success.
- The unit that ultimately does the work will change the state of the span to error if any occurred.
With these premises, this is by no means a fixed document and the more we learn about the usage of an instance the more context we can add to the traces.
+96
View File
@@ -0,0 +1,96 @@
---
title: "13. Locking"
weight: 13
date: 2021-08-17T12:56:53+01:00
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/adr
geekdocFilePath: 0013-locking.md
---
- Status: accepted
- Deciders: @hodyroff, @pmaier1, @jojowein, @dragotin, @micbar, @tbsbdr, @wkloucek
- Date: 2021-11-03
## Context and Problem Statement
At the time of this writing no locking mechanisms exists in oCIS / REVA for both directories and files. The CS3org WOPI server implements a file based locking in order to lock files. This ADR discusses if this approach is ok for the general availability of oCIS or if changes are needed.
## Decision Drivers
- Is the current situation acceptable for the GA
- Is locking needed or can we have oCIS / REVA without locking
## Considered Options
1. File based locking
2. No locking
3. CS3 API locking
## Decision Outcome
For the GA we chose option 2. Therefore we need to remove or disable the file based locking functionality of the CS3org WOPI server. The decision was taken because the current file based locking does not work on file-only shares. The current locking also does not guarantee exclusive access to a file since other parts of oCIS like the WebDAV API or other REVA services don't respect the locks.
After the GA we need to implement option 3.
## Pros and Cons of the Options
### File based locking
The CS3org WOPI server creates a `.sys.wopilock.<filename>.` and `.~lock.<filename>#` file when opening a file in write mode
**File based locking is good**, because:
- it is already implemented in the current CS3org WOPI server
**File based locking is bad**, because:
- lock files should be checked by all parties manipulating files (e.g. the WebDAV api)
- lock files can be deleted by everyone
- you can not lock files in a file-only share (you need a folder share to create a lock file besides the original file)
If we have file based locks, we can also sync them with e.g. the Desktop Client.
**Syncing lock files is good**: because
- native office applications can notice lock files by the WOPI server and vice versa (LibreOffice also creates `.lock.<filename>#` files)
**Syncing lock files is bad**, because:
- if lockfile is not deleted, no one can edit the file
- creating lock files in a folder shared with 2000000 users creates a lot of noise and pressure on the server (etag propagation, therefore oC Desktop sync client has an ignore rule for `.~lock.*` files)
### No locking
We remove or disable the file based locking of the CS3org WOPI server.
**No locking is good**, because:
- you don't need to release locks
- overwriting a file just creates a new version of it
**No locking is bad**, because:
- merging changes from different versions is a pain, since there is no way to calculate differences for most of the files (e.g. docx or xlsx files)
- no locking breaks the WOPI specs, as the CS3 WOPI server won't be capable to honor the WOPI Lock related operations
### CS3 API locking
- Add CS3 API for resource (files, directories) locking, unlocking and checking locks
- locking always with timeout
- lock creation is a "create-if-not-exists" operation
- locks need to have arbitrary metadata (e.g. the CS3 WOPI server is stateless by storing information on / in the locks)
- Implement WebDAV locking using the CS3 API
- Implement Locking in storage drivers
- Change CS3 WOPI server to use CS3 API locking mechanism
- Optional: manual lock / unlock in ownCloud Web (who is allowed to unlock locks of another user?)
**CS3 API locking is good**, because:
- you can lock files on the actual storage (if the storage supports that -> storage driver dependent)
- you can lock files in ownCloud 10 when using the ownCloudSQL storage driver in the migration deployment (but oC10 Collabora / OnlyOffice also need to implement locking, to fully leverage that)
- clients can get the lock information via the api without ignoring / hiding lock file changes
- clients can use the lock information to lock the file in their context (e.g. via some file explorer integration)
**CS3 API locking is bad**, because:
- it needs to be defined and implemented, currently not planned for the GA
@@ -0,0 +1,63 @@
---
title: "14. Microservices Runtime"
weight: 14
date: 2022-01-21T12:56:53+01:00
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/adr
geekdocFilePath: 0014-microservices-runtime.md
---
* Status: proposed
* Deciders: @butonic, @micbar, @dragotin, @mstingl, @pmaier1, @fschade
* Date: 2022-01-21
## Context and Problem Statement
In an environment where shipping a single binary makes it easier for the end user to use oCIS, embedding a whole family of microservices within a package and running it leveraging the use of the Go language has plenty of value. In such environment, a runtime is necessary to orchestrate the services that run within it. Other solutions are hot right now, such as Kubernetes, but for a single deployment this entails orbital measures.
## Decision Drivers
- Start oCIS microservices with a single command (`ocis server`).
- Clear separation of concerns between services.
- Control the lifecycle of the running services.
- Services can be distributed across multiple machines and still be controllable somehow.
## Considered Options
1.The use of frameworks such as:
- asim/go-micro
- go-kit/kit
2. Build and synchronize all services in-house.
3. A hybrid solution between framework and in-house.
## Options
### go-kit/kit
Pros
- Large community behind
- The creator is a maintainer of Go, so the code quality is quite high.
Cons
- Too verbose. Ultimately too slow to make progress.
- Implementing a service would require defining interfaces and a lot of boilerplate.
### asim/go-micro
Pros
- Implementation based in swappable interfaces.
- Multiple implementations, either in-memory or through external services
- Production ready
- Good compromise between high and low level code.
## Decision Outcome
Number 3: A hybrid solution between framework and in-house.
### Design
{{< figure src="/ocis/static/runtime.drawio.svg" >}}
First of, every ocis service IS a go-micro service, and because go-micro makes use of urfave/cli, a service can be conveniently wrapped inside a subcommand. Writing a supervisor is then a choice. We do use a supervisor to ensure long-running processes and embrace the "let it crash" mentality. The piece we use for this end is called [Suture](https://github.com/thejerf/suture).
The code regarding the runtime can be found pretty isolated [here](https://github.com/owncloud/ocis/blob/d6adb7bee83b58aa3524951ed55872a5f3105568/ocis/pkg/runtime/service/service.go). The runtime itself runs as a service. This is done so messages can be sent to it using the oCIS single binary to control the lifecycle of its services.
+100
View File
@@ -0,0 +1,100 @@
---
title: "15. oCIS Event System"
weight: 15
date: 2022-02-01T12:56:53+01:00
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/adr
geekdocFilePath: 0015-events.md
---
* Status: proposed
* Deciders: @butonic, @micbar, @dragotin, @c0rby, @wkloucek
* Date: 2022-01-21
## Context and Problem Statement
### Overview
To be able to implement simple, flexible and independent inter service communication there is the idea to implement an event system in oCIS. A service can send out events which are received by one or more other services. The receiving service can cause different kinds of actions based on the event by utilizing the information that the event carries.
### Example: Email Notification
A simple example is the notification feature for oCIS: Users should receive an email when another user shares a file with them. The information, that the file was shared should go out as an event from a storage provider or share manager, carrying the information which file was shared to which receiver. A potential notification service that sends out the email listens to these kinds of events and sends the email out once on every received event of that specific type.
## Decision Drivers
* Events are supposed to decouple services and raise flexibility, also considering extensions that are not directly controlled by the ownCloud project.
* Events should bring flexibility in the implementation of sending and receiving services.
* Events should not obsolete other mechanisms to communicate, i.e. grpc calls.
* Sending an event has to be as little resource consuming for the sender as possible.
* Events are never user visible.
## Considered Options
1. Lightweight Events with Event Queue and "At most once" QoS
2. As 1., but with "At least once" QoS
## Options
### 1. Lightweight Events with Event Queue and "At most once" QoS
Reva will get a messaging service that is available to all services within oCIS and Reva. It is considered as one of the mandatory services of the oCIS system. If the messaging backend is not running, neither Reva nor oCIS can be considered healthy and should shut down.
All oCIS- and Reva-services can connect to the messaging bus and send so-called events. The sender gets an immediate return if handing the event to the message bus was successful or not.
The sender can not make any assumptions when the message is delivered to any receiving service. Depending on the QoS model (as proposed as alternatives in this ADR) it might even be not guaranteed that the event is delivered at all. Also, the sender can not know if zero, one or many services are listening to that event.
#### Event Data
Events are identified by their namespace and their respective name. The namespace is delimited by dots and starts with either "reva" or "ocis" or a future extension name. It is followed by the name of the sending service and an unique name of the event.
Example: `ocis.ocdav.delete` - an event with that name sent out if an WebDAV DELETE request arrived in the oCDav service.
An event can carry a payload which is encoded as json object. (See for example [NATS](https://docs.nats.io/using-nats/developer/sending/structure) ). There are no pre-defined members in that object, it is fully up to the sender which data will be included in the payload. Receivers must be robust to deal with changes.
#### Quality of Service
Events are sent with "At most once" quality of service. That means, if a receiver is not present at the moment of publishing it might not receive the event. That requires that the sender and the receiver must have functionality to back up the situation that events were missed. That adds more state to the services because they always need to behave like a [FISM](https://en.wikipedia.org/wiki/Finite-state_machine). Given that the event queue can be considered the backbone of the system, it is unlikely that it is not running.
#### Transactions
The described way of inter service communication with events is not transactional. It is not supposed to be, but only provides a lightweight, loosely coupled way to "inform".
If transactions are required, proper synchronous GRPC API calls should be used. Another way would be to build asynchronous flows with request- and reply events as in [saga pattern](https://microservices.io/patterns/data/saga.html). That is only recommended for special cases.
#### Pros
* Simple setup
* Flexible way of connecting services
* Stateless event queue
* "State of the art" pattern in microservices architectures
#### Cons
* Over engineering: Can we do without an extra message queue component?
* Messages might get lost, so that eventual consistency is endangered
* A service needs to hold more state to ensure consistency
* Message queue needs to be implemented in Reva
### 2. Lightweight Events with Event Queue and "At-least once" QoS
Exactly as described above, but with a higher service level quality.
#### Quality of Service
Events are sent with "At least once" quality of service. That means the events will remain in the queue until they are received by all receivers. This puts more responsibility on the event bus and adds state to the events. Given that the event queue can be considered the backbone of the system, it is required to be running.
#### Pros
* Better service level: Messages do not get lost
* Simplifies the design of the microservices because the events are "fire-and-forget"
* Events would be idempotent. If a service goes down the events will stay in the queue until they are consumed
#### Cons
* Stateful event system with higher cost in terms of compute and storage
* The queue could become a bottleneck and needs to be scaled
## Decision Outcome
### Design
+90
View File
@@ -0,0 +1,90 @@
---
title: "16. Storage for Files Metadata"
weight: 16
date: 2022-03-02T00:00:00+01:00
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/adr
geekdocFilePath: 0016-files-metadata.md
---
* Status: proposed
* Deciders: @butonic, @dragotin, @micbar, @C0rby
* Date: 2022-02-04
## Context and Problem Statement
In addition to the file content we need to store metadata which is attached to a file. Metadata describes additional properties of a file. These properties need to be stored as close as possible to the file content to avoid inconsistencies. Metadata are key to workflows and search. We consider them as an additional value which enhances the file content.
## Decision Drivers
* Metadata will become more important in the future
* Metadata are key to automated data processing
* Metadata storage should be as close as possible to the file content
* Metadata should be always in sync with the file content
## Considered Options
* Database
* Extended file attributes
* Metadata file next to the file content
* Linked metadata in separate file
## Decision Outcome
Chosen option: "Extended File Attributes", because we guarantee the consistency of data and have arbitrary simple storage mechanism.
### Positive Consequences
* Metadata is always attached to the file itself
* We can store arbitrary key/values
* No external dependencies are needed
### Negative consequences
* The storage inside extended file attributes has limits
* Changes to extended attributes are not atomic and need file locks
## Pros and Cons of the Options <!-- optional -->
### Database or Key-Value Store
Use a Database or an external key/value store to persist metadata.
* Good, because it scales well
* Good, because databases provide efficient lookup mechanisms
* Bad, because the file content and the metadata could run out of sync
* Bad, because a storage backup doesn't cover the file metadata
### Extended File Attributes
Extended File Attributes allow to store arbitrary properties. There are 4 namespaces `user`, `system`, `trusted` and `security`. We can safely use the `user` namespace. An example attribute name would be `user.ocis.owner.id`. The linux kernel has length limits on attribute names and values.
From Wikipedia on [Extended file attributes](https://en.wikipedia.org/wiki/Extended_file_attributes#Linux):
> The Linux kernel allows extended attribute to have names of up to 255 bytes and values of up to 64 KiB,[14] as do XFS and ReiserFS, but ext2/3/4 and btrfs impose much smaller limits, requiring all the attributes (names and values) of one file to fit in one “filesystem block” (usually 4 KiB). Per POSIX.1e,[citation needed] the names are required to start with one of security, system, trusted, and user plus a period. This defines the four namespaces of extended attributes.
* Good, because metadata is stored in the filesystem
* Good, because consistency is easy to maintain
* Good, because the data is attached to the file and survives file operations like copy and move
* Good, because a storage backup also covers the file metadata
* Bad, because we could hit the filesystem limit
* Bad, because changes to extended attributes are not atomic
### Metadata File
We could store metadata in a metadata file next to the file content which has a structured content format like .json, .yaml or .toml. That would give us more space to store bigger amounts of metadata.
* Good, because there are no size limits
* Good, because there is more freedom to the content format
* Good, because a storage backup also covers the file metadata
* Bad, because it doubles the amount of read / write operations
* Bad, because it needs additional measures against concurrent overwriting changes
### Link metadata with an id in the extended attributes
To link metadata to file content a single extended attribute with a file id (unique per storage space) is sufficient. This would also allow putting metadata in better suited storage systems like SQLite or a key value store.
* Good, because it avoids extended attribute limits
* Good, because the same mechanism could be used to look up files by id, when the underlying filesystem is an existing POSIX filesystem.
* Bad, because backup needs to cover the metadata as well. Could be mitigated by sharing metadata per space and doing space wide snapshots.
* Bad, because it is a bit more effort to access it to read or index it.
@@ -0,0 +1,111 @@
---
title: "17. Allow read only external User Management"
weight: 17
date: 2022-02-08T10:53:00+01:00
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/adr
geekdocFilePath: 0017-allow-read-only-external-user-management.md
---
* Status: proposed
* Deciders: @butonic, @micbar, @rhafer
* Date: 2022-02-08
## Context and Problem Statement
oCIS needs to be integrated with various external Authentication and Identity Management Systems.
Usually oCIS will have no administrative access to such a system and we will not be allowed to
reconfigure it to suit our needs (e.g. we will not be able to enhance the schema of an already existing
LDAP Directory). In most of the cases our access will be read-only.
Sidenote: There is a difference between users, identities and accounts: A user may have multiple
identities which he can authenticate with, e.g. his facebook, twitter, microsoft or google
identity. Multiple identities can be linked to an account in ocis, allowing to fall back to another
identity provider should one of them shut down. This also allows migrating from one identity
provider to another.
There are different cases where oCIS requires access to users:
1. While we settled on using OpenID Connect (OIDC) as the authentication protocol for oCIS, we
need to build a user object during authentication with at least an account UUID (to identify
the account) and the email or a name (for display purposes).
2. When searching for share recipients we need to be able to query existing users in the external
identity management system
3. When listing files we need to be able to look up a users display properties (username, email,
avatar...) based on the account UUID
oCIS internally relies on a stable and persistent identifier (e.g. a UUID) for accounts in order to
implement permissions and sharing. Unfortunately, some deployments are unable to deliver this kind
of stable identifier for users:
- In OIDC itself the only stable identifier that is guaranteed to be provided by the IDP is
combination of the sub and iss claims. IDPs can optionally return other claims, but we cannot
rely on a specific claim being present.
- When no other services (LDAP, SCIM, ...) are available that could be used look up a user UUID
## Decision Drivers
* oCIS should be a single binary that can run out of the box without external dependencies like an
LDAP server.
* Time: we want to build a release candidate asap.
* oCIS should be easy to integrate with standard external identity management systems
## Considered Options
There are two case to consider:
* External identity management system provides an OIDC IdP and an interface to query users
* External identity management system provides just an OIDC IdP with no possibility to query users
## Decision Outcome
It's not really possible single out any of the options for this ADR. In the end we will likely need
to support both scenarios.
### Positive Consequences: <!-- optional -->
* Very flexible integration with a wide range of external systems
### Negative consequences: <!-- optional -->
* configuration complexity, high support efforts
* Increasingly complex code in oCIS
## Pros and Cons of the Options <!-- optional -->
### External identity management system is read only and provides an interface to query users (e.g. Corporate Active Directory)
IdP sends sub & iss and mail or username claims, Identity Management System provides APIs (e.g.
LDAP, SCIM, REST ...) to lookup additional user information. All oCIS services use the CS3 API to
look up the account for the given email or username, where CS3 then uses a backend that relies on
the APIs provided by the IdM.
* Good, because we can rely on the external identity management
* Good, because ocis services only need to know about the CS3 user provider API, which acts as an
abstraction layer for different identity management systems
* Good, because there is only a single source of truth (the external IdM) and we don't need to
implement a synchronization mechanism to maintain an internal user database (we will likely need
some form of caching though, see below)
* Bad, because the identity management needs to provide a stable, persistent, non-reassignable user
identifier for an account, e.g. `owncloudUUID` or `ms-DS-ConsistencyGuid`
* Bad, because we need to implement tools that can change the account id when it did change anyway
* Bad, because without caching we will hammer the identity management system with lookup requests
### External identity management system is read only and does NOT provide an API to query users
Idp sends sub & iss and mail or username claims. We need to provision an internal account mapping,
creating a unique ID, upon the first login of a user to be able to look up user properties by account
id.
* Good, because this has very little external requirements
* Good, because we have accounts fully under our control
* Bad, because we have to provide the user lookup APIs
* Bad, because users will only a visible after the first login
* Bad, because our internal account mapping might get out of date when user attribute (e.g. name or
mail) change. At least until the next time that user logs in
## Links <!-- optional -->
* [Link type] [Link to ADR] <!-- example: Refined by [ADR-0005](0005-example.md) -->
* … <!-- numbers of links can vary -->
* supersedes [3. Use external User Management]({{< ref "0003-external-user-management.md" >}})
+61
View File
@@ -0,0 +1,61 @@
---
title: "18. File Search API"
date: 2022-03-18T09:00:00+01:00
weight: 18
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/adr
geekdocFilePath: 0018-file-search-api.md
---
* Status: proposed
* Deciders: @butonic, @micbar, @dragotin, @C0rby
* Date: 2022-03-18
## Context and Problem Statement
The ability to find files based on certain search terms is a key requirement for a system that provides the ability to store unstructured data on a large scale.
## Decision Drivers
* Have a simple yet powerful, scalable and performant way of finding files in oCIS
* Be able to construct intelligent searches based on metadata
* Allow the user to filter the search queries based on metadata
## Considered Options
* [Libre Graph API](#libre-graph-api)
* [WebDAV API](#webdav-api)
## Decision Outcome
Chosen option: [WebDAV API](#webdav-api) because the current WebUI is compatible with that API. We may use the GraphAPI later in a second iteration.
### Positive Consequences
* The existing Clients can continue to use the well-known API
* There are existing API tests which cover the basic behavior
### Negative consequences
* We have no server side result filtering capabilities
## Pros and Cons of the Options
### Libre Graph API
* Good, because we try to switch most of our HTTP requests to Libre Graph
* Good, because the Graph API supports scopes, sorting and query language
* Good, because it supports server side result filtering
* Bad, because there are currently no clients which support that
### WebDAV API
* Good, because WebDAV is a well-known and widely adopted Standard
* Good, because existing Clients continue to work without extra efforts
* Bad, because the syntax is limited
* Bad, because we cannot do server side result filtering
## Links
* [Search Indexing](0019-file-search-index.md)
* [Search Query Language](0020-file-search-query-language.md)
@@ -0,0 +1,80 @@
---
title: "19. File Search Index"
date: 2022-03-18T09:00:00+01:00
weight: 19
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/adr
geekdocFilePath: 0019-file-search-index.md
---
* Status: proposed
* Deciders: @butonic, @micbar, @dragotin, @C0rby
* Date: 2022-03-18
## Context and Problem Statement
The ability to find files based on certain search terms is a key requirement for a system that provides the ability to store unstructured data on a large scale.
More sophisticated search capabilities are expected and can be implemented, especially based on metadata.
To trigger the indexing of a file, the search service listens to create, update and delete events on the internal event bus of oCIS.
The events need to contain a valid reference that defines the file space and file id of the file in question. The event only must be sent when the file operation (update, creation, removal) is finished.
Sharing adds more complexity because the index also needs to react to create, delete and modify shares events. Sharing should not duplicate the indexed data, especially within spaces or group shares.
## Decision Drivers
* Have a simple yet powerful, scalable and performant way of finding files in oCIS
* Be able to construct intelligent searches based on metadata
* Allow the user to filter the search queries based on metadata
* Basic File Search needs to be implemented out of the box without external dependencies
* The Search Indexing Service should be replaceable with more sophisticated technologies like Elasticsearch
* Make use of the spaces architecture to shard search indexes by space
* The Search Indexing Service needs to deal with multiple users accessing the same resources due to shares
* The Search Service should be compatible with different search indexing technologies
## Considered Options
* [Bleve Search](#bleve-search)
* [Elastic Search](#elastic-search)
## Decision Outcome
Chosen option: Bleve Search, because we can fulfill the MVP and include it into the single binary.
### Positive Consequences
* Basic File Search works out of the box
* We do not need heavy external dependencies which need to be deployed alongside
### Negative consequences
* We need to be aware of the scaling limits
* We need to find a way to work with shares and spaces
* It has a limited query language
## Pros and Cons of the Options
### Bleve Search
* Good, because it is written in GoLang and can be bundled into the single oCIS binary
* Good, because it is a lightweight but powerful solution which could fulfill a lot of use cases
* Bad, because we do not know exactly how we can represent shares in the index without duplicating data
* Bad, because it is a single process
* Bad, because the query language is limited
### Elastic Search
* Good, because it has become an industry standard
* Good, because it supports a rich query language
* Good, because it has built in cluster support and scales well
* Good, because it has a permission system and supports multiple users and groups to access the same resource
* Bad, because it is a heavy setup and needs extra effort and knowledge
## Links
* [Search API](0018-file-search-api.md)
* [Search Query Language](0020-file-search-query-language.md)
* [Bleve Search on GitHub](https://github.com/blevesearch/bleve)
* [ElasticSearch](https://www.elastic.co/elastic-stack/)
@@ -0,0 +1,96 @@
---
title: "20. File Search Query Language"
date: 2022-03-18T09:00:00+01:00
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/adr
geekdocFilePath: 0018-file-search-query-language.md
---
* Status: proposed
* Deciders: @butonic, @micbar, @dragotin, @C0rby
* Date: 2022-03-18
## Context and Problem Statement
From the users perspective, the interface to search is just a single form field where the user enters one or more search terms. The minimum expectation is that the search returns file names and links to files that:
* have a file name that contains at least one of the search terms
* contain at least one of the search terms in the file contents
* have metadata that is equal or contains one of the search terms
## Decision Drivers
* The standard user should not be bothered by a query syntax
* The power user should also be able to narrow his search with an efficient and flexible syntax
* We need to consider different backend technologies which we need to access through an abstraction layer
* Using different indexing systems should lead to a slightly different feature set without changing the syntax completely
## Considered Options
* [Simple Query](#simplified-query)
* [Lucene Query Language](#lucene-query-language)
* [Solr Query Language](#solr-query-language)
* [Elasticsearch Query Language](#elasticsearch-query-language)
## Decision Outcome
Chosen option: [Simple Query](#simplified-query), because it is a suitable MVP.
### Positive Consequences
* We can do a quick implementation
### Negative consequences
* We cannot specify terms or other search criteria
* We will need to find a good point in time to use a query language before we start working around it
## Pros and Cons of the Options
### Simplified Query
Implement a very simple search approach: Return all files which contain at least one of the keywords in their name, path, alias or selected metadata.
* Good, because that covers 80% of the users needs
* Good, because it is very straightforward
* Good, because it is a suitable solution for GA
* Bad, because it is below the industry standard
* Bad, because it only provides one search query
### Lucene Query Language
The Lucene Query Parser syntax supports advanced queries like term, phrase, wildcard, fuzzy search, proximity search, regular expressions, boosting, boolean operators and grouping. It is a well known query syntax used by the Apache Lucene Project. Popular Platforms like Wikipedia are using Lucene or Solr, which is the successor of Lucene
* Good, because it is a well documented and powerful syntax
* Good, because it is very close to the Elasticsearch and the Solr syntax which enhances compatibility
* Bad, because there is no powerful and well tested query parser for golang available
* Bad, because it adds complexity and fulfilling all the different query use-cases can be an "uphill battle"
### Solr Query Language
Solr is highly reliable, scalable and fault-tolerant, providing distributed indexing, replication and load-balanced querying, automated failover and recovery, centralized configuration and more. Solr powers the search and navigation features of many of the world's largest internet sites.
* Good, because it is a well documented and powerful syntax
* Good, because it is very close to the Elasticsearch and the Lucene syntax which enhances compatibility
* Good, because it has a strong community with large resources and knowledge
* Bad, because it adds complexity and fulfilling all the different query use-cases can be an "uphill battle"
### Elasticsearch Query Language
Elasticsearch provides a full Query DSL (Domain Specific Language) based on JSON to define queries. Think of the Query DSL as an AST (Abstract Syntax Tree) of queries, consisting of two types of clauses. It is able to combine multiple query types into compound queries. It is also a successor of Solr.
* Good, because it is a well documented and powerful syntax
* Good, because it is very close to the Elasticsearch and the Solr syntax which enhances compatibility
* Good, because there is a stable and well tested go client which brings a query builder
* Good, because it could be used as the query language which supports different search backends by just implementing what is needed for our use-case
* Bad, because it adds complexity and fulfilling all the different query use-cases can be an "uphill battle"
## Links
* [Search API](0018-file-search-api.md)
* [Search Indexing](0019-file-search-index.md)
* [Apache Lucene](https://lucene.apache.org/)
* [Apache Solr](https://solr.apache.org/)
* [Elastic Search](https://solr.apache.org/)
* [Elastic Search for go](https://github.com/elastic/go-elasticsearch)
+15
View File
@@ -0,0 +1,15 @@
---
title: "Architecture Decisions"
date: 2021-02-10T20:21:00+01:00
weight: 15
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/adr
geekdocFilePath: _index.md
geekdocCollapseSection: true
---
oCIS is documenting architecture decisions using [Markdown Architectural Decision Records](https://adr.github.io/madr/) (MADR), following [Documenting Architecture Decisions by Michael Nygard](https://cognitect.com/blog/2011/11/15/documenting-architecture-decisions).
{{< toc >}}
To manage the records we use [butonic/adr-tools](https://github.com/butonic/adr-tools), a fork of the original [npryce/adr-tools](https://github.com/npryce/adr-tools), based on [a pull request that should have added MADR support](https://github.com/npryce/adr-tools/pull/43). It also supports a YAML header that is used by our Hugo based doc generation
+155
View File
@@ -0,0 +1,155 @@
---
title: "Configuration"
date: "2021-11-09T00:03:16+0100"
weight: 2
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis
geekdocFilePath: config.md
---
{{< toc >}}
## Configuration Framework
In order to simplify deployments and development the configuration model from oCIS aims to be simple yet flexible.
## Overview of the approach
{{< figure src="/ocis/static/ocis-config-redesign.drawio.svg" >}}
## In-depth configuration
Since we include a set of predefined extensions within the single binary, configuring an extension can be done in a variety of ways. Since we work with complex types, having as many cli per config value scales poorly, so we limited the options to config files and environment variables.
The hierarchy is clear enough, leaving us with:
_(each element above overwrites its precedent)_
1. env variables
2. extension config
3. ocis config
This is manifested in the previous diagram. We can then speak about "configuration file arithmetics", where resulting config transformations happen through a series of steps. An administrator must be aware of these sources, since mis-managing them can be a source of confusion, having undesired transformations on config files believed not to be applied.
## Flows
Let's explore the various flows with examples and workflows.
### Examples
Let's explore with examples this approach.
#### Expected loading locations
- docker images: `/etc/ocis/`
- binary releases: `$HOME/.ocis/config/`
followed by the `<extension name>.yaml`, eg `proxy.yaml` for the extension configuration. You also can put an `ocis.yaml` config file to the expected loading location to use a single config file.
You can set another directory as config path in the environment variable `OCIS_CONFIG_DIR`. It will then pick the same file names, but from the folder you configured.
#### Only config files
The following config files are present in the default loading locations:
_ocis.yaml_
```yaml
proxy:
http:
addr: localhost:1111
log:
pretty: false
color: false
level: info
log:
pretty: true
color: true
level: info
```
_proxy.yaml_
```yaml
http:
addr: localhost:3333
```
Note that the extension files will overwrite values from the main `ocis.yaml`, causing `ocis server` to run with the following configuration:
```yaml
proxy:
http:
addr: localhost:3333
log:
pretty: true
color: true
level: info
```
#### Using ENV variables
The logging configuration if defined in the main ocis.yaml is inherited by all extensions. It can be, however, overwritten by a single extension file if desired. The same example can be used to demonstrate environment values overwrites. With the same set of config files now we have the following command `PROXY_HTTP_ADDR=localhost:5555 ocis server`, now the resulting config looks like:
```yaml
proxy:
http:
addr: localhost:5555
log:
pretty: true
color: true
level: info
```
### Workflows
Since one can run an extension using the runtime (supervised) or not (unsupervised), we ensure correct behavior in both modes, expecting the same outputs.
#### Supervised
You are using the supervised mode whenever you issue the `ocis server` command. We start the runtime on port `9250` (by default) that listens for commands regarding the lifecycle of the supervised extensions. When an extension runs supervised and is killed, the only way to provide / overwrite configuration values will be through an extension config file. This is due to the parent process has already started, and it already has its own environment.
#### Unsupervised
All the points from the priority section hold true. An unsupervised extension can be started with the format: `ocis [extension]` i.e: `ocis proxy`. First, `ocis.yaml` is parsed, then `proxy.yaml` followed by environment variables.
## Shared Values
When running in supervised mode (`ocis server`) it is beneficial to have common values for logging, so that the log output is correctly formatted, or everything is piped to the same file without duplicating config keys and values all over the place. This is possible using the global `log` config key:
_ocis.yaml_
```yaml
log:
level: error
color: true
pretty: true
file: /var/tmp/ocis_output.log
```
There is, however, the option for extensions to overwrite this global values by declaring their own logging directives:
_ocis.yaml_
```yaml
log:
level: info
color: false
pretty: false
```
One can go as far as to make the case of an extension overwriting its shared logging config that received from the main `ocis.yaml` file. Because things can get out of hands pretty fast we recommend not mixing logging configuration values and either use the same global logging values for all extensions.
{{< hint warning >}}
When overwriting a globally shared logging values, one *MUST* specify all values.
{{< /hint >}}
### Log config keys
```yaml
log:
level: [ error | warning | info | debug ]
color: [ true | false ]
pretty: [ true | false ]
file: [ path/to/log/file ] # MUST not be used with pretty = true
```
## Default config values (in yaml)
TBD. Needs to be generated and merged with the env mappings.
+33
View File
@@ -0,0 +1,33 @@
---
title: "Deployment"
date: 2020-10-01T20:35:00+01:00
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/deployment
geekdocFilePath: _index.md
geekdocCollapseSection: true
---
{{< toc >}}
## Deployments scenarios and examples
This section handles deployments and operations for admins and people who are interested in how versatile oCIS is. If you want to just try oCIS you may also follow [Getting started]({{< ref "../getting-started" >}}).
### Setup oCIS on your server
oCIS deployments are super simple, yet there are many configurations possible for advanced setups.
- [Basic oCIS setup]({{< ref "basic-remote-setup" >}}) - configure domain, certificates and port
- [oCIS setup with Traefik for SSL termination]({{< ref "ocis_traefik" >}})
- [oCIS setup with Keycloak as identity provider]({{< ref "ocis_keycloak" >}})
- [oCIS setup with WOPI server to open office documents in your browser]({{< ref "ocis_wopi" >}})
- [Parallel deployment of oC10 and oCIS]({{< ref "oc10_ocis_parallel" >}})
- [oCIS with S3 storage backend (MinIO)]({{< ref "ocis_s3" >}})
- [oCIS with the Hello extension example]({{< ref "ocis_hello" >}})
## Secure an oCIS instance
oCIS no longer has any default secrets in versions later than oCIS 1.20.0. Therefore you're no
longer able to start oCIS without generating / setting all needed secrets.
The recommended way is to use `ocis init` for that. It will generate a secure config file for you.
@@ -0,0 +1,54 @@
---
title: "Basic Remote Setup"
date: 2020-02-27T20:35:00+01:00
weight: 16
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/deployment
geekdocFilePath: basic-remote-setup.md
---
{{< toc >}}
The default configuration of the oCIS binary and the `owncloud/ocis` docker image assume, that you access oCIS on `localhost`. This enables you to do quick testing and development without any configuration.
If you need to access oCIS running in a docker container, on a VM or a remote machine via another hostname than `localhost`, you need to configure this hostname in oCIS. The same applies if you are not using hostnames but instead an IP (e.g. `192.168.178.25`).
## Start the oCIS fullstack server from binary
Initialize the oCIS configuration by running `./bin/ocis init`.
Upon first start of the oCIS fullstack server with `./bin/ocis server` it will generate a directory tree skeleton in `$HOME/.ocis`. If that is already existing it will not be overwritten as it contains all relevant data for oCIS.
For the following examples you need to have the oCIS binary in your current working directory, we assume it is named `ocis` and it needs to be marked as executable. See [Getting Started]({{< ref "../getting-started/#binaries" >}}) for where to get the binary from.
### Using automatically generated certificates
In order to run oCIS with automatically generated and self-signed certificates please execute following command. You need to replace `your-host` with an IP or hostname. Since you have only self-signed certificates you need to have `OCIS_INSECURE` set to `true`.
```bash
OCIS_INSECURE=true \
PROXY_HTTP_ADDR=0.0.0.0:9200 \
OCIS_URL=https://your-host:9200 \
./ocis server
```
### Using already present certificates
If you have your own certificates already in place, you may want to make oCIS use them:
```bash
OCIS_INSECURE=false \
PROXY_HTTP_ADDR=0.0.0.0:9200 \
OCIS_URL=https://your-host:9200 \
PROXY_TRANSPORT_TLS_KEY=./certs/your-host.key \
PROXY_TRANSPORT_TLS_CERT=./certs/your-host.crt \
./ocis server
```
If you generated these certificates on your own, you might need to set `OCIS_INSECURE` to `true`.
For more configuration options check the configuration section in [oCIS]({{< ref "../config" >}}) and the oCIS extensions.
## Start the oCIS fullstack server with Docker Compose
Please have a look at our other [deployment examples]({{< ref "./" >}}).
+318
View File
@@ -0,0 +1,318 @@
---
title: "Bridge"
date: 2020-02-27T20:35:00+01:00
weight: 30
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/deployment
geekdocFilePath: bridge.md
---
{{< toc >}}
We are planning to build a bridge from ownCloud 10 to ocis. The idea is to have a reverse proxy in front of ownCloud 10 that will forward requests to ownCloud 10 or ocis-reva, depending on the migration status of the logged-in user.
This document is a work in progress of the current setup.
## Current status
Using ocis and the ownCloud 10 [graphapi app](https://github.com/owncloud/graphapi/) it is possible today to use an existing owncloud 10 instance as a user backend and storage backend for ocis.
## How to do it
### Install the owncloud 10 graphapi app
In an owncloud 10 apps folder
```
$ git clone git@github.com:owncloud/graphapi.git
$ cd graphapi
$ composer install
```
### Enable the graphapi app
```
occ a:e graphapi
```
No configuration necessary. You can test with `curl`:
```console
$ curl https://cloud.ocis.test/index.php/apps/graphapi/v1.0/users -u admin -s | jq
Enter host password for user 'admin':
{
"value": [
{
"id": "admin",
"displayName": "admin",
"mail": null
},
{
"id": "demo",
"displayName": "Demo",
"mail": null
},
...
],
"@odata.nextLink": "https://cloud.ocis.test/apps/graphapi/v1.0/users?$top=10&$skip=10"
}
```
{{< hint >}}
The MS graph api actually asks for `Bearer` auth, but in order to check users passwords during an LDAP bind we are exploiting ownClouds authentication implementation that will grant access when `Basic` auth is used. An LDAP Bind you may ask? Read on!
{{< /hint >}}
### Grab ocis!
```
$ git clone git@github.com:owncloud/ocis.git
$ cd ocis
$ make -C ocis build
```
This should give you an `ocis/bin/ocis` binary. Try listing the help with `ocis/bin/ocis --help`.
{{< hint >}}
You can check out a custom branch and build a custom binary which can then be used for the steps below.
{{< /hint >}}
### Start ocis glauth
We are going to use the built binary and ownCloud 10 graphapi app to turn ownCloud 10 into the datastore for an LDAP proxy.
#### configure it
While ocis can be configured using environment variables, e.g. for a docker compose setup we are going to use a more traditional config file here.
Create a config file for ocis in either `/etc/ocis`, `$HOME/.ocis` or `./.config`. You can use `.json`, `.yaml` or `.toml`. I will use toml here, because ... reasons.
```toml
[glauth.backend]
datastore = "owncloud" # switch to the owncloud datastore
servers = ["https://cloud.ocis.test/apps/graphapi/v1.0"] # the graph api endpoint to connect to
basedn = "dc=ocis,dc=test" # base dn to construct the LDAP dn. The user `admin` will become `cn=admin,dc=ocis,dc=test`
```
{{< hint >}}
There is a bug in the config merging for environment variables, cli flags and config files causing log settings not to be picked up from the config file when specifying `--extensions`. That is why I will
* configure most of the config in a file,
* adjust logging using `OCIS_LOG_*` environment variables and
* specify which extension to run using `ocis/bin/ocis server --extensions "comma, separated, list, of, extensions"`.
{{< /hint >}}
#### Run it!
For now, we only start the glauth extension:
```console
$ OCIS_LOG_PRETTY=true OCIS_LOG_COLOR=true ocis/bin/ocis server --extensions "glauth"
```
#### Check it is up and running
You should now be able to list accounts from your ownCloud 10 oc_accounts table using:
```console
$ ldapsearch -x -H ldap://127.0.0.1:9125 -b dc=ocis,dc=test -D "cn=admin,dc=ocis,dc=test" -W '(objectclass=posixaccount)'
```
Groups should work as well:
```console
$ ldapsearch -x -H ldap://127.0.0.1:9125 -b dc=ocis,dc=test -D "cn=admin,dc=ocis,dc=test" -W '(objectclass=posixgroup)'
```
{{< hint >}}
This is currently a readonly implementation and minimal to the use-case of authenticating users with an IDP.
{{< /hint >}}
### Start ocis storage-gateway, storage-authbasic and storage-userprovider
We are going to set up reva to authenticate users against our glauth LDAP proxy. This allows us to log in and use the reva cli. The ocis storage-gateway starts the reva gateway which will authenticate basic auth requests using the storage-authbasic service. Furthermore, users have to be available in the storage-userprovider to retrieve displayname, email address and other user metadata.
To configure LDAP to use our glauth we add this section to the config file:
```toml
[storage.reva.ldap]
idp = "https://ocis.ocis.test"
basedn = "dc=ocis,dc=test"
binddn = "cn=admin,dc=ocis,dc=test" # an admin user in your oc10
bindpassword = "secret"
userschema = { uid = "uid", displayname = "givenname" } # TODO make glauth return an ownclouduuid and displayname attribute
```
Now we can start all necessary services.
```console
$ OCIS_LOG_PRETTY=true OCIS_LOG_COLOR=true ocis/bin/ocis server --extensions "glauth, storage-gateway, storage-authbasic, storage-userprovider"
```
{{< hint warning >}}
Here I ran out of time. I tried to verify this step with the reva cli:
`cmd/reva/reva -insecure -host localhost:9142`
`login basic`
but it tries to create the user home, which cannot be disabled in a config file: https://github.com/owncloud/ocis/issues/2416#issuecomment-901197053
starting `STORAGE_GATEWAY_DISABLE_HOME_CREATION_ON_LOGIN=true OCIS_LOG_LEVEL=debug OCIS_LOG_PRETTY=true OCIS_LOG_COLOR=true ocis/bin/ocis server --extensions "storage-gateway, storage-authbasic, storage-userprovider"` let me login:
```console
✗ cmd/reva/reva -insecure -host localhost:9142
reva-cli v1.11.0-27-g95b1f2ee (rev-95b1f2ee)
Please use `exit` or `Ctrl-D` to exit this program.
>> login basic
username: jfd
password: OK
>> whoami
id:<idp:"https://ocis.ocis.test" opaque_id:"jfd" type:USER_TYPE_PRIMARY > username:"jfd" mail:"jfd@butonic.de" display_name:"J\303\266rn" uid_number:99 gid_number:99
>> exit
```
I hope https://github.com/owncloud/ocis/pull/2024 fixes the parsing order of things.
everything below this is outdated
... gotta run
{{< /hint >}}
### Start ocis storage-userprovider
```console
ocis/bin/ocis storage-userprovider --ldap-port 19126 --ldap-user-schema-uid uid --ldap-user-schema-displayName givenName --addr :19144
```
TODO clone `git clone git@github.com:cs3org/cs3apis.git`
query users using [grpcurl](https://github.com/fullstorydev/grpcurl)
```console
grpcurl -import-path ./cs3apis/ -proto ./cs3apis/cs3/identity/user/v1beta1/user_api.proto -plaintext localhost:19144 cs3.identity.user.v1beta1.UserAPI/FindUsers
ERROR:
Code: Unauthenticated
Message: auth: core access token not found
```
### Start ocis idp
#### Set environment variables
The built-in [libregraph/lico](https://github.com/libregraph/lico) needs environment variables to configure the LDAP server:
```console
export OCIS_URL=https://ocis.ocis.test
export IDP_LDAP_URI=ldap://127.0.0.1:9125
export IDP_LDAP_BASE_DN="dc=ocis,dc=test"
export IDP_LDAP_BIND_DN="cn=admin,dc=ocis,dc=test"
export IDP_LDAP_BIND_PASSWORD="its-a-secret"
export IDP_LDAP_SCOPE=sub
export IDP_LDAP_LOGIN_ATTRIBUTE=uid
export IDP_LDAP_NAME_ATTRIBUTE=givenName
```
Don't forget to use an existing user with admin permissions (only admins are allowed to list all users via the graph api) and the correct password.
#### Run it!
You can now bring up `ocis/bin/ocis idp` with:
```console
$ ocis/bin/ocis idp server --iss http://127.0.0.1:9130 --signing-kid gen1-2020-02-27
```
`ocis/bin/ocis idp` needs to know
- `--iss http://127.0.0.1:9130` the issuer, which must be a reachable http endpoint. For testing an ip works. For openid connect HTTPS is NOT optional. This URL is exposed in the `http://127.0.0.1:9130/.well-known/openid-configuration` endpoint and clients need to be able to connect to it, securely. We will change this when introducing the proxy.
- `--signing-kid gen1-2020-02-27` a signature key id, otherwise the jwks key has no name, which might cause problems with clients. a random key is ok, but it should change when the actual signing key changes.
{{< hint warning >}}
* TODO: the port in the `--iss` needs to be changed when hiding the idp behind the proxy
* TODO: the signing keys and encryption keys should be precreated so they are reused between restarts. Otherwise all client sessions will become invalid when restarting the IdP.
{{< /hint >}}
#### Check it is up and running
1. Try getting the configuration:
```console
$ curl http://127.0.0.1:9130/.well-known/openid-configuration
```
2. Check if the login works at http://127.0.0.1:9130/signin/v1/identifier
{{< hint >}}
If you later get a `Unable to find a key for (algorithm, kid):PS256, )` Error make sure you did set a `--signing-kid` when starting `ocis/bin/ocis idp` by checking it is present in http://127.0.0.1:9130/konnect/v1/jwks.json
{{< /hint >}}
### Start ocis proxy
{{< hint >}}
Everything below this hint is outdated. Next steps are roughly:
* directly after glauth start the `ocis storage-userporvider`?
- how to verify that works?
- https://github.com/fullstorydev/grpcurl
* start proxy
- the ocis ipd url can be changed to https
- when do we hide oc10 behind ocis? -> advanced bridge at the end? for now run it without touching the existing oc10 instance
* start web
- verify the login works, but how?
- TODO the login works, but then the capabilities requests will fail ... unless we make the proxy answer them by talking to oc10?
Other ideas:
* the owncloud backend in glauth also works with the user provisioning api ... no changes to a running production instance? db access could be done with a read only account as well...
{{< /hint >}}
### Start ocis-web
#### Run it!
Point `ocis-web` to your owncloud domain and tell it where to find the openid connect issuing authority:
```console
$ bin/web server --web-config-server https://cloud.example.com --oidc-authority https://192.168.1.100:9130 --oidc-metadata-url https://192.168.1.100:9130/.well-known/openid-configuration --oidc-client-id ocis
```
`ocis-web` needs to know
- `--web-config-server https://cloud.example.com` is ownCloud url with webdav and ocs endpoints (oc10 or ocis)
- `--oidc-authority https://192.168.1.100:9130` the openid connect issuing authority, in our case `oidc-idp`, running on port 9130
- `--oidc-metadata-url https://192.168.1.100:9130/.well-known/openid-configuration` the openid connect configuration endpoint, typically the issuer host with `.well-known/openid-configuration`, but there are cases when another endpoint is used, e.g. ping identity provides multiple endpoints to separate domains
- `--oidc-client-id ocis` the client id we will register later with `ocis-idp` in idp OIDC client settings
### Patch owncloud
While the UserSession in ownCloud 10 is currently used to test all available IAuthModule implementations, it immediately logs out the user when an exception occurs. However, existing owncloud 10 instances use the oauth2 app to create Bearer tokens for mobile and desktop clients.
To give the openidconnect app a chance to verify the tokens we need to change the code a bit. See https://github.com/owncloud/core/pull/37043 for a possible solution.
> Note: The PR is hot ... as in *younger than this list of steps*. And it messes with authentication. Use with caution.
### Install the owncloud 10 openidconnect app
In an owncloud 10 apps folder
```
$ git clone git@github.com:owncloud/openidconnect.git
$ cd openidconnect
$ composer install
```
After enabling the app configure it in `config/oidc.config.php`
```php
$CONFIG = [
'openid-connect' => [
'provider-url' => 'https://192.168.1.100:9130',
'client-id' => 'ocis',
'loginButtonName' => 'OpenId Connect @ Konnectd',
],
'debug' => true, // if using self-signed certificates
// allow the different domains access to the ocs and webdav endpoints:
'cors.allowed-domains' => [
'https://cloud.example.com',
'http://localhost:9100',
],
];
```
In the above configuration replace
- `provider-url` with the URL to your `ocis-idp` issuer
- `https://cloud.example.com` with the URL to your ownCloud 10 instance
- `http://localhost:9100` with the URL to your ownCloud Web instance
> Note: By default the openidconnect app will use the email of the user to match the user from the oidc userinfo endpoint with the ownCloud account. So make sure your users have a unique primary email.
## Next steps
Aside from the above todos these are the next steps
- tie it all together behind `ocis-proxy`
- create an `ocis bridge` command that runs all the ocis services in one step with a properly preconfigured idp OIDC client `ocis-idp` for `ownCloud Web` and the owncloud 10 `openidconnect` app, as well as a randomized `--signing-kid`.
@@ -0,0 +1,137 @@
---
title: "Continuous Deployment"
date: 2020-10-12T14:04:00+01:00
weight: 10
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/deployment
geekdocFilePath: continuous_deployment.md
---
{{< toc >}}
We are continuously deploying the following deployment examples. Every example is deployed in two flavors:
- Latest: reflects the current master branch state of oCIS and will be updated with every commit to master
- Released: reflects the newest release state (currently latest release of version 1) and will be updated with every release
The configuration for the continuous deployment can be found in the [oCIS repository](https://github.com/owncloud/ocis/tree/master/deployments/continuous-deployment-config).
# oCIS with Traefik
Credentials:
- oCIS: see [default demo users]({{< ref "../getting-started#login-to-owncloud-web" >}})
## Latest
- oCIS: [ocis.ocis-traefik.latest.owncloud.works](https://ocis.ocis-traefik.latest.owncloud.works)
- Mail: [mail.ocis-traefik.latest.owncloud.works](https://mail.ocis-traefik.latest.owncloud.works)
## Released
- oCIS: [ocis.ocis-traefik.released.owncloud.works](https://ocis.ocis-traefik.released.owncloud.works)
- Mail: [mail.ocis-traefik.released.owncloud.works](https://mail.ocis-traefik.released.owncloud.works)
# oCIS with WOPI server
Credentials:
- oCIS: see [default demo users]({{< ref "../getting-started#login-to-owncloud-web" >}})
## Latest
- oCIS: [ocis.ocis-wopi.latest.owncloud.works](https://ocis.ocis-wopi.latest.owncloud.works)
## Released
- oCIS: [ocis.ocis-wopi.released.owncloud.works](https://ocis.ocis-wopi.released.owncloud.works)
# oCIS with latest ownCloud Web
Credentials:
- oCIS: see [default demo users]({{< ref "../getting-started#login-to-owncloud-web" >}})
## Latest
- oCIS: [ocis.ocis-web.latest.owncloud.works](https://ocis.ocis-web.latest.owncloud.works)
# oCIS with Keycloak
Credentials:
- oCIS: see [default demo users]({{< ref "../getting-started#login-to-owncloud-web" >}})
- Keycloak:
- username: admin
- password: admin
## Latest
- oCIS: [ocis.ocis-keycloak.latest.owncloud.works](https://ocis.ocis-keycloak.latest.owncloud.works)
- Keycloak: [keycloak.ocis-keycloak.latest.owncloud.works](https://keycloak.ocis-keycloak.latest.owncloud.works)
## Released
- oCIS: [ocis.ocis-keycloak.released.owncloud.works](https://ocis.ocis-keycloak.released.owncloud.works)
- Keycloak: [keycloak.ocis-keycloak.released.owncloud.works](https://keycloak.ocis-keycloak.released.owncloud.works)
# Parallel deployment of oC10 and oCIS
Credentials:
- oC10 / oCIS: see [default demo users]({{< ref "../getting-started#login-to-owncloud-web" >}})
- Keycloak:
- username: admin
- password: admin
- LDAP management:
- username: cn=admin,dc=owncloud,dc=com
- password: admin
## Latest
- oC10 / oCIS: [cloud.oc10-ocis-parallel.latest.owncloud.works](https://cloud.oc10-ocis-parallel.latest.owncloud.works)
- LDAP management: [ldap.oc10-ocis-parallel.latest.owncloud.works](https://ldap.oc10-ocis-parallel.latest.owncloud.works)
- Keycloak: [keycloak.oc10-ocis-parallel.latest.owncloud.works](https://keycloak.oc10-ocis-parallel.latest.owncloud.works)
# oCIS with Hello extension
Credentials:
- oCIS: see [default demo users]({{< ref "../getting-started#login-to-owncloud-web" >}})
## Latest
- oCIS: [ocis.ocis-hello.latest.owncloud.works](https://ocis.ocis-hello.latest.owncloud.works)
# oCIS with S3 storage backend (MinIO)
Credentials:
- oCIS: see [default demo users]({{< ref "../getting-started#login-to-owncloud-web" >}})
- MinIO:
- access key: ocis
- secret access key: ocis-secret-key
## Latest
- oCIS: [ocis.ocis-s3.latest.owncloud.works](https://ocis.ocis-s3.latest.owncloud.works)
- MinIO: [minio.ocis-s3.latest.owncloud.works](https://minio.ocis-s3.latest.owncloud.works)
# oCIS with LDAP for users and groups
Credentials:
- oCIS: see [default demo users]({{< ref "../getting-started#login-to-owncloud-web" >}})
- LDAP admin:
- username: cn=admin,dc=owncloud,dc=com
- password: admin
## Latest
- oCIS: [ocis.ocis-ldap.latest.owncloud.works](https://ocis.ocis-ldap.latest.owncloud.works)
- LDAP admin: [ldap.ocis-ldap.latest.owncloud.works](https://ldap.ocis-ldap.latest.owncloud.works)
## Released
- oCIS: [ocis.ocis-ldap.released.owncloud.works](https://ocis.ocis-ldap.released.owncloud.works)
- LDAP admin: [ldap.ocis-ldap.released.owncloud.works](https://ldap.ocis-ldap.released.owncloud.works)
+73
View File
@@ -0,0 +1,73 @@
---
title: "Kubernetes"
date: 2021-09-23T11:04:00+01:00
weight: 25
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/deployment
geekdocFilePath: kubernetes.md
---
{{< toc >}}
## What is Kubernetes
Formally described as:
> Kubernetes is a portable, extensible, open-source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation.
_[source](https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/)_
Without getting too deep in definitions, and for the purpose of compactness, Kubernetes can be summarized as a way of managing containers that run applications to ensure that there is no downtime and an optimal usage of resources. It provides with a framework in which to run distributed systems.
Kubernetes provides you with:
- **Service discovery and load balancing**: Kubernetes can expose a container using the DNS name or using their own IP address. If traffic to a container is high, Kubernetes is able to load balance and distribute the network traffic so that the deployment is stable.
- **Storage orchestration**: Kubernetes allows you to automatically mount a storage system of your choice, such as local storages, public cloud providers, and more.
- **Automated rollouts and rollbacks**: You can describe the desired state for your deployed containers using Kubernetes, and it can change the actual state to the desired state at a controlled rate. For example, you can automate Kubernetes to create new containers for your deployment, remove existing containers and adopt all their resources to the new container.
- **Automatic bin packing**: You provide Kubernetes with a cluster of nodes that it can use to run containerized tasks. You tell Kubernetes how much CPU and memory (RAM) each container needs. Kubernetes can fit containers onto your nodes to make the best use of your resources.
- **Self-healing**: Kubernetes restarts containers that fail, replaces containers, kills containers that don't respond to your user-defined health check, and doesn't advertise them to clients until they are ready to serve.
- **Secret and configuration management**: Kubernetes lets you store and manage sensitive information, such as passwords, OAuth tokens, and SSH keys. You can deploy and update secrets and application configuration without rebuilding your container images, and without exposing secrets in your stack configuration.
_[extracted from k8s docs](https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/#why-you-need-kubernetes-and-what-can-it-do)_
If that is still too abstract, [here is an ELI5 writeup](https://dev.to/miguelmota/comment/filh).
### References and further reads
- [Marcel Wunderlich's](https://github.com/Deaddy) [4 series articles](http://deaddy.net/introduction-to-kubernetes-pt-1.html) on Kubernetes clarifying its declarative nature, deep diving into ingress networking, storage and monitoring.
### How does oCIS fit in the Kubernetes model
oCIS was designed with running on Kubernetes in mind. We set up to adopt the [Twelve-Factor App](https://12factor.net/) principles regarding configuration, with almost every aspect of oCIS being modifiable via environment variables. This comes in handy when you especially have a look at how a helm chart's (we will introduce this concept shortly) [list of values](https://github.com/owncloud/ocis-charts/blob/d8735e3222d2050504303851d3461909c86fcc89/ocis/values.yaml) looks like.
## What is Minikube
[Minikube](https://minikube.sigs.k8s.io/docs/) lets you run a Kubernetes cluster locally. It is the most approachable way to test a deployment. It requires no extra configuration on any cloud platform, as everything runs on your local machine. For the purpose of these docs, this is the first approach we chose to run oCIS and will develop on how to set it up.
## What is `kubectl`
[kubectl](https://kubernetes.io/docs/tasks/tools/) is the command-line tool for Kubernetes. It allows users to run commands against a k8s cluster the user has access to. It supports for having multiple contexts for as many clusters as you have access to. In these docs we will setup 2 contexts, a minikube and a GCP context.
## What are Helm Charts, and why they are useful for oCIS
[Helm](https://helm.sh/) is the equivalent of a package manager for Kubernetes. It can be described as a layer on top of how you would write pods, deployments or any other k8s resource declaration.
### Installing Helm
[Follow the official installation guide](https://helm.sh/docs/intro/install/).
## Setting up Minikube
For a guide on how to set minikube up follow the [official minikube start guide](https://minikube.sigs.k8s.io/docs/start/) for your specific OS.
## oCIS charts
We have not yet published the oCIS Helm charts, therefore you need to clone the git repository manually. It currently also does not support to be run on Kind or Minikube clusters. For known issues and planned features, please have a look at the [GitHub issue tracker](https://github.com/owncloud/ocis-charts/issues).
Configuration options are described [here](https://github.com/owncloud/ocis-charts/tree/master/charts/ocis#configuration).
### Run oCIS
1. clone the charts: `git clone https://github.com/owncloud/ocis-charts.git /var/tmp/ocis-charts`
2. cd into the charts root: `cd /var/tmp/ocis-charts/ocis`
3. install the package: `helm install ocis .` (you need to set configuration values in almost all cases)
4. verify the application is running in the cluster: `kubectl get pods`
@@ -0,0 +1,42 @@
---
title: "Monitoring & Tracing"
date: 2020-02-27T20:35:00+01:00
weight: 10
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/deployment
geekdocFilePath: monitoring-tracing.md
---
{{< toc >}}
Monitoring and tracing gives developers and admin insights into a complex system, in this case oCIS.
If you are a developer and want to trace during developing you should have a look at [example server setup]({{< ref "../development/tracing" >}}).
This documentation describes how to set up a long-running monitoring & tracing infrastructure for one or multiple oCIS servers or deployments. After reading this guide, you also should know everything needed to integrate oCIS into your existing monitoring and tracing infrastructure.
# Overview about the proposed solution
{{< figure src="/ocis/static/monitoring_tracing_overview.drawio.svg" >}}
## Monitoring & tracing clients
We assume that you already have oCIS deployed on one or multiple servers by using our deployment examples (see rectangle on the left). On these servers our monitoring & tracing clients, namely Telegraf and Jaeger agent, need to be added.
Telegraf will collect host metrics (CPU, RAM, network, processes, ...) and docker metrics (per container CPU, RAM, network, ...). Telegraf is also configured to scrape metrics from Prometheus metric endpoints which oCIS exposes, this is done by the Prometheus input plugin . The metrics from oCIS and all other metrics gathered will be exposed with the Prometheus output plugin and can therefore be scraped by our monitoring & tracing server.
Jaeger agent is being configured as target for traces in oCIS. It then will receive traces from all oCIS extensions, add some process tags to them and forward them to our Jaeger collector on our monitoring & tracing server.
For more information and how to deploy it, see [monitoring & tracing client](https://github.com/owncloud-devops/monitoring-tracing-client).
## Monitoring & tracing server
A live version of the monitoring and tracing server for our demo instances is available here: [Grafana](https://grafana.infra.owncloud.works), [Prometheus](https://prometheus.infra.owncloud.works) and [Jaeger Query](https://jaeger.infra.owncloud.works).
The monitoring & tracing server is considered as shared infrastructure and is normally used for different services. This means that oCIS is not the only software whose metrics and traces are available on the monitoring server. It is also possible that data of multiple oCIS instances are available on the monitoring server.
Metrics are scraped, stored and can be queried with Prometheus. For the visualization of these metrics Grafana is used. Because Prometheus is scraping the metrics from the oCIS server (pull model instead of a push model), the Prometheus server must have access to the exposed endpoint of the Telegraf Prometheus output plugin.
Jaeger collector receives traces sent by the Jaeger agent on the oCIS servers and persists them in ElasticSearch. From there the user can query and visualize the traces in Jaeger query or in Grafana. Because Jaeger agent is actively sending traces to the monitoring & tracing server, the server must be reachable from the oCIS server.
For more information and how to deploy it, see [monitoring & tracing server](https://github.com/owncloud-devops/monitoring-tracing-server).
@@ -0,0 +1,168 @@
---
title: "Parallel deployment of oC10 and oCIS"
date: 2020-10-12T14:04:00+01:00
weight: 24
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/deployment
geekdocFilePath: oc10_ocis_parallel.md
---
{{< toc >}}
## Overview
- This setup reflects [stage 6 of the oC10 to oCIS migration plan]({{< ref "migration#stage-6-parallel-deployment" >}})
- Traefik generating self-signed certificates for local setup or obtaining valid SSL certificates for a server setup
- OpenLDAP server with demo users
- LDAP admin interface to edit users
- Keycloak as OpenID Connect provider in federation with the LDAP server
- ownCloud 10 with MariaDB and Redis
- ownCloud 10 is configured to synchronize users from the LDAP server
- ownCloud 10 is used to use OpenID Connect for authentication with Keycloak
- oCIS running behind Traefik as reverse proxy
- oCIS is using the ownCloudSQL storage driver on the same files and same database as ownCloud 10
- oCIS is using Keycloak as OpenID Connect provider
- oCIS is using the LDAP server as user backend
- All requests to both oCIS and oC10 are routed through the oCIS proxy and will be routed based on an OIDC claim to one of them. Therefore admins can change on a user basis in the LDAP which backend is used.
[Find this example on GitHub](https://github.com/owncloud/ocis/tree/master/deployments/examples/oc10_ocis_parallel)
## Server Deployment
### Requirements
- Linux server with docker and docker-compose installed
- four domains set up and pointing to your server
- cloud.\* for serving oCIS
- keycloak.\* for serving Keycloak
- ldap .\* for serving the LDAP management UI
- traefik.\* for serving the Traefik dashboard
See also [example server setup]({{< ref "preparing_server" >}})
### Install this example
- Clone oCIS repository
`git clone https://github.com/owncloud/ocis.git`
- Go to the deployment example
`cd ocis/deployment/examples/oc10_ocis_parallel`
- Open the `.env` file in a text editor
The file by default looks like this:
```bash
# If you're on a internet facing server please comment out following line.
# It skips certificate validation for various parts of oCIS and is needed if you use self signed certificates.
INSECURE=true
### Traefik settings ###
TRAEFIK_LOG_LEVEL=
# Serve Traefik dashboard. Defaults to "false".
TRAEFIK_DASHBOARD=
# Domain of Traefik, where you can find the dashboard. Defaults to "traefik.owncloud.test"
TRAEFIK_DOMAIN=
# Basic authentication for the dashboard. Defaults to user "admin" and password "admin"
TRAEFIK_BASIC_AUTH_USERS=
# Email address for obtaining LetsEncrypt certificates, needs only be changed if this is a public facing server
TRAEFIK_ACME_MAIL=
### shared oCIS / oC10 settings ###
# Domain of oCIS / oC10, where you can find the frontend. Defaults to "cloud.owncloud.test"
CLOUD_DOMAIN=
### oCIS settings ###
# oCIS version. Defaults to "latest"
OCIS_DOCKER_TAG=
# JWT secret which is used for the storage provider. Must be changed in order to have a secure oCIS. Defaults to "Pive-Fumkiu4"
OCIS_JWT_SECRET=
# JWT secret which is used for uploads to create transfer tokens. Must be changed in order to have a secure oCIS. Defaults to "replace-me-with-a-transfer-secret"
STORAGE_TRANSFER_SECRET=
# Machine auth api key secret. Must be changed in order to have a secure oCIS. Defaults to "change-me-please"
OCIS_MACHINE_AUTH_API_KEY=
### oCIS settings ###
# oC10 version. Defaults to "latest"
OC10_DOCKER_TAG=
# client secret which the openidconnect app uses to authenticate to Keycloak. Defaults to "oc10-oidc-secret"
OC10_OIDC_CLIENT_SECRET=
# app which will be shown when opening the ownCloud 10 UI. Defaults to "files" but also could be set to "web"
OWNCLOUD_DEFAULT_APP=
# if set to "false" (default) links will be opened in the classic UI, if set to "true" ownCloud Web is used
OWNCLOUD_WEB_REWRITE_LINKS=
### LDAP settings ###
# password for the LDAP admin user "cn=admin,dc=owncloud,dc=com", defaults to "admin"
LDAP_ADMIN_PASSWORD=
# Domain of the LDAP management frontend. Defaults to "ldap.owncloud.test"
LDAP_MANAGER_DOMAIN=
### Keycloak ###
# Domain of Keycloak, where you can find the management and authentication frontend. Defaults to "keycloak.owncloud.test"
KEYCLOAK_DOMAIN=
# Realm which to be used with oC10 and oCIS. Defaults to "owncloud"
KEYCLOAK_REALM=
# Admin user login name. Defaults to "admin"
KEYCLOAK_ADMIN_USER=
# Admin user login password. Defaults to "admin"
KEYCLOAK_ADMIN_PASSWORD=
```
You are installing oCIS on a server and Traefik will obtain valid certificates for you so please remove `INSECURE=true` or set it to `false`.
If you want to use the Traefik dashboard, set TRAEFIK_DASHBOARD to `true` (default is `false` and therefore not active). If you activate it, you must set a domain for the Traefik dashboard in `TRAEFIK_DOMAIN=` e.g. `TRAEFIK_DOMAIN=traefik.owncloud.test`.
The Traefik dashboard is secured by basic auth. Default credentials are the user `admin` with the password `admin`. To set your own credentials, generate a htpasswd (e.g. by using [an online tool](https://htpasswdgenerator.de/) or a cli tool).
Traefik will issue certificates with LetsEncrypt and therefore you must set an email address in `TRAEFIK_ACME_MAIL=`.
By default oCIS will be started in the `latest` version. If you want to start a specific version of oCIS set the version to `OCIS_DOCKER_TAG=`. Available versions can be found on [Docker Hub](https://hub.docker.com/r/owncloud/ocis/tags?page=1&ordering=last_updated).
Set your domain for the oC10 and oCIS frontend in `CLOUD_DOMAIN=`, e.g. `CLOUD_DOMAIN=cloud.owncloud.test`.
By default ownCloud 10 will be started in the `latest` version. If you want to start a specific version of oCIS set the version to `OC10_DOCKER_TAG=`. Available versions can be found on [Docker Hub](https://hub.docker.com/r/owncloud/ocis/tags?page=1&ordering=last_updated).
You can switch the default application of ownCloud 10 by setting`OWNCLOUD_DEFAULT_APP=files` in oder to have the classic UI as frontend, which is also the default. If you prefer ownCloud Web as the default application in ownCloud 10 just set `OWNCLOUD_DEFAULT_APP=web`.
In oder to change the default link open action which defaults to the classic UI (`OWNCLOUD_WEB_REWRITE_LINKS=false`) you can set it to `OWNCLOUD_WEB_REWRITE_LINKS=true`. This will lead to links being opened in ownCloud Web.
The OpenLDAP server in this example deployment has an admin users, which is also used as bind user in order to keep these examples simple. You can change the default password "admin" to a different one by setting it to `LDAP_ADMIN_PASSWORD=...`.
Set your domain for the LDAP manager UI in `LDAP_MANAGER_DOMAIN=`, e.g. `ldap.owncloud.test`.
Set your domain for the Keycloak administration panel and authentication endpoints to `KEYCLOAK_DOMAIN=` e.g. `KEYCLOAK_DOMAIN=keycloak.owncloud.test`.
Changing the used Keycloak realm can be done by setting `KEYCLOAK_REALM=`. This defaults to the ownCloud realm `KEYCLOAK_REALM=owncloud`. The ownCloud realm will be automatically imported on startup and includes our demo users.
You probably should secure your Keycloak admin account by setting `KEYCLOAK_ADMIN_USER=` and `KEYCLOAK_ADMIN_PASSWORD=` to values other than `admin`.
Now you have configured everything and can save the file.
- Start the docker stack
`docker-compose up -d`
- You now can visit the cloud, oC10 or oCIS depending on the user configuration. Marie defaults to oC10 and Richard and Einstein default to oCIS, but you can change the ownCloud selector at any time in the LDAP management UI.
## Local setup
For a more simple local ocis setup see [Getting started]({{< ref "../getting-started" >}})
This docker stack can also be run locally. One downside is that Traefik can not obtain valid SSL certificates and therefore will create self-signed ones. This means that your browser will show scary warnings. Another downside is that you can not point DNS entries to your localhost. So you have to add static host entries to your computer.
On Linux and macOS you can add them to your `/etc/hosts` file and on Windows to `C:\Windows\System32\Drivers\etc\hosts` file like this:
```
127.0.0.1 cloud.owncloud.test
127.0.0.1 keycloak.owncloud.test
127.0.0.1 ldap.owncloud.test
127.0.0.1 traefik.owncloud.test
```
After that you're ready to start the application stack:
`docker-compose up -d`
You now can visit the cloud, oC10 or oCIS depending on the user configuration. Marie defaults to oC10 and Richard and Einstein default to oCIS, but you can change the ownCloud selector at any time in the LDAP management UI.
+122
View File
@@ -0,0 +1,122 @@
---
title: "oCIS with Hello extension"
date: 2020-10-12T14:04:00+01:00
weight: 24
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/deployment
geekdocFilePath: ocis_hello.md
---
{{< toc >}}
## Overview
- oCIS running behind Traefik as reverse proxy
- oCIS Hello extension runs beside the main oCIS stack and providing the Hello functionality
- Traefik generating self-signed certificates for local setup or obtaining valid SSL certificates for a server setup
[Find this example on GitHub](https://github.com/owncloud/ocis/tree/master/deployments/examples/ocis_hello)
The docker stack consists of 3 containers. One of them is Traefik, a proxy which is terminating SSL and forwards the requests to oCIS in the internal docker network.
The next container is oCIS itself in a configuration like the [oCIS with Traefik example]({{< ref "ocis_traefik" >}}), except that for this example a custom proxy and web UI configuration is used to enable the oCIS Hello extension.
The oCIS Hello extension is running in another container and enables you to use its functionality from within ownCloud Web.
## Server Deployment
### Requirements
- Linux server with docker and docker-compose installed
- two domains set up and pointing to your server
- ocis.\* for serving oCIS
- traefik.\* for serving the Traefik dashboard
See also [example server setup]({{< ref "preparing_server" >}})
### Install oCIS and Traefik
- Clone oCIS repository
`git clone https://github.com/owncloud/ocis.git`
- Go to the deployment example
`cd ocis/deployment/examples/ocis_hello`
- Open the `.env` file in a text editor
The file by default looks like this:
```bash
# If you're on a internet facing server please comment out following line.
# It skips certificate validation for various parts of oCIS and is needed if you use self signed certificates.
INSECURE=true
### Traefik settings ###
# Serve Traefik dashboard. Defaults to "false".
TRAEFIK_DASHBOARD=
# Domain of Traefik, where you can find the dashboard. Defaults to "traefik.owncloud.test"
TRAEFIK_DOMAIN=
# Basic authentication for the dashboard. Defaults to user "admin" and password "admin"
TRAEFIK_BASIC_AUTH_USERS=
# Email address for obtaining LetsEncrypt certificates, needs only be changed if this is a public facing server
TRAEFIK_ACME_MAIL=
### oCIS settings ###
# oCIS version. Defaults to "latest"
OCIS_DOCKER_TAG=
# Domain of oCIS, where you can find the frontend. Defaults to "ocis.owncloud.test"
OCIS_DOMAIN=
# oCIS admin user password. Defaults to "admin".
ADMIN_PASSWORD=
# The demo users should not be created on a production instance
# because their passwords are public. Defaults to "false".
DEMO_USERS=
### oCIS Hello settings ###
# oCIS Hello version. Defaults to "latest"
OCIS_HELLO_DOCKER_TAG=
```
You are installing oCIS on a server and Traefik will obtain valid certificates for you so please remove `INSECURE=true` or set it to `false`.
If you want to use the Traefik dashboard, set TRAEFIK_DASHBOARD to `true` (default is `false` and therefore not active). If you activate it, you must set a domain for the Traefik dashboard in `TRAEFIK_DOMAIN=` e.g. `TRAEFIK_DOMAIN=traefik.owncloud.test`.
The Traefik dashboard is secured by basic auth. Default credentials are the user `admin` with the password `admin`. To set your own credentials, generate a htpasswd (e.g. by using [an online tool](https://htpasswdgenerator.de/) or a cli tool).
Traefik will issue certificates with LetsEncrypt and therefore you must set an email address in `TRAEFIK_ACME_MAIL=`.
By default oCIS will be started in the `latest` version. If you want to start a specific version of oCIS set the version to `OCIS_DOCKER_TAG=`. Available versions can be found on [Docker Hub](https://hub.docker.com/r/owncloud/ocis/tags?page=1&ordering=last_updated).
Set your domain for the oCIS frontend in `OCIS_DOMAIN=`, e.g. `OCIS_DOMAIN=ocis.owncloud.test`.
Set the initial admin user password in `ADMIN_PASSWORD=`, it defaults to `admin`.
By default the oCIS Hello extension will be started in the `latest` version. If you want to start a specific version of oCIS Hello set the version to `OCIS_HELLO_DOCKER_TAG=`. Available versions can be found on [Docker Hub](https://hub.docker.com/r/owncloud/ocis-hello/tags?page=1&ordering=last_updated).
Now you have configured everything and can save the file.
- Start the docker stack
`docker-compose up -d`
- You now can visit oCIS and are able to switch to the Hello extension by using the application switcher on the top right corner of ownCloud Web. You may need to wait some minutes until all services are fully ready, so make sure that you try to reload the pages from time to time.
## Local setup
For a more simple local ocis setup see [Getting started]({{< ref "../getting-started" >}})
This docker stack can also be run locally. One downside is that Traefik can not obtain valid SSL certificates and therefore will create self-signed ones. This means that your browser will show scary warnings. Another downside is that you can not point DNS entries to your localhost. So you have to add static host entries to your computer.
On Linux and macOS you can add them to your `/etc/hosts` file and on Windows to `C:\Windows\System32\Drivers\etc\hosts` file like this:
```
127.0.0.1 ocis.owncloud.test
127.0.0.1 traefik.owncloud.test
```
After that you're ready to start the application stack:
`docker-compose up -d`
Open https://ocis.owncloud.test in your browser and accept the invalid certificate warning. You are now able to switch to the Hello extension by using the application switcher on the top right corner of ownCloud Web. You may need to wait some minutes until all services are fully ready, so make sure that you try to reload the pages from time to time.
+135
View File
@@ -0,0 +1,135 @@
---
title: "oCIS with Keycloak"
date: 2020-10-12T14:04:00+01:00
weight: 24
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/deployment
geekdocFilePath: ocis_keycloak.md
---
{{< toc >}}
## Overview
* oCIS and Keycloak running behind Traefik as reverse proxy
* Keycloak acting as the IDP for oCIS
* Traefik generating self-signed certificates for local setup or obtaining valid SSL certificates for a server setup
[Find this example on GitHub](https://github.com/owncloud/ocis/tree/master/deployments/examples/ocis_keycloak)
The docker stack consists 4 containers. One of them is Traefik, a proxy which is terminating ssl and forwards the requests to oCIS in the internal docker network. It
is also responsible for redirecting requests on the OIDC discovery endpoints (e.g. `.well-known/openid-configuration`) to the correct destination in Keycloak.
Keycloak add two containers: Keycloak itself and a PostgreSQL as database. Keycloak will be configured as oCIS' IDP instead of the internal IDP [LibreGraph Connect]({{< ref "../../services/idp" >}})
The other container is oCIS itself, running all services in one container. In this example oCIS uses the [oCIS storage driver]({{< ref "../storage/storagedrivers" >}})
## Server Deployment
### Requirements
* Linux server with docker and docker-compose installed
* Three domains set up and pointing to your server
- ocis.* for serving oCIS
- keycloak.* for serving Keycloak
- traefik.* for serving the Traefik dashboard
See also [example server setup]({{< ref "preparing_server" >}})
### Install oCIS and Traefik
* Clone oCIS repository
`git clone https://github.com/owncloud/ocis.git`
* Go to the deployment example
`cd ocis/deployments/examples/ocis_keycloak`
* Open the `.env` file in a text editor
The file by default looks like this:
```bash
# If you're on a internet facing server please comment out following line.
# It skips certificate validation for various parts of oCIS and is needed if you use self signed certificates.
INSECURE=true
### Traefik settings ###
# Serve Traefik dashboard. Defaults to "false".
TRAEFIK_DASHBOARD=
# Domain of Traefik, where you can find the dashboard. Defaults to "traefik.owncloud.test"
TRAEFIK_DOMAIN=
# Basic authentication for the dashboard. Defaults to user "admin" and password "admin"
TRAEFIK_BASIC_AUTH_USERS=
# Email address for obtaining LetsEncrypt certificates, needs only be changed if this is a public facing server
TRAEFIK_ACME_MAIL=
### oCIS settings ###
# oCIS version. Defaults to "latest"
OCIS_DOCKER_TAG=
# Domain of oCIS, where you can find the frontend. Defaults to "ocis.owncloud.test"
OCIS_DOMAIN=
# ownCloud Web openid connect client id. Defaults to "ocis-web"
OCIS_OIDC_CLIENT_ID=
### Keycloak ###
# Domain of Keycloak, where you can find the management and authentication frontend. Defaults to "keycloak.owncloud.test"
KEYCLOAK_DOMAIN=
# Realm which to be used with oCIS. Defaults to "oCIS"
KEYCLOAK_REALM=
# Admin user login name. Defaults to "admin"
KEYCLOAK_ADMIN_USER=
# Admin user login password. Defaults to "admin"
KEYCLOAK_ADMIN_PASSWORD=
```
You are installing oCIS on a server and Traefik will obtain valid certificates for you so please remove `INSECURE=true` or set it to `false`.
If you want to use the Traefik dashboard, set TRAEFIK_DASHBOARD to `true` (default is `false` and therefore not active). If you activate it, you must set a domain for the Traefik dashboard in `TRAEFIK_DOMAIN=` e.g. `TRAEFIK_DOMAIN=traefik.owncloud.test`.
The Traefik dashboard is secured by basic auth. Default credentials are the user `admin` with the password `admin`. To set your own credentials, generate a htpasswd (e.g. by using [an online tool](https://htpasswdgenerator.de/) or a cli tool).
Traefik will issue certificates with LetsEncrypt and therefore you must set an email address in `TRAEFIK_ACME_MAIL=`.
By default oCIS will be started in the `latest` version. If you want to start a specific version of oCIS set the version to `OCIS_DOCKER_TAG=`. Available versions can be found on [Docker Hub](https://hub.docker.com/r/owncloud/ocis/tags?page=1&ordering=last_updated).
Set your domain for the oCIS frontend in `OCIS_DOMAIN=`, e.g. `OCIS_DOMAIN=ocis.owncloud.test`.
If you want to change the OIDC client id of th ownCloud Web frontend, you can do this by setting the name to `OCIS_OIDC_CLIENT_ID=`.
Set your domain for the Keycloak administration panel and authentication endpoints to `KEYCLOAK_DOMAIN=` e.g. `KEYCLOAK_DOMAIN=keycloak.owncloud.test`.
Changing the used Keycloak realm can be done by setting `KEYCLOAK_REALM=`. This defaults to the oCIS realm `KEYCLOAK_REALM=oCIS`. The oCIS realm will be automatically imported on startup and includes our demo users.
You probably should secure your Keycloak admin account by setting `KEYCLOAK_ADMIN_USER=` and `KEYCLOAK_ADMIN_PASSWORD=` to values other than `admin`.
Now you have configured everything and can save the file.
* Start the docker stack
`docker-compose up -d`
* You now can visit oCIS, Keycloak and Traefik dashboard on your configured domains. You may need to wait some minutes until all services are fully ready, so make sure that you try to reload the pages from time to time.
## Local setup
For a more simple local ocis setup see [Getting started]({{< ref "../getting-started" >}})
This docker stack can also be run locally. One downside is that Traefik can not obtain valid SSL certificates and therefore will create self-signed ones. This means that your browser will show scary warnings. Another downside is that you can not point DNS entries to your localhost. So you have to add static host entries to your computer.
On Linux and macOS you can add them to your `/etc/hosts` file and on Windows to `C:\Windows\System32\Drivers\etc\hosts` file like this:
```
127.0.0.1 ocis.owncloud.test
127.0.0.1 traefik.owncloud.test
127.0.0.1 keycloak.owncloud.test
```
After that you're ready to start the application stack:
`docker-compose up -d`
Open https://keycloak.owncloud.test in your browser and accept the invalid certificate warning.
Open https://ocis.owncloud.test in your browser and accept the invalid certificate warning. You now can login to oCIS with the demo users. You may need to wait some minutes until all services are fully ready, so make sure that you try to reload the pages from time to time.
+133
View File
@@ -0,0 +1,133 @@
---
title: "oCIS with LDAP"
date: 2020-10-12T14:04:00+01:00
weight: 24
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/deployment
geekdocFilePath: ocis_ldap.md
---
{{< toc >}}
## Overview
- Traefik generating self-signed certificates for local setup or obtaining valid SSL certificates for a server setup
- OpenLDAP server with demo users
- LDAP admin interface to edit users
- oCIS running behind Traefik as reverse proxy
- oCIS is using the LDAP server as user backend
[Find this example on GitHub](https://github.com/owncloud/ocis/tree/master/deployments/examples/ocis_ldap)
## Server Deployment
### Requirements
- Linux server with docker and docker-compose installed
- four domains set up and pointing to your server
- ocis.\* for serving oCIS
- ldap .\* for serving the LDAP management UI
- traefik.\* for serving the Traefik dashboard
See also [example server setup]({{< ref "preparing_server" >}})
### Install this example
- Clone oCIS repository
`git clone https://github.com/owncloud/ocis.git`
- Go to the deployment example
`cd ocis/deployment/examples/ocis_ldap`
- Open the `.env` file in a text editor
The file by default looks like this:
```bash
# If you're on a internet facing server please comment out following line.
# It skips certificate validation for various parts of oCIS and is needed if you use self signed certificates.
INSECURE=true
### Traefik settings ###
# Serve Traefik dashboard. Defaults to "false".
TRAEFIK_DASHBOARD=
# Domain of Traefik, where you can find the dashboard. Defaults to "traefik.owncloud.test"
TRAEFIK_DOMAIN=
# Basic authentication for the dashboard. Defaults to user "admin" and password "admin"
TRAEFIK_BASIC_AUTH_USERS=
# Email address for obtaining LetsEncrypt certificates, needs only be changed if this is a public facing server
TRAEFIK_ACME_MAIL=
### oCIS settings ###
# oCIS version. Defaults to "latest"
OCIS_DOCKER_TAG=
# Domain of oCIS, where you can find the frontend. Defaults to "ocis.owncloud.test"
OCIS_DOMAIN=
# JWT secret which is used for the storage provider. Must be changed in order to have a secure oCIS. Defaults to "Pive-Fumkiu4"
OCIS_JWT_SECRET=
# JWT secret which is used for uploads to create transfer tokens. Must be changed in order to have a secure oCIS. Defaults to "replace-me-with-a-transfer-secret"
STORAGE_TRANSFER_SECRET=
# Machine auth api key secret. Must be changed in order to have a secure oCIS. Defaults to "change-me-please"
OCIS_MACHINE_AUTH_API_KEY=
### LDAP server settings ###
# Password of LDAP user "cn=admin,dc=owncloud,dc=com". Defaults to "admin"
LDAP_ADMIN_PASSWORD=
### LDAP manager settings ###
# Domain of LDAP manager. Defaults to "ldap.owncloud.test"
LDAP_MANAGER_DOMAIN=
```
You are installing oCIS on a server and Traefik will obtain valid certificates for you so please remove `INSECURE=true` or set it to `false`.
If you want to use the Traefik dashboard, set TRAEFIK_DASHBOARD to `true` (default is `false` and therefore not active). If you activate it, you must set a domain for the Traefik dashboard in `TRAEFIK_DOMAIN=` e.g. `TRAEFIK_DOMAIN=traefik.owncloud.test`.
The Traefik dashboard is secured by basic auth. Default credentials are the user `admin` with the password `admin`. To set your own credentials, generate a htpasswd (e.g. by using [an online tool](https://htpasswdgenerator.de/) or a cli tool).
Traefik will issue certificates with LetsEncrypt and therefore you must set an email address in `TRAEFIK_ACME_MAIL=`.
By default oCIS will be started in the `latest` version. If you want to start a specific version of oCIS set the version to `OCIS_DOCKER_TAG=`. Available versions can be found on [Docker Hub](https://hub.docker.com/r/owncloud/ocis/tags?page=1&ordering=last_updated).
Set your domain for the oCIS frontend in `OCIS_DOMAIN=`, e.g. `OCIS_DOMAIN=cloud.owncloud.test`.
The OpenLDAP server in this example deployment has an admin users, which is also used as bind user in order to keep these examples simple. You can change the default password "admin" to a different one by setting it to `LDAP_ADMIN_PASSWORD=...`.
Set your domain for the LDAP manager UI in `LDAP_MANAGER_DOMAIN=`, e.g. `ldap.owncloud.test`.
Grant the oCIS Admin role to the admin user from your LDAP in `OCIS_ADMIN_USER_ID:`. You need to enter the uuid of LDAP user.
{{< hint type=tip title=Encoding >}}
In the .ldif file in this example, the admin user id is base64 encoded. You need to decode it to make it work.
{{< /hint >}}
Now you have configured everything and can save the file.
- Start the docker stack
`docker-compose up -d`
- You now can visit oCIS and Traefik dashboard on your configured domains. You may need to wait some minutes until all services are fully ready, so make sure that you try to reload the pages from time to time.
## Local setup
For a more simple local ocis setup see [Getting started]({{< ref "../getting-started" >}})
This docker stack can also be run locally. One downside is that Traefik can not obtain valid SSL certificates and therefore will create self-signed ones. This means that your browser will show scary warnings. Another downside is that you can not point DNS entries to your localhost. So you have to add static host entries to your computer.
On Linux and macOS you can add them to your `/etc/hosts` file and on Windows to `C:\Windows\System32\Drivers\etc\hosts` file like this:
```
127.0.0.1 cloud.owncloud.test
127.0.0.1 keycloak.owncloud.test
127.0.0.1 ldap.owncloud.test
127.0.0.1 traefik.owncloud.test
```
After that you're ready to start the application stack:
`docker-compose up -d`
Open https://ocis.owncloud.test in your browser and accept the invalid certificate warning. You now can login to oCIS with the default users, which also can be found here: [Getting started]({{< ref "../getting-started#login-to-ocis-web" >}}). You may need to wait some minutes until all services are fully ready, so make sure that you try to reload the pages from time to time.
+135
View File
@@ -0,0 +1,135 @@
---
title: "oCIS with S3 storage backend (MinIO)"
date: 2020-10-12T14:04:00+01:00
weight: 24
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/deployment
geekdocFilePath: ocis_s3.md
---
{{< toc >}}
## Overview
* oCIS running behind Traefik as reverse proxy
* MinIO as S3 compatible storage provider
* oCIS is configured to use S3 as user storage provider
* Traefik generating self-signed certificates for local setup or obtaining valid SSL certificates for a server setup
[Find this example on GitHub](https://github.com/owncloud/ocis/tree/master/deployments/examples/ocis_s3)
The docker stack consists 3 containers. One of them is Traefik, a proxy which is terminating SSL and forwards the requests to oCIS in the internal docker network.
The next container is oCIS itself in a configuration like the [oCIS with Traefik example]({{< ref "ocis_traefik" >}}), except that it will use S3 as user storage.
The last container is MinIO, providing a S3 compatible API, where oCIS will store its data.
## Server Deployment
### Requirements
* Linux server with docker and docker-compose installed
* Three domains set up and pointing to your server
- ocis.* for serving oCIS
- minio.* for accessing the MinIO S3 bucket in the browser
- traefik.* for serving the Traefik dashboard
See also [example server setup]({{< ref "preparing_server" >}})
### Install oCIS and Traefik
* Clone oCIS repository
`git clone https://github.com/owncloud/ocis.git`
* Go to the deployment example
`cd ocis/deployments/examples/ocis_s3`
* Open the `.env` file in a text editor
The file by default looks like this:
```bash
# If you're on a internet facing server please comment out following line.
# It skips certificate validation for various parts of oCIS and is needed if you use self signed certificates.
INSECURE=true
### Traefik settings ###
# Serve Traefik dashboard. Defaults to "false".
TRAEFIK_DASHBOARD=
# Domain of Traefik, where you can find the dashboard. Defaults to "traefik.owncloud.test"
TRAEFIK_DOMAIN=
# Basic authentication for the dashboard. Defaults to user "admin" and password "admin"
TRAEFIK_BASIC_AUTH_USERS=
# Email address for obtaining LetsEncrypt certificates, needs only be changed if this is a public facing server
TRAEFIK_ACME_MAIL=
### oCIS settings ###
# oCIS version. Defaults to "latest"
OCIS_DOCKER_TAG=
# Domain of oCIS, where you can find the frontend. Defaults to "ocis.owncloud.test"
OCIS_DOMAIN=
# oCIS admin user password. Defaults to "admin".
ADMIN_PASSWORD=
# The demo users should not be created on a production instance
# because their passwords are public. Defaults to "false".
DEMO_USERS=
### MINIO / S3 settings ###
# Domain of MinIO where the Web UI is accessible. Defaults to "minio.owncloud.test".
MINIO_DOMAIN=
# S3 bucket name, where oCIS stores its data in. Defaults to "ocis-bucket".
MINIO_BUCKET=
# S3 bucket access key, which oCIS uses to authenticate. Defaults to "ocis".
MINIO_ACCESS_KEY=
# S3 bucket access key secret, which oCIS uses to authenticate. Defaults to "ocis-secret-key".
MINIO_SECRET_KEY=
```
You are installing oCIS on a server and Traefik will obtain valid certificates for you so please remove `INSECURE=true` or set it to `false`.
If you want to use the Traefik dashboard, set TRAEFIK_DASHBOARD to `true` (default is `false` and therefore not active). If you activate it, you must set a domain for the Traefik dashboard in `TRAEFIK_DOMAIN=` e.g. `TRAEFIK_DOMAIN=traefik.owncloud.test`.
The Traefik dashboard is secured by basic auth. Default credentials are the user `admin` with the password `admin`. To set your own credentials, generate a htpasswd (e.g. by using [an online tool](https://htpasswdgenerator.de/) or a cli tool).
Traefik will issue certificates with LetsEncrypt and therefore you must set an email address in `TRAEFIK_ACME_MAIL=`.
By default oCIS will be started in the `latest` version. If you want to start a specific version of oCIS set the version to `OCIS_DOCKER_TAG=`. Available versions can be found on [Docker Hub](https://hub.docker.com/r/owncloud/ocis/tags?page=1&ordering=last_updated).
Set your domain for the oCIS frontend in `OCIS_DOMAIN=`, e.g. `OCIS_DOMAIN=ocis.owncloud.test`.
Set the initial admin user password in `ADMIN_PASSWORD=`, it defaults to `admin`.
Set your domain for the MinIO frontend in `MINIO_DOMAIN=`, e.g. `MINIO_DOMAIN=minio.owncloud.test`. If you are using other S3-compatible providers you need to configure the respective endpoint here.
If you like you can change the default name of the S3 bucket by setting `MINIO_BUCKET=` to a different value.
You also must override the S3 bucket credentials in `MINIO_ACCESS_KEY` and `MINIO_SECRET_KEY` in order to secure your MinIO instance. Choose some random strings e.g. from the output of `openssl rand -base64 32`.
Now you have configured everything and can save the file.
* Start the docker stack
`docker-compose up -d`
* You now can visit oCIS and are able to use it just normally. If you log into the web UI of MinIO, you will see blobs of files you uploaded. You may need to wait some minutes until all services are fully ready, so make sure that you try to reload the pages from time to time.
## Local setup
For a more simple local ocis setup see [Getting started]({{< ref "../getting-started" >}})
This docker stack can also be run locally. One downside is that Traefik can not obtain valid SSL certificates and therefore will create self-signed ones. This means that your browser will show scary warnings. Another downside is that you can not point DNS entries to your localhost. So you have to add static host entries to your computer.
On Linux and macOS you can add them to your `/etc/hosts` file and on Windows to `C:\Windows\System32\Drivers\etc\hosts` file like this:
```
127.0.0.1 ocis.owncloud.test
127.0.0.1 traefik.owncloud.test
127.0.0.1 minio.owncloud.test
```
After that you're ready to start the application stack:
`docker-compose up -d`
Open https://ocis.owncloud.test in your browser and accept the invalid certificate warning. You now can use oCIS normally and should now upload a file. Open https://minio.owncloud.test in your browser and accept the invalid certificate warning, after that you will see blobs of files you have uploaded to oCIS. You may need to wait some minutes until all services are fully ready, so make sure that you try to reload the pages from time to time.
+113
View File
@@ -0,0 +1,113 @@
---
title: "oCIS with Traefik"
date: 2020-10-12T14:04:00+01:00
weight: 24
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/deployment
geekdocFilePath: ocis_traefik.md
---
{{< toc >}}
## Overview
* oCIS running behind Traefik as reverse proxy
* Traefik generating self-signed certificates for local setup or obtaining valid SSL certificates for a server setup
[Find this example on GitHub](https://github.com/owncloud/ocis/tree/master/deployments/examples/ocis_traefik)
The docker stack consists of two containers. One of them is Traefik, a proxy which is terminating ssl and forwards the requests to oCIS in the internal docker network.
The other one is oCIS itself running all extensions in one container. In this example, oCIS uses its internal IDP [LibreGraph Connect]({{< ref "../../services/idp" >}}) and the [oCIS storage driver]({{< ref "../storage/storagedrivers" >}})
## Server Deployment
### Requirements
* Linux server with docker and docker-compose installed
* Two domains set up and pointing to your server
- ocis.* for serving oCIS
- traefik.* for serving the Traefik dashboard
See also [example server setup]({{< ref "preparing_server" >}})
### Install oCIS and Traefik
* Clone oCIS repository
`git clone https://github.com/owncloud/ocis.git`
* Go to the deployment example
`cd ocis/deployments/examples/ocis_traefik`
* Open the `.env` file in a text editor
The file by default looks like this:
```bash
# If you're on a internet facing server please comment out following line.
# It skips certificate validation for various parts of oCIS and is needed if you use self signed certificates.
INSECURE=true
### Traefik settings ###
# Serve Traefik dashboard. Defaults to "false".
TRAEFIK_DASHBOARD=
# Domain of Traefik, where you can find the dashboard. Defaults to "traefik.owncloud.test"
TRAEFIK_DOMAIN=
# Basic authentication for the dashboard. Defaults to user "admin" and password "admin"
TRAEFIK_BASIC_AUTH_USERS=
# Email address for obtaining LetsEncrypt certificates, needs only be changed if this is a public facing server
TRAEFIK_ACME_MAIL=
### oCIS settings ###
# oCIS version. Defaults to "latest"
OCIS_DOCKER_TAG=
# Domain of oCIS, where you can find the frontend. Defaults to "ocis.owncloud.test"
OCIS_DOMAIN=
# oCIS admin user password. Defaults to "admin".
ADMIN_PASSWORD=
# The demo users should not be created on a production instance
# because their passwords are public. Defaults to "false".
DEMO_USERS=
```
You are installing oCIS on a server and Traefik will obtain valid certificates for you so please remove `INSECURE=true` or set it to `false`.
If you want to use the Traefik dashboard, set TRAEFIK_DASHBOARD to `true` (default is `false` and therefore not active). If you activate it, you must set a domain for the Traefik dashboard in `TRAEFIK_DOMAIN=` e.g. `TRAEFIK_DOMAIN=traefik.owncloud.test`.
The Traefik dashboard is secured by basic auth. Default credentials are the user `admin` with the password `admin`. To set your own credentials, generate a htpasswd (e.g. by using [an online tool](https://htpasswdgenerator.de/) or a cli tool).
Traefik will issue certificates with LetsEncrypt and therefore you must set an email address in `TRAEFIK_ACME_MAIL=`.
By default ocis will be started in the `latest` version. If you want to start a specific version of oCIS set the version to `OCIS_DOCKER_TAG=`. Available versions can be found on [Docker Hub](https://hub.docker.com/r/owncloud/ocis/tags?page=1&ordering=last_updated).
Set your domain for the oCIS frontend in `OCIS_DOMAIN=`, e.g. `OCIS_DOMAIN=ocis.owncloud.test`.
Set the initial admin user password in `ADMIN_PASSWORD=`, it defaults to `admin`.
Now you have configured everything and can save the file.
* Start the docker stack
`docker-compose up -d`
* You now can visit oCIS and Traefik dashboard on your configured domains. You may need to wait some minutes until all services are fully ready, so make sure that you try to reload the pages from time to time.
## Local setup
For a more simple local ocis setup see [Getting started]({{< ref "../getting-started" >}})
This docker stack can also be run locally. One downside is that Traefik can not obtain valid SSL certificates and therefore will create self-signed ones. This means that your browser will show scary warnings. Another downside is that you can not point DNS entries to your localhost. So you have to add static host entries to your computer.
On Linux and macOS you can add them to your `/etc/hosts` file and on Windows to `C:\Windows\System32\Drivers\etc\hosts` file like this:
```
127.0.0.1 ocis.owncloud.test
127.0.0.1 traefik.owncloud.test
```
After that you're ready to start the application stack:
`docker-compose up -d`
Open https://ocis.owncloud.test in your browser and accept the invalid certificate warning. You now can login to oCIS with the default users, which also can be found here: [Getting started]({{< ref "../getting-started#login-to-ocis-web" >}}). You may need to wait some minutes until all services are fully ready, so make sure that you try to reload the pages from time to time.
+177
View File
@@ -0,0 +1,177 @@
---
title: "oCIS with WOPI server"
date: 2020-10-12T14:04:00+01:00
weight: 24
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/deployment
geekdocFilePath: ocis_wopi.md
---
{{< toc >}}
## Overview
* oCIS, Wopi server, Collabora and OnlyOffice running behind Traefik as reverse proxy
* Collabora and OnlyOffice enable you to edit documents in your browser
* Wopi server acts as a bridge to make the oCIS storage accessible to Collabora and OnlyOffice
* Traefik generating self-signed certificates for local setup or obtaining valid SSL certificates for a server setup
[Find this example on GitHub](https://github.com/owncloud/ocis/tree/master/deployments/examples/ocis_wopi)
The docker stack consists of 10 containers. One of them is Traefik, a proxy which is terminating SSL and forwards the requests to oCIS in the internal docker network.
The next container is oCIS itself in a configuration like the [oCIS with Traefik example]({{< ref "ocis_traefik" >}}), except that for this example a custom mimetype configuration is used.
There are three oCIS app driver containers that register Collabora and OnlyOffice at the app registry.
The last four containers are the WOPI server, Collabora and OnlyOffice.
## Server Deployment
### Requirements
* Linux server with docker and docker-compose installed
* Three domains set up and pointing to your server
* ocis.* for serving oCIS
* collabora.* for serving Collabora
* onlyoffice.* for serving OnlyOffice
* wopiserver.* for serving the WOPI server
* traefik.* for serving the Traefik dashboard
See also [example server setup]({{< ref "preparing_server" >}})
### Install oCIS and Traefik
* Clone oCIS repository
`git clone https://github.com/owncloud/ocis.git`
* Go to the deployment example
`cd ocis/deployments/examples/ocis_wopi`
* Open the `.env` file in a text editor
The file by default looks like this:
```bash
# If you're on a internet facing server please comment out following line.
# It skips certificate validation for various parts of oCIS and is needed if you use self signed certificates.
INSECURE=true
### Traefik settings ###
# Serve Traefik dashboard. Defaults to "false".
TRAEFIK_DASHBOARD=
# Domain of Traefik, where you can find the dashboard. Defaults to "traefik.owncloud.test"
TRAEFIK_DOMAIN=
# Basic authentication for the dashboard. Defaults to user "admin" and password "admin"
TRAEFIK_BASIC_AUTH_USERS=
# Email address for obtaining LetsEncrypt certificates, needs only be changed if this is a public facing server
TRAEFIK_ACME_MAIL=
### oCIS settings ###
# oCIS version. Defaults to "latest"
OCIS_DOCKER_TAG=
# Domain of oCIS, where you can find the frontend. Defaults to "ocis.owncloud.test"
OCIS_DOMAIN=
# oCIS admin user password. Defaults to "admin".
ADMIN_PASSWORD=
# The demo users should not be created on a production instance
# because their passwords are public. Defaults to "false".
DEMO_USERS=
### Wopi server settings ###
# cs3org wopi server version. Defaults to "v8.3.3"
WOPISERVER_DOCKER_TAG=
# cs3org wopi server domain. Defaults to "wopiserver.owncloud.test"
WOPISERVER_DOMAIN=
# JWT secret which is used for the documents to be request by the Wopi client from the cs3org Wopi server. Must be change in order to have a secure Wopi server. Defaults to "LoremIpsum567"
WOPI_JWT_SECRET=
### Collabora settings ###
# Domain of Collabora, where you can find the frontend. Defaults to "collabora.owncloud.test"
COLLABORA_DOMAIN=
# Admin user for Collabora. Defaults to blank, provide one to enable access
COLLABORA_ADMIN_USER=
# Admin password for Collabora. Defaults to blank, provide one to enable access
COLLABORA_ADMIN_PASSWORD=
### OnlyOffice settings ###
# Domain of OnlyOffice, where you can find the frontend. Defaults to "onlyoffice.owncloud.test"
ONLYOFFICE_DOMAIN=
```
You are installing oCIS on a server and Traefik will obtain valid certificates for you so please remove `INSECURE=true` or set it to `false`.
If you want to use the Traefik dashboard, set TRAEFIK_DASHBOARD to `true` (default is `false` and therefore not active). If you activate it, you must set a domain for the Traefik dashboard in `TRAEFIK_DOMAIN=` e.g. `TRAEFIK_DOMAIN=traefik.owncloud.test`.
The Traefik dashboard is secured by basic auth. Default credentials are the user `admin` with the password `admin`. To set your own credentials, generate a htpasswd (e.g. by using [an online tool](https://htpasswdgenerator.de/) or a cli tool).
Traefik will issue certificates with LetsEncrypt and therefore you must set an email address in `TRAEFIK_ACME_MAIL=`.
By default oCIS will be started in the `latest` version. If you want to start a specific version of oCIS set the version to `OCIS_DOCKER_TAG=`. Available versions can be found on [Docker Hub](https://hub.docker.com/r/owncloud/ocis/tags?page=1&ordering=last_updated).
Set your domain for the oCIS frontend in `OCIS_DOMAIN=`, e.g. `OCIS_DOMAIN=ocis.owncloud.test`.
Set the initial admin user password in `ADMIN_PASSWORD=`, it defaults to `admin`.
By default the CS3Org WOPI server will also be started in the `latest` version. If you want to start a specific version of it, you can set the version to `WOPISERVER_DOCKER_TAG=`. Available versions can be found on [Docker Hub](https://hub.docker.com/r/cs3org/wopiserver/tags?page=1&ordering=last_updated).
Set your domain for the CS3Org WOPI server in `WOPISERVER_DOMAIN=`, where all office suites can download the files via the WOPI protocol.
You also must override the default WOPI JWT secret in order to have a secure setup. Do this by setting `WOPI_JWT_SECRET` to a long and random string.
Now it's time to set up Collabora and you need to configure the domain of Collabora in `COLLABORA_DOMAIN=`.
If you want to use the Collabora admin panel you need to set the username and password for the administrator in `COLLABORA_ADMIN_USER=` and `COLLABORA_ADMIN_PASSWORD=`.
Next up is OnlyOffice, which also needs a domain in `ONLYOFFICE_DOMAIN=`.
Now you have configured everything and can save the file.
* Start the docker stack
`docker-compose up -d`
* You now can visit oCIS and are able to open an office document in your browser. You may need to wait some minutes until all services are fully ready, so make sure that you try to reload the pages from time to time.
## Local setup
For a more simple local ocis setup see [Getting started]({{< ref "../getting-started" >}})
This docker stack can also be run locally. One downside is that Traefik can not obtain valid SSL certificates and therefore will create self-signed ones. This means that your browser will show scary warnings. Another downside is that you can not point DNS entries to your localhost. So you have to add static host entries to your computer.
On Linux and macOS you can add them to your `/etc/hosts` file and on Windows to `C:\Windows\System32\Drivers\etc\hosts` file like this:
```
127.0.0.1 ocis.owncloud.test
127.0.0.1 traefik.owncloud.test
127.0.0.1 collabora.owncloud.test
127.0.0.1 onlyoffice.owncloud.test
127.0.0.1 wopiserver.owncloud.test
```
After that you're ready to start the application stack:
`docker-compose up -d`
Open https://collabora.owncloud.test, https://onlyoffice.owncloud.test and https://wopiserver.owncloud.test in your browser and accept the invalid certificate warning.
Open https://ocis.owncloud.test in your browser and accept the invalid certificate warning. You are now able to open an office document in your browser. You may need to wait some minutes until all services are fully ready, so make sure that you try to reload the pages from time to time.
## Local setup for web development
In case you want to run ownCloud Web from a development branch together with this deployment example (e.g. for feature development for the app provider frontend) you can use this deployment example with the local setup and some additional steps as described below.
1. Clone the [ownCloud Web repository](https://github.com/owncloud/web) on your development machine.
2. Run `pnpm && pnpm build:w` for `web`, so that it creates and continuously updates the `dist` folder for web.
3. Add the dist folder as read only volume to `volumes` section of the `ocis` service in the `docker-compose.yml` file:
```yaml
- /your/local/path/to/web/dist/:/web/dist:ro
```
Make sure to point to the `dist` folder inside your local copy of the web repository.
4. Set the oCIS environment variable `WEB_ASSET_PATH` in the `environment` section of the `ocis` service, so that it uses your mounted dist folder for the web assets, instead of the assets that are embedded into oCIS.
```yaml
WEB_ASSET_PATH: "/web/dist"
```
5. Start the deployment example as described above in the `Local setup` section.
For app provider frontend development in `web` you can find the source code in `web/packages/web-app-external`. Some parts of the integration live in `web/packages/web-app-files`.
@@ -0,0 +1,67 @@
---
title: "Preparing a server"
date: 2020-10-12T14:04:00+01:00
weight: 100
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/deployment
geekdocFilePath: preparing_server.md
---
{{< toc >}}
## Example for Hetzner Cloud
* create server on Hetzner Cloud. Set labels "owner" and "for". Example for hcloud cli:
`hcloud server create --type cx21 --image ubuntu-20.04 --ssh-key admin --name ocis-server --label owner=admin --label for=testing`
* Configure DNS A-records for needed domains pointing on the servers ip address, for example in CloudFlare
* Access server via ssh as root
* Create a new user
`$ adduser --disabled-password --gecos "" admin`
* Add user to sudo group
`$ usermod -aG sudo admin`
* Install docker
```
apt update
apt install docker.io
```
* Add user to docker group
`usermod -aG docker admin`
* Install docker-compose via
`curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose`
(docker compose version 1.27.4 as of today)
* Make docker-compose executable
`chmod +x /usr/local/bin/docker-compose`
* Add users pub key to
```
mkdir /home/admin/.ssh
echo "<pubkey>" >> /home/admin/.ssh/authorized_keys`
chown admin:admin -R /home/admin/.ssh
```
* Secure ssh daemon by editing `/etc/ssh/sshd_config`
```
PermitRootLogin no
ChallengeResponseAuthentication no
PasswordAuthentication no
UsePAM no
```
* restart sshd server to apply settings `systemctl restart sshd`
* Login as the user you created
+72
View File
@@ -0,0 +1,72 @@
---
title: "Systemd service"
date: 2020-09-27T06:00:00+01:00
weight: 16
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/deployment
geekdocFilePath: systemd.md
---
{{< toc >}}
## Install the oCIS binary
Download the oCIS binary of your preferred version and for your CPU architecture and operating system from [download.owncloud.com](https://download.owncloud.com/ocis/ocis).
Rename the downloaded binary to `ocis` and move it to `/usr/bin/`. As a next step, you need to mark it as executable with `chmod +x /usr/bin/ocis`.
When you now run `ocis help` on your command line, you should see the available options for the oCIS command.
## Systemd service definition
Create the Systemd service definition for oCIS in the file `/etc/systemd/system/ocis.service` with following content:
```systemd
[Unit]
Description=OCIS server
[Service]
Type=simple
User=root
Group=root
EnvironmentFile=/etc/ocis/ocis.env
ExecStart=ocis server
Restart=always
[Install]
WantedBy=multi-user.target
```
{{< hint warning >}}
For reasons of simplicity we are using the root user and group to run oCIS which is not recommended. Please use a non-root user in production environments and modify the oCIS service definition accordingly.
{{< /hint >}}
In the service definition we referenced `/etc/ocis/ocis.env` as our file containing environment variables for the oCIS process.
In order to create the file we need first to create the folder `/etc/ocis/` and then we can add the actual `/etc/ocis/ocis.env` with following content:
```bash
OCIS_URL=https://some-hostname-or-ip:9200
PROXY_HTTP_ADDR=0.0.0.0:9200
OCIS_INSECURE=false
OCIS_LOG_LEVEL=error
OCIS_CONFIG_DIR=/etc/ocis
OCIS_BASE_DATA_PATH=/var/lib/ocis
```
Since we set `OCIS_CONFIG_DIR` to `/etc/ocis` you can also place configuration files in this directory.
Please change your `OCIS_URL` in order to reflect your actual deployment. If you are using self-signed certificates you need to set `OCIS_INSECURE=true` in `/etc/ocis/ocis.env`.
oCIS will store all data in `/var/lib/ocis`, because we configured it so by setting `OCIS_BASE_DATA_PATH`. Therefore you need to create that directory and make it accessible to the user, you use to start oCIS.
## Starting the oCIS service
Initialize the oCIS configuration by running `ocis init --config-path /etc/ocis`.
You can enable oCIS now by running `systemctl enable --now ocis`. It will ensure that oCIS also is restarted after a reboot of the host.
If you need to restart oCIS because of configuration changes in `/etc/ocis/ocis.env`, run `systemctl restart ocis`.
You can have a look at the logs of oCIS by issuing `journalctl -f -u ocis`.
@@ -1,9 +1,9 @@
---
title: Clients
date: 2023-12-06T13:00:00+01:00
title: "Development"
date: 2020-10-01T20:35:00+01:00
weight: 10
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/clients/
geekdocEditPath: edit/master/docs/ocis/development
geekdocFilePath: _index.md
geekdocCollapseSection: true
---
+316
View File
@@ -0,0 +1,316 @@
---
title: "Beta testplan"
date: 2022-03-24T00:00:00+00:00
weight: 37
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/development
geekdocFilePath: beta-testplan.md
---
# Beta Testing
This document is supposed to give you some ideas how and what to test on ocis. It's not meant to be an extensive list of all tests to be done, rather it should help you, as beta-tester, to get started and enable you to get creative and create your own test-cases. [Derive from these examples, be creative, do unusual and unconventional things, to try to break things](https://twitter.com/sempf/status/514473420277694465).
One option to create new test-cases and to stress the system is to examine what the [API acceptance-tests](https://owncloud.dev/ocis/development/testing/#testing-with-test-suite-natively-installed) or the [web-UI](#web) does, [examine the requests](#decode-https-traffic-with-wireshark) and do something a bit different with curl. This is also a good way to find out how APIs work that are not already fully documented.
Some cases have suggested setup steps, but feel free to use other setups. This can include:
- different deployment methods (e.g. running single binary, docker-container, docker-compose setup, [individual services in own docker containers](https://owncloud.dev/ocis/deployment/ocis_individual_services/))
- different identity managers (e.g. [different external LDAP](https://owncloud.dev/ocis/deployment/ocis_ldap/), internal IDM)
- different reverse proxies (e.g. [traefik](https://owncloud.dev/ocis/deployment/ocis_traefik/))
- different OpenIDConnect IDPs (e.g builtin IDP, [keycloak](https://owncloud.dev/ocis/deployment/ocis_keycloak/), AzureAD)
- for some functionalities you will need an [LDAP server](https://owncloud.dev/ocis/deployment/ocis_ldap/) where the IDP and oCIS both get the users from
- [keycloak example](https://owncloud.dev/ocis/deployment/ocis_keycloak/)
- [service configuration](https://owncloud.dev/extensions/idp/configuration/)
- different storage systems (decomposedFS on local POSIX (default), [decomposedFS on NFS](https://owncloud.dev/ocis/storage-backends/dcfsnfs/), [S3](https://owncloud.dev/ocis/deployment/ocis_s3/) )
It's a good idea to test ocis in the same environment where you are planning to use it later (with the LDAP server, storage system, etc. of your organisation).
# run oCIS
For a quick start, please have a look into the [getting started documentation of oCIS]({{< ref "../getting-started/#run-ocis" >}})
If you would like
to access oCIS remotely please refer to the [Basic Remote Setup]({{< ref "../deployment/basic-remote-setup" >}}) section.
## additional tips
- to allow basic auth (e.g. to easily access oCIS using curl commands) you have to set `PROXY_ENABLE_BASIC_AUTH=true` environment variable
- if you cannot use real SSL Certificates set `OCIS_INSECURE=true` as environment variable
# Testplan
## user / groups from LDAP
Prerequisite:
- connect ocis to your preferred LDAP server
- create users and groups in LDAP
- start ocis with basic auth
documentation resources:
- [configure ocis with LDAP](https://owncloud.dev/ocis/deployment/ocis_ldap/)
- [sharing API is compatible to ownCloud 10](https://doc.owncloud.com/server/10.9/developer_manual/core/apis/ocs-share-api.html)
- [webDav operations](#webdav)
| Test Case | Expected Result | Comment |
|-------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------|---------|
| share file / folder to a group | member of the group can access shared item | |
| share file / folder to a group, remove member from group in LDAP | removed member should not have access to the shared item | |
| share file / folder to a group with different permissions, as receiver try to violate the permissions | receiver should not be able to violate the permissions | |
| try to login with wrong credentials | login should not be possible | |
| set a quota in LDAP, upload files till the quota is exceeded | upload should work till quota is full, uploads should not work when quota is full | |
| try to access files / folders of other users | access should not be possible | |
| try to share with non-existing users and groups | sharing should not be possible | |
| try to share with user/groups-names that contain special characters | sharing should be possible, access shares with that user does not create any problems | |
## other sharing
should be tried in various ways and in different environments
documentation resources:
- [sharing API is compatible to ownCloud 10](https://doc.owncloud.com/server/10.9/developer_manual/core/apis/ocs-share-api.html)
- [webDav operations](#webdav)
| Test Case | Expected Result | Comment |
|---------------------------------------------------------------------------------------|-----------------------------------------------------------------------|-----------------------------------------------------------|
| share a file/folder with the same name from different users | receiver can accept and access both file/folders and distinguish them | |
| share a file/folder with the same name but different permissions from different users | receiver can access both file/folders according to the permissions | |
| share a file/folder with the same name but different locations from one user | receiver can accept and access both file/folders and distinguish them | |
| share a file/folder back to the sharer | sharing back should not be possible | |
| re-share a file/folder with different permissions | sharing with lower permissions is possible, but not with higher | |
| decline received share | shared resource should not be shown to the receiver | |
## parallel deployment
- [configure ocis with LDAP](https://owncloud.dev/ocis/deployment/ocis_ldap/)
- [setup oC10 and ocis in parallel](https://owncloud.dev/ocis/deployment/oc10_ocis_parallel/)
- create users and groups in LDAP
documentation resources:
- [sharing API is compatible to ownCloud 10](https://doc.owncloud.com/server/10.9/developer_manual/core/apis/ocs-share-api.html)
| Test Case | Expected Result | Comment |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------|---------|
| share file / folder to a group in one implementation (use different permissions), access the items with the other implementation, try to violate the permissions | receiver should not be able to violate the permissions | |
| share file / folder to a group, remove member from group in LDAP, try to access items with the removed member from both implementations | removed member should not have access to the shared item | |
## Spaces
Prerequisite:
- start ocis with basic auth
- variable declaration, for curl examples:
```shell
SERVER_URI=https://localhost:9200
GRAPH_API_PATH=graph/v1.0
SHARE_API_PATH=ocs/v2.php/apps/files_sharing/api/v1/shares
USER=admin
PASSWORD=admin
```
- create a new user `curl -k -u $USER:$PASSWORD "$SERVER_URI/$GRAPH_API_PATH/users" -X POST -d'{"displayName":"Example User","mail":"example@example.org","onPremisesSamAccountName":"example","passwordProfile":{"password":"ThePassword"}}'`
- give the user the "Space Admin" role
1. get the id of the user: `curl -k -u $USER:$PASSWORD $SERVER_URI/$GRAPH_API_PATH/users/<user-name> | jq '.id'`
2. assign role user to role: `curl -k -u $USER:$PASSWORD $SERVER_URI/api/v0/settings/assignments-add -d'{"account_uuid":"<user-id>","role_id":"2aadd357-682c-406b-8874-293091995fdd"}`
- create a space: `curl -k -u $USER:$PASSWORD "$SERVER_URI/$GRAPH_API_PATH/drives" -X POST -d'{"Name":"Space for finance","driveType":"project", "description":"we need some space"}'`
- list spaces: `curl -k -u $USER:$PASSWORD $SERVER_URI/$GRAPH_API_PATH/me/drives`
- disable a space: `curl -k -u $USER:$PASSWORD $SERVER_URI/$GRAPH_API_PATH/drives/<space-id> -X DELETE`
- delete a space: `curl -k -u $USER:$PASSWORD $SERVER_URI/$GRAPH_API_PATH/drives/<space-id> -X DELETE -H'Purge: T'`
- restore a space: `curl -k -u $USER:$PASSWORD $SERVER_URI/$GRAPH_API_PATH/drives/<space-id> -X PATCH -d"{}" -H"Restore: true"`
- rename the space: `curl -k -u $USER:$PASSWORD $SERVER_URI/$GRAPH_API_PATH/drives/<space-id> -X PATCH -d'{"name":"नेपालि नाम"}'`
- change description of the space: `curl -k -u $USER:$PASSWORD $SERVER_URI/$GRAPH_API_PATH/drives/<space-id> -X PATCH -d'{"description":"this contains important data"}'`
- change quota of the space `curl -k -u $USER:$PASSWORD $SERVER_URI/$GRAPH_API_PATH/drives/<space-id> -X PATCH -d'{"quota":{"total":<bytes>}}'`
- change image of space:
1. upload an image file to the `.spaces` folder: `curl -k -u $USER:$PASSWORD https://localhost:9200/dav/spaces/<space-id>/.space/<file-name> -T <path-of-local-image> -v`
2. note the id provided in the `Oc-Fileid` header
3. set the image as "special-folder": `curl -k -u $USER:$PASSWORD $SERVER_URI/$GRAPH_API_PATH/drives/<space-id> -X PATCH -d'{"special":[{"specialFolder":{"name":"image"},"id":"<oc-fileid>"}]}'`
- share a space: `curl -k -u $USER:$PASSWORD $SERVER_URI/$SHARE_API_PATH -d'space_ref=<space-id>&shareType=7&shareWith=<receiver-username>&role=<role>'`
- Roles:
- viewer
- editor
- manager
- share a resource within a space `curl -k -u $USER:$PASSWORD $SERVER_URI/$SHARE_API_PATH -d'shareType=0&shareWith=<receiver-username>&space_ref=<space-id>%2F<resource>&permissions=<permissions>`
- possible permissions
- 1 = read
- 2 = update
- 4 = create
- 8 = delete
- 15 = read/write
- 16 = share
- 31 = All permissions
- WebDAV
- root: `https://<server-uri>/dav/spaces/<space-id>`
- [example commands for operations](#webdav)
| Test Case | Expected Result | Comment |
|-------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------|---------|
| create a space | space should exist | |
| create a space with special characters as a name & description | space should exist | |
| create a space, delete the space | space should not exist | |
| create a space, share the space with a user | space should be accessible | |
| create a space, share the space with a group | space should be accessible, space content is shared among all users | |
| create a space, share the space with a group, disable the space | space should not be accessible | |
| create a space, share the space with a user, disable the space, restore the space | space should be accessible | |
| create a space, disable the space, delete the space, restore the space | it should not be possible to restore the space | |
| create a space, disable the space, try to share the space | sharing the space should not be possible | |
| create a space, try to delete the space | it should not be possible to delete an enabled space | |
| create & share a space with a group with viewer role, do CRUD file/folder operations with WebDAV | space content is readable but neither space not content should not be writable | |
| create & share a space with a group with editor role, do CRUD file/folder operations with WebDAV | space and content should be writable | |
| create a space, try CRUD file/folder operations with WebDAV on the space with a user that its not shared with | space and content should not be accessible | |
| create a space with a quota, share the space, upload files till the quota is exceeded | upload should work till quota is full, uploads should not work when quota is full | |
| share file/folders from inside a space (see other sharing section) | sharing works and obeys the permissions | |
| create a space, rename the space | new name should be displayed in API calls and web | |
| create a space, change description of the space | new description should be displayed in API calls and web | |
| create a space, set quota, change quota of the space | new quota is obeyed | |
| create a space, set quota, change quota of the space to a value that is lower than the sum of data already stored | new quota is obeyed, new files cannot be uploaded | |
| try the various space operations with invalid data | good error output, server does not crash | |
| try the various space operations without the correct permissions | operations are not possible without sufficient permissions | |
| try the various space operations on personal and virtual spaces | server should not crash, good error responses | |
| try the various space operations sending invalid data (invalid numbers, wrong types, invalid JSON, etc.) | server should not crash, good error responses | |
## Web
Prerequisite:
- [connect ocis to your preferred LDAP server](https://owncloud.dev/ocis/deployment/ocis_ldap/)
- create users and groups in LDAP
- Use your preferred browser (Firefox 94-96, Chrome 92-97, Opera 81-82, Edge 96-97, Safari 14-15) to access the built-in webUI (by default: https://localhost:9200)
| Test Case | Expected Result | Comment |
|--------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------|---------|
| Login with the created user | User logs in. | |
| Create a text file. | Text editor can open, file is saved. | |
| Create a text file with special characters as name | file is created if the name is legal otherwise an error is displayed | |
| Modify a text file. | File can be modified, no problems found. | |
| Rename a file. | File is renamed. | |
| Upload a file. | File is uploaded, no problems found. | |
| Upload multiple files at once. | Files are uploaded, no problems found. | |
| delete all content of a folder at once. | Folder is cleaned, items are visible in the trashbin | |
| Overwrite a file by uploading a new version. | File is uploaded and overwritten, file versions are displayed | |
| Overwrite a file by uploading a new version, restore the original version. | File is restored correctly | |
| upload a huge file | File is uploaded, no problems found. | |
| upload a huge file, cancel the upload, restart the upload | Upload continues at the position where it was cancelled, file is uploaded completely. | |
| Remove a file. | File is removed correctly, it appears in the trashbin. | |
| Restore the deleted file from trashbin | File is restored correctly | |
| Remove multiple files that have the same name but are located in different folders | Files are removed correctly, they appear in the trashbin. | |
| Restore some of the deleted files from trashbin | Files are restored correctly in the correct folders. | |
| Restore some of the deleted files from trashbin, but delete the original containing folder before | Files are restored correctly | |
| Clean files from the trashbin | files are permanently deleted | |
| Create a lot of files, delete a lot of files, empty the trashbin | trashbin is cleaned | |
| Move a file inside a folder. | There are not problems on the process. | |
| Move a file inside a folder that already contains a file with the same name | File is not moved, content in the destination is not overwritten | |
| Create a folder. | Folder is created, no MKCOL problems appear. | |
| Create a folder with special characters as name | Folder is created if the name is legal otherwise an error is displayed | |
| Create a folder with a name of an already existing file/folder | Folder is not created, an error is displayed | |
| Create a folder with a lot of subfolders, use special characters in the name | Folder is created, no MKCOL problems appear. | |
| Delete a folder. | Folder is removed. | |
| Move a folder inside another. | No problems while moving the folder. | |
| open images in mediaviewer | files are displayed correctly. | |
| open videos in mediaviewer | files are displayed correctly. | |
| switch through videos and images in mediaviewer | files are displayed correctly. | |
| Share a file by public link. | Link is created and can be accessed. | |
| Share a folder by public link. | Link is created and can be accessed. | |
| Share a file with another user. | It is shared correctly. | |
| Share a folder with another user. | It is shared correctly. | |
| Share a file with a group. | It is shared correctly. | |
| Share a folder with a group. | It is shared correctly. | |
| Share a folder with userB giving edit permissions. As userB do CRUD operations on items inside the received folder | userB doesn't find any problem while interacting with files. | |
| Use your mobile device to access the UI | All elements reachable | |
| do tests mentioned in the [spaces](#spaces) section using the web-UI | | |
## Desktop Client
Prerequisite:
- [install the desktop client on your preferred OS](https://owncloud.com/desktop-app/)
- start ocis
- connect a new account in the desktop client to ocis e.g. `https://localhost:9200` if you are running the server and the client on the same machine
- accept the self-signed certificate
- you will be redirected to the browser, accept the certificate there also
- login as any user
- allow the "ownCloud desktop app" to access ocis
- select a folder to sync
| Test Case | Expected Result | Comment |
|---------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------|---------|
| Set up two clients with the same user. Change files, add some, delete some, move some, create folders. | Changes sync properly in both clients without errors. | |
| Share a file using contextual menu with userB. | Option to share appears in the contextual menu and file is correctly shared. | |
## Mobile Clients (iOS || Android)
Prerequisite:
- [install the ownCloud app on your mobile](https://owncloud.com/mobile-apps/)
- start oCIS as described in [Basic Remote Setup]({{< ref "../deployment/basic-remote-setup" >}})
- connect a new account in the mobile client to ocis
- accept the self-signed certificate
- you will be redirected to the browser, accept the certificate there also
- login as any user
- allow the mobile app to access ocis
| Test Case | Expected Result | Comment |
|-----------------------------------------------|------------------------------------------|---------|
| Connect to server, see files, download one. | No problems while downloading. | |
| Upload a file using mobile client. | No problems while uploading. | |
| Share a file with userB using mobile client. | File is correctly shared. | |
## other WebDAV clients
Prerequisite:
- start ocis with basic auth
| Test Case | Expected Result | Comment |
|---------------------------------------------------------------|-------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------|
| use ocis as webDAV external storage in ownCloud 10 | resource access works | |
| access webDAV with your file-manager | that will not give you a good UX, but ocis should not crash | Urls: https://\<ocis-server\>/remote.php/webdav & https://\<ocis-server\>/remote.php/dav/files/\<username\> |
| access webDAV with the "remote-files" function of LibreOffice | files are accessible and can be written back | |
# Tips for testing
## WebDav
WebDav is accessible under different path
- old: https://\<ocis-server\>/remote.php/webdav
- new: https://\<ocis-server\>/remote.php/dav/files/\<username\>
- spaces: https://\<ocis-server\>/dav/spaces/\<space-id\>
WebDav specifications can be found on http://webdav.org/
here some general WebDav request examples:
variable declaration:
```shell
SERVER_URI=https://localhost:9200
API_PATH=remote.php/webdav
USER=admin
PASSWORD=admin
```
- list content of root folder: `curl -k -u $USER:$PASSWORD "$SERVER_URI/$API_PATH/" -X PROPFIND`
- list content of sub-folder: `curl -k -u $USER:$PASSWORD "$SERVER_URI/$API_PATH/f1" -X PROPFIND`
- create a folder: `curl -k -u $USER:$PASSWORD "$SERVER_URI/$API_PATH/folder" -X MKCOL`
- delete a resource: `curl -k -u $USER:$PASSWORD "$SERVER_URI/$API_PATH/folder" -X DELETE`
- rename / move a resource: `curl -k -u $USER:$PASSWORD "$SERVER_URI/$API_PATH/folder" -X MOVE -H "Destination: $SERVER_URI/$API_PATH/renamed"`
- copy a resource: `curl -k -u $USER:$PASSWORD "$SERVER_URI/$API_PATH/folder" -X COPY -H "Destination: $SERVER_URI/$API_PATH/folder-copy"`
## decode HTTPS traffic with wireshark
To decode the HTTPS traffic we need the keys that were used to encrypt the traffic. Those keys are kept secret by the clients, but we can request the clients to save them in a specific file, so that wireshark can use them to decrypt the traffic again.
1. create key file: `touch /tmp/sslkey.log`
2. start wireshark
3. set log filename
- navigate to Edit=>Preferences=>Protocols=>TLS
- in the field `(Pre)-Master-Secret log filename` enter `/tmp/sslkey.log`
4. decode as HTTP
- navigate to Analyze=>Decode As...
- click the + button
- set Field: `TLS Port; Value=9200; Type: Integer, base 10; Default (none); Current HTTP` (adjust the port if you are using another one than 9200)
5. start recording
- use `port 9200` as capture filter to only record ocis packages
- use `http` as display filter to see only decoded traffic
6. run test-software with `SSLKEYLOGFILE=/tmp/sslkey.log` as env. variable e.g.
- curl: `SSLKEYLOGFILE=/tmp/sslkey.log curl -k -u admin:admin https://localhost:9200/ocs/v1.php/cloud/users`
- Browser: `SSLKEYLOGFILE=/tmp/sslkey.log firefox`
- LibreOffice: `SSLKEYLOGFILE=/tmp/sslkey.log libreoffice`
- acceptance tests: `SSLKEYLOGFILE=/tmp/sslkey.log make test-acceptance-api ...`
## format output
- piping **xml** results to `xmllint` gives you nice formats. E.g. `curl -k --user marie:radioactivity "https://localhost:9200/ocs/v1.php/apps/files_sharing/api/v1/shares" | xmllint --format -`
- piping **json** results to `jq` gives you nice formats. E.g. `curl -k --user marie:radioactivity "https://localhost:9200/ocs/v1.php/apps/files_sharing/api/v1/shares?format=json" | jq`
## create edge cases
- [Big List of Naughty Strings](https://github.com/minimaxir/big-list-of-naughty-strings)
+24
View File
@@ -0,0 +1,24 @@
---
title: "Documentation"
date: 2020-07-27T08:39:38+00:00
weight: 99
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/development
geekdocFilePath: build-docs.md
---
{{< toc >}}
## Build the documentation
{{< hint info >}}
For building the documentation you need to have Make and Go 1.14 or higher installed.
{{< /hint >}}
Just run `make -C docs docs-serve` from within the root level of the oCIS git repository. This will make documentation available on [localhost:1313](http://localhost:1313) and also do a hot reload if you change something in the (non autogenerated) documentation files.
## Add changes to the documentation
Please keep this documentation in sync with the oCIS source code.
Changes on the documentation are automatically applied to [this site]({{< ref "../" >}}) when merged to the master branch.
+57
View File
@@ -0,0 +1,57 @@
---
title: "Build"
date: 2020-02-27T20:35:00+01:00
weight: 30
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/development
geekdocFilePath: build.md
---
{{< toc >}}
## Build requirements
see [Development - Getting Started]({{< ref "getting-started/#requirements">}})
## Get the sources
{{< highlight txt >}}
git clone https://github.com/owncloud/ocis.git
cd ocis
{{< / highlight >}}
## Build the oCIS binary
You only need to run following command if you have changed protobuf definitions or the frontend part in one of the extensions. Run the command in the root directory of the repository. Otherwise you can skip this step and proceed to build the oCIS binary.
This will usually modify multiple `embed.go` files because we embed the frontend build output in these `embed.go` files and a timestamp will be updated and also minor differences are expected between different Node.js versions.
{{< highlight txt >}}
make generate
{{< / highlight >}}
The next step is to build the actual oCIS binary. Therefore you need to navigate to the subdirectory `ocis` and start the build process.
{{< highlight txt >}}
cd ocis
make build
{{< / highlight >}}
After the build process finished, you can find the binary within the `bin/` folder (in `ocis/bin` relative to the oCIS repository root folder).
Try to run it: `./bin/ocis h`
## Build a local oCIS docker image
If you are developing and want to run your local changes in a docker or docker-compose setup, you have to build an image locally.
Therefore run following commands in the root of the oCIS repository:
{{< highlight txt >}}
docker build -t owncloud/ocis:dev .
{{< / highlight >}}
Then you can test as usual via
{{< highlight txt >}}
docker run --rm -ti owncloud/ocis:dev
{{< / highlight >}}
@@ -0,0 +1,56 @@
---
title: "Continuous Integration"
date: 2020-10-01T20:35:00+01:00
weight: 100
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/development
geekdocFilePath: continuous-integration.md
---
{{< toc >}}
oCIS uses [DRONE](https://www.drone.io/) as CI system. You can find the pipeline logs [here](https://drone.owncloud.com/owncloud/ocis) or in your PR.
## Concepts
The pipeline is defined in [Starlark](https://github.com/bazelbuild/starlark) and transformed to YAML upon pipeline run. This enables us to do a highly dynamic and non repeating pipeline configuration. We enforce Starlark format guidelines with Bazel Buildifier. You can format the .drone.star file by running `make ci-format`.
Upon running the pipeline, your branch gets merged to the master branch. This ensures that we always test your changeset if as it was applied to the master of oCIS. Please note that this does not apply to the pipeline definition (`.drone.star`).
## Things done in CI
- static code analysis
- linting
- running UI tests
- running ownCloud 10 test suite against oCIS
- build and release docker images
- build and release binaries
- build and release documentation
## Flags in commit message and PR title
You may add flags to your commit message or PR title in order to speed up pipeline runs and take load from the CI runners.
- `[CI SKIP]`: no CI is run on the commit or PR
- `[full-ci]`: deactivates the fail early mechanism and runs all available test (as default only smoke tests are run)
### Knowledge base
- My pipeline fails because some CI related files or commands are missing.
Please make sure to rebase your branch onto the latest master of oCIS. It could be that the pipeline definition (`.drone.star`) was changed on the master branch. This is the only file, that will not be auto merged to master upon pipeline run. So things could be out of sync.
- How can I see the YAML drone pipeline definition?
In order to see the Yaml pipeline definition you can use the drone-cli to convert the Starlark file.
```
drone starlark
```
{{< hint info >}}
If you experience a `"build" struct has no .title attribute` you need a newer version of drone-cli.
You currently need to build it yourself from this [source code](https://github.com/drone/drone-cli). If you are not using master as source, please ensure that this [PR](https://github.com/drone/drone-cli/pull/175) is included.
{{< /hint >}}
+217
View File
@@ -0,0 +1,217 @@
---
title: "Debugging"
date: 2020-03-19T08:21:00+01:00
weight: 50
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/development
geekdocFilePath: debugging.md
---
{{< toc >}}
## Debugging
As a single binary for easy deployment running `ocis server` just forks itself to start all the services, which makes debugging those processes a little harder.
Ultimately, we want to be able to stop a single service using e.g. `ocis kill web` so that you can start the service you want to debug in debug mode. We need to [change the way we fork processes](https://github.com/owncloud/ocis/issues/77) though, otherwise the runtime will automatically restart a service if killed.
### Start ocis
For debugging there are two workflows that work well, depending on your preferences.
#### Use the debug binary and attach to the process as needed
Run the debug binary with `OCIS_LOG_LEVEL=debug bin/ocis-debug server` and then find the service you want to debug using:
```console
# ps ax | grep ocis
12837 pts/1 Sl+ 0:00 bin/ocis-debug server
12845 pts/1 Sl 0:00 bin/ocis-debug graph
12847 pts/1 Sl 0:00 bin/ocis-debug reva-auth-bearer
12849 pts/1 Sl 0:00 bin/ocis-debug ocs
12850 pts/1 Sl 0:00 bin/ocis-debug reva-storage-oc-data
12863 pts/1 Sl 0:00 bin/ocis-debug webdav
12874 pts/1 Sl 0:00 bin/ocis-debug reva-frontend
12897 pts/1 Sl 0:00 bin/ocis-debug reva-sharing
12905 pts/1 Sl 0:00 bin/ocis-debug reva-gateway
12912 pts/1 Sl 0:00 bin/ocis-debug reva-storage-home
12920 pts/1 Sl 0:00 bin/ocis-debug reva-users
12929 pts/1 Sl 0:00 bin/ocis-debug glauth
12940 pts/1 Sl 0:00 bin/ocis-debug reva-storage-home-data
12948 pts/1 Sl 0:00 bin/ocis-debug idp
12952 pts/1 Sl 0:00 bin/ocis-debug proxy
12961 pts/1 Sl 0:00 bin/ocis-debug thumbnails
12971 pts/1 Sl 0:00 bin/ocis-debug reva-storage-oc
12981 pts/1 Sl 0:00 bin/ocis-debug web
12993 pts/1 Sl 0:00 bin/ocis-debug api
12998 pts/1 Sl 0:00 bin/ocis-debug registry
13004 pts/1 Sl 0:00 bin/ocis-debug web
13015 pts/1 Sl 0:00 bin/ocis-debug reva-auth-basic
```
Then you can set a breakpoint in the service you need and attach to the process via processid. To debug the `reva-sharing` service the VS Code `launch.json` would look like this:
```json
{
"version": "0.2.0",
"configurations": [
{
"name": "ocis attach",
"type": "go",
"request": "attach",
"mode": "local",
"processId": 12897
}
]
}
```
#### Start all services independently to replace one of them with a debug process
1. You can use this `./ocis.sh` script to start all services independently, so they don't get restarted by the runtime when you kill them:
```bash
#/bin/sh
LOG_LEVEL="debug"
bin/ocis --log-level=$LOG_LEVEL micro &
bin/ocis --log-level=$LOG_LEVEL glauth &
bin/ocis --log-level=$LOG_LEVEL graph &
#bin/ocis --log-level=$LOG_LEVEL hello &
bin/ocis --log-level=$LOG_LEVEL idp &
#bin/ocis --log-level=$LOG_LEVEL ocs &
bin/ocis --log-level=$LOG_LEVEL web &
bin/ocis --log-level=$LOG_LEVEL reva-auth-basic &
bin/ocis --log-level=$LOG_LEVEL reva-auth-bearer &
bin/ocis --log-level=$LOG_LEVEL reva-frontend &
bin/ocis --log-level=$LOG_LEVEL reva-gateway &
bin/ocis --log-level=$LOG_LEVEL reva-sharing &
bin/ocis --log-level=$LOG_LEVEL reva-storage-home &
bin/ocis --log-level=$LOG_LEVEL reva-storage-home-data &
bin/ocis --log-level=$LOG_LEVEL reva-storage-oc &
bin/ocis --log-level=$LOG_LEVEL reva-storage-oc-data &
bin/ocis --log-level=$LOG_LEVEL reva-storage-root &
bin/ocis --log-level=$LOG_LEVEL reva-users &
#bin/ocis --log-level=$LOG_LEVEL webdav
bin/ocis --log-level=$LOG_LEVEL proxy &
```
2. Get the list of running processes:
```console
# ps ax | grep ocis
12837 pts/1 Sl+ 0:00 bin/ocis-debug server
12845 pts/1 Sl 0:00 bin/ocis-debug graph
12847 pts/1 Sl 0:00 bin/ocis-debug reva-auth-bearer
12849 pts/1 Sl 0:00 bin/ocis-debug ocs
12850 pts/1 Sl 0:00 bin/ocis-debug reva-storage-oc-data
12863 pts/1 Sl 0:00 bin/ocis-debug webdav
12874 pts/1 Sl 0:00 bin/ocis-debug reva-frontend
12897 pts/1 Sl 0:00 bin/ocis-debug reva-sharing
12905 pts/1 Sl 0:00 bin/ocis-debug reva-gateway
12912 pts/1 Sl 0:00 bin/ocis-debug reva-storage-home
12920 pts/1 Sl 0:00 bin/ocis-debug reva-users
12929 pts/1 Sl 0:00 bin/ocis-debug glauth
12940 pts/1 Sl 0:00 bin/ocis-debug reva-storage-home-data
12948 pts/1 Sl 0:00 bin/ocis-debug idp
12952 pts/1 Sl 0:00 bin/ocis-debug proxy
12961 pts/1 Sl 0:00 bin/ocis-debug thumbnails
12971 pts/1 Sl 0:00 bin/ocis-debug reva-storage-oc
12981 pts/1 Sl 0:00 bin/ocis-debug web
12993 pts/1 Sl 0:00 bin/ocis-debug api
12998 pts/1 Sl 0:00 bin/ocis-debug registry
13004 pts/1 Sl 0:00 bin/ocis-debug web
13015 pts/1 Sl 0:00 bin/ocis-debug reva-auth-basic
```
3. Kill the service you want to start in debug mode:
```console
# kill 17628
```
4. Start the service you are interested in debug mode. When using make to build the binary there is already a `bin/ocis-debug` binary for you. When running an IDE tell it which service to start by providing the corresponding sub command, e.g. `bin\ocis-debug reva-frontend`.
### Gather error messages
We recommend you collect all related information in a single file or in a GitHub issue. Let us start with an error that pops up in the Web UI:
> Error while sharing.
> error sending a grpc stat request
This popped up when I tried to add `marie` as a collaborator in ownCloud Web. That triggers a request to the server which I copied as curl. We can strip a lot of headers and the gist of it is:
```console
# curl 'https://localhost:9200/ocs/v1.php/apps/files_sharing/api/v1/shares' -d 'shareType=0&shareWith=marie&path=%2FNeuer+Ordner&permissions=1' -u einstein:relativity -k -v | xmllint -format -
[... headers ...]
<?xml version="1.0" encoding="UTF-8"?>
<ocs>
<meta>
<status>error</status>
<statuscode>998</statuscode>
<message>error sending a grpc stat request</message>
</meta>
</ocs>
```
{{< hint info >}}
The username and password only work when basic auth is available. Otherwise you have to obtain a bearer token, e.g. by grabbing it from the browser.
{{< /hint >}}
{{< hint danger >}}
TODO add ocis cli tool to obtain a bearer token.
{{< /hint >}}
We also have a few interesting log entries:
```
0:43PM INF home/jfd/go/pkg/mod/github.com/cs3org/reva@v0.0.2-0.20200318111623-a2f97d4aa741/internal/grpc/interceptors/log/log.go:69 > unary code=OK end="18/Mar/2020:22:43:40 +0100" from=tcp://[::1]:44078 pid=17836 pkg=rgrpc start="18/Mar/2020:22:43:40 +0100" time_ns=95841 traceid=b4eb9a9f45921f7d3632523ca32a42b0 uri=/cs3.storage.registry.v1beta1.RegistryAPI/GetStorageProvider user-agent=grpc-go/1.26.0
10:43PM ERR home/jfd/go/pkg/mod/github.com/cs3org/reva@v0.0.2-0.20200318111623-a2f97d4aa741/internal/grpc/interceptors/log/log.go:69 > unary code=Unknown end="18/Mar/2020:22:43:40 +0100" from=tcp://[::1]:43910 pid=17836 pkg=rgrpc start="18/Mar/2020:22:43:40 +0100" time_ns=586115 traceid=b4eb9a9f45921f7d3632523ca32a42b0 uri=/cs3.gateway.v1beta1.GatewayAPI/Stat user-agent=grpc-go/1.26.0
10:43PM ERR home/jfd/go/pkg/mod/github.com/cs3org/reva@v0.0.2-0.20200318111623-a2f97d4aa741/internal/http/services/owncloud/ocs/reqres.go:94 > error sending a grpc stat request error="rpc error: code = Unknown desc = gateway: error calling Stat: rpc error: code = Unavailable desc = connection error: desc = \"transport: Error while dialing dial tcp [::1]:9152: connect: connection refused\"" pid=17832 pkg=rhttp traceid=b4eb9a9f45921f7d3632523ca32a42b0
```
{{< hint danger >}}
TODO return the trace id in the response so we can correlate easier. For reva tracked in https://github.com/cs3org/reva/issues/587
{{< /hint >}}
The last line gives us a hint where the log message originated: `.../github.com/cs3org/reva@v0.0.2-0.20200318111623-a2f97d4aa741/internal/http/services/owncloud/ocs/reqres.go:94`. Which looks like this:
```go
89: // WriteOCSResponse handles writing ocs responses in json and xml
90: func WriteOCSResponse(w http.ResponseWriter, r *http.Request, res *Response, err error) {
91: var encoded []byte
92:
93: if err != nil {
94: appctx.GetLogger(r.Context()).Error().Err(err).Msg(res.OCS.Meta.Message)
95: }
```
Ok, so this seems to be a convenience method that is called from multiple places and also handles errors. Unfortunately, this hides the actual source of the error. We could set a breakpoint in line 94 and reproduce the problem, which can be a lot harder than just clicking the share button or sending a curl request again. So let us see what else the log tells us.
The previous line tells us that a Stat request failed: `uri=/cs3.gateway.v1beta1.GatewayAPI/Stat`. This time the line is written by the grpc log interceptor. What else is there?
The first line tells us that looking up the responsible storage provider seems to have succeeded: `uri=/cs3.storage.registry.v1beta1.RegistryAPI/GetStorageProvider`.
At this point it your familiarity with the codebase starts to become a factor. If you are new you should probably go back to setting a break point on the log line and check the stack trace.
Debug wherever the call trace leads you to ... good luck!
### Managing dependencies and testing changes
You can either run and manage the services independently, or you can update the `go.mod` file and replace dependencies with your local version.
To debug the reva frontend we need to add two replacements:
```
// use the local ocis-reva repo
replace github.com/owncloud/ocis-reva => ../ocis-reva
// also use the local reva repo
replace github.com/cs3org/reva => ../reva
```
{{< hint info >}}
The username and password only work when basic auth is available. Otherwise you have to obtain a bearer token, e.g. by grabbing it from the browser.
{{< /hint >}}
Rebuild ocis to make sure the dependency is used. It should be sufficient to just restart the service you want to debug.
@@ -0,0 +1,39 @@
---
title: "Deprecating Variables"
date: 2022-11-29T15:41:00+01:00
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/development
geekdocFilePath: deprecating-variables.md
---
{{< toc >}}
## Deprecating Environment Variables
Sometimes it is necessary to deprecate environment to align their naming with
conventions. We therefore added annotations to automate the documentation
process. It is necessary to know when the variable is going to be deprecated,
when it is going to be removed and why.
### Example
```golang
// Nats is the nats config
type Nats struct {
Host string `yaml:"host" env:"NATS_HOST_ADDRESS;NATS_NATS_HOST" desc:"Bind address." deprecationVersion:"1.6.2" removalVersion:"1.7.5" deprecationInfo:"NATS_NATS_HOST is confusing" deprecationReplacement:"NATS_HOST_ADDRESS"`
...
}
```
There are four different annotation variables that need to be filled:
| Annotation |Description| Format|
|---|---|---|
| depreactionVersion| The version the variable will be deprecated| semver (e.g. 1.6.2)|
| removalVersion| The version the variable will be removed from the codebase| semver (e.g. 1.7.3)|
| deprecationInfo| Information why the variable is deprecated, must start with the name of the variable in order to avoid confusion, when there are multiple options in the `env:`-field | string (e.g. NATS_NATS_HOST is confusing) |
| depreactionReplacement | The name of the variable that is going to replace the deprecated one.| string (e.g. NATS_HOST_ADDRESS)|
### What happens next?
Once a variable has been finally removed, the annotations must be removed again from the code, since they do not serve any purpose from this point.
+65
View File
@@ -0,0 +1,65 @@
---
title: "Extensions"
date: 2020-02-27T20:35:00+01:00
weight: 40
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/development
geekdocFilePath: extensions.md
---
oCIS is all about files, sync and share - but most of the time there is more you want to do with your files, e.g. having a different view on your photo collection or editing your offices files in an online file editor. ownCloud 10 faced the same problem and solved it with `applications`, which can extend the functionality of ownCloud 10 in a wide range. Since oCIS is different in its architecture compared to ownCloud 10, we had to come up with a similar (yet slightly different) solution. To extend the functionality of oCIS, you can write or install `extensions`. An extension is basically any running code which integrates into oCIS and provides functionality to oCIS and its users. Because extensions are just microservices providing an API, you can technically choose any programming language you like - a huge improvement to ownCloud 10, where it was nearly impossible to use a different programming language than PHP.
We will now introduce you to the oCIS extension system and show you how you can create a custom extension yourself.
## Extension examples
Technically every service in oCIS is an extension, even if oCIS would not really work without some of them. Therefore, you can draw inspiration from any of the plenty of extensions in the [oCIS monorepo](https://github.com/owncloud/ocis).
Besides these "default" extensions in the oCIS monorepo, there are two more extensions you should be aware of:
- [Hello](https://github.com/owncloud/ocis-hello)
- [WOPI server](https://github.com/owncloud/ocis-wopiserver)
Differences between the extensions maintained inside the oCIS monorepo and the ones maintained in their own repository are:
- extensions inside the [oCIS monorepo](https://github.com/owncloud/ocis) are all written in Go, whereas other extensions may choose the programming language freely
- extensions inside the oCIS monorepo heavily share tooling to reduce maintenance efforts, whereas other extensions may use different tooling (e.g. a different CI system)
- extensions inside the oCIS monorepo will be all build into one binary and started with the `ocis server` command. All other extensions must be started individually besides oCIS.
For quickstart purposes we also offer a [template project](https://github.com/owncloud/boilr-ocis-extension) which can be used to generate all the boilerplate code for you. But you also can decide to use your own project layout or even a different programming language.
## Integration into oCIS
Depending on the functionality of your extension, you might need to integrate with one or multiple of the components of oCIS mentioned below.
### ownCloud Web
If your extension is not just doing something in the background, you will need a UI in order to allow the user to interact with your extension. You could just provide your own web frontend for that purpose, but for a better user experience you can easily integrate into the web frontend of oCIS, the new [ownCloud Web](https://github.com/owncloud/web).
ownCloud Web allows you to write an extension for itself and therefore offers a seamless user experience. Upon login, the user will be able to use the application switcher to switch between the files view, settings and other available and installed extensions, yours included. Furthermore it is also possible to register your extension for different file actions. As an example, you could offer your extension to the user for creating and editing office documents. The user will then be able to create or open a file with your application directly from the files view. How to provide create an extension for ownCloud Web can be seen best in [the Hello extension](https://github.com/owncloud/ocis-hello/blob/master/ui/app.js), whereas plain file handling without any web frontend is available in the [WOPI server extension](https://github.com/owncloud/ocis-wopiserver/blob/master/ui/app.js).
To make ownCloud Web pick up your extension, you need to activate it in the configuration like seen in the [Hello extension](https://owncloud.dev/extensions/ocis_hello/running/#configure-and-start-ocis).
For a consistent look and feel, ownCloud Web uses an external design library, the [ownCloud design system](https://github.com/owncloud/owncloud-design-system). Since its classes and components are available through the wrapping `web runtime`, we highly recommend you to leverage it in your extension as well.
### Settings
An extension likely has some behaviour which the user can configure. Fundamental configuration will often be done by administrators during deployment, via configuration files or by setting environment variables. But for other settings, which are supposed to change more often or which are even user specific, this is not a viable way. Therefore you need to offer the users a UI where they can configure your extension to their liking. Because implementing something like this is a repetitive task among extensions, oCIS already offers the settings extensions which does that for your extension. Your extension just needs to register settings bundles, respective permissions and finally read the current values from the settings service. You can read more on that on the [settings extension]({{< ref "../../services/settings" >}}) and see how [oCIS Hello uses these settings](https://owncloud.dev/extensions/ocis_hello/settings/).
### Proxy
The Proxy is an API gateway and acts as the single connection point where all external request from users and devices need to pass through.
To make sure that requests can reach your extension's API, you need to register one or multiple endpoints at the proxy. The registration is an easy task and can be seen best on the [oCIS Hello example](https://owncloud.dev/extensions/ocis_hello/running/#configure-and-start-ocis).
As files in ownCloud must always stay private (unless you share them with your friends or coworkers), requests to oCIS have an authenticated user context. This user context is also available to your extension and can be used to interact with the user's files. How to get the user context and authentication can be seen on the [oCIS Hello example](https://owncloud.dev/extensions/ocis_hello/settings/#account-uuid).
### Storage
oCIS leverages the CS3 APIs and [CS3 REVA](https://github.com/cs3org/reva) as a storage system because it offers a very flexible setup and supports a variety of storage backends like EOS, S3 and of course your local hard drive. REVA makes it easy to support more storage backends as needed.
If you need to interact with files directly, you have the full power of the [CS3 APIs](https://cs3org.github.io/cs3apis/) in your hand. With the user context and the user's authentication token, which your extensions gets from the proxy, your extension can make these request in behalf of the user.
If your extension needs to store persistent data which is not supposed to live in the user's home folder, there is also a so-called metadata storage, intended for exactly that purpose. You should always use the metadata storage in favor of the local filesystem for persistent files, because your extension will then automatically use the storage backend the oCIS admin decides to use. For a temporary cache it is perfectly fine to use the local filesystem.
@@ -0,0 +1,55 @@
---
title: "Getting Started"
date: 2020-07-07T20:35:00+01:00
weight: 15
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/development
geekdocFilePath: getting-started.md
---
{{< toc >}}
## Requirements
We want contribution to oCIS and the creation of extensions to be as easy as possible.
So we are trying to reflect this in the tooling. It should be kept simple and quick to be set up.
Besides standard development tools like git and a text editor, you need the following software for development:
- Go >= v1.18 ([install instructions](https://golang.org/doc/install))
- pnpm ([install instructions](https://pnpm.io/installation))
- docker ([install instructions](https://docs.docker.com/get-docker/))
- docker-compose ([install instructions](https://docs.docker.com/compose/install/))
If you find tools needed besides the mentioned above, please feel free to open an issue or open a PR.
## Repository structure
oCIS consists of multiple microservices, also called extensions. We started by having standalone repositories for each of them, but quickly noticed that this adds a time-consuming overhead for developers. So we ended up with a monorepo housing all the extensions in one repository.
Each extension lives in a subfolder (e.g. `accounts` or `settings`) within this repository as an independent Go module, following the [golang-standard project-layout](https://github.com/golang-standards/project-layout). They have common Makefile targets and can be used to change, build and run individual extensions. This allows us to version and release each extension independently.
The `ocis` folder contains our [go-micro](https://github.com/asim/go-micro/) and [suture](https://github.com/thejerf/suture) based runtime. It is used to import all extensions and implements commands to manage them, similar to a small orchestrator. With the resulting oCIS binary you can start single extensions or even all extensions at the same time.
The `docs` folder contains the source for the [oCIS documentation]({{< ref "../" >}}).
The `deployments` folder contains documented deployment configurations and templates. On a single node, running a single ocis runtime is a resource efficient way to deploy ocis. For multiple nodes docker compose or helm charts for kubernetes examples can be found here.
The `scripts` folder contains scripts to perform various build, install, analysis, etc. operations.
## Starting points
Depending on what you want to develop there are different starting points. These will be described below.
### Developing oCIS
If you want to contribute to oCIS:
- see [contribution guidelines](https://github.com/owncloud/ocis#contributing)
- make sure the tooling is set up by [building oCIS]({{< ref "build" >}}) and [building the docs]({{< ref "build-docs" >}})
- create or pick an [open issue](https://github.com/owncloud/ocis/issues) to develop on and mention in the issue that you are working on it
- open a PR and get things done
### Developing extensions
If you want to develop an extension, start here: [Extensions]({{< ref "extensions">}})
+140
View File
@@ -0,0 +1,140 @@
---
title: "Profiling"
date: 2021-08-24T12:32:20+01:00
weight: 56
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/development
geekdocFilePath: profiling.md
---
{{< toc >}}
# 0. Prerequisites
- Go development kit of a [supported version](https://golang.org/doc/devel/release.html#policy).
Follow [these instructions](http://golang.org/doc/code.html) to install the
go tool and set up GOPATH.
- Graphviz: http://www.graphviz.org/. Used to generate graphic visualizations of profiles, which this example setup does.
The only way to enable the profiler currently is to explicitly select which areas to collect samples for. In order to do this, the following steps have to be followed.
## 1. Clone Reva
Reva is the reference implementation of the CS3 APIs that we use for our daily business between oCIS and its storages. It is in charge of accessing the storage, as well as managing shares. Because of this fact, the examples will modify code in this dependency. You can think of Reva as the framework we use in order to interface with different storage providers.
`git clone github.com/cs3org/reva`
## 2. Patch reva with the area that you want sampled.
For the purposes of these docs let's use the WebDAV `PROPFIND` path. This patch is needed in order to have the WebDAV process reporting profiling traces to the `pprof`.
```diff
diff --git a/internal/http/services/owncloud/ocdav/propfind.go b/internal/http/services/owncloud/ocdav/propfind.go
index 0e9c99be..f271572f 100644
--- a/internal/http/services/owncloud/ocdav/propfind.go
+++ b/internal/http/services/owncloud/ocdav/propfind.go
@@ -32,6 +32,8 @@ import (
"strings"
"time"
+ _ "net/http/pprof"
+
userv1beta1 "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
rpc "github.com/cs3org/go-cs3apis/cs3/rpc/v1beta1"
link "github.com/cs3org/go-cs3apis/cs3/sharing/link/v1beta1"
@@ -311,6 +313,12 @@ func requiresExplicitFetching(n *xml.Name) bool {
return true
}
+func init() {
+ go func() {
+ http.ListenAndServe(":1234", nil)
+ }()
+}
+
// from https://github.com/golang/net/blob/e514e69ffb8bc3c76a71ae40de0118d794855992/webdav/xml.go#L178-L205
func readPropfind(r io.Reader) (pf propfindXML, status int, err error) {
c := countingReader{r: r}
```
The previous patch will:
1. import `net/http/pprof`, which will register debug handlers in `DefaultServeMux`.
2. define a `init()` function that starts an HTTP server with the previously registered handlers.
With everything running one should have access to http://localhost:1234/debug/pprof/
## 3. Replace reva in oCIS go.mod with local version and build a new binary
In Go, the `go.mod` file controls the dependencies of your module. Because we patched an external library, Go provides with a mechanism to overwrite an existing dependency with one on your local machine, which we previously installed.
```diff
diff --git a/go.mod b/go.mod
index 131d14d7b..9668c38e4 100644
--- a/go.mod
+++ b/go.mod
@@ -78,6 +78,7 @@ require (
replace (
github.com/crewjam/saml => github.com/crewjam/saml v0.4.5
+ github.com/cs3org/reva => path/to/your/reva
go.etcd.io/etcd/api/v3 => go.etcd.io/etcd/api/v3 v3.0.0-20210204162551-dae29bb719dd
go.etcd.io/etcd/pkg/v3 => go.etcd.io/etcd/pkg/v3 v3.0.0-20210204162551-dae29bb719dd
)
```
Make sure to replace `github.com/cs3org/reva => path/to/your/reva` with the correct location of your reva.
## 4. Build a new ocis binary
Using the new dependency with the pprof patch.
From owncloud/ocis root:
```console
$ cd ocis
$ make clean build
```
## 5. Start oCIS server
From owncloud/ocis root:
```console
$ ocis/bin/ocis server
```
## 6. Run `pprof`
[Pprof](https://github.com/google/pprof) is a tool developed at Google. It is a tool for visualization and analysis of profiling data. It will take the reported profiled data from our server, and represent it in a meaningful manner.
### Install pprof
If `pprof` is not installed make sure to get it; one way of installing it is using the Go tools:
```console
$ go get -u github.com/google/pprof
```
### Collecting samples
Collect 30 seconds of samples:
```console
$ pprof -web http://:1234/debug/pprof/profile\?seconds\=30
```
Once the collection is done a browser tab will open with the result `svg`, looking similar to this:
![img](https://i.imgur.com/vo0EbcX.jpg)
For references on how to interpret this graph, [continue reading here](https://github.com/google/pprof/blob/master/doc/README.md#interpreting-the-callgraph).
## Room for improvement
Because these docs are intended to be read by developers they are quite technical in content. Requiring the user to alter the code. This is done so that we do not include, or assume, third party dependencies such as Graphviz in our binary, making it heavier. Having said this, the profiler is only meant to be used in development
## References
- https://medium.com/swlh/go-profile-your-code-like-a-master-1505be38fdba
- https://dave.cheney.net/2013/07/07/introducing-profile-super-simple-profiling-for-go-programs
+225
View File
@@ -0,0 +1,225 @@
---
title: "Testing"
date: 2018-05-02T00:00:00+00:00
weight: 37
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/development
geekdocFilePath: testing.md
---
{{< toc >}}
To run tests in the test suite you have two options. You may go the easy way and just run the test suite in docker. But for some tasks you could also need to install the test suite natively, which requires a little more setup since PHP and some dependencies need to be installed.
Both ways to run tests with the test suites are described here.
## Testing with test suite in docker
Let's see what is available. Invoke the following command from within the root of the oCIS repository.
```
make -C tests/acceptance/docker help
```
Basically we have two sources for feature tests and test suites:
- [oCIS feature test and test suites](https://github.com/owncloud/ocis/tree/master/tests/acceptance/features)
- [ownCloud feature tests and test suites](https://github.com/owncloud/core/tree/master/tests/acceptance/features)
At the moment both can be applied to oCIS since the api of oCIS is designed to be compatible with ownCloud.
Since we have to offer a migration path to existing users of ownCloud, you can use your existing ownCloud as the storage backend for oCIS. As another storage backend we offer oCIS native storage, also called "oCIS". This stores files directly on disk. Which storage backend is used is also reflected in the tests, there are always different tests for oCIS storage and ownCloud storage.
You can invoke two types of test suite runs:
- run a full test suite, which consists of multiple feature tests
- run a single feature or single scenario in a feature
### Run full test suite
The names of the full test suite make targets have the same naming as in the CI pipeline.
For example `make -C tests/acceptance/docker localApiTests-apiAccountsHashDifficulty-ocis` runs the same tests as the `localApiTests-apiAccountsHashDifficulty-ocis` CI pipeline, which runs the oCIS test suite "apiAccountsHashDifficulty" against an oCIS with oCIS storage.
For example `make -C tests/acceptance/docker Core-API-Tests-owncloud-storage-3`runs the same tests as the `Core-API-Tests-owncloud-storage-3` CI pipeline, which runs the third (out of ten) ownCloud test suite against an oCIS with owncloud storage.
### Run single feature test
The single feature tests can also be run against the different storage backends. Therefore, multiple make targets with the schema test-<test source>-feature-<storage backend> exist. To select a single feature you have to add an additional `BEHAT_FEATURE=...` parameter when invoking the make command:
```
make -C tests/acceptance/docker test-ocis-feature-ocis-storage BEHAT_FEATURE='tests/acceptance/features/apiAccountsHashDifficulty/addUser.feature'
```
This must be pointing to a valid feature definition.
To run a single scenario in a feature, then mention the line number of the scenario:
```
make -C tests/acceptance/docker test-ocis-feature-ocis-storage BEHAT_FEATURE='tests/acceptance/features/apiAccountsHashDifficulty/addUser.feature:20'
```
### oCIS image to be tested (or: skip build and take existing image)
By default, the tests will be run against the docker image built from your current working state of the oCIS repository. For some purposes it might also be handy to use an oCIS image from Docker Hub. Therefore, you can provide the optional flag `OCIS_IMAGE_TAG=...` which must contain an available docker tag of the [owncloud/ocis registry on Docker Hub](https://hub.docker.com/r/owncloud/ocis) (e.g. 'latest').
```
make -C tests/acceptance/docker localApiTests-apiAccountsHashDifficulty-ocis OCIS_IMAGE_TAG=latest
```
### Test log output
While a test is running or when it is finished, you can attach to the logs generated by the tests.
```
make -C tests/acceptance/docker show-test-logs
```
{{< hint info >}}
The log output is opened in `less`. You can navigate up and down with your cursors. By pressing "F" you can follow the latest line of the output.
{{< /hint >}}
### Cleanup
During testing we start a redis and oCIS docker container. These will not be stopped automatically. You can stop them with:
```
make -C tests/acceptance/docker clean
```
## Testing with test suite natively installed
We have two sets of tests:
- `test-acceptance-from-core-api` set was transferred from [core](https://github.com/owncloud/core) repository
The suite name of all tests transferred from the core starts with "core"
- `test-acceptance-api` set was created for ocis. Mainly for testing spaces features
### Run ocis
Create an up-to-date ocis binary by [building oCIS]({{< ref "build" >}})
To start ocis:
```bash
IDM_ADMIN_PASSWORD=admin \
ocis/bin/ocis init --insecure true
OCIS_INSECURE=true PROXY_ENABLE_BASIC_AUTH=true \
ocis/bin/ocis server
```
`PROXY_ENABLE_BASIC_AUTH` will allow the acceptance tests to make requests against the provisioning api (and other endpoints) using basic auth.
### Run the test-acceptance-from-core-api tests
```bash
make test-acceptance-from-core-api \
TEST_SERVER_URL=https://localhost:9200 \
TEST_WITH_GRAPH_API=true \
TEST_OCIS=true \
```
Note: This command only works for suites that start with core
### Run the test-acceptance-api tests
```bash
make test-acceptance-api \
TEST_SERVER_URL=https://localhost:9200 \
TEST_WITH_GRAPH_API=true \
TEST_OCIS=true \
```
Make sure to adjust the settings `TEST_SERVER_URL` according to your environment.
To run a single feature add `BEHAT_FEATURE=<feature file>`
example: `BEHAT_SUITE=tests/acceptance/features/apiGraph/createUser.feature`
To run a single test add `BEHAT_FEATURE=<file.feature:(line number)>`
example: `BEHAT_SUITE=tests/acceptance/features/apiGraph/createUser.feature:12`
To run a single suite add `BEHAT_SUITE=<test suite>`
example: `BEHAT_SUITE=apiGraph`
To run tests with a different storage driver set `STORAGE_DRIVER` to the correct value. It can be set to `OCIS` or `OWNCLOUD` and uses `OWNCLOUD` as the default value.
### use existing tests for BDD
As a lot of scenarios from `test-acceptance-from-core-api` are written for oC10, we can use those tests for Behaviour driven development in ocis.
Every scenario that does not work in oCIS with "ocis" storage, is listed in `tests/acceptance/expected-failures-API-on-OCIS-storage.md` with a link to the related issue.
Those scenarios are run in the ordinary acceptance test pipeline in CI. The scenarios that fail are checked against the
expected failures. If there are any differences then the CI pipeline fails.
The tests are not currently run in CI with the OWNCLOUD or EOS storage drivers, so there are no expected-failures files for those.
If you want to work on a specific issue
1. locally run each of the tests marked with that issue in the expected failures file.
E.g.:
```bash
make test-acceptance-from-core-api \
TEST_SERVER_URL=https://localhost:9200 \
TEST_OCIS=true \
TEST_WITH_GRAPH_API=true \
STORAGE_DRIVER=OCIS \
BEHAT_FEATURE='tests/acceptance/features/coreApiVersions/fileVersions.feature:147'
```
2. the tests will fail, try to understand how and why they are failing
3. fix the code
4. go back to 1. and repeat till the tests are passing.
5. remove those tests from the expected failures file
6. make a PR that has the fixed code, and the relevant lines removed from the expected failures file.
## Running tests for parallel deployment
### Setup the parallel deployment environment
Instruction on setup is available [here](https://owncloud.dev/ocis/deployment/oc10_ocis_parallel/#local-setup)
Edit the `.env` file and uncomment this line:
```bash
COMPOSE_FILE=docker-compose.yml:testing/docker-compose-additions.yml
```
Start the docker stack with the following command:
```bash
docker-compose up -d
```
### Getting the test helpers
All the test helpers are located in the core repo.
```bash
git clone https://github.com/owncloud/core.git
```
### Run the acceptance tests
Run the acceptance tests with the following command from the root of the oCIS repository:
```bash
make test-paralleldeployment-api \
TEST_SERVER_URL="https://cloud.owncloud.test" \
TEST_OC10_URL="http://localhost:8080" \
TEST_PARALLEL_DEPLOYMENT=true \
TEST_OCIS=true \
TEST_WITH_LDAP=true \
PATH_TO_CORE="<path_to_core>" \
SKELETON_DIR="<path_to_core>/apps/testing/data/apiSkeleton"
```
Replace `<path_to_core>` with the actual path to the root directory of core repo that you have cloned earlier.
In order to run a single test, use the `BEHAT_FEATURE` environment variable.
```bash
make test-paralleldeployment-api \
... \
BEHAT_FEATURE="tests/parallelDeployAcceptance/features/apiShareManagement/acceptShares.feature"
```
+50
View File
@@ -0,0 +1,50 @@
---
title: "Tracing"
date: 2020-05-13T12:09:00+01:00
weight: 55
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/development
geekdocFilePath: tracing.md
---
{{< toc >}}
By default, we use [Jaeger](https://www.jaegertracing.io) for request tracing within oCIS. You can follow these steps
to get started:
1. Start Jaeger by using the all-in-one docker image:
```console
docker run -d --name jaeger \
-e COLLECTOR_ZIPKIN_HTTP_PORT=9411 \
-p 5775:5775/udp \
-p 6831:6831/udp \
-p 6832:6832/udp \
-p 5778:5778 \
-p 16686:16686 \
-p 14268:14268 \
-p 14250:14250 \
-p 9411:9411 \
jaegertracing/all-in-one:1.17
```
2. Every single oCIS service has its own environment variables for enabling and configuring tracing.
1. You can enable and configure tracing on each service individually. For example, enable tracing
in Reva when starting the oCIS single binary like this:
```console
REVA_TRACING_ENABLED=true \
REVA_TRACING_ENDPOINT=localhost:6831 \
REVA_TRACING_COLLECTOR=http://localhost:14268/api/traces \
./bin/ocis server
```
2. Enabling and configuring tracing on oCIS itself will forward the configuration to all services:
```console
OCIS_TRACING_ENABLED=true \
OCIS_TRACING_ENDPOINT=localhost:6831 \
OCIS_TRACING_COLLECTOR=http://localhost:14268/api/traces \
./bin/ocis server
```
If you want to set individual tracing configuration for each service, make sure to set
`OCIS_TRACING_ENABLED=false`.
3. Make the actual request that you want to trace.
4. Open up the [Jaeger UI](http://localhost:16686) to analyze request traces.
For more information on Jaeger, please refer to their [Documentation](https://www.jaegertracing.io/docs/1.17/).
Loaded 100 of 674 files, more files were not shown because too many files have changed in this diff. Show more