Add 'reva/' from commit '26235b1c92648716bb30771e6d538c5dddf755c4'

git-subtree-dir: reva
git-subtree-mainline: 91bd83938b
git-subtree-split: 26235b1c92
This commit is contained in:
A.Unger
2020-09-18 12:49:16 +02:00
179 changed files with 17143 additions and 0 deletions

9
reva/.codacy.yml Normal file
View File

@@ -0,0 +1,9 @@
---
exclude_paths:
- CHANGELOG.md
- changelog/**
- docs/**
- pkg/proto/**
- tests/acceptance/features/bootstrap/*
...

2
reva/.dockerignore Normal file
View File

@@ -0,0 +1,2 @@
*
!bin/

1051
reva/.drone.star Normal file
View File

File diff suppressed because it is too large Load Diff

35
reva/.editorconfig Normal file
View File

@@ -0,0 +1,35 @@
# http://editorconfig.org
root = true
[*]
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
[Makefile]
indent_style = tab
indent_size = 4
[*.go]
indent_style = tab
indent_size = 4
[*.starlark]
indent_style = space
indent_size = 2
[*.{yml,json}]
indent_style = space
indent_size = 2
[*.{js,vue}]
indent_style = space
indent_size = 2
[*.{css,less}]
indent_style = space
indent_size = 2
[*.md]
trim_trailing_whitespace = true

12
reva/.github/config.yml vendored Normal file
View File

@@ -0,0 +1,12 @@
# Configuration for update-docs - https://github.com/behaviorbot/update-docs
# Comment to be posted to on PRs that don't update documentation
updateDocsComment: >
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a [changelog](https://github.com/owncloud/ocis-reva/blob/master/changelog/README.md) item based on your changes.
updateDocsWhiteList:
- Tests-only
- tests-only
- Tests-Only
updateDocsTargetFiles:
- changelog/unreleased/

0
reva/.github/issue_template.md vendored Normal file
View File

0
reva/.github/pull_request_template.md vendored Normal file
View File

98
reva/.github/settings.yml vendored Normal file
View File

@@ -0,0 +1,98 @@
---
repository:
name: ocis-reva
description: ':arrows_counterclockwise: reva integration for oCIS'
homepage: https://owncloud.github.io/ocis-reva/
topics: reva, ocis
private: false
has_issues: true
has_projects: false
has_wiki: true
has_downloads: false
default_branch: master
allow_squash_merge: true
allow_merge_commit: true
allow_rebase_merge: true
labels:
- name: bug
color: d73a4a
description: Something isn't working
- name: documentation
color: 0075ca
description: Improvements or additions to documentation
- name: duplicate
color: cfd3d7
description: This issue or pull request already exists
- name: enhancement
color: a2eeef
description: New feature or request
- name: good first issue
color: 7057ff
description: Good for newcomers
- name: help wanted
color: 008672
description: Extra attention is needed
- name: invalid
color: e4e669
description: This doesn't seem right
- name: question
color: d876e3
description: Further information is requested
- name: wontfix
color: ffffff
description: This will not be worked on
- name: effort/trivial
color: c2e0c6
description: Required effort to finish task
- name: effort/0.25d
color: c2e0c6
description: Required effort to finish task
- name: effort/0.5d
color: c2e0c6
description: Required effort to finish task
- name: effort/1d
color: c2e0c6
description: Required effort to finish task
- name: effort/2d
color: c2e0c6
description: Required effort to finish task
- name: effort/4d
color: c2e0c6
description: Required effort to finish task
- name: effort/5d
color: c2e0c6
description: Required effort to finish task
- name: effort/10d
color: c2e0c6
description: Required effort to finish task
teams:
- name: ci
permission: admin
- name: employees
permission: push
branches:
- name: master
protection:
required_pull_request_reviews:
required_approving_review_count: 1
dismiss_stale_reviews: false
require_code_owner_reviews: false
dismissal_restrictions: {}
required_status_checks:
strict: true
contexts:
- continuous-integration/drone/pr
enforce_admins: false
restrictions:
users: []
teams:
- ci
- employees
...

15
reva/.gitignore vendored Normal file
View File

@@ -0,0 +1,15 @@
coverage.out
/bin
/dist
/hugo
/node_modules
/assets
# API acceptance tests
composer.lock
/vendor
vendor-bin/**/vendor
vendor-bin/**/composer.lock
tests/acceptance/output

18
reva/.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,18 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "go",
"request": "launch",
"mode": "auto",
"program": "${workspaceFolder}/cmd/ocis-reva",
"env": {},
"cwd": "${workspaceFolder}",
"args": ["legacy"]
}
]
}

948
reva/CHANGELOG.md Normal file
View File

@@ -0,0 +1,948 @@
# Changelog for [0.14.0] (2020-09-11)
The following sections list the changes in ocis-reva 0.14.0.
[0.14.0]: https://github.com/owncloud/ocis-reva/compare/v0.13.0...v0.14.0
## Summary
* Bugfix - Fix default configuration for accessing shares: [#205](https://github.com/owncloud/product/issues/205)
* Enhancement - Allow configuring arbitrary storage registry rules: [#193](https://github.com/owncloud/product/issues/193)
* Enhancement - Update reva to v1.2.1-0.20200826162318-c0f54e1f37ea: [#454](https://github.com/owncloud/ocis-reva/pull/454)
* Enhancement - Update reva to v1.2.1-0.20200911111727-51649e37df2d: [#466](https://github.com/owncloud/ocis-reva/pull/466)
## Details
* Bugfix - Fix default configuration for accessing shares: [#205](https://github.com/owncloud/product/issues/205)
The storage provider mounted at `/home` should always have EnableHome set to `true`. The other
storage providers should have it set to `false`.
https://github.com/owncloud/product/issues/205
https://github.com/owncloud/ocis-reva/pull/461
* Enhancement - Allow configuring arbitrary storage registry rules: [#193](https://github.com/owncloud/product/issues/193)
We added a new config flag `storage-registry-rule` that can be given multiple times for the
gateway to specify arbitrary storage registry rules. You can also use a comma separated list of
rules in the `REVA_STORAGE_REGISTRY_RULES` environment variable.
https://github.com/owncloud/product/issues/193
https://github.com/owncloud/ocis-reva/pull/461
* Enhancement - Update reva to v1.2.1-0.20200826162318-c0f54e1f37ea: [#454](https://github.com/owncloud/ocis-reva/pull/454)
- Update reva to v1.2.1-0.20200826162318-c0f54e1f37ea - Do not swallow 'not found' errors in
Stat [(reva/#1124)](https://github.com/cs3org/reva/pull/1124) - Rewire dav files to the
home storage [(reva/#1125)](https://github.com/cs3org/reva/pull/1125) - Do not restore
recycle entry on purge [(reva/#1099)](https://github.com/cs3org/reva/pull/1099) -
Allow listing the trashbin [(reva/#1091)](https://github.com/cs3org/reva/pull/1091) -
Restore and delete trash items via ocs
[(reva/#1103)](https://github.com/cs3org/reva/pull/1103) - Ensure ignoring public
stray shares [(reva/#1090)](https://github.com/cs3org/reva/pull/1090) - Ensure
ignoring stray shares [(reva/#1064)](https://github.com/cs3org/reva/pull/1064) -
Minor fixes in reva cmd, gateway uploads and smtpclient
[(reva/#1082)](https://github.com/cs3org/reva/pull/1082) - Owncloud driver -
propagate mtime on RemoveGrant
[(reva/#1115)](https://github.com/cs3org/reva/pull/1115) - Handle redirection
prefixes when extracting destination from URL
[(reva/#1111)](https://github.com/cs3org/reva/pull/1111) - Add UID and GID in ldap auth
driver [(reva/#1101)](https://github.com/cs3org/reva/pull/1101) - Add calens check to
verify changelog entries in CI
[(reva/#1077)](https://github.com/cs3org/reva/pull/1077) - Refactor Reva CLI with
prompts [(reva/#1072)](https://github.com/cs3org/reva/pull/1072j) - Get file info
using fxids from EOS [(reva/#1079)](https://github.com/cs3org/reva/pull/1079) - Update
LDAP user driver [(reva/#1088)](https://github.com/cs3org/reva/pull/1088) - System
information metrics cleanup
[(reva/#1114)](https://github.com/cs3org/reva/pull/1114) - System information
included in Prometheus metrics
[(reva/#1071)](https://github.com/cs3org/reva/pull/1071) - Add logic for resolving
storage references over webdav
[(reva/#1094)](https://github.com/cs3org/reva/pull/1094)
https://github.com/owncloud/ocis-reva/pull/454
* Enhancement - Update reva to v1.2.1-0.20200911111727-51649e37df2d: [#466](https://github.com/owncloud/ocis-reva/pull/466)
- Update reva to v1.2.1-0.20200911111727-51649e37df2d - Added new OCIS storage driver ocis
[(reva/#1155)](https://github.com/cs3org/reva/pull/1155) - App provider: fallback to
env. variable if 'iopsecret' unset
[(reva/#1146)](https://github.com/cs3org/reva/pull/1146) - Add switch to database
[(reva/#1135)](https://github.com/cs3org/reva/pull/1135) - Add the ocdav HTTP svc to the
standalone config [(reva/#1128)](https://github.com/cs3org/reva/pull/1128)
https://github.com/owncloud/ocis-reva/pull/466
# Changelog for [0.13.0] (2020-08-27)
The following sections list the changes in ocis-reva 0.13.0.
[0.13.0]: https://github.com/owncloud/ocis-reva/compare/v0.12.0...v0.13.0
## Summary
* Enhancement - Separate user and auth providers, add config for rest user: [#412](https://github.com/owncloud/ocis-reva/pull/412)
* Enhancement - Update reva to v1.1.1-0.20200819100654-dcbf0c8ea187: [#447](https://github.com/owncloud/ocis-reva/pull/447)
## Details
* Enhancement - Separate user and auth providers, add config for rest user: [#412](https://github.com/owncloud/ocis-reva/pull/412)
Previously, the auth and user provider services used to have the same driver, which restricted
using separate drivers and configs for both. This PR separates the two and adds the config for
the rest user driver and the gatewaysvc parameter to EOS fs.
https://github.com/owncloud/ocis-reva/pull/412
https://github.com/cs3org/reva/pull/995
* Enhancement - Update reva to v1.1.1-0.20200819100654-dcbf0c8ea187: [#447](https://github.com/owncloud/ocis-reva/pull/447)
- Update reva to v1.1.1-0.20200819100654-dcbf0c8ea187 - fix restoring and deleting trash
items via ocs [(reva/#1103)](https://github.com/cs3org/reva/pull/1103) - Add UID and GID
in ldap auth driver [(reva/#1101)](https://github.com/cs3org/reva/pull/1101) - Allow
listing the trashbin [(reva/#1091)](https://github.com/cs3org/reva/pull/1091) -
Ignore Stray Public Shares [(reva/#1090)](https://github.com/cs3org/reva/pull/1090) -
Implement GetUserByClaim for LDAP user driver
[(reva/#1088)](https://github.com/cs3org/reva/pull/1088) - eosclient: get file info by
fxid [(reva/#1079)](https://github.com/cs3org/reva/pull/1079) - Ensure stray shares
get ignored [(reva/#1064)](https://github.com/cs3org/reva/pull/1064) - Improve
timestamp precision while logging
[(reva/#1059)](https://github.com/cs3org/reva/pull/1059) - Ocfs lookup userid
(update) [(reva/#1052)](https://github.com/cs3org/reva/pull/1052) - Disallow sharing
the shares directory [(reva/#1051)](https://github.com/cs3org/reva/pull/1051) - Local
storage provider: Fixed resolution of fileid
[(reva/#1046)](https://github.com/cs3org/reva/pull/1046) - List public shares only
created by the current user [(reva/#1042)](https://github.com/cs3org/reva/pull/1042)
https://github.com/owncloud/ocis-reva/pull/447
# Changelog for [0.12.0] (2020-08-17)
The following sections list the changes in ocis-reva 0.12.0.
[0.12.0]: https://github.com/owncloud/ocis-reva/compare/v0.11.0...v0.12.0
## Summary
* Bugfix - Update LDAP filters: [#399](https://github.com/owncloud/ocis-reva/pull/399)
* Change - Environment updates for the username userid split: [#420](https://github.com/owncloud/ocis-reva/pull/420)
* Enhancement - Update storage documentation: [#384](https://github.com/owncloud/ocis-reva/pull/384)
* Enhancement - Update reva to v0.1.1-0.20200724135750-b46288b375d6: [#399](https://github.com/owncloud/ocis-reva/pull/399)
* Enhancement - Update reva to v0.1.1-0.20200728071211-c948977dd3a0: [#407](https://github.com/owncloud/ocis-reva/pull/407)
## Details
* Bugfix - Update LDAP filters: [#399](https://github.com/owncloud/ocis-reva/pull/399)
With the separation of use and find filters we can now use a filter that taken into account a users
uuid as well as his username. This is necessary to make sharing work with the new account service
which assigns accounts an immutable account id that is different from the username.
Furthermore, the separate find filters now allows searching users by their displayname or
email as well.
``` userfilter =
"(&(objectclass=posixAccount)(|(ownclouduuid={{.OpaqueId}})(cn={{.OpaqueId}})))"
findfilter =
"(&(objectclass=posixAccount)(|(cn={{query}}*)(displayname={{query}}*)(mail={{query}}*)))"
```
https://github.com/owncloud/ocis-reva/pull/399
https://github.com/cs3org/reva/pull/996
* Change - Environment updates for the username userid split: [#420](https://github.com/owncloud/ocis-reva/pull/420)
We updated the owncloud storage driver in reva to properly look up users by userid or username
using the userprovider instead of taking the path segment as is. This requires the user service
address as well as changing the default layout to the userid instead of the username. The latter
is not considered a stable and persistent identifier.
https://github.com/owncloud/ocis-reva/pull/420
https://github.com/cs3org/reva/pull/1033
* Enhancement - Update storage documentation: [#384](https://github.com/owncloud/ocis-reva/pull/384)
We added details to the documentation about storage requirements known from ownCloud 10, the
local storage driver and the ownCloud storage driver.
https://github.com/owncloud/ocis-reva/pull/384
https://github.com/owncloud/ocis-reva/pull/390
* Enhancement - Update reva to v0.1.1-0.20200724135750-b46288b375d6: [#399](https://github.com/owncloud/ocis-reva/pull/399)
- Update reva to v0.1.1-0.20200724135750-b46288b375d6 - Split LDAP user filters
(reva/#996) - meshdirectory: Add invite forward API to provider links (reva/#1000) - OCM:
Pass the link to the meshdirectory service in token mail (reva/#1002) - Update
github.com/go-ldap/ldap to v3 (reva/#1004)
https://github.com/owncloud/ocis-reva/pull/399
https://github.com/cs3org/reva/pull/996
https://github.com/cs3org/reva/pull/1000
https://github.com/cs3org/reva/pull/1002
https://github.com/cs3org/reva/pull/1004
* Enhancement - Update reva to v0.1.1-0.20200728071211-c948977dd3a0: [#407](https://github.com/owncloud/ocis-reva/pull/407)
- Update reva to v0.1.1-0.20200728071211-c948977dd3a0 - Use proper logging for ldap auth
requests (reva/#1008) - Update github.com/eventials/go-tus to
v0.0.0-20200718001131-45c7ec8f5d59 (reva/#1007) - Check if SMTP credentials are nil
(reva/#1006)
https://github.com/owncloud/ocis-reva/pull/407
https://github.com/cs3org/reva/pull/1008
https://github.com/cs3org/reva/pull/1007
https://github.com/cs3org/reva/pull/1006
# Changelog for [0.11.0] (2020-07-23)
The following sections list the changes in ocis-reva 0.11.0.
[0.11.0]: https://github.com/owncloud/ocis-reva/compare/v0.10.0...v0.11.0
## Summary
* Bugfix - Build docker images with alpine:latest instead of alpine:edge: [#393](https://github.com/owncloud/ocis-reva/pull/393)
* Enhancement - Update reva to v0.1.1-0.20200710143425-cf38a45220c5: [#371](https://github.com/owncloud/ocis-reva/pull/371)
* Enhancement - Update reva to v0.1.1-0.20200722125752-6dea7936f9d1: [#392](https://github.com/owncloud/ocis-reva/pull/392)
## Details
* Bugfix - Build docker images with alpine:latest instead of alpine:edge: [#393](https://github.com/owncloud/ocis-reva/pull/393)
ARM builds were failing when built on alpine:edge, so we switched to alpine:latest instead.
https://github.com/owncloud/ocis-reva/pull/393
* Enhancement - Update reva to v0.1.1-0.20200710143425-cf38a45220c5: [#371](https://github.com/owncloud/ocis-reva/pull/371)
- Update reva to v0.1.1-0.20200710143425-cf38a45220c5 (#371) - Add wopi open (reva/#920) -
Added a CS3API compliant data exporter to Mentix (reva/#955) - Read SMTP password from env if
not set in config (reva/#953) - OCS share fix including file info after update (reva/#958) - Add
flag to smtpclient for for unauthenticated SMTP (reva/#963)
https://github.com/owncloud/ocis-reva/pull/371
https://github.com/cs3org/reva/pull/920
https://github.com/cs3org/reva/pull/953
https://github.com/cs3org/reva/pull/955
https://github.com/cs3org/reva/pull/958
https://github.com/cs3org/reva/pull/963
* Enhancement - Update reva to v0.1.1-0.20200722125752-6dea7936f9d1: [#392](https://github.com/owncloud/ocis-reva/pull/392)
- Update reva to v0.1.1-0.20200722125752-6dea7936f9d1 - Added signing key capability
(reva/#986) - Add functionality to create webdav references for OCM shares (reva/#974) -
Added a site locations exporter to Mentix (reva/#972) - Add option to config to allow requests
to hosts with unverified certificates (reva/#969)
https://github.com/owncloud/ocis-reva/pull/392
https://github.com/cs3org/reva/pull/986
https://github.com/cs3org/reva/pull/974
https://github.com/cs3org/reva/pull/972
https://github.com/cs3org/reva/pull/969
# Changelog for [0.10.0] (2020-07-10)
The following sections list the changes in ocis-reva 0.10.0.
[0.10.0]: https://github.com/owncloud/ocis-reva/compare/v0.9.1...v0.10.0
## Summary
* Enhancement - Make frontend prefixes configurable: [#363](https://github.com/owncloud/ocis-reva/pull/363)
* Enhancement - Update reva to v0.1.1-0.20200701152626-2f6cc60e2f66: [#341](https://github.com/owncloud/ocis-reva/pull/341)
* Enhancement - Update reva to v0.1.1-0.20200709064551-91eed007038f: [#362](https://github.com/owncloud/ocis-reva/pull/362)
## Details
* Enhancement - Make frontend prefixes configurable: [#363](https://github.com/owncloud/ocis-reva/pull/363)
We introduce three new environment variables and preconfigure them the following way:
``` REVA_FRONTEND_DATAGATEWAY_PREFIX="data" REVA_FRONTEND_OCDAV_PREFIX=""
REVA_FRONTEND_OCS_PREFIX="ocs" ```
This restores the reva defaults that were changed upstream.
https://github.com/owncloud/ocis-reva/pull/363
https://github.com/cs3org/reva/pull/936/files#diff-51bf4fb310f7362f5c4306581132fc3bR63
* Enhancement - Update reva to v0.1.1-0.20200701152626-2f6cc60e2f66: [#341](https://github.com/owncloud/ocis-reva/pull/341)
- Update reva to v0.1.1-0.20200701152626-2f6cc60e2f66 (#341) - Added country information
to Mentix (reva/#924) - Refactor metrics package to implement reader interface (reva/#934) -
Fix OCS public link share update values logic (#252, #288, reva/#930)
https://github.com/owncloud/ocis-reva/issues/252
https://github.com/owncloud/ocis-reva/issues/288
https://github.com/owncloud/ocis-reva/pull/341
https://github.com/cs3org/reva/pull/924
https://github.com/cs3org/reva/pull/934
https://github.com/cs3org/reva/pull/930
* Enhancement - Update reva to v0.1.1-0.20200709064551-91eed007038f: [#362](https://github.com/owncloud/ocis-reva/pull/362)
- Update reva to v0.1.1-0.20200709064551-91eed007038f (#362) - Fix config for uploads when
data server is not exposed (reva/#936) - Update OCM partners endpoints (reva/#937) - Update
Ailleron endpoint (reva/#938) - OCS: Fix initialization of shares json file (reva/#940) -
OCS: Fix returned public link URL (#336, reva/#945) - OCS: Share wrap resource id correctly
(#344, reva/#951) - OCS: Implement share handling for accepting and listing shares (#11,
reva/#929) - ocm: dynamically lookup IPs for provider check (reva/#946) - ocm: add
functionality to mail OCM invite tokens (reva/#944) - Change percentagused to
percentageused (reva/#903) - Fix file-descriptor leak (reva/#954)
https://github.com/owncloud/ocis-reva/issues/344
https://github.com/owncloud/ocis-reva/issues/336
https://github.com/owncloud/ocis-reva/issues/11
https://github.com/owncloud/ocis-reva/pull/362
https://github.com/cs3org/reva/pull/936
https://github.com/cs3org/reva/pull/937
https://github.com/cs3org/reva/pull/938
https://github.com/cs3org/reva/pull/940
https://github.com/cs3org/reva/pull/951
https://github.com/cs3org/reva/pull/945
https://github.com/cs3org/reva/pull/929
https://github.com/cs3org/reva/pull/946
https://github.com/cs3org/reva/pull/944
https://github.com/cs3org/reva/pull/903
https://github.com/cs3org/reva/pull/954
# Changelog for [0.9.1] (2020-07-02)
The following sections list the changes in ocis-reva 0.9.1.
[0.9.1]: https://github.com/owncloud/ocis-reva/compare/v0.9.0...v0.9.1
## Summary
* Enhancement - Add new config options for the http client: [#330](https://github.com/owncloud/ocis-reva/pull/330)
## Details
* Enhancement - Add new config options for the http client: [#330](https://github.com/owncloud/ocis-reva/pull/330)
The internal certificates are checked for validity after
https://github.com/cs3org/reva/pull/914, which causes the acceptance tests to fail. This
change sets new hardcoded defaults.
https://github.com/owncloud/ocis-reva/pull/330
# Changelog for [0.9.0] (2020-07-01)
The following sections list the changes in ocis-reva 0.9.0.
[0.9.0]: https://github.com/owncloud/ocis-reva/compare/v0.8.0...v0.9.0
## Summary
* Enhancement - Allow datagateway transfers to take 24h: [#323](https://github.com/owncloud/ocis-reva/pull/323)
* Enhancement - Update reva to v0.1.1-0.20200630075923-39a90d431566: [#320](https://github.com/owncloud/ocis-reva/pull/320)
* Enhancement - Update reva to v0.1.1-0.20200701152626-2f6cc60e2f66: [#328](https://github.com/owncloud/ocis-reva/pull/328)
## Details
* Enhancement - Allow datagateway transfers to take 24h: [#323](https://github.com/owncloud/ocis-reva/pull/323)
- Increase transfer token life time to 24h (PR #323)
https://github.com/owncloud/ocis-reva/pull/323
* Enhancement - Update reva to v0.1.1-0.20200630075923-39a90d431566: [#320](https://github.com/owncloud/ocis-reva/pull/320)
- Update reva to v0.1.1-0.20200630075923-39a90d431566 (#320) - Return special value for
public link password (#294, reva/#904) - Fix public stat and listcontainer response to
contain the correct prefix (#310, reva/#902)
https://github.com/owncloud/ocis-reva/issues/310
https://github.com/owncloud/ocis-reva/issues/294
https://github.com/owncloud/ocis-reva/pull/320
https://github.com/cs3org/reva/pull/902
https://github.com/cs3org/reva/pull/904
* Enhancement - Update reva to v0.1.1-0.20200701152626-2f6cc60e2f66: [#328](https://github.com/owncloud/ocis-reva/pull/328)
- Update reva to v0.1.1-0.20200701152626-2f6cc60e2f66 (#328) - Use sync.Map on pool package
(reva/#909) - Use mutex instead of sync.Map (reva/#915) - Use gatewayProviders instead of
storageProviders on conn pool (reva/#916) - Add logic to ls and stat to process arbitrary
metadata keys (reva/#905) - Preliminary implementation of Set/UnsetArbitraryMetadata
(reva/#912) - Make datagateway forward headers (reva/#913, reva/#926) - Add option to cmd
upload to disable tus (reva/#911) - OCS Share Allow date-only expiration for public shares
(#288, reva/#918) - OCS Share Remove array from OCS Share update response (#252, reva/#919) -
OCS Share Implement GET request for single shares (#249, reva/#921)
https://github.com/owncloud/ocis-reva/issues/288
https://github.com/owncloud/ocis-reva/issues/252
https://github.com/owncloud/ocis-reva/issues/249
https://github.com/owncloud/ocis-reva/pull/328
https://github.com/cs3org/reva/pull/909
https://github.com/cs3org/reva/pull/915
https://github.com/cs3org/reva/pull/916
https://github.com/cs3org/reva/pull/905
https://github.com/cs3org/reva/pull/912
https://github.com/cs3org/reva/pull/913
https://github.com/cs3org/reva/pull/926
https://github.com/cs3org/reva/pull/911
https://github.com/cs3org/reva/pull/918
https://github.com/cs3org/reva/pull/919
https://github.com/cs3org/reva/pull/921
# Changelog for [0.8.0] (2020-06-29)
The following sections list the changes in ocis-reva 0.8.0.
[0.8.0]: https://github.com/owncloud/ocis-reva/compare/v0.7.0...v0.8.0
## Summary
* Enhancement - Update reva to v0.1.1-0.20200629131207-04298ea1c088: [#309](https://github.com/owncloud/ocis-reva/pull/309)
## Details
* Enhancement - Update reva to v0.1.1-0.20200629131207-04298ea1c088: [#309](https://github.com/owncloud/ocis-reva/pull/309)
- Update reva to v0.1.1-0.20200629094927-e33d65230abc (#309) - Fix public link file share
(#278, reva/#895, reva/#900) - Delete public share (reva/#899) - Updated reva to
v0.1.1-0.20200629131207-04298ea1c088 (#313)
https://github.com/owncloud/ocis-reva/issues/278
https://github.com/owncloud/ocis-reva/pull/309
https://github.com/cs3org/reva/pull/895
https://github.com/cs3org/reva/pull/899
https://github.com/cs3org/reva/pull/900
https://github.com/owncloud/ocis-reva/pull/313
# Changelog for [0.7.0] (2020-06-26)
The following sections list the changes in ocis-reva 0.7.0.
[0.7.0]: https://github.com/owncloud/ocis-reva/compare/v0.6.0...v0.7.0
## Summary
* Enhancement - Update reva to v0.1.1-0.20200626111234-e21c32db9614: [#261](https://github.com/owncloud/ocis-reva/pull/261)
## Details
* Enhancement - Update reva to v0.1.1-0.20200626111234-e21c32db9614: [#261](https://github.com/owncloud/ocis-reva/pull/261)
- Updated reva to v0.1.1-0.20200626111234-e21c32db9614 (#304) - TUS upload support through
datagateway (#261, reva/#878, reva/#888) - Added support for differing metrics path for
Prometheus to Mentix (reva/#875) - More data exported by Mentix (reva/#881) - Implementation
of file operations in public folder shares (#49, #293, reva/#877) - Make httpclient trust
local certificates for now (reva/#880) - EOS homes are not configured with an enable-flag
anymore, but with a dedicated storage driver. We're using it now and adapted default configs of
storages (reva/#891, #304)
https://github.com/owncloud/ocis-reva/issues/49
https://github.com/owncloud/ocis-reva/issues/293
https://github.com/owncloud/ocis-reva/issues/261
https://github.com/owncloud/ocis-reva/pull/261
https://github.com/cs3org/reva/pull/875
https://github.com/cs3org/reva/pull/877
https://github.com/cs3org/reva/pull/878
https://github.com/cs3org/reva/pull/881
https://github.com/cs3org/reva/pull/880
https://github.com/cs3org/reva/pull/888
https://github.com/owncloud/ocis-reva/pull/304
https://github.com/cs3org/reva/pull/891
# Changelog for [0.6.0] (2020-06-24)
The following sections list the changes in ocis-reva 0.6.0.
[0.6.0]: https://github.com/owncloud/ocis-reva/compare/v0.5.0...v0.6.0
## Summary
* Enhancement - Update reva to v0.1.1-0.20200624063447-db5e6635d5f0: [#279](https://github.com/owncloud/ocis-reva/pull/279)
## Details
* Enhancement - Update reva to v0.1.1-0.20200624063447-db5e6635d5f0: [#279](https://github.com/owncloud/ocis-reva/pull/279)
- Updated reva to v0.1.1-0.20200624063447-db5e6635d5f0 (#279) - Local storage: URL-encode
file ids to ease integration with other microservices like WOPI (reva/#799) - Mentix fixes
(reva/#803, reva/#817) - OCDAV: fix returned timestamp format (#116, reva/#805) - OCM: add
default prefix (#814) - add the content-length header to the responses (reva/#816) - Deps:
clean (reva/#818) - Fix trashbin listing (#112, #253, #254, reva/#819) - Make the json
publicshare driver configurable (reva/#820) - TUS: Return metadata headers after direct
upload (ocis/#216, reva/#813) - Set mtime to storage after simple upload (#174, reva/#823,
reva/#841) - Configure grpc client to allow for insecure conns and skip server certificate
verification (reva/#825) - Deployment: simplify config with more default values
(reva/#826, reva/#837, reva/#843, reva/#848, reva/#842) - Separate local fs into home and
with home disabled (reva/#829) - Register reflection after other services (reva/#831) -
Refactor EOS fs (reva/#830) - Add ocs-share-permissions to the propfind response (#47,
reva/#836) - OCS: Properly read permissions when creating public link (reva/#852) - localfs:
make normalize return associated error (reva/#850) - EOS grpc driver (reva/#664) - OCS: Add
support for legacy public link arg publicUpload (reva/#853) - Add cache layer to user REST
package (reva/#849) - Meshdirectory: pass query params to selected provider (reva/#863) -
Pass etag in quotes from the fs layer (#269, reva/#866, reva/#867) - OCM: use refactored
cs3apis provider definition (reva/#864)
https://github.com/owncloud/ocis-reva/issues/116
https://github.com/owncloud/ocis-reva/issues/112
https://github.com/owncloud/ocis-reva/issues/253
https://github.com/owncloud/ocis-reva/issues/254
https://github.com/owncloud/ocis/issues/216
https://github.com/owncloud/ocis-reva/issues/174
https://github.com/owncloud/ocis-reva/issues/47
https://github.com/owncloud/ocis-reva/issues/269
https://github.com/owncloud/ocis-reva/pull/279
https://github.com/owncloud/cs3org/reva/pull/799
https://github.com/owncloud/cs3org/reva/pull/803
https://github.com/owncloud/cs3org/reva/pull/817
https://github.com/owncloud/cs3org/reva/pull/805
https://github.com/owncloud/cs3org/reva/pull/814
https://github.com/owncloud/cs3org/reva/pull/816
https://github.com/owncloud/cs3org/reva/pull/818
https://github.com/owncloud/cs3org/reva/pull/819
https://github.com/owncloud/cs3org/reva/pull/820
https://github.com/owncloud/cs3org/reva/pull/823
https://github.com/owncloud/cs3org/reva/pull/841
https://github.com/owncloud/cs3org/reva/pull/813
https://github.com/owncloud/cs3org/reva/pull/825
https://github.com/owncloud/cs3org/reva/pull/826
https://github.com/owncloud/cs3org/reva/pull/837
https://github.com/owncloud/cs3org/reva/pull/843
https://github.com/owncloud/cs3org/reva/pull/848
https://github.com/owncloud/cs3org/reva/pull/842
https://github.com/owncloud/cs3org/reva/pull/829
https://github.com/owncloud/cs3org/reva/pull/831
https://github.com/owncloud/cs3org/reva/pull/830
https://github.com/owncloud/cs3org/reva/pull/836
https://github.com/owncloud/cs3org/reva/pull/852
https://github.com/owncloud/cs3org/reva/pull/850
https://github.com/owncloud/cs3org/reva/pull/664
https://github.com/owncloud/cs3org/reva/pull/853
https://github.com/owncloud/cs3org/reva/pull/849
https://github.com/owncloud/cs3org/reva/pull/863
https://github.com/owncloud/cs3org/reva/pull/866
https://github.com/owncloud/cs3org/reva/pull/867
https://github.com/owncloud/cs3org/reva/pull/864
# Changelog for [0.5.0] (2020-06-04)
The following sections list the changes in ocis-reva 0.5.0.
[0.5.0]: https://github.com/owncloud/ocis-reva/compare/v0.4.0...v0.5.0
## Summary
* Enhancement - Add TUS global capability: [#177](https://github.com/owncloud/ocis-reva/issues/177)
* Enhancement - Update reva to v0.1.1-0.20200603071553-e05a87521618: [#244](https://github.com/owncloud/ocis-reva/issues/244)
## Details
* Enhancement - Add TUS global capability: [#177](https://github.com/owncloud/ocis-reva/issues/177)
The TUS global capabilities from Reva are now exposed.
The advertised max chunk size can be configured using the "--upload-max-chunk-size" CLI
switch or "REVA_FRONTEND_UPLOAD_MAX_CHUNK_SIZE" environment variable. The advertised
http method override can be configured using the "--upload-http-method-override" CLI
switch or "REVA_FRONTEND_UPLOAD_HTTP_METHOD_OVERRIDE" environment variable.
https://github.com/owncloud/ocis-reva/issues/177
https://github.com/owncloud/ocis-reva/pull/228
* Enhancement - Update reva to v0.1.1-0.20200603071553-e05a87521618: [#244](https://github.com/owncloud/ocis-reva/issues/244)
- Updated reva to v0.1.1-0.20200603071553-e05a87521618 (#244) - Add option to disable TUS on
OC layer (#177, reva/#791) - Dataprovider now supports method override (#177, reva/#792) -
OCS fixes for create public link (reva/#798)
https://github.com/owncloud/ocis-reva/issues/244
https://github.com/owncloud/ocis-reva/issues/177
https://github.com/cs3org/reva/pull/791
https://github.com/cs3org/reva/pull/792
https://github.com/cs3org/reva/pull/798
# Changelog for [0.4.0] (2020-05-29)
The following sections list the changes in ocis-reva 0.4.0.
[0.4.0]: https://github.com/owncloud/ocis-reva/compare/v0.3.0...v0.4.0
## Summary
* Enhancement - Add public shares service: [#49](https://github.com/owncloud/ocis-reva/issues/49)
* Enhancement - Update reva to v0.1.1-0.20200529120551-4f2d9c85d3c9: [#49](https://github.com/owncloud/ocis-reva/issues/49)
## Details
* Enhancement - Add public shares service: [#49](https://github.com/owncloud/ocis-reva/issues/49)
Added Public Shares service with CRUD operations and File Public Shares Manager
https://github.com/owncloud/ocis-reva/issues/49
https://github.com/owncloud/ocis-reva/pull/232
* Enhancement - Update reva to v0.1.1-0.20200529120551-4f2d9c85d3c9: [#49](https://github.com/owncloud/ocis-reva/issues/49)
- Updated reva to v0.1.1-0.20200529120551 (#232) - Public Shares CRUD, File Public Shares
Manager (#49, #232, reva/#681, reva/#788) - Disable HTTP-KeepAlives to reduce fd count
(ocis/#268, reva/#787) - Fix trashbin listing (#229, reva/#782) - Create PUT wrapper for TUS
uploads (reva/#770) - Add security access headers for ocdav requests (#66, reva/#780) - Add
option to revad cmd to specify logging level (reva/#772) - New metrics package (reva/#740) -
Remove implicit data member from memory store (reva/#774) - Added TUS global capabilities
(#177, reva/#775) - Fix PROPFIND with Depth 1 for cross-storage operations (reva/#779)
https://github.com/owncloud/ocis-reva/issues/49
https://github.com/owncloud/ocis-reva/issues/229
https://github.com/owncloud/ocis-reva/issues/66
https://github.com/owncloud/ocis-reva/issues/177
https://github.com/owncloud/ocis/issues/268
https://github.com/owncloud/ocis-reva/pull/232
https://github.com/cs3org/reva/pull/787
https://github.com/cs3org/reva/pull/681
https://github.com/cs3org/reva/pull/788
https://github.com/cs3org/reva/pull/782
https://github.com/cs3org/reva/pull/770
https://github.com/cs3org/reva/pull/780
https://github.com/cs3org/reva/pull/772
https://github.com/cs3org/reva/pull/740
https://github.com/cs3org/reva/pull/774
https://github.com/cs3org/reva/pull/775
https://github.com/cs3org/reva/pull/779
# Changelog for [0.3.0] (2020-05-20)
The following sections list the changes in ocis-reva 0.3.0.
[0.3.0]: https://github.com/owncloud/ocis-reva/compare/v0.2.1...v0.3.0
## Summary
* Enhancement - Update reva to v0.1.1-0.20200520150229: [#161](https://github.com/owncloud/ocis-reva/pull/161)
## Details
* Enhancement - Update reva to v0.1.1-0.20200520150229: [#161](https://github.com/owncloud/ocis-reva/pull/161)
- Update reva to v0.1.1-0.20200520150229 (#161, #180, #192, #207, #221) - Return arbitrary
metadata with stat, upload without TUS (reva/#766) - Stat file before returning datagateway
URL when initiating download (reva/#765) - REST driver for user package (reva/#747) - Sharing
behavior now consistent with the old backend (#20, #26, #43, #44, #46, #94 ,reva/#748) - Mentix
service (reva/#755) - meshdirectory: add mentix driver for gocdb sites integration
(reva/#754) - Add functionality to commit to storage for OCM shares (reva/#760) - Add option in
config to disable tus (reva/#759) - ocdav: fix custom property XML parsing in PROPPATCH
handler (#203, reva/#743) - ocdav: fix PROPPATCH response for removed properties (#186,
reva/#742) - ocdav: implement PROPFIND infinity depth (#212, reva/#758) - Local fs: Allow
setting of arbitrary metadata, minor bug fixes (reva/#764) - Local fs: metadata handling and
share persistence (reva/#732) - Local fs: return file owner info in stat (reva/#750) - Fixed
regression when uploading empty files to OCFS or EOS with PUT and TUS (#188, reva/#734) - On
delete move the file versions to the trashbin (#94, reva/#731) - Fix OCFS move operation (#182,
reva/#729) - Fix OCFS custom property / xattr removal (reva/#728) - Retry trashbin in case of
timestamp collision (reva/#730) - Disable chunking v1 by default (reva/#678) - Implement ocs
to http status code mapping (#26, reva/#696, reva/#707, reva/#711) - Handle the case if
directory already exists (reva/#695) - Added TUS upload support (reva/#674, reva/#725,
reva/#717) - Always return file sizes in Webdav PROPFIND (reva/#712) - Use default mime type
when none was detected (reva/#713) - Fixed Webdav shallow COPY (reva/#714) - Fixed arbitrary
namespace usage for custom properties in PROPFIND (#57, reva/#720) - Implement returning
Webdav custom properties from xattr (#57, reva/#721) - Minor fix in OCM share pkg (reva/#718)
https://github.com/owncloud/ocis-reva/issues/20
https://github.com/owncloud/ocis-reva/issues/26
https://github.com/owncloud/ocis-reva/issues/43
https://github.com/owncloud/ocis-reva/issues/44
https://github.com/owncloud/ocis-reva/issues/46
https://github.com/owncloud/ocis-reva/issues/94
https://github.com/owncloud/ocis-reva/issues/26
https://github.com/owncloud/ocis-reva/issues/67
https://github.com/owncloud/ocis-reva/issues/57
https://github.com/owncloud/ocis-reva/issues/94
https://github.com/owncloud/ocis-reva/issues/188
https://github.com/owncloud/ocis-reva/issues/182
https://github.com/owncloud/ocis-reva/issues/212
https://github.com/owncloud/ocis-reva/issues/186
https://github.com/owncloud/ocis-reva/issues/203
https://github.com/owncloud/ocis-reva/pull/161
https://github.com/owncloud/ocis-reva/pull/180
https://github.com/owncloud/ocis-reva/pull/192
https://github.com/owncloud/ocis-reva/pull/207
https://github.com/owncloud/ocis-reva/pull/221
https://github.com/cs3org/reva/pull/766
https://github.com/cs3org/reva/pull/765
https://github.com/cs3org/reva/pull/755
https://github.com/cs3org/reva/pull/754
https://github.com/cs3org/reva/pull/747
https://github.com/cs3org/reva/pull/748
https://github.com/cs3org/reva/pull/760
https://github.com/cs3org/reva/pull/759
https://github.com/cs3org/reva/pull/678
https://github.com/cs3org/reva/pull/696
https://github.com/cs3org/reva/pull/707
https://github.com/cs3org/reva/pull/711
https://github.com/cs3org/reva/pull/695
https://github.com/cs3org/reva/pull/674
https://github.com/cs3org/reva/pull/725
https://github.com/cs3org/reva/pull/717
https://github.com/cs3org/reva/pull/712
https://github.com/cs3org/reva/pull/713
https://github.com/cs3org/reva/pull/720
https://github.com/cs3org/reva/pull/718
https://github.com/cs3org/reva/pull/731
https://github.com/cs3org/reva/pull/734
https://github.com/cs3org/reva/pull/729
https://github.com/cs3org/reva/pull/728
https://github.com/cs3org/reva/pull/730
https://github.com/cs3org/reva/pull/758
https://github.com/cs3org/reva/pull/742
https://github.com/cs3org/reva/pull/764
https://github.com/cs3org/reva/pull/743
https://github.com/cs3org/reva/pull/732
https://github.com/cs3org/reva/pull/750
# Changelog for [0.2.1] (2020-04-28)
The following sections list the changes in ocis-reva 0.2.1.
[0.2.1]: https://github.com/owncloud/ocis-reva/compare/v0.2.0...v0.2.1
## Summary
* Bugfix - Stop advertising unsupported chunking v2: [#145](https://github.com/owncloud/ocis-reva/pull/145)
* Enhancement - Allow configuring the gateway for dataproviders: [#136](https://github.com/owncloud/ocis-reva/pull/136)
* Enhancement - Use a configured logger on reva runtime: [#153](https://github.com/owncloud/ocis-reva/pull/153)
## Details
* Bugfix - Stop advertising unsupported chunking v2: [#145](https://github.com/owncloud/ocis-reva/pull/145)
Removed "chunking" attribute in the DAV capabilities. Please note that chunking v2 is
advertised as "chunking 1.0" while chunking v1 is the attribute "bigfilechunking" which is
already false.
https://github.com/owncloud/ocis-reva/pull/145
* Enhancement - Allow configuring the gateway for dataproviders: [#136](https://github.com/owncloud/ocis-reva/pull/136)
This allows using basic or bearer auth when directly talking to dataproviders.
https://github.com/owncloud/ocis-reva/pull/136
* Enhancement - Use a configured logger on reva runtime: [#153](https://github.com/owncloud/ocis-reva/pull/153)
For consistency reasons we need a configured logger that is inline with an ocis logger, so the
log cascade can be easily parsed by a human.
https://github.com/owncloud/ocis-reva/pull/153
# Changelog for [0.2.0] (2020-04-15)
The following sections list the changes in ocis-reva 0.2.0.
[0.2.0]: https://github.com/owncloud/ocis-reva/compare/v0.1.1...v0.2.0
## Summary
* Bugfix - Fix eos user sharing config: [#127](https://github.com/owncloud/ocis-reva/pull/127)
* Enhancement - Update reva to v1.1.0-20200414133413: [#127](https://github.com/owncloud/ocis-reva/pull/127)
## Details
* Bugfix - Fix eos user sharing config: [#127](https://github.com/owncloud/ocis-reva/pull/127)
We have added missing config options for the user sharing manager and added a dedicated eos
storage command with pre configured settings for the eos-docker container. It configures a
`Shares` folder in a users home when using eos as the storage driver.
https://github.com/owncloud/ocis-reva/pull/127
* Enhancement - Update reva to v1.1.0-20200414133413: [#127](https://github.com/owncloud/ocis-reva/pull/127)
Adds initial public sharing and ocm implementation.
https://github.com/owncloud/ocis-reva/pull/127
# Changelog for [0.1.1] (2020-03-31)
The following sections list the changes in ocis-reva 0.1.1.
[0.1.1]: https://github.com/owncloud/ocis-reva/compare/v0.1.0...v0.1.1
## Summary
* Bugfix - Fix eos config: [#125](https://github.com/owncloud/ocis-reva/pull/125)
## Details
* Bugfix - Fix eos config: [#125](https://github.com/owncloud/ocis-reva/pull/125)
We have added missing config options for the home layout to the config struct that is passed to
eos.
https://github.com/owncloud/ocis-reva/pull/125
# Changelog for [0.1.0] (2020-03-23)
The following sections list the changes in ocis-reva 0.1.0.
[0.1.0]: https://github.com/owncloud/ocis-reva/compare/6702be7f9045a382d40691a9bcd04f572203e9ed...v0.1.0
## Summary
* Bugfix - Set correct flag type in the flagsets: [#75](https://github.com/owncloud/ocis-reva/issues/75)
* Bugfix - We fixed a typo in the `REVA_LDAP_SCHEMA_MAIL` environment variable: [#113](https://github.com/owncloud/ocis-reva/pull/113)
* Bugfix - Allow different namespaces for /webdav and /dav/files: [#68](https://github.com/owncloud/ocis-reva/pull/68)
* Change - Use /home as default namespace: [#68](https://github.com/owncloud/ocis-reva/pull/68)
* Change - Initial release of basic version: [#1](https://github.com/owncloud/ocis-reva/issues/1)
* Change - Start multiple services with dedicated commands: [#6](https://github.com/owncloud/ocis-reva/issues/6)
* Change - Storage providers now default to exposing data servers: [#89](https://github.com/owncloud/ocis-reva/issues/89)
* Change - Default to running behind ocis-proxy: [#113](https://github.com/owncloud/ocis-reva/pull/113)
* Enhancement - Expose owncloud storage driver config in flagset: [#87](https://github.com/owncloud/ocis-reva/issues/87)
* Enhancement - Update reva to v0.0.2-0.20200212114015-0dbce24f7e8b: [#91](https://github.com/owncloud/ocis-reva/pull/91)
* Enhancement - Allow configuring user sharing driver: [#115](https://github.com/owncloud/ocis-reva/pull/115)
## Details
* Bugfix - Set correct flag type in the flagsets: [#75](https://github.com/owncloud/ocis-reva/issues/75)
While upgrading to the micro/cli version 2 there where two instances of `StringFlag` which had
not been changed to `StringSliceFlag`. This caused `ocis-reva users` and `ocis-reva
storage-root` to fail on startup.
https://github.com/owncloud/ocis-reva/issues/75
https://github.com/owncloud/ocis-reva/pull/76
* Bugfix - We fixed a typo in the `REVA_LDAP_SCHEMA_MAIL` environment variable: [#113](https://github.com/owncloud/ocis-reva/pull/113)
It was misspelled as `REVA_LDAP_SCHEMA_Mail`.
https://github.com/owncloud/ocis-reva/pull/113
* Bugfix - Allow different namespaces for /webdav and /dav/files: [#68](https://github.com/owncloud/ocis-reva/pull/68)
After fbf131c the path for the "new" webdav path does not contain a username
`/remote.php/dav/files/textfile0.txt`. It used to be
`/remote.php/dav/files/oc/einstein/textfile0.txt` So it lost `oc/einstein`.
This PR allows setting up different namespaces for `/webav` and `/dav/files`:
`/webdav` is jailed into `/home` - which uses the home storage driver and uses the logged in user
to construct the path `/dav/files` is jailed into `/oc` - which uses the owncloud storage
driver and expects a username as the first path segment
This mimics oc10
The `WEBDAV_NAMESPACE_JAIL` environment variable is split into - `WEBDAV_NAMESPACE` and -
`DAV_FILES_NAMESPACE` accordingly.
https://github.com/owncloud/ocis-reva/pull/68
related:
* Change - Use /home as default namespace: [#68](https://github.com/owncloud/ocis-reva/pull/68)
Currently, cross storage etag propagation is not yet implemented, which prevents the desktop
client from detecting changes via the PROPFIND to /. / is managed by the root storage provider
which is independend of the home and oc storage providers. If a file changes in /home/foo, the
etag change will only be propagated to the root of the home storage provider.
This change jails users into the `/home` namespace, and allows configuring the namespace to
use for the two webdav endpoints using the new environment variable `WEBDAV_NAMESPACE_JAIL`
which affects both endpoints `/dav/files` and `/webdav`.
This will allow us to focus on getting a single storage driver like eos or owncloud tested and
better resembles what owncloud 10 does.
To get back the global namespace, which ultimately is the goal, just set the above environment
variable to `/`.
https://github.com/owncloud/ocis-reva/pull/68
* Change - Initial release of basic version: [#1](https://github.com/owncloud/ocis-reva/issues/1)
Just prepared an initial basic version to start a reva server and start integrating with the
go-micro base dextension framework of ownCloud Infinite Scale.
https://github.com/owncloud/ocis-reva/issues/1
* Change - Start multiple services with dedicated commands: [#6](https://github.com/owncloud/ocis-reva/issues/6)
The initial version would only allow us to use a set of reva configurations to start multiple
services. We use a more opinionated set of commands to start dedicated services that allows us
to configure them individually. It allows us to switch eg. the user backend to LDAP and fully use
it on the cli.
https://github.com/owncloud/ocis-reva/issues/6
* Change - Storage providers now default to exposing data servers: [#89](https://github.com/owncloud/ocis-reva/issues/89)
The flags that let reva storage providers announce that they expose a data server now defaults
to true:
`REVA_STORAGE_HOME_EXPOSE_DATA_SERVER=1` `REVA_STORAGE_OC_EXPOSE_DATA_SERVER=1`
https://github.com/owncloud/ocis-reva/issues/89
* Change - Default to running behind ocis-proxy: [#113](https://github.com/owncloud/ocis-reva/pull/113)
We changed the default configuration to integrate better with ocis.
- We use ocis-glauth as the default ldap server on port 9125 with base `dc=example,dc=org`. - We
use a dedicated technical `reva` user to make ldap binds - Clients are supposed to use the
ocis-proxy endpoint `https://localhost:9200` - We removed unneeded ocis configuration
from the frontend which no longer serves an oidc provider. - We changed the default user
OpaqueID attribute from `sub` to `preferred_username`. The latter is a claim populated by
konnectd that can also be used by the reva ldap user manager to look up users by their OpaqueId
https://github.com/owncloud/ocis-reva/pull/113
* Enhancement - Expose owncloud storage driver config in flagset: [#87](https://github.com/owncloud/ocis-reva/issues/87)
Three new flags are now available:
- scan files on startup to generate missing fileids default: `true` env var:
`REVA_STORAGE_OWNCLOUD_SCAN` cli option: `--storage-owncloud-scan`
- autocreate home path for new users default: `true` env var:
`REVA_STORAGE_OWNCLOUD_AUTOCREATE` cli option: `--storage-owncloud-autocreate`
- the address of the redis server default: `:6379` env var:
`REVA_STORAGE_OWNCLOUD_REDIS_ADDR` cli option: `--storage-owncloud-redis`
https://github.com/owncloud/ocis-reva/issues/87
* Enhancement - Update reva to v0.0.2-0.20200212114015-0dbce24f7e8b: [#91](https://github.com/owncloud/ocis-reva/pull/91)
Reva has seen a lot of changes that allow us to - reduce the configuration overhead - use the
autocreato home folder option - use the home folder path layout option - no longer start the root
storage
https://github.com/owncloud/ocis-reva/pull/91
related:
* Enhancement - Allow configuring user sharing driver: [#115](https://github.com/owncloud/ocis-reva/pull/115)
We now default to `json` which persists shares in the sharing manager in a json file instead of an
in memory db.
https://github.com/owncloud/ocis-reva/pull/115

202
reva/LICENSE Normal file
View File

@@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

179
reva/Makefile Normal file
View File

@@ -0,0 +1,179 @@
SHELL := bash
NAME := ocis-reva
IMPORT := github.com/owncloud/$(NAME)
BIN := bin
DIST := dist
HUGO := hugo
ifeq ($(OS), Windows_NT)
EXECUTABLE := $(NAME).exe
UNAME := Windows
else
EXECUTABLE := $(NAME)
UNAME := $(shell uname -s)
endif
ifeq ($(UNAME), Darwin)
GOBUILD ?= go build -i
else
GOBUILD ?= go build
endif
PACKAGES ?= $(shell go list ./...)
SOURCES ?= $(shell find . -name "*.go" -type f -not -path "./node_modules/*")
GENERATE ?= $(PACKAGES)
TAGS ?=
ifndef OUTPUT
ifneq ($(DRONE_TAG),)
OUTPUT ?= $(subst v,,$(DRONE_TAG))
else
OUTPUT ?= testing
endif
endif
ifndef VERSION
ifneq ($(DRONE_TAG),)
VERSION ?= $(subst v,,$(DRONE_TAG))
else
VERSION ?= $(shell git rev-parse --short HEAD)
endif
endif
ifndef DATE
DATE := $(shell date -u '+%Y%m%d')
endif
LDFLAGS += -s -w -X "$(IMPORT)/pkg/version.String=$(VERSION)" -X "$(IMPORT)/pkg/version.Date=$(DATE)"
DEBUG_LDFLAGS += -X "$(IMPORT)/pkg/version.String=$(VERSION)" -X "$(IMPORT)/pkg/version.Date=$(DATE)"
GCFLAGS += all=-N -l
.PHONY: all
all: build
.PHONY: sync
sync:
go mod download
.PHONY: clean
clean:
go clean -i ./...
rm -rf $(BIN) $(DIST) $(HUGO)
.PHONY: fmt
fmt:
gofmt -s -w $(SOURCES)
.PHONY: vet
vet:
go vet $(PACKAGES)
.PHONY: staticcheck
staticcheck:
go run honnef.co/go/tools/cmd/staticcheck -tags '$(TAGS)' $(PACKAGES)
.PHONY: lint
lint:
for PKG in $(PACKAGES); do go run golang.org/x/lint/golint -set_exit_status $$PKG || exit 1; done;
.PHONY: generate
generate:
go generate $(GENERATE)
.PHONY: changelog
changelog:
go run github.com/restic/calens >| CHANGELOG.md
.PHONY: test
test:
go run github.com/haya14busa/goverage -v -coverprofile coverage.out $(PACKAGES)
.PHONY: install
install: $(SOURCES)
go install -v -tags '$(TAGS)' -ldflags '$(LDFLAGS)' ./cmd/$(NAME)
.PHONY: build
build: $(BIN)/$(EXECUTABLE) $(BIN)/$(EXECUTABLE)-debug
$(BIN)/$(EXECUTABLE): $(SOURCES)
$(GOBUILD) -v -tags '$(TAGS)' -ldflags '$(LDFLAGS)' -o $@ ./cmd/$(NAME)
$(BIN)/$(EXECUTABLE)-debug: $(SOURCES)
$(GOBUILD) -v -tags '$(TAGS)' -ldflags '$(DEBUG_LDFLAGS)' -gcflags '$(GCFLAGS)' -o $@ ./cmd/$(NAME)
.PHONY: release
release: release-dirs release-linux release-windows release-darwin release-copy release-check
.PHONY: release-dirs
release-dirs:
mkdir -p $(DIST)/binaries $(DIST)/release
.PHONY: release-linux
release-linux: release-dirs
go run github.com/mitchellh/gox -tags 'netgo $(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS)' -os 'linux' -arch 'amd64 386 arm64 arm' -output '$(DIST)/binaries/$(EXECUTABLE)-$(OUTPUT)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
.PHONY: release-windows
release-windows: release-dirs
go run github.com/mitchellh/gox -tags 'netgo $(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS)' -os 'windows' -arch 'amd64' -output '$(DIST)/binaries/$(EXECUTABLE)-$(OUTPUT)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
.PHONY: release-darwin
release-darwin: release-dirs
go run github.com/mitchellh/gox -tags 'netgo $(TAGS)' -ldflags '$(LDFLAGS)' -os 'darwin' -arch 'amd64' -output '$(DIST)/binaries/$(EXECUTABLE)-$(OUTPUT)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
.PHONY: release-copy
release-copy:
$(foreach file,$(wildcard $(DIST)/binaries/$(EXECUTABLE)-*),cp $(file) $(DIST)/release/$(notdir $(file));)
.PHONY: release-check
release-check:
cd $(DIST)/release; $(foreach file,$(wildcard $(DIST)/release/$(EXECUTABLE)-*),sha256sum $(notdir $(file)) > $(notdir $(file)).sha256;)
.PHONY: release-finish
release-finish: release-copy release-check
.PHONY: docs-copy
docs-copy:
mkdir -p $(HUGO); \
mkdir -p $(HUGO)/content/extensions; \
cd $(HUGO); \
git init; \
git remote rm origin; \
git remote add origin https://github.com/owncloud/owncloud.github.io; \
git fetch; \
git checkout origin/source -f; \
rsync --delete -ax ../docs/ content/extensions/$(NAME)
.PHONY: config-docs-generate
config-docs-generate:
go run github.com/owncloud/flaex >| docs/configuration.md
.PHONY: docs-build
docs-build:
cd $(HUGO); hugo
.PHONY: docs
docs: config-docs-generate docs-copy docs-build
.PHONY: watch
watch:
go run github.com/cespare/reflex -c reflex.conf
BEHAT_BIN=vendor-bin/behat/vendor/bin/behat
.PHONY: test-acceptance-api
test-acceptance-api: vendor-bin/behat/vendor
BEHAT_BIN=$(BEHAT_BIN) $(PATH_TO_CORE)/tests/acceptance/run.sh --remote --type api
vendor/bamarni/composer-bin-plugin: composer.lock
composer install
vendor-bin/behat/vendor: vendor/bamarni/composer-bin-plugin vendor-bin/behat/composer.lock
composer bin behat install --no-progress
vendor-bin/behat/composer.lock: vendor-bin/behat/composer.json
@echo behat composer.lock is not up to date.
composer.lock: composer.json
@echo composer.lock is not up to date.

86
reva/README.md Normal file
View File

@@ -0,0 +1,86 @@
# ownCloud Infinite Scale: Reva
[![Build Status](https://cloud.drone.io/api/badges/owncloud/ocis-reva/status.svg)](https://cloud.drone.io/owncloud/ocis-reva)
[![Gitter chat](https://badges.gitter.im/cs3org/reva.svg)](https://gitter.im/cs3org/reva)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/6f1eaaa399294d959ef7b3b10deed41d)](https://www.codacy.com/manual/owncloud/ocis-reva?utm_source=github.com&utm_medium=referral&utm_content=owncloud/ocis-reva&utm_campaign=Badge_Grade)
[![Go Doc](https://godoc.org/github.com/owncloud/ocis-reva?status.svg)](http://godoc.org/github.com/owncloud/ocis-reva)
[![Go Report](http://goreportcard.com/badge/github.com/owncloud/ocis-reva)](http://goreportcard.com/report/github.com/owncloud/ocis-reva)
[![](https://images.microbadger.com/badges/image/owncloud/ocis-reva.svg)](http://microbadger.com/images/owncloud/ocis-reva "Get your own image badge on microbadger.com")
**This project is under heavy development, it's not in a working state yet!**
## Install
You can download prebuilt binaries from the GitHub releases or from our [download mirrors](http://download.owncloud.com/ocis/reva/). For instructions how to install this on your platform you should take a look at our [documentation](https://owncloud.github.io/extensions/ocis_reva/)
## Development
Make sure you have a working Go environment, for further reference or a guide take a look at the [install instructions](http://golang.org/doc/install.html).
```console
git clone https://github.com/owncloud/ocis-reva.git
cd ocis-reva
make generate build
./bin/ocis-reva -h
```
To run a demo installation you can use the preconfigured defaults and start all necessary services:
```
export REVA_USERS_DRIVER=demo
bin/ocis-reva frontend & \
bin/ocis-reva gateway & \
bin/ocis-reva users & \
bin/ocis-reva auth-basic & \
bin/ocis-reva auth-bearer & \
bin/ocis-reva sharing & \
bin/ocis-reva storage-root & \
bin/ocis-reva storage-home & \
bin/ocis-reva storage-home-data & \
bin/ocis-reva storage-oc & \
bin/ocis-reva storage-oc-data
```
The root storage serves the available namespaces from disk using the local storage driver. In order to be able to navigate into the `/home` and `/oc` storage providers you have to create these directories:
```
mkdir /var/tmp/reva/root/home
mkdir /var/tmp/reva/root/oc
```
Note: the owncloud storage driver currently requires a redis server running on the local machine.
You should now be able to get a file listing of a users home using
```
curl -X PROPFIND http://localhost:9140/remote.php/dav/files/ -v -u einstein:relativity
```
## Users
The default config uses the demo user backend, which contains three users:
```
einstein:relativity
marie:radioactivty
richard:superfluidity
```
For details on the `json` and `ldap` backends see the [documentation](https://owncloud.github.io/extensions/ocis_reva/users/)
## Security
If you find a security issue please contact security@owncloud.com first.
## Contributing
Fork -> Patch -> Push -> Pull Request
## License
Apache-2.0
## Copyright
```console
Copyright (c) 2019 ownCloud GmbH <https://owncloud.com>
```

View File

@@ -0,0 +1,8 @@
Bugfix: set correct flag type in the flagsets
While upgrading to the micro/cli version 2 there where two instances of `StringFlag`
which had not been changed to `StringSliceFlag`.
This caused `ocis-reva users` and `ocis-reva storage-root` to fail on startup.
https://github.com/owncloud/ocis-reva/issues/75
https://github.com/owncloud/ocis-reva/pull/76

View File

@@ -0,0 +1,11 @@
Change: use /home as default namespace
Currently, cross storage etag propagation is not yet implemented, which prevents the desktop client from detecting changes via the PROPFIND to /. / is managed by the root storage provider which is independend of the home and oc storage providers. If a file changes in /home/foo, the etag change will only be propagated to the root of the home storage provider.
This change jails users into the `/home` namespace, and allows configuring the namespace to use for the two webdav endpoints using the new environment variable `WEBDAV_NAMESPACE_JAIL` which affects both endpoints `/dav/files` and `/webdav`.
This will allow us to focus on getting a single storage driver like eos or owncloud tested and better resembles what owncloud 10 does.
To get back the global namespace, which ultimately is the goal, just set the above environment variable to `/`.
https://github.com/owncloud/ocis-reva/pull/68

View File

@@ -0,0 +1,5 @@
Bugfix: we fixed a typo in the `REVA_LDAP_SCHEMA_MAIL` environment variable
It was misspelled as `REVA_LDAP_SCHEMA_Mail`.
https://github.com/owncloud/ocis-reva/pull/113

View File

@@ -0,0 +1,5 @@
Change: Initial release of basic version
Just prepared an initial basic version to start a reva server and start integrating with the go-micro base dextension framework of ownCloud Infinite Scale.
https://github.com/owncloud/ocis-reva/issues/1

View File

@@ -0,0 +1,7 @@
Change: start multiple services with dedicated commands
The initial version would only allow us to use a set of reva configurations to start multiple services.
We use a more opinionated set of commands to start dedicated services that allows us to configure them individually.
It allows us to switch eg. the user backend to LDAP and fully use it on the cli.
https://github.com/owncloud/ocis-reva/issues/6

View File

@@ -0,0 +1,20 @@
Enhancement: expose owncloud storage driver config in flagset
Three new flags are now available:
- scan files on startup to generate missing fileids
default: `true`
env var: `REVA_STORAGE_OWNCLOUD_SCAN`
cli option: `--storage-owncloud-scan`
- autocreate home path for new users
default: `true`
env var: `REVA_STORAGE_OWNCLOUD_AUTOCREATE`
cli option: `--storage-owncloud-autocreate`
- the address of the redis server
default: `:6379`
env var: `REVA_STORAGE_OWNCLOUD_REDIS_ADDR`
cli option: `--storage-owncloud-redis`
https://github.com/owncloud/ocis-reva/issues/87

View File

@@ -0,0 +1,8 @@
Change: storage providers now default to exposing data servers
The flags that let reva storage providers announce that they expose a data server now defaults to true:
`REVA_STORAGE_HOME_EXPOSE_DATA_SERVER=1`
`REVA_STORAGE_OC_EXPOSE_DATA_SERVER=1`
https://github.com/owncloud/ocis-reva/issues/89

View File

@@ -0,0 +1,11 @@
Change: default to running behind ocis-proxy
We changed the default configuration to integrate better with ocis.
- We use ocis-glauth as the default ldap server on port 9125 with base `dc=example,dc=org`.
- We use a dedicated technical `reva` user to make ldap binds
- Clients are supposed to use the ocis-proxy endpoint `https://localhost:9200`
- We removed unneeded ocis configuration from the frontend which no longer serves an oidc provider.
- We changed the default user OpaqueID attribute from `sub` to `preferred_username`. The latter is a claim populated by konnectd that can also be used by the reva ldap user manager to look up users by their OpaqueId
https://github.com/owncloud/ocis-reva/pull/113

View File

@@ -0,0 +1,16 @@
Bugfix: Allow different namespaces for /webdav and /dav/files
After fbf131c the path for the "new" webdav path does not contain a username `/remote.php/dav/files/textfile0.txt`. It used to be `/remote.php/dav/files/oc/einstein/textfile0.txt` So it lost `oc/einstein`.
This PR allows setting up different namespaces for `/webav` and `/dav/files`:
`/webdav` is jailed into `/home` - which uses the home storage driver and uses the logged in user to construct the path
`/dav/files` is jailed into `/oc` - which uses the owncloud storage driver and expects a username as the first path segment
This mimics oc10
The `WEBDAV_NAMESPACE_JAIL` environment variable is split into
- `WEBDAV_NAMESPACE` and
- `DAV_FILES_NAMESPACE` accordingly.
Related: https://github.com/owncloud/ocis-reva/pull/68

View File

@@ -0,0 +1,9 @@
Enhancement: update reva to v0.0.2-0.20200212114015-0dbce24f7e8b
Reva has seen a lot of changes that allow us to
- reduce the configuration overhead
- use the autocreato home folder option
- use the home folder path layout option
- no longer start the root storage
Related: https://github.com/owncloud/ocis-reva/pull/91

View File

@@ -0,0 +1,5 @@
Enhancement: Allow configuring user sharing driver
We now default to `json` which persists shares in the sharing manager in a json file instead of an in memory db.
https://github.com/owncloud/ocis-reva/pull/115

View File

@@ -0,0 +1,5 @@
Bugfix: Fix eos config
We have added missing config options for the home layout to the config struct that is passed to eos.
https://github.com/owncloud/ocis-reva/pull/125

View File

@@ -0,0 +1,14 @@
Enhancement: make frontend prefixes configurable
We introduce three new environment variables and preconfigure them the following way:
```
REVA_FRONTEND_DATAGATEWAY_PREFIX="data"
REVA_FRONTEND_OCDAV_PREFIX=""
REVA_FRONTEND_OCS_PREFIX="ocs"
```
This restores the reva defaults that were changed upstream.
https://github.com/owncloud/ocis-reva/pull/363
https://github.com/cs3org/reva/pull/936/files#diff-51bf4fb310f7362f5c4306581132fc3bR63

View File

@@ -0,0 +1,13 @@
Enhancement: update reva to v0.1.1-0.20200701152626-2f6cc60e2f66
- Update reva to v0.1.1-0.20200701152626-2f6cc60e2f66 (#341)
- Added country information to Mentix (reva/#924)
- Refactor metrics package to implement reader interface (reva/#934)
- Fix OCS public link share update values logic (#252, #288, reva/#930)
https://github.com/owncloud/ocis-reva/pull/341
https://github.com/cs3org/reva/pull/924
https://github.com/cs3org/reva/pull/934
https://github.com/owncloud/ocis-reva/issues/252
https://github.com/owncloud/ocis-reva/issues/288
https://github.com/cs3org/reva/pull/930

View File

@@ -0,0 +1,32 @@
Enhancement: update reva to v0.1.1-0.20200709064551-91eed007038f
- Update reva to v0.1.1-0.20200709064551-91eed007038f (#362)
- Fix config for uploads when data server is not exposed (reva/#936)
- Update OCM partners endpoints (reva/#937)
- Update Ailleron endpoint (reva/#938)
- OCS: Fix initialization of shares json file (reva/#940)
- OCS: Fix returned public link URL (#336, reva/#945)
- OCS: Share wrap resource id correctly (#344, reva/#951)
- OCS: Implement share handling for accepting and listing shares (#11, reva/#929)
- ocm: dynamically lookup IPs for provider check (reva/#946)
- ocm: add functionality to mail OCM invite tokens (reva/#944)
- Change percentagused to percentageused (reva/#903)
- Fix file-descriptor leak (reva/#954)
https://github.com/owncloud/ocis-reva/pull/362
https://github.com/cs3org/reva/pull/936
https://github.com/cs3org/reva/pull/937
https://github.com/cs3org/reva/pull/938
https://github.com/cs3org/reva/pull/940
https://github.com/cs3org/reva/pull/951
https://github.com/owncloud/ocis-reva/issues/344
https://github.com/cs3org/reva/pull/945
https://github.com/owncloud/ocis-reva/issues/336
https://github.com/cs3org/reva/pull/929
https://github.com/owncloud/ocis-reva/issues/11
https://github.com/cs3org/reva/pull/946
https://github.com/cs3org/reva/pull/944
https://github.com/cs3org/reva/pull/903
https://github.com/cs3org/reva/pull/954

View File

@@ -0,0 +1,15 @@
Enhancement: update reva to v0.1.1-0.20200710143425-cf38a45220c5
- Update reva to v0.1.1-0.20200710143425-cf38a45220c5 (#371)
- Add wopi open (reva/#920)
- Added a CS3API compliant data exporter to Mentix (reva/#955)
- Read SMTP password from env if not set in config (reva/#953)
- OCS share fix including file info after update (reva/#958)
- Add flag to smtpclient for for unauthenticated SMTP (reva/#963)
https://github.com/owncloud/ocis-reva/pull/371
https://github.com/cs3org/reva/pull/920
https://github.com/cs3org/reva/pull/953
https://github.com/cs3org/reva/pull/955
https://github.com/cs3org/reva/pull/958
https://github.com/cs3org/reva/pull/963

View File

@@ -0,0 +1,13 @@
Enhancement: update reva to v0.1.1-0.20200722125752-6dea7936f9d1
- Update reva to v0.1.1-0.20200722125752-6dea7936f9d1
- Added signing key capability (reva/#986)
- Add functionality to create webdav references for OCM shares (reva/#974)
- Added a site locations exporter to Mentix (reva/#972)
- Add option to config to allow requests to hosts with unverified certificates (reva/#969)
https://github.com/owncloud/ocis-reva/pull/392
https://github.com/cs3org/reva/pull/986
https://github.com/cs3org/reva/pull/974
https://github.com/cs3org/reva/pull/972
https://github.com/cs3org/reva/pull/969

View File

@@ -0,0 +1,5 @@
Bugfix: build docker images with alpine:latest instead of alpine:edge
ARM builds were failing when built on alpine:edge, so we switched to alpine:latest instead.
https://github.com/owncloud/ocis-reva/pull/393

View File

@@ -0,0 +1,6 @@
Enhancement: Update storage documentation
We added details to the documentation about storage requirements known from ownCloud 10, the local storage driver and the ownCloud storage driver.
https://github.com/owncloud/ocis-reva/pull/384
https://github.com/owncloud/ocis-reva/pull/390

View File

@@ -0,0 +1,12 @@
Bugfix: Update LDAP filters
With the separation of use and find filters we can now use a filter that taken into account a users uuid as well as his username. This is necessary to make sharing work with the new account service which assigns accounts an immutable account id that is different from the username. Furthermore, the separate find filters now allows searching users by their displayname or email as well.
```
userfilter = "(&(objectclass=posixAccount)(|(ownclouduuid={{.OpaqueId}})(cn={{.OpaqueId}})))"
findfilter = "(&(objectclass=posixAccount)(|(cn={{query}}*)(displayname={{query}}*)(mail={{query}}*)))"
```
https://github.com/owncloud/ocis-reva/pull/399
https://github.com/cs3org/reva/pull/996

View File

@@ -0,0 +1,13 @@
Enhancement: update reva to v0.1.1-0.20200724135750-b46288b375d6
- Update reva to v0.1.1-0.20200724135750-b46288b375d6
- Split LDAP user filters (reva/#996)
- meshdirectory: Add invite forward API to provider links (reva/#1000)
- OCM: Pass the link to the meshdirectory service in token mail (reva/#1002)
- Update github.com/go-ldap/ldap to v3 (reva/#1004)
https://github.com/owncloud/ocis-reva/pull/399
https://github.com/cs3org/reva/pull/996
https://github.com/cs3org/reva/pull/1000
https://github.com/cs3org/reva/pull/1002
https://github.com/cs3org/reva/pull/1004

View File

@@ -0,0 +1,11 @@
Enhancement: update reva to v0.1.1-0.20200728071211-c948977dd3a0
- Update reva to v0.1.1-0.20200728071211-c948977dd3a0
- Use proper logging for ldap auth requests (reva/#1008)
- Update github.com/eventials/go-tus to v0.0.0-20200718001131-45c7ec8f5d59 (reva/#1007)
- Check if SMTP credentials are nil (reva/#1006)
https://github.com/owncloud/ocis-reva/pull/407
https://github.com/cs3org/reva/pull/1008
https://github.com/cs3org/reva/pull/1007
https://github.com/cs3org/reva/pull/1006

View File

@@ -0,0 +1,6 @@
Change: environment updates for the username userid split
We updated the owncloud storage driver in reva to properly look up users by userid or username using the userprovider instead of taking the path segment as is. This requires the user service address as well as changing the default layout to the userid instead of the username. The latter is not considered a stable and persistent identifier.
https://github.com/owncloud/ocis-reva/pull/420
https://github.com/cs3org/reva/pull/1033

View File

@@ -0,0 +1,9 @@
Enhancement: Separate user and auth providers, add config for rest user
Previously, the auth and user provider services used to have the same driver,
which restricted using separate drivers and configs for both. This PR separates
the two and adds the config for the rest user driver and the gatewaysvc
parameter to EOS fs.
https://github.com/owncloud/ocis-reva/pull/412
https://github.com/cs3org/reva/pull/995

View File

@@ -0,0 +1,17 @@
Enhancement: update reva to v1.1.1-0.20200819100654-dcbf0c8ea187
- Update reva to v1.1.1-0.20200819100654-dcbf0c8ea187
- fix restoring and deleting trash items via ocs [(reva/#1103)](https://github.com/cs3org/reva/pull/1103)
- Add UID and GID in ldap auth driver [(reva/#1101)](https://github.com/cs3org/reva/pull/1101)
- Allow listing the trashbin [(reva/#1091)](https://github.com/cs3org/reva/pull/1091)
- Ignore Stray Public Shares [(reva/#1090)](https://github.com/cs3org/reva/pull/1090)
- Implement GetUserByClaim for LDAP user driver [(reva/#1088)](https://github.com/cs3org/reva/pull/1088)
- eosclient: get file info by fxid [(reva/#1079)](https://github.com/cs3org/reva/pull/1079)
- Ensure stray shares get ignored [(reva/#1064)](https://github.com/cs3org/reva/pull/1064)
- Improve timestamp precision while logging [(reva/#1059)](https://github.com/cs3org/reva/pull/1059)
- Ocfs lookup userid (update) [(reva/#1052)](https://github.com/cs3org/reva/pull/1052)
- Disallow sharing the shares directory [(reva/#1051)](https://github.com/cs3org/reva/pull/1051)
- Local storage provider: Fixed resolution of fileid [(reva/#1046)](https://github.com/cs3org/reva/pull/1046)
- List public shares only created by the current user [(reva/#1042)](https://github.com/cs3org/reva/pull/1042)
https://github.com/owncloud/ocis-reva/pull/447

View File

@@ -0,0 +1,8 @@
Bugfix: Fix default configuration for accessing shares
The storage provider mounted at `/home` should always have EnableHome set to `true`. The other storage providers should have it set to `false`.
https://github.com/owncloud/product/issues/205
https://github.com/owncloud/ocis-reva/pull/461

View File

@@ -0,0 +1,8 @@
Enhancement: Allow configuring arbitrary storage registry rules
We added a new config flag `storage-registry-rule` that can be given multiple times for the gateway to specify arbitrary storage registry rules. You can also use a comma separated list of rules in the `REVA_STORAGE_REGISTRY_RULES` environment variable.
https://github.com/owncloud/product/issues/193
https://github.com/owncloud/ocis-reva/pull/461

View File

@@ -0,0 +1,24 @@
Enhancement: update reva to v1.2.1-0.20200826162318-c0f54e1f37ea
- Update reva to v1.2.1-0.20200826162318-c0f54e1f37ea
- Do not swallow 'not found' errors in Stat [(reva/#1124)](https://github.com/cs3org/reva/pull/1124)
- Rewire dav files to the home storage [(reva/#1125)](https://github.com/cs3org/reva/pull/1125)
- Do not restore recycle entry on purge [(reva/#1099)](https://github.com/cs3org/reva/pull/1099)
- Allow listing the trashbin [(reva/#1091)](https://github.com/cs3org/reva/pull/1091)
- Restore and delete trash items via ocs [(reva/#1103)](https://github.com/cs3org/reva/pull/1103)
- Ensure ignoring public stray shares [(reva/#1090)](https://github.com/cs3org/reva/pull/1090)
- Ensure ignoring stray shares [(reva/#1064)](https://github.com/cs3org/reva/pull/1064)
- Minor fixes in reva cmd, gateway uploads and smtpclient [(reva/#1082)](https://github.com/cs3org/reva/pull/1082)
- Owncloud driver - propagate mtime on RemoveGrant [(reva/#1115)](https://github.com/cs3org/reva/pull/1115)
- Handle redirection prefixes when extracting destination from URL [(reva/#1111)](https://github.com/cs3org/reva/pull/1111)
- Add UID and GID in ldap auth driver [(reva/#1101)](https://github.com/cs3org/reva/pull/1101)
- Add calens check to verify changelog entries in CI [(reva/#1077)](https://github.com/cs3org/reva/pull/1077)
- Refactor Reva CLI with prompts [(reva/#1072)](https://github.com/cs3org/reva/pull/1072j)
- Get file info using fxids from EOS [(reva/#1079)](https://github.com/cs3org/reva/pull/1079)
- Update LDAP user driver [(reva/#1088)](https://github.com/cs3org/reva/pull/1088)
- System information metrics cleanup [(reva/#1114)](https://github.com/cs3org/reva/pull/1114)
- System information included in Prometheus metrics [(reva/#1071)](https://github.com/cs3org/reva/pull/1071)
- Add logic for resolving storage references over webdav [(reva/#1094)](https://github.com/cs3org/reva/pull/1094)
https://github.com/owncloud/ocis-reva/pull/454

View File

@@ -0,0 +1,10 @@
Enhancement: update reva to v1.2.1-0.20200911111727-51649e37df2d
- Update reva to v1.2.1-0.20200911111727-51649e37df2d
- Added new OCIS storage driver ocis [(reva/#1155)](https://github.com/cs3org/reva/pull/1155)
- App provider: fallback to env. variable if 'iopsecret' unset [(reva/#1146)](https://github.com/cs3org/reva/pull/1146)
- Add switch to database [(reva/#1135)](https://github.com/cs3org/reva/pull/1135)
- Add the ocdav HTTP svc to the standalone config [(reva/#1128)](https://github.com/cs3org/reva/pull/1128)
https://github.com/owncloud/ocis-reva/pull/466

View File

@@ -0,0 +1,5 @@
Bugfix: Fix eos user sharing config
We have added missing config options for the user sharing manager and added a dedicated eos storage command with pre configured settings for the eos-docker container. It configures a `Shares` folder in a users home when using eos as the storage driver.
https://github.com/owncloud/ocis-reva/pull/127

View File

@@ -0,0 +1,5 @@
Enhancement: update reva to v1.1.0-20200414133413
Adds initial public sharing and ocm implementation.
https://github.com/owncloud/ocis-reva/pull/127

View File

@@ -0,0 +1,5 @@
Enhancement: Allow configuring the gateway for dataproviders
This allows using basic or bearer auth when directly talking to dataproviders.
https://github.com/owncloud/ocis-reva/pull/136

View File

@@ -0,0 +1,5 @@
Enhancement: Use a configured logger on reva runtime
For consistency reasons we need a configured logger that is inline with an ocis logger, so the log cascade can be easily parsed by a human.
https://github.com/owncloud/ocis-reva/pull/153

View File

@@ -0,0 +1,7 @@
Bugfix: Stop advertising unsupported chunking v2
Removed "chunking" attribute in the DAV capabilities.
Please note that chunking v2 is advertised as "chunking 1.0" while
chunking v1 is the attribute "bigfilechunking" which is already false.
https://github.com/owncloud/ocis-reva/pull/145

View File

@@ -0,0 +1,87 @@
Enhancement: update reva to v0.1.1-0.20200520150229
- Update reva to v0.1.1-0.20200520150229 (#161, #180, #192, #207, #221)
- Return arbitrary metadata with stat, upload without TUS (reva/#766)
- Stat file before returning datagateway URL when initiating download (reva/#765)
- REST driver for user package (reva/#747)
- Sharing behavior now consistent with the old backend (#20, #26, #43, #44, #46, #94 ,reva/#748)
- Mentix service (reva/#755)
- meshdirectory: add mentix driver for gocdb sites integration (reva/#754)
- Add functionality to commit to storage for OCM shares (reva/#760)
- Add option in config to disable tus (reva/#759)
- ocdav: fix custom property XML parsing in PROPPATCH handler (#203, reva/#743)
- ocdav: fix PROPPATCH response for removed properties (#186, reva/#742)
- ocdav: implement PROPFIND infinity depth (#212, reva/#758)
- Local fs: Allow setting of arbitrary metadata, minor bug fixes (reva/#764)
- Local fs: metadata handling and share persistence (reva/#732)
- Local fs: return file owner info in stat (reva/#750)
- Fixed regression when uploading empty files to OCFS or EOS with PUT and TUS (#188, reva/#734)
- On delete move the file versions to the trashbin (#94, reva/#731)
- Fix OCFS move operation (#182, reva/#729)
- Fix OCFS custom property / xattr removal (reva/#728)
- Retry trashbin in case of timestamp collision (reva/#730)
- Disable chunking v1 by default (reva/#678)
- Implement ocs to http status code mapping (#26, reva/#696, reva/#707, reva/#711)
- Handle the case if directory already exists (reva/#695)
- Added TUS upload support (reva/#674, reva/#725, reva/#717)
- Always return file sizes in Webdav PROPFIND (reva/#712)
- Use default mime type when none was detected (reva/#713)
- Fixed Webdav shallow COPY (reva/#714)
- Fixed arbitrary namespace usage for custom properties in PROPFIND (#57, reva/#720)
- Implement returning Webdav custom properties from xattr (#57, reva/#721)
- Minor fix in OCM share pkg (reva/#718)
https://github.com/owncloud/ocis-reva/pull/161
https://github.com/owncloud/ocis-reva/pull/180
https://github.com/owncloud/ocis-reva/pull/192
https://github.com/owncloud/ocis-reva/pull/207
https://github.com/owncloud/ocis-reva/pull/221
https://github.com/cs3org/reva/pull/766
https://github.com/cs3org/reva/pull/765
https://github.com/cs3org/reva/pull/755
https://github.com/cs3org/reva/pull/754
https://github.com/owncloud/ocis-reva/issues/20
https://github.com/owncloud/ocis-reva/issues/26
https://github.com/owncloud/ocis-reva/issues/43
https://github.com/owncloud/ocis-reva/issues/44
https://github.com/owncloud/ocis-reva/issues/46
https://github.com/owncloud/ocis-reva/issues/94
https://github.com/cs3org/reva/pull/747
https://github.com/cs3org/reva/pull/748
https://github.com/cs3org/reva/pull/760
https://github.com/cs3org/reva/pull/759
https://github.com/cs3org/reva/pull/678
https://github.com/owncloud/ocis-reva/issues/26
https://github.com/cs3org/reva/pull/696
https://github.com/cs3org/reva/pull/707
https://github.com/cs3org/reva/pull/711
https://github.com/cs3org/reva/pull/695
https://github.com/cs3org/reva/pull/674
https://github.com/cs3org/reva/pull/725
https://github.com/cs3org/reva/pull/717
https://github.com/owncloud/ocis-reva/issues/67
https://github.com/cs3org/reva/pull/712
https://github.com/cs3org/reva/pull/713
https://github.com/owncloud/ocis-reva/issues/57
https://github.com/cs3org/reva/pull/720
https://github.com/cs3org/reva/pull/718
https://github.com/owncloud/ocis-reva/issues/94
https://github.com/cs3org/reva/pull/731
https://github.com/owncloud/ocis-reva/issues/188
https://github.com/cs3org/reva/pull/734
https://github.com/owncloud/ocis-reva/issues/182
https://github.com/cs3org/reva/pull/729
https://github.com/cs3org/reva/pull/728
https://github.com/cs3org/reva/pull/730
https://github.com/owncloud/ocis-reva/issues/212
https://github.com/cs3org/reva/pull/758
https://github.com/owncloud/ocis-reva/issues/186
https://github.com/cs3org/reva/pull/742
https://github.com/cs3org/reva/pull/764
https://github.com/owncloud/ocis-reva/issues/203
https://github.com/cs3org/reva/pull/743
https://github.com/cs3org/reva/pull/732
https://github.com/cs3org/reva/pull/750

View File

@@ -0,0 +1,7 @@
Enhancement: Add public shares service
Added Public Shares service with CRUD operations and File Public Shares Manager
https://github.com/owncloud/ocis-reva/issues/49
https://github.com/owncloud/ocis-reva/pull/232

View File

@@ -0,0 +1,32 @@
Enhancement: update reva to v0.1.1-0.20200529120551-4f2d9c85d3c9
- Updated reva to v0.1.1-0.20200529120551 (#232)
- Public Shares CRUD, File Public Shares Manager (#49, #232, reva/#681, reva/#788)
- Disable HTTP-KeepAlives to reduce fd count (ocis/#268, reva/#787)
- Fix trashbin listing (#229, reva/#782)
- Create PUT wrapper for TUS uploads (reva/#770)
- Add security access headers for ocdav requests (#66, reva/#780)
- Add option to revad cmd to specify logging level (reva/#772)
- New metrics package (reva/#740)
- Remove implicit data member from memory store (reva/#774)
- Added TUS global capabilities (#177, reva/#775)
- Fix PROPFIND with Depth 1 for cross-storage operations (reva/#779)
https://github.com/owncloud/ocis-reva/issues/49
https://github.com/owncloud/ocis-reva/pull/232
https://github.com/cs3org/reva/pull/787
https://github.com/cs3org/reva/pull/681
https://github.com/cs3org/reva/pull/788
https://github.com/owncloud/ocis-reva/issues/229
https://github.com/cs3org/reva/pull/782
https://github.com/cs3org/reva/pull/770
https://github.com/owncloud/ocis-reva/issues/66
https://github.com/cs3org/reva/pull/780
https://github.com/cs3org/reva/pull/772
https://github.com/cs3org/reva/pull/740
https://github.com/cs3org/reva/pull/774
https://github.com/owncloud/ocis-reva/issues/177
https://github.com/cs3org/reva/pull/775
https://github.com/cs3org/reva/pull/779
https://github.com/owncloud/ocis/issues/268

View File

@@ -0,0 +1,9 @@
Enhancement: Add TUS global capability
The TUS global capabilities from Reva are now exposed.
The advertised max chunk size can be configured using the "--upload-max-chunk-size" CLI switch or "REVA_FRONTEND_UPLOAD_MAX_CHUNK_SIZE" environment variable.
The advertised http method override can be configured using the "--upload-http-method-override" CLI switch or "REVA_FRONTEND_UPLOAD_HTTP_METHOD_OVERRIDE" environment variable.
https://github.com/owncloud/ocis-reva/issues/177
https://github.com/owncloud/ocis-reva/pull/228

View File

@@ -0,0 +1,12 @@
Enhancement: update reva to v0.1.1-0.20200603071553-e05a87521618
- Updated reva to v0.1.1-0.20200603071553-e05a87521618 (#244)
- Add option to disable TUS on OC layer (#177, reva/#791)
- Dataprovider now supports method override (#177, reva/#792)
- OCS fixes for create public link (reva/#798)
https://github.com/owncloud/ocis-reva/issues/244
https://github.com/owncloud/ocis-reva/issues/177
https://github.com/cs3org/reva/pull/791
https://github.com/cs3org/reva/pull/792
https://github.com/cs3org/reva/pull/798

View File

@@ -0,0 +1,68 @@
Enhancement: update reva to v0.1.1-0.20200624063447-db5e6635d5f0
- Updated reva to v0.1.1-0.20200624063447-db5e6635d5f0 (#279)
- Local storage: URL-encode file ids to ease integration with other microservices like WOPI (reva/#799)
- Mentix fixes (reva/#803, reva/#817)
- OCDAV: fix returned timestamp format (#116, reva/#805)
- OCM: add default prefix (#814)
- add the content-length header to the responses (reva/#816)
- Deps: clean (reva/#818)
- Fix trashbin listing (#112, #253, #254, reva/#819)
- Make the json publicshare driver configurable (reva/#820)
- TUS: Return metadata headers after direct upload (ocis/#216, reva/#813)
- Set mtime to storage after simple upload (#174, reva/#823, reva/#841)
- Configure grpc client to allow for insecure conns and skip server certificate verification (reva/#825)
- Deployment: simplify config with more default values (reva/#826, reva/#837, reva/#843, reva/#848, reva/#842)
- Separate local fs into home and with home disabled (reva/#829)
- Register reflection after other services (reva/#831)
- Refactor EOS fs (reva/#830)
- Add ocs-share-permissions to the propfind response (#47, reva/#836)
- OCS: Properly read permissions when creating public link (reva/#852)
- localfs: make normalize return associated error (reva/#850)
- EOS grpc driver (reva/#664)
- OCS: Add support for legacy public link arg publicUpload (reva/#853)
- Add cache layer to user REST package (reva/#849)
- Meshdirectory: pass query params to selected provider (reva/#863)
- Pass etag in quotes from the fs layer (#269, reva/#866, reva/#867)
- OCM: use refactored cs3apis provider definition (reva/#864)
https://github.com/owncloud/ocis-reva/pull/279
https://github.com/owncloud/cs3org/reva/pull/799
https://github.com/owncloud/cs3org/reva/pull/803
https://github.com/owncloud/cs3org/reva/pull/817
https://github.com/owncloud/ocis-reva/issues/116
https://github.com/owncloud/cs3org/reva/pull/805
https://github.com/owncloud/cs3org/reva/pull/814
https://github.com/owncloud/cs3org/reva/pull/816
https://github.com/owncloud/cs3org/reva/pull/818
https://github.com/owncloud/ocis-reva/issues/112
https://github.com/owncloud/ocis-reva/issues/253
https://github.com/owncloud/ocis-reva/issues/254
https://github.com/owncloud/cs3org/reva/pull/819
https://github.com/owncloud/cs3org/reva/pull/820
https://github.com/owncloud/ocis/issues/216
https://github.com/owncloud/ocis-reva/issues/174
https://github.com/owncloud/cs3org/reva/pull/823
https://github.com/owncloud/cs3org/reva/pull/841
https://github.com/owncloud/cs3org/reva/pull/813
https://github.com/owncloud/cs3org/reva/pull/825
https://github.com/owncloud/cs3org/reva/pull/826
https://github.com/owncloud/cs3org/reva/pull/837
https://github.com/owncloud/cs3org/reva/pull/843
https://github.com/owncloud/cs3org/reva/pull/848
https://github.com/owncloud/cs3org/reva/pull/842
https://github.com/owncloud/cs3org/reva/pull/829
https://github.com/owncloud/cs3org/reva/pull/831
https://github.com/owncloud/cs3org/reva/pull/830
https://github.com/owncloud/ocis-reva/issues/47
https://github.com/owncloud/cs3org/reva/pull/836
https://github.com/owncloud/cs3org/reva/pull/852
https://github.com/owncloud/cs3org/reva/pull/850
https://github.com/owncloud/cs3org/reva/pull/664
https://github.com/owncloud/cs3org/reva/pull/853
https://github.com/owncloud/cs3org/reva/pull/849
https://github.com/owncloud/cs3org/reva/pull/863
https://github.com/owncloud/ocis-reva/issues/269
https://github.com/owncloud/cs3org/reva/pull/866
https://github.com/owncloud/cs3org/reva/pull/867
https://github.com/owncloud/cs3org/reva/pull/864

View File

@@ -0,0 +1,23 @@
Enhancement: update reva to v0.1.1-0.20200626111234-e21c32db9614
- Updated reva to v0.1.1-0.20200626111234-e21c32db9614 (#304)
- TUS upload support through datagateway (#261, reva/#878, reva/#888)
- Added support for differing metrics path for Prometheus to Mentix (reva/#875)
- More data exported by Mentix (reva/#881)
- Implementation of file operations in public folder shares (#49, #293, reva/#877)
- Make httpclient trust local certificates for now (reva/#880)
- EOS homes are not configured with an enable-flag anymore, but with a dedicated storage driver.
We're using it now and adapted default configs of storages (reva/#891, #304)
https://github.com/owncloud/ocis-reva/pull/261
https://github.com/cs3org/reva/pull/875
https://github.com/owncloud/ocis-reva/issues/49
https://github.com/owncloud/ocis-reva/issues/293
https://github.com/cs3org/reva/pull/877
https://github.com/owncloud/ocis-reva/issues/261
https://github.com/cs3org/reva/pull/878
https://github.com/cs3org/reva/pull/881
https://github.com/cs3org/reva/pull/880
https://github.com/cs3org/reva/pull/888
https://github.com/owncloud/ocis-reva/pull/304
https://github.com/cs3org/reva/pull/891

View File

@@ -0,0 +1,13 @@
Enhancement: update reva to v0.1.1-0.20200629131207-04298ea1c088
- Update reva to v0.1.1-0.20200629094927-e33d65230abc (#309)
- Fix public link file share (#278, reva/#895, reva/#900)
- Delete public share (reva/#899)
- Updated reva to v0.1.1-0.20200629131207-04298ea1c088 (#313)
https://github.com/owncloud/ocis-reva/pull/309
https://github.com/owncloud/ocis-reva/issues/278
https://github.com/cs3org/reva/pull/895
https://github.com/cs3org/reva/pull/899
https://github.com/cs3org/reva/pull/900
https://github.com/owncloud/ocis-reva/pull/313

View File

@@ -0,0 +1,5 @@
Enhancement: Allow datagateway transfers to take 24h
- Increase transfer token life time to 24h (PR #323)
https://github.com/owncloud/ocis-reva/pull/323

View File

@@ -0,0 +1,11 @@
Enhancement: update reva to v0.1.1-0.20200630075923-39a90d431566
- Update reva to v0.1.1-0.20200630075923-39a90d431566 (#320)
- Return special value for public link password (#294, reva/#904)
- Fix public stat and listcontainer response to contain the correct prefix (#310, reva/#902)
https://github.com/owncloud/ocis-reva/pull/320
https://github.com/owncloud/ocis-reva/issues/310
https://github.com/cs3org/reva/pull/902
https://github.com/owncloud/ocis-reva/issues/294
https://github.com/cs3org/reva/pull/904

View File

@@ -0,0 +1,30 @@
Enhancement: update reva to v0.1.1-0.20200701152626-2f6cc60e2f66
- Update reva to v0.1.1-0.20200701152626-2f6cc60e2f66 (#328)
- Use sync.Map on pool package (reva/#909)
- Use mutex instead of sync.Map (reva/#915)
- Use gatewayProviders instead of storageProviders on conn pool (reva/#916)
- Add logic to ls and stat to process arbitrary metadata keys (reva/#905)
- Preliminary implementation of Set/UnsetArbitraryMetadata (reva/#912)
- Make datagateway forward headers (reva/#913, reva/#926)
- Add option to cmd upload to disable tus (reva/#911)
- OCS Share Allow date-only expiration for public shares (#288, reva/#918)
- OCS Share Remove array from OCS Share update response (#252, reva/#919)
- OCS Share Implement GET request for single shares (#249, reva/#921)
https://github.com/owncloud/ocis-reva/pull/328
https://github.com/cs3org/reva/pull/909
https://github.com/cs3org/reva/pull/915
https://github.com/cs3org/reva/pull/916
https://github.com/cs3org/reva/pull/905
https://github.com/cs3org/reva/pull/912
https://github.com/cs3org/reva/pull/913
https://github.com/cs3org/reva/pull/926
https://github.com/cs3org/reva/pull/911
https://github.com/owncloud/ocis-reva/issues/288
https://github.com/cs3org/reva/pull/918
https://github.com/owncloud/ocis-reva/issues/252
https://github.com/cs3org/reva/pull/919
https://github.com/owncloud/ocis-reva/issues/249
https://github.com/cs3org/reva/pull/921

View File

@@ -0,0 +1,5 @@
Enhancement: add new config options for the http client
The internal certificates are checked for validity after https://github.com/cs3org/reva/pull/914, which causes the acceptance tests to fail. This change sets new hardcoded defaults.
https://github.com/owncloud/ocis-reva/pull/330

View File

@@ -0,0 +1,53 @@
{{ $allVersions := . }}
{{- range $index, $changes := . }}{{ with $changes -}}
{{ if gt (len $allVersions) 1 -}}
# Changelog for [{{ .Version }}] ({{ .Date }})
The following sections list the changes in ocis-reva {{ .Version }}.
{{/* creating version compare links */ -}}
{{ $next := add1 $index -}}
{{ if ne (len $allVersions) $next -}}
{{ $previousVersion := (index $allVersions $next).Version -}}
{{ if eq .Version "unreleased" -}}
[{{ .Version }}]: https://github.com/owncloud/ocis-reva/compare/v{{ $previousVersion }}...master
{{ else -}}
[{{ .Version }}]: https://github.com/owncloud/ocis-reva/compare/v{{ $previousVersion }}...v{{ .Version }}
{{ end -}}
{{ end -}}
{{- /* last version managed by calens, end of the loop */ -}}
{{ if eq .Version "0.1.0" -}}
[{{ .Version }}]: https://github.com/owncloud/ocis-reva/compare/6702be7f9045a382d40691a9bcd04f572203e9ed...v{{ .Version }}
{{ end -}}
{{ else -}}
# Changes in {{ .Version }}
{{ end -}}
## Summary
{{ range $entry := .Entries }}{{ with $entry }}
* {{ .Type }} - {{ .Title }}: [#{{ .PrimaryID }}]({{ .PrimaryURL }})
{{- end }}{{ end }}
## Details
{{ range $entry := .Entries }}{{ with $entry }}
* {{ .Type }} - {{ .Title }}: [#{{ .PrimaryID }}]({{ .PrimaryURL }})
{{ range $par := .Paragraphs }}
{{ wrapIndent $par 80 3 }}
{{ end -}}
{{ range $url := .IssueURLs }}
{{ $url -}}
{{ end -}}
{{ range $url := .PRURLs }}
{{ $url -}}
{{ end -}}
{{ range $url := .OtherURLs }}
{{ $url -}}
{{ end }}
{{ end }}{{ end -}}
{{ end }}{{ end -}}

6
reva/changelog/README.md Normal file
View File

@@ -0,0 +1,6 @@
# Changelog
We are using [calens](https://github.com/restic/calens) to properly generate a
changelog before we are tagging a new release. To get an idea how this could
look like <https://github.com/restic/restic/tree/master/changelog> would be the
best reference.

11
reva/changelog/TEMPLATE Normal file
View File

@@ -0,0 +1,11 @@
Bugfix: Fix behavior for foobar (in present tense)
We've fixed the behavior for foobar, a long-standing annoyance for users. The
text should be wrapped at 80 characters length.
The text in the paragraphs is written in past tense. The last section is a list
of issue URLs, PR URLs and other URLs. The first issue ID (or the first PR ID,
in case there aren't any issue links) is used as the primary ID.
https://github.com/owncloud/ocis-reva/issues/1234
https://github.com/owncloud/ocis-reva/pull/55555

View File

View File

@@ -0,0 +1,13 @@
package main
import (
"os"
"github.com/owncloud/ocis-reva/pkg/command"
)
func main() {
if err := command.Execute(); err != nil {
os.Exit(1)
}
}

18
reva/composer.json Normal file
View File

@@ -0,0 +1,18 @@
{
"name": "owncloud/ocis-reva",
"config" : {
"platform": {
"php": "7.2"
}
},
"require": {
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.4"
},
"extra": {
"bamarni-bin": {
"bin-links": false
}
}
}

24
reva/config/example.json Normal file
View File

@@ -0,0 +1,24 @@
{
"debug": {
"addr": "0.0.0.0:9109",
"token": "",
"pprof": false,
"zpages": false
},
"http": {
"addr": "0.0.0.0:9105"
},
"grpc": {
"addr": "0.0.0.0:9106"
},
"tracing": {
"enabled": false,
"type": "jaeger",
"endpoint": "localhost:6831",
"collector": "http://localhost:14268/api/traces",
"service": "reva"
},
"asset": {
"path": ""
}
}

24
reva/config/example.yml Normal file
View File

@@ -0,0 +1,24 @@
---
debug:
addr: 0.0.0.0:9109
token:
pprof: false
zpages: false
http:
addr: 0.0.0.0:9105
grpc:
addr: 0.0.0.0:9106
tracing:
enabled: false
type: jaeger
endpoint: localhost:6831
collector: http://localhost:14268/api/traces
service: reva
asset:
path:
...

View File

@@ -0,0 +1,19 @@
FROM amd64/alpine:latest
RUN apk update && \
apk upgrade && \
apk add ca-certificates mailcap && \
rm -rf /var/cache/apk/* && \
echo 'hosts: files dns' >| /etc/nsswitch.conf
LABEL maintainer="ownCloud GmbH <devops@owncloud.com>" \
org.label-schema.name="oCIS Reva" \
org.label-schema.vendor="ownCloud GmbH" \
org.label-schema.schema-version="1.0"
EXPOSE 9140 9141 9142 9143
ENTRYPOINT ["/usr/bin/ocis-reva"]
CMD ["server"]
COPY bin/ocis-reva /usr/bin/ocis-reva

View File

@@ -0,0 +1,19 @@
FROM arm32v6/alpine:latest
RUN apk update && \
apk upgrade && \
apk add ca-certificates mailcap && \
rm -rf /var/cache/apk/* && \
echo 'hosts: files dns' >| /etc/nsswitch.conf
LABEL maintainer="ownCloud GmbH <devops@owncloud.com>" \
org.label-schema.name="oCIS Reva" \
org.label-schema.vendor="ownCloud GmbH" \
org.label-schema.schema-version="1.0"
EXPOSE 9140 9141 9142 9143
ENTRYPOINT ["/usr/bin/ocis-reva"]
CMD ["server"]
COPY bin/ocis-reva /usr/bin/ocis-reva

View File

@@ -0,0 +1,19 @@
FROM arm64v8/alpine:latest
RUN apk update && \
apk upgrade && \
apk add ca-certificates mailcap && \
rm -rf /var/cache/apk/* && \
echo 'hosts: files dns' >| /etc/nsswitch.conf
LABEL maintainer="ownCloud GmbH <devops@owncloud.com>" \
org.label-schema.name="oCIS Reva" \
org.label-schema.vendor="ownCloud GmbH" \
org.label-schema.schema-version="1.0"
EXPOSE 9140 9141 9142 9143
ENTRYPOINT ["/usr/bin/ocis-reva"]
CMD ["server"]
COPY bin/ocis-reva /usr/bin/ocis-reva

22
reva/docker/manifest.tmpl Normal file
View File

@@ -0,0 +1,22 @@
image: owncloud/ocis-reva:{{#if build.tag}}{{trimPrefix "v" build.tag}}{{else}}latest{{/if}}
{{#if build.tags}}
tags:
{{#each build.tags}}
- {{this}}
{{/each}}
{{/if}}
manifests:
- image: owncloud/ocis-reva:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
platform:
architecture: amd64
os: linux
- image: owncloud/ocis-reva:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm64
platform:
architecture: arm64
variant: v8
os: linux
- image: owncloud/ocis-reva:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-arm
platform:
architecture: arm
variant: v6
os: linux

45
reva/docs/_index.md Normal file
View File

@@ -0,0 +1,45 @@
---
title: "Reva"
date: 2018-05-02T00:00:00+00:00
weight: 10
geekdocRepo: https://github.com/owncloud/ocis-reva
geekdocEditPath: edit/master/docs
geekdocFilePath: _index.md
---
This service provides an ocis extension that wraps [reva](https://github.com/cs3org/reva/) and adds an opinionated configuration to it.
It uses the port range 9140-9179 to preconfigure several services.
| port | service |
+------+---------+
| 9109 | health? |
| 9140 | frontend |
| 9141 | frontend debug |
| 9142 | gateway |
| 9143 | gateway debug |
| 9144 | users |
| 9145 | users debug |
| 9146 | authbasic |
| 9147 | authbasic debug |
| 9148 | authbearer |
| 9149 | authbearer debug |
| 9150 | sharing |
| 9151 | sharing debug |
| 9152 | storage root |
| 9153 | storage root debug |
| 9154 | storage home |
| 9155 | storage home debug |
| 9156 | storage home data |
| 9157 | storage home data debug |
| 9158 | storage eos |
| 9159 | storage eos debug |
| 9160 | storage eos data |
| 9161 | storage eos data debug |
| 9162 | storage oc |
| 9163 | storage oc debug |
| 9164 | storage oc data |
| 9165 | storage oc data debug |
| 9166-9177 | reserved for s3, wnd, custom + data providers |
| 9178 | storage public link |
| 9179 | storage public link data |

26
reva/docs/building.md Normal file
View File

@@ -0,0 +1,26 @@
---
title: "Building"
date: 2018-05-02T00:00:00+00:00
weight: 30
geekdocRepo: https://github.com/owncloud/ocis-reva
geekdocEditPath: edit/master/docs
geekdocFilePath: building.md
---
As this project is built with Go, so you need to install that first. The installation of Go is out of the scope of this document, please follow the official documentation for [Go](https://golang.org/doc/install).To build this project you have to install Go >= v1.13. After the installation of the required tools you need to get the sources:
{{< highlight txt >}}
git clone https://github.com/owncloud/ocis-reva.git
cd ocis-reva
{{< / highlight >}}
All required tool besides Go itself and make are bundled or getting automatically installed within the `GOPATH`. All commands to build this project are part of our `Makefile`.
### Backend
{{< highlight txt >}}
make build
{{< / highlight >}}
The above command should produce the binary within the `bin/` folder now, give it a try with `./bin/ocis-reva -h` to see all available options.

656
reva/docs/configuration.md Normal file
View File

@@ -0,0 +1,656 @@
---
title: "Configuration"
date: "2020-09-09T12:38:00+0200"
weight: 20
geekdocRepo: https://github.com/owncloud/ocis-reva
geekdocEditPath: edit/master/docs
geekdocFilePath: configuration.md
---
{{< toc >}}
## Configuration
oCIS Single Binary is not responsible for configuring extensions. Instead, each extension could either be configured by environment variables, cli flags or config files.
Each extension has its dedicated documentation page (e.g. https://owncloud.github.io/extensions/ocis_proxy/configuration) which lists all possible configurations. Config files and environment variables are picked up if you use the `./bin/ocis server` command within the oCIS single binary. Command line flags must be set explicitly on the extensions subcommands.
### Configuration using config files
Out of the box extensions will attempt to read configuration details from:
```console
/etc/ocis
$HOME/.ocis
./config
```
For this configuration to be picked up, have a look at your extension `root` command and look for which default config name it has assigned. *i.e: ocis-proxy reads `proxy.json | yaml | toml ...`*.
So far we support the file formats `JSON` and `YAML`, if you want to get a full example configuration just take a look at [our repository](https://github.com/owncloud/ocis/tree/master/config), there you can always see the latest configuration format. These example configurations include all available options and the default values. The configuration file will be automatically loaded if it's placed at `/etc/ocis/ocis.yml`, `${HOME}/.ocis/ocis.yml` or `$(pwd)/config/ocis.yml`.
### Envrionment variables
If you prefer to configure the service with environment variables you can see the available variables below.
### Commandline flags
If you prefer to configure the service with commandline flags you can see the available variables below. Command line flags are only working when calling the subcommand directly.
## Root Command
Example service for Reva/oCIS
Usage: `ocis-reva [global options] command [command options] [arguments...]`
--config-file | $REVA_CONFIG_FILE
: Path to config file.
--log-level | $REVA_LOG_LEVEL
: Set logging level. Default: `info`.
--log-pretty | $REVA_LOG_PRETTY
: Enable pretty logging.
--log-color | $REVA_LOG_COLOR
: Enable colored logging.
## Sub Commands
### ocis-reva frontend
Start reva frontend service
Usage: `ocis-reva frontend [command options] [arguments...]`
--debug-addr | $REVA_FRONTEND_DEBUG_ADDR
: Address to bind debug server. Default: `0.0.0.0:9141`.
--transfer-secret | $REVA_TRANSFER_SECRET
: Transfer secret for datagateway. Default: `replace-me-with-a-transfer-secret`.
--webdav-namespace | $WEBDAV_NAMESPACE
: Namespace prefix for the /webdav endpoint. Default: `/home/`.
--dav-files-namespace | $DAV_FILES_NAMESPACE
: Namespace prefix for the webdav /dav/files endpoint. Default: `/oc/`.
--network | $REVA_FRONTEND_NETWORK
: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`.
--protocol | $REVA_FRONTEND_PROTOCOL
: protocol for reva service, can be 'http' or 'grpc'. Default: `http`.
--addr | $REVA_FRONTEND_ADDR
: Address to bind reva service. Default: `0.0.0.0:9140`.
--url | $REVA_FRONTEND_URL
: URL to use for the reva service. Default: `https://localhost:9200`.
--datagateway-prefix | $REVA_FRONTEND_DATAGATEWAY_PREFIX
: datagateway prefix. Default: `data`.
--ocdav-prefix | $REVA_FRONTEND_OCDAV_PREFIX
: owncloud webdav endpoint prefix.
--ocs-prefix | $REVA_FRONTEND_OCS_PREFIX
: open collaboration services endpoint prefix. Default: `ocs`.
--gateway-url | $REVA_GATEWAY_URL
: URL to use for the reva gateway service. Default: `localhost:9142`.
--upload-disable-tus | $REVA_FRONTEND_UPLOAD_DISABLE_TUS
: Disables TUS upload mechanism. Default: `false`.
--upload-http-method-override | $REVA_FRONTEND_UPLOAD_HTTP_METHOD_OVERRIDE
: Specify an HTTP method (ex: POST) that clients should to use when uploading instead of PATCH.
### ocis-reva health
Check health status
Usage: `ocis-reva health [command options] [arguments...]`
--debug-addr | $REVA_DEBUG_ADDR
: Address to debug endpoint. Default: `0.0.0.0:9109`.
### ocis-reva storage-home-data
Start reva storage-home-data service
Usage: `ocis-reva storage-home-data [command options] [arguments...]`
--debug-addr | $REVA_STORAGE_HOME_DATA_DEBUG_ADDR
: Address to bind debug server. Default: `0.0.0.0:9157`.
--network | $REVA_STORAGE_HOME_DATA_NETWORK
: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`.
--protocol | $REVA_STORAGE_HOME_DATA_PROTOCOL
: protocol for reva service, can be 'http' or 'grpc'. Default: `http`.
--addr | $REVA_STORAGE_HOME_DATA_ADDR
: Address to bind reva service. Default: `0.0.0.0:9156`.
--url | $REVA_STORAGE_HOME_DATA_URL
: URL to use for the reva service. Default: `localhost:9156`.
--driver | $REVA_STORAGE_HOME_DATA_DRIVER
: storage driver for home data mount: eg. local, eos, owncloud, ocis or s3. Default: `owncloud`.
--prefix | $REVA_STORAGE_HOME_DATA_PREFIX
: prefix for the http endpoint, without leading slash. Default: `data`.
--temp-folder | $REVA_STORAGE_HOME_DATA_TEMP_FOLDER
: temp folder. Default: `/var/tmp/`.
--enable-home | $REVA_STORAGE_HOME_ENABLE_HOME
: enable the creation of home directories. Default: `true`.
--gateway-url | $REVA_GATEWAY_URL
: URL to use for the reva gateway service. Default: `localhost:9142`.
--users-url | $REVA_USERS_URL
: URL to use for the reva service. Default: `localhost:9144`.
### ocis-reva storage-oc
Start reva storage-oc service
Usage: `ocis-reva storage-oc [command options] [arguments...]`
--debug-addr | $REVA_STORAGE_OC_DEBUG_ADDR
: Address to bind debug server. Default: `0.0.0.0:9163`.
--network | $REVA_STORAGE_OC_NETWORK
: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`.
--protocol | $REVA_STORAGE_OC_PROTOCOL
: protocol for reva service, can be 'http' or 'grpc'. Default: `grpc`.
--addr | $REVA_STORAGE_OC_ADDR
: Address to bind reva service. Default: `0.0.0.0:9162`.
--url | $REVA_STORAGE_OC_URL
: URL to use for the reva service. Default: `localhost:9162`.
--driver | $REVA_STORAGE_OC_DRIVER
: storage driver for oc mount: eg. local, eos, owncloud, ocis or s3. Default: `owncloud`.
--mount-path | $REVA_STORAGE_OC_MOUNT_PATH
: mount path. Default: `/oc`.
--mount-id | $REVA_STORAGE_OC_MOUNT_ID
: mount id. Default: `1284d238-aa92-42ce-bdc4-0b0000009162`.
--expose-data-server | $REVA_STORAGE_OC_EXPOSE_DATA_SERVER
: exposes a dedicated data server. Default: `false`.
--data-server-url | $REVA_STORAGE_OC_DATA_SERVER_URL
: data server url. Default: `http://localhost:9164/data`.
--users-url | $REVA_USERS_URL
: URL to use for the reva service. Default: `localhost:9144`.
### ocis-reva auth-basic
Start reva authprovider for basic auth
Usage: `ocis-reva auth-basic [command options] [arguments...]`
--debug-addr | $REVA_AUTH_BASIC_DEBUG_ADDR
: Address to bind debug server. Default: `0.0.0.0:9147`.
--auth-driver | $REVA_AUTH_DRIVER
: auth driver: 'demo', 'json' or 'ldap'. Default: `ldap`.
--auth-json | $REVA_AUTH_JSON
: Path to users.json file.
--network | $REVA_AUTH_BASIC_NETWORK
: Network to use for the reva auth-basic service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`.
--protocol | $REVA_AUTH_BASIC_PROTOCOL
: protocol for reva service, can be 'http' or 'grpc'. Default: `grpc`.
--addr | $REVA_AUTH_BASIC_ADDR
: Address to bind reva service. Default: `0.0.0.0:9146`.
--url | $REVA_AUTH_BASIC_URL
: URL to use for the reva service. Default: `localhost:9146`.
### ocis-reva gateway
Start reva gateway
Usage: `ocis-reva gateway [command options] [arguments...]`
--debug-addr | $REVA_GATEWAY_DEBUG_ADDR
: Address to bind debug server. Default: `0.0.0.0:9143`.
--transfer-secret | $REVA_TRANSFER_SECRET
: Transfer secret for datagateway. Default: `replace-me-with-a-transfer-secret`.
--network | $REVA_GATEWAY_NETWORK
: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`.
--protocol | $REVA_GATEWAY_PROTOCOL
: protocol for reva service, can be 'http' or 'grpc'. Default: `grpc`.
--addr | $REVA_GATEWAY_ADDR
: Address to bind reva service. Default: `0.0.0.0:9142`.
--url | $REVA_GATEWAY_URL
: URL to use for the reva service. Default: `localhost:9142`.
--commit-share-to-storage-grant | $REVA_GATEWAY_COMMIT_SHARE_TO_STORAGE_GRANT
: Commit shares to the share manager. Default: `true`.
--commit-share-to-storage-ref | $REVA_GATEWAY_COMMIT_SHARE_TO_STORAGE_REF
: Commit shares to the storage. Default: `true`.
--share-folder | $REVA_GATEWAY_SHARE_FOLDER
: mount shares in this folder of the home storage provider. Default: `Shares`.
--disable-home-creation-on-login | $REVA_GATEWAY_DISABLE_HOME_CREATION_ON_LOGIN
: Disable creation of home folder on login.
--storage-registry-driver | $REVA_STORAGE_REGISTRY_DRIVER
: driver of the storage registry. Default: `static`.
--storage-home-provider | $REVA_STORAGE_HOME_PROVIDER
: mount point of the storage provider for user homes in the global namespace. Default: `/home`.
--frontend-url | $REVA_FRONTEND_URL
: URL to use for the reva service. Default: `https://localhost:9200`.
--datagateway-url | $REVA_DATAGATEWAY_URL
: URL to use for the reva datagateway. Default: `https://localhost:9200/data`.
--users-url | $REVA_USERS_URL
: URL to use for the reva service. Default: `localhost:9144`.
--auth-basic-url | $REVA_AUTH_BASIC_URL
: URL to use for the reva service. Default: `localhost:9146`.
--auth-bearer-url | $REVA_AUTH_BEARER_URL
: URL to use for the reva service. Default: `localhost:9148`.
--sharing-url | $REVA_SHARING_URL
: URL to use for the reva service. Default: `localhost:9150`.
--storage-root-url | $REVA_STORAGE_ROOT_URL
: URL to use for the reva service. Default: `localhost:9152`.
--storage-root-mount-path | $REVA_STORAGE_ROOT_MOUNT_PATH
: mount path. Default: `/`.
--storage-root-mount-id | $REVA_STORAGE_ROOT_MOUNT_ID
: mount id. Default: `1284d238-aa92-42ce-bdc4-0b0000009152`.
--storage-home-url | $REVA_STORAGE_HOME_URL
: URL to use for the reva service. Default: `localhost:9154`.
--storage-home-mount-path | $REVA_STORAGE_HOME_MOUNT_PATH
: mount path. Default: `/home`.
--storage-home-mount-id | $REVA_STORAGE_HOME_MOUNT_ID
: mount id. Default: `1284d238-aa92-42ce-bdc4-0b0000009154`.
--storage-eos-url | $REVA_STORAGE_EOS_URL
: URL to use for the reva service. Default: `localhost:9158`.
--storage-eos-mount-path | $REVA_STORAGE_EOS_MOUNT_PATH
: mount path. Default: `/eos`.
--storage-eos-mount-id | $REVA_STORAGE_EOS_MOUNT_ID
: mount id. Default: `1284d238-aa92-42ce-bdc4-0b0000009158`.
--storage-oc-url | $REVA_STORAGE_OC_URL
: URL to use for the reva service. Default: `localhost:9162`.
--storage-oc-mount-path | $REVA_STORAGE_OC_MOUNT_PATH
: mount path. Default: `/oc`.
--storage-oc-mount-id | $REVA_STORAGE_OC_MOUNT_ID
: mount id. Default: `1284d238-aa92-42ce-bdc4-0b0000009162`.
--public-link-url | $REVA_STORAGE_PUBLIC_LINK_URL
: URL to use for the public links service. Default: `localhost:9178`.
--storage-public-link-mount-path | $REVA_STORAGE_PUBLIC_LINK_MOUNT_PATH
: mount path. Default: `/public/`.
### ocis-reva sharing
Start reva sharing service
Usage: `ocis-reva sharing [command options] [arguments...]`
--debug-addr | $REVA_SHARING_DEBUG_ADDR
: Address to bind debug server. Default: `0.0.0.0:9151`.
--network | $REVA_SHARING_NETWORK
: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`.
--protocol | $REVA_SHARING_PROTOCOL
: protocol for reva service, can be 'http' or 'grpc'. Default: `grpc`.
--addr | $REVA_SHARING_ADDR
: Address to bind reva service. Default: `0.0.0.0:9150`.
--url | $REVA_SHARING_URL
: URL to use for the reva service. Default: `localhost:9150`.
--user-driver | $REVA_SHARING_USER_DRIVER
: driver to use for the UserShareProvider. Default: `json`.
--user-json-file | $REVA_SHARING_USER_JSON_FILE
: file used to persist shares for the UserShareProvider. Default: `/var/tmp/reva/shares.json`.
--public-driver | $REVA_SHARING_PUBLIC_DRIVER
: driver to use for the PublicShareProvider. Default: `json`.
### ocis-reva storage-eos-data
Start reva storage-eos-data service
Usage: `ocis-reva storage-eos-data [command options] [arguments...]`
--debug-addr | $REVA_STORAGE_OC_DATA_DEBUG_ADDR
: Address to bind debug server. Default: `0.0.0.0:9161`.
--network | $REVA_STORAGE_EOS_DATA_NETWORK
: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`.
--protocol | $REVA_STORAGE_EOS_DATA_PROTOCOL
: protocol for reva service, can be 'http' or 'grpc'. Default: `http`.
--addr | $REVA_STORAGE_EOS_DATA_ADDR
: Address to bind reva service. Default: `0.0.0.0:9160`.
--url | $REVA_STORAGE_EOS_DATA_URL
: URL to use for the reva service. Default: `localhost:9160`.
--driver | $REVA_STORAGE_EOS_DATA_DRIVER
: storage driver for eos data mount: eg. local, eos, owncloud, ocis or s3. Default: `eos`.
--prefix | $REVA_STORAGE_EOS_DATA_PREFIX
: prefix for the http endpoint, without leading slash. Default: `data`.
--temp-folder | $REVA_STORAGE_EOS_DATA_TEMP_FOLDER
: temp folder. Default: `/var/tmp/`.
--gateway-url | $REVA_GATEWAY_URL
: URL to use for the reva gateway service. Default: `localhost:9142`.
--users-url | $REVA_USERS_URL
: URL to use for the reva service. Default: `localhost:9144`.
### ocis-reva auth-bearer
Start reva authprovider for bearer auth
Usage: `ocis-reva auth-bearer [command options] [arguments...]`
--debug-addr | $REVA_AUTH_BEARER_DEBUG_ADDR
: Address to bind debug server. Default: `0.0.0.0:9149`.
--oidc-issuer | $REVA_OIDC_ISSUER
: OIDC issuer. Default: `https://localhost:9200`.
--oidc-insecure | $REVA_OIDC_INSECURE
: OIDC allow insecure communication. Default: `true`.
--oidc-id-claim | $REVA_OIDC_ID_CLAIM
: OIDC id claim. Default: `preferred_username`.
--oidc-uid-claim | $REVA_OIDC_UID_CLAIM
: OIDC uid claim.
--oidc-gid-claim | $REVA_OIDC_GID_CLAIM
: OIDC gid claim.
--network | $REVA_AUTH_BEARER_NETWORK
: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`.
--protocol | $REVA_AUTH_BEARER_PROTOCOL
: protocol for reva service, can be 'http' or 'grpc'. Default: `grpc`.
--addr | $REVA_AUTH_BEARER_ADDR
: Address to bind reva service. Default: `0.0.0.0:9148`.
--url | $REVA_AUTH_BEARER_URL
: URL to use for the reva service. Default: `localhost:9148`.
### ocis-reva storage-eos
Start reva storage-eos service
Usage: `ocis-reva storage-eos [command options] [arguments...]`
--debug-addr | $REVA_STORAGE_EOS_DEBUG_ADDR
: Address to bind debug server. Default: `0.0.0.0:9159`.
--network | $REVA_STORAGE_EOS_NETWORK
: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`.
--protocol | $REVA_STORAGE_EOS_PROTOCOL
: protocol for reva service, can be 'http' or 'grpc'. Default: `grpc`.
--addr | $REVA_STORAGE_EOS_ADDR
: Address to bind reva service. Default: `0.0.0.0:9158`.
--url | $REVA_STORAGE_EOS_URL
: URL to use for the reva service. Default: `localhost:9158`.
--driver | $REVA_STORAGE_EOS_DRIVER
: storage driver for eos mount: eg. local, eos, owncloud, ocis or s3. Default: `eos`.
--mount-path | $REVA_STORAGE_EOS_MOUNT_PATH
: mount path. Default: `/eos`.
--mount-id | $REVA_STORAGE_EOS_MOUNT_ID
: mount id. Default: `1284d238-aa92-42ce-bdc4-0b0000009158`.
--expose-data-server | $REVA_STORAGE_EOS_EXPOSE_DATA_SERVER
: exposes a dedicated data server. Default: `false`.
--data-server-url | $REVA_STORAGE_EOS_DATA_SERVER_URL
: data server url. Default: `http://localhost:9160/data`.
### ocis-reva storage-home
Start reva storage-home service
Usage: `ocis-reva storage-home [command options] [arguments...]`
--debug-addr | $REVA_STORAGE_HOME_DEBUG_ADDR
: Address to bind debug server. Default: `0.0.0.0:9155`.
--network | $REVA_STORAGE_HOME_NETWORK
: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`.
--protocol | $REVA_STORAGE_HOME_PROTOCOL
: protocol for reva service, can be 'http' or 'grpc'. Default: `grpc`.
--addr | $REVA_STORAGE_HOME_ADDR
: Address to bind reva service. Default: `0.0.0.0:9154`.
--url | $REVA_STORAGE_HOME_URL
: URL to use for the reva service. Default: `localhost:9154`.
--driver | $REVA_STORAGE_HOME_DRIVER
: storage driver for home mount: eg. local, eos, owncloud, ocis or s3. Default: `owncloud`.
--mount-path | $REVA_STORAGE_HOME_MOUNT_PATH
: mount path. Default: `/home`.
--mount-id | $REVA_STORAGE_HOME_MOUNT_ID
: mount id. Default: `1284d238-aa92-42ce-bdc4-0b0000009162`.
--expose-data-server | $REVA_STORAGE_HOME_EXPOSE_DATA_SERVER
: exposes a dedicated data server. Default: `false`.
--data-server-url | $REVA_STORAGE_HOME_DATA_SERVER_URL
: data server url. Default: `http://localhost:9156/data`.
--enable-home | $REVA_STORAGE_HOME_ENABLE_HOME
: enable the creation of home directories. Default: `true`.
--users-url | $REVA_USERS_URL
: URL to use for the reva service. Default: `localhost:9144`.
### ocis-reva storage-oc-data
Start reva storage-oc-data service
Usage: `ocis-reva storage-oc-data [command options] [arguments...]`
--debug-addr | $REVA_STORAGE_OC_DATA_DEBUG_ADDR
: Address to bind debug server. Default: `0.0.0.0:9165`.
--network | $REVA_STORAGE_OC_DATA_NETWORK
: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`.
--protocol | $REVA_STORAGE_OC_DATA_PROTOCOL
: protocol for reva service, can be 'http' or 'grpc'. Default: `http`.
--addr | $REVA_STORAGE_OC_DATA_ADDR
: Address to bind reva service. Default: `0.0.0.0:9164`.
--url | $REVA_STORAGE_OC_DATA_URL
: URL to use for the reva service. Default: `localhost:9164`.
--driver | $REVA_STORAGE_OC_DATA_DRIVER
: storage driver for oc data mount: eg. local, eos, owncloud, ocis or s3. Default: `owncloud`.
--prefix | $REVA_STORAGE_OC_DATA_PREFIX
: prefix for the http endpoint, without leading slash. Default: `data`.
--temp-folder | $REVA_STORAGE_OC_DATA_TEMP_FOLDER
: temp folder. Default: `/var/tmp/`.
--gateway-url | $REVA_GATEWAY_URL
: URL to use for the reva gateway service. Default: `localhost:9142`.
--users-url | $REVA_USERS_URL
: URL to use for the reva service. Default: `localhost:9144`.
### ocis-reva storage-root
Start reva storage-root service
Usage: `ocis-reva storage-root [command options] [arguments...]`
--debug-addr | $REVA_STORAGE_ROOT_DEBUG_ADDR
: Address to bind debug server. Default: `0.0.0.0:9153`.
--network | $REVA_STORAGE_ROOT_NETWORK
: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`.
--protocol | $REVA_STORAGE_ROOT_PROTOCOL
: protocol for reva service, can be 'http' or 'grpc'. Default: `grpc`.
--addr | $REVA_STORAGE_ROOT_ADDR
: Address to bind reva service. Default: `0.0.0.0:9152`.
--url | $REVA_STORAGE_ROOT_URL
: URL to use for the reva service. Default: `localhost:9152`.
--driver | $REVA_STORAGE_ROOT_DRIVER
: storage driver for root mount: eg. local, eos, owncloud, ocis or s3. Default: `local`.
--mount-path | $REVA_STORAGE_ROOT_MOUNT_PATH
: mount path. Default: `/`.
--mount-id | $REVA_STORAGE_ROOT_MOUNT_ID
: mount id. Default: `123e4567-e89b-12d3-a456-426655440001`.
--expose-data-server | $REVA_STORAGE_ROOT_EXPOSE_DATA_SERVER
: exposes a dedicated data server.
--data-server-url | $REVA_STORAGE_ROOT_DATA_SERVER_URL
: data server url.
### ocis-reva users
Start reva users service
Usage: `ocis-reva users [command options] [arguments...]`
--debug-addr | $REVA_SHARING_DEBUG_ADDR
: Address to bind debug server. Default: `0.0.0.0:9145`.
--network | $REVA_USERS_NETWORK
: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`.
--protocol | $REVA_USERS_PROTOCOL
: protocol for reva service, can be 'http' or 'grpc'. Default: `grpc`.
--addr | $REVA_USERS_ADDR
: Address to bind reva service. Default: `0.0.0.0:9144`.
--url | $REVA_USERS_URL
: URL to use for the reva service. Default: `localhost:9144`.
--driver | $REVA_USERS_DRIVER
: user driver: 'demo', 'json', 'ldap', or 'rest'. Default: `ldap`.
--json-config | $REVA_USERS_JSON
: Path to users.json file.
--rest-client-id | $REVA_REST_CLIENT_ID
: User rest driver Client ID.
--rest-client-secret | $REVA_REST_CLIENT_SECRET
: User rest driver Client Secret.
--rest-redis-address | $REVA_REST_REDIS_ADDRESS
: Address for redis server. Default: `localhost:6379`.
--rest-redis-username | $REVA_REST_REDIS_USERNAME
: Username for redis server.
--rest-redis-password | $REVA_REST_REDIS_PASSWORD
: Password for redis server.
--rest-id-provider | $REVA_REST_ID_PROVIDER
: The OIDC Provider.
--rest-api-base-url | $REVA_REST_API_BASE_URL
: Base API Endpoint.
--rest-oidc-token-endpoint | $REVA_REST_OIDC_TOKEN_ENDPOINT
: Endpoint to generate token to access the API.
--rest-target-api | $REVA_REST_TARGET_API
: The target application.
### ocis-reva reva-storage-public-link
Start reva storage-public-link service
Usage: `ocis-reva reva-storage-public-link [command options] [arguments...]`
--debug-addr | $REVA_STORAGE_PUBLIC_LINK_DEBUG_ADDR
: Address to bind debug server. Default: `0.0.0.0:9179`.
--network | $REVA_STORAGE_PUBLIC_LINK_NETWORK
: Network to use for the reva service, can be 'tcp', 'udp' or 'unix'. Default: `tcp`.
--protocol | $REVA_STORAGE_PUBLIC_LINK_PROTOCOL
: protocol for reva service, can be 'http' or 'grpc'. Default: `grpc`.
--addr | $REVA_STORAGE_PUBLIC_LINK_ADDR
: Address to bind reva service. Default: `0.0.0.0:9178`.
--url | $REVA_STORAGE_PUBLIC_LINK_URL
: Address to bind reva service. Default: `localhost:9178`.
--mount-path | $REVA_STORAGE_PUBLIC_LINK_MOUNT_PATH
: mount path. Default: `/public/`.
--gateway-url | $REVA_GATEWAY_URL
: URL to use for the reva gateway service. Default: `localhost:9142`.

View File

@@ -0,0 +1,56 @@
---
title: "Getting Started"
date: 2018-05-02T00:00:00+00:00
weight: 15
geekdocRepo: https://github.com/owncloud/ocis-reva
geekdocEditPath: edit/master/docs
geekdocFilePath: getting-started.md
---
{{< toc >}}
## Installation
So far we are offering two different variants for the installation. You can choose between [Docker](https://www.docker.com/) or pre-built binaries which are stored on our download mirrors and GitHub releases. Maybe we will also provide system packages for the major distributions later if we see the need for it.
### Docker
Docker images for ocis-reva are hosted on https://hub.docker.com/r/owncloud/ocis-reva.
The `latest` tag always reflects the current master branch.
```console
docker pull owncloud/ocis-reva
```
#### Dependencies
- Running ocis-reva currently needs a working Redis caching server
- The default storage location in the container is `/var/tmp/reva/data`. You may want to create a volume to persist the files in the primary storage
### Binaries
The pre-built binaries for different platforms are downloadable at https://download.owncloud.com/ocis/ocis-reva/ . Specific releases are organized in separate folders. They are in sync which every release tag on GitHub. The binaries from the current master branch can be found in https://download.owncloud.com/ocis/ocis-reva/testing/
```console
curl https://download.owncloud.com/ocis/ocis/1.0.0-beta1/ocis-reva-1.0.0-beta1-darwin-amd64 --output ocis-reva
chmod +x ocis
./ocis-reva sharing
```
#### Dependencies
- Running ocis currently needs a working Redis caching server
- The default promary storage location is `/var/tmp/reva/data`. You can change that value by configuration.
## Usage
The program provides a few sub-commands on execution. The available configuration methods have already been mentioned above. Generally you can always see a formated help output if you execute the binary via `ocis-reva --help`.
### Health
The health command is used to execute a health check, if the exit code equals zero the service should be up and running, if the exist code is greater than zero the service is not in a healthy state. Generally this command is used within our Docker containers, it could also be used within Kubernetes.
{{< highlight txt >}}
ocis-reva health --help
{{< / highlight >}}

10
reva/docs/license.md Normal file
View File

@@ -0,0 +1,10 @@
---
title: "License"
date: 2018-05-02T00:00:00+00:00
weight: 40
geekdocRepo: https://github.com/owncloud/ocis-reva
geekdocEditPath: edit/master/docs
geekdocFilePath: license.md
---
This project is licensed under the [Apache 2.0](https://github.com/owncloud/ocis-reva/blob/master/LICENSE) license. For the license of the used libraries you have to check the respective sources.

47
reva/docs/releasing.md Normal file
View File

@@ -0,0 +1,47 @@
---
title: "Releasing"
date: 2020-05-22T00:00:00+00:00
weight: 60
geekdocRepo: https://github.com/owncloud/ocis-reva
geekdocEditPath: edit/master/docs
geekdocFilePath: releasing.md
---
{{< toc >}}
To release a new version of ocis-reva, you have to follow a few simple steps.
## Preparation
1. Before releasing, make sure that reva has been [updated to the desired version]({{< ref "updating.md" >}})
2. Create a new branch e.g. `release-x.x.x` where `x.x.x` is the version you want to release.
3. Checkout the preparation branch.
4. Create a new changelog folder and move the unreleased snippets there.
{{< highlight txt >}}
mkdir changelog/x.x.x_yyyy-MM-dd/ # yyyy-MM-dd is the current date
mv changelog/unreleased/* changelog/x.x.x_yyyy-MM-dd/
{{< / highlight >}}
5. Commit and push the changes
{{< highlight txt >}}
git add --all
git commit -m "prepare release x.x.x"
git push origin release-x.x.x
{{< / highlight >}}
6. Create a pull request to the master branch.
## Release
1. After the preparation branch has been merged update your local master.
2. [Wait for CI](https://cloud.drone.io/owncloud/ocis-reva) to generate a commit for the changelog update
3. Check out master (or make sure to check out the generated changelog commit in case of subsequent merges)
{{< highlight txt >}}
git checkout master
git pull origin master
{{< / highlight >}}
4. Create a new tag (preferably signed) and replace the version number accordingly.
{{< highlight txt >}}
git tag -s vx.x.x -m "release vx.x.x"
git push origin vx.x.x
{{< / highlight >}}
5. Wait for CI and check that the GitHub release was published.
Congratulations, you just released ocis-reva!

194
reva/docs/storages.md Normal file
View File

@@ -0,0 +1,194 @@
---
title: "Storages"
date: 2020-04-27T18:46:00+01:00
weight: 37
geekdocRepo: https://github.com/owncloud/ocis-reva
geekdocEditPath: edit/master/docs
geekdocFilePath: storages.md
---
## Storage commands
`ocis-reva` has multiple storage provider commands to preconfigure different default configurations for the reva *storage provider* service. While you could rerun `ocis-reva storage-oc` multiple times with different flags to get multiple instances we are giving the different commands the necessary default configuration to allow the `ocis` binary to simply start them and not deal with configuration.
## Storage providers
To manage the file tree ocis uses reva *storage providers* that are accessing the underlying storage using a *storage driver*. The driver can be used to change the implementation of a storage aspect to better reflect the actual underlying storage capabilities. As an example a move operation on a POSIX filesystem ([theoretically](https://danluu.com/deconstruct-files/)) is an atomic operation. When trying to implement a file tree on top of S3 there is no native move operation that can be used. A naive implementation might fall back on a COPY and DELETE. Some S3 implementations provide a COPY operation that uses an existing key as the source, so the file at least does not need to be reuploaded. In the worst case scenario, which is renaming a folder with hundreds of thousands of objects, a reupload for every file has to be made. Instead of hiding this complexity a better choice might be to disable renaming of files or at least folders on S3. There are however implementations of filesystems on top of S3 that store the tree metadata in dedicated objects or use a completely different persistence mechanism like a distributed key value store to implement the file tree aspect of a storage.
{{< hint info >}}
While the *storage provider* is responsible for managing the tree, file up and download is delegated to a dedicated *data provider*. See below.
{{< /hint >}}
## Storage aspects
A lot of different storage technologies exist, ranging from general purpose file systems with POSIX semantics to software defined storage with multiple APIs. Choosing any of them is making a tradeoff decision. Or, if a storage technology is already in place it automatically predetermines the capabilities that can be made available. *Not all storage systems are created equal.*
Unfortunately, no POSIX filesystem natively supports all storage aspects that ownCloud 10 requires:
### A hierarchical file tree
An important aspect of a filesystem is organizing files and directories in a file hierarchy, or tree. It allows you to create, move and delete nodes. Beside the name a node also has well known metadata like size and mtime that are persisted in the tree as well.
{{< hint info >}}
**Folders are not directories**
There is a difference between *folder* and *directory*: a *directory* is a file system concept. A *folder* is a metaphor for the concept of a physical file folder. There are also *virtual folders* or *smart folders* like the recent files folder which are no file system *directories*. So, every *directory* and every *virtual folder* is a *folder*, but not every *folder* is a *directory*. See [the folder metaphor in wikipedia](https://en.wikipedia.org/wiki/Directory_(computing)#Folder_metaphor). Also see the activity history below.
{{< /hint >}}
#### Id based lookup
While traditionally nodes in the tree are reached by traversing the path the tree persistence should be prepared to look up a node by an id. Think of an inode in a POSIX filesystem. If this operation needs to be cached for performance reasons keep in mind that cache invalidation is hard and crawling all files to update the inode to path mapping takes O(n), not O(1).
#### ETag propagation
For the state based sync a client can discover changes by recursively descending the tree and comparing the ETag for every node. If the storage technology supports propagating ETag changes up the tree, only the root node of a tree needs to be checked to determine if a discovery needs to be started and which nodes need to be traversed. This allows using the storage technology itself to persist all metadata that is necessary for sync, without additional services or caches.
#### Subtree size accounting
The tree can keep track of how many bytes are stored in a folder. Similar to ETag propagation a change in file size is propagated up the hierarchy.
{{< hint info >}}
**ETag and Size propagation**
When propagating the ETag (mtime) and size changes up the tree the question is where to stop. If all changes need to be propagated to the root of a storage then the root or busy folders will become a hotspot. There are two things to keep in mind: 1. propagation only happens up to the root of a single space (a user private drive or a single group drive), 2. no cross storage propagation. The latter was used in oc10 to let clients detect when a file in a received shared folder changed. This functionality is moving to the storage registry which caches the ETag for every root so clients can discover if and which storage changed.
{{< /hint >}}
#### Rename
Depending on the underlying storage technology some operations may either be slow, up to a point where it makes more sense to disable them entirely. One example is a folder rename: on S3 a *simple* folder rename translates to a copy and delete operation for every child of the renamed folder. There is an exception though: this restriction only applies if the S3 storage is treated like a filesystem, where the keys are the path and the value is the file content. There are smarter ways to implement file systems on top of S3, but again: there is always a tradeoff.
{{< hint info >}}
**S3 has no rename**
Technically, [S3 has no rename operation at all](https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/examples-s3-objects.html#copy-object). By design, the location of the value is determined by the key, so it always has to do a copy and delete. Another example is the [redis RENAME operation](https://redis.io/commands/rename): while being specified as O(1) it *executes an implicit DEL operation, so if the deleted key contains a very big value it may cause high latency...*
{{< /hint >}}
#### Arbitrary metadata persistence
In addition to well known metadata like name size and mtime, users might be able to add arbitrary metadata like tags, comments or [dublin core](https://en.wikipedia.org/wiki/Dublin_Core). In POSIX filesystems this maps to extended attributes.
### Grant persistence
The CS3 API uses grants to describe access permissions. Storage systems have a wide range of permissions granularity and not all grants may be supported by every storage driver. POSIX ACLs for example have no expiry. If the storage system does not support certain grant properties, e.g. expiry, then the storage driver may choose to implement them in a different way. Expiries could be persisted in a different way and checked periodically to remove the grants. Again: every decision is a tradeoff.
### Trash persistence
After deleting a node the storage allows listing the deleted nodes and has an undo mechanism for them.
### Versions persistence
A user can restore a previous version of a file.
{{< hint info >}}
**Snapshots are not versions**
Modern POSIX filesystems support snapshotting of volumes. This is different from keeping track of versions to a file or folder, but might be another implementation strategy for a storage driver to allow users to restore content.
{{< /hint >}}
### Activity History
The storage keeps an activity history, tracking the different actions that have been performed. This does not only include file changes but also metadata changes like renames and permission changes.
## Storage drivers
Reva currently has four storage driver implementations that can be used for *storage providers* an well as *data providers*.
### Local Storage Driver
The *minimal* storage driver for a POSIX based filesystem. It literally supports none of the storage aspect other than basic file tree management. Sharing can - to a degree - be implemented using POSIX ACLs.
- tree provided by a POSIX filesystem
- inefficient path by id lookup, currently uses the file path as id, so ids are not stable
- can store a uuid in extended attributes and use a cache to look them up, similar to the ownCloud driver
- no native ETag propagation, five options are available:
- built in propagation (changes bypassing ocis are not picked up until a rescan)
- built in inotify (requires 48 bytes of RAM per file, needs to keep track of every file and folder)
- external inotify (same RAM requirement, but could be triggered by external tools, e.g. a workflow engine)
- kernel audit log (use the linux kernel audit to capture file events on the storage and offload them to a queue)
- fuse filesystem overlay
- no subtree accounting, same options as for ETag propagation
- efficient rename
- arbitrary metadata using extended attributes
- grant persistence
- using POSIX ACLs
- requires an LDAP server to make guest accounts available in the OS
- OCIS has glauth which contains all users
- an existing LDAP could be used if guests ar provisioned in another way
- using extended attributes to implement expiry or sharing that does not require OS level integration
- fuse filesystem overlay
- no native trash
- could use the [The FreeDesktop.org Trash specification](https://specifications.freedesktop.org/trash-spec/trashspec-latest.html)
- fuse filesystem overlay
- no native versions, multiple options possible
- git for folders
- rcs for single files
- rsnapshot for hourly / daily / weekly / monthly backups ... but this is not versioning as known from oc10
- design new freedesktop spec, basically what is done in oc10 without the limitations or borrow ideas from the freedesktop trash spec
- fuse filesystem overlay
To provide the other storage aspects we plan to implement a FUSE overlay filesystem which will add the different aspects on top of local filesystems like ext4, btrfs or xfs. It should work on NFSv45 as well, although NFSv4 supports RichACLs and we will explore how to leverage them to implement sharing at a future date. The idea is to use the storages native capabilities to deliver the best user experience. But again: that means making the right tradeoffs.
### OwnCloud Storage Driver
This is the current default storage driver. While it implements the file tree (using redis, including id based lookup), ETag propagation, trash, versions and sharing (including expiry) using the data directory layout of ownCloud 10 it has [known limitations](https://github.com/owncloud/core/issues/28095) that cannot be fixed without changing the actual layout on disk.
To setup it up properly in a distributed fashion, the storage-home and the storage-oc need to share the same underlying FS. Their "data" counterparts also need access to the same shared FS.
For a simple docker-compose setup, you can create a volume which will be used by the "ocis-reva-storage-home", "ocis-reva-storage-home-data", "ocis-reva-storage-oc" and "ocis-reva-storage-oc-data" containers. Using the `owncloud/ocis-reva` docker image, the volume would need to be hooked in the `/var/tmp/reva` folder insde the containers.
- tree provided by a POSIX filesystem
- file layout is mapped to the old ownCloud 10 layout
- the root of tree for a user on disk is prefixed with `/path/to/data/<username>/files/`
- efficient path by id lookup
- all files and folders get assigned a uuid in the extended attributes
- when starting the storage provider it will walk all files to populate a redis kv store for uuid to path lookup
- slow to boot trees with lots of nodes
- build in ETag propagation
- ETags are calculated based on mtime
- mtime is propagated by the storage driver
- changes bypassing ocis are not picked up until a restart of the storage provider
- no subtree accounting, same options as for local storage
- efficient rename
- TODO [update the kv store for path lookup](https://github.com/cs3org/reva/issues/985), this is an O(n) operation
- arbitrary metadata using extended attributes
- grant persistence
- using custom ACLs that are stored as extended attributes
- a grant corresponds to one extended attribute of 40-100 bytes, effectively limiting the number of shares to ~100-40
- extended attributes have varying limitations, based on the underlying filesystem
- the linux kernel imposes a limit of 255bytes per name and 64KiB per value
- ext2/3/4: total bytes for all attributes of a file is limited to 4KiB (a filesystem block)
- xfs: limit of 64KiB per value
- btrfs: total bytes used for the name, value, and implementation overhead bytes 16KiB (the default filesystem nodesize value)
- does not require OS level integration
- built in trash
- trashed files are moved to `/path/to/data/<username>/files_trashbin/`
- trashed files are appended a timestamp `.d<unixtime>`, which [breaks trashing of files that reach the filesystems specific name limit](https://github.com/owncloud/core/issues/28095)
- built in versions
- file versions are stored in `/path/to/data/<username>/files_versions/`
- file versions are appended a timestamp `.d<unixtime>`, which [breaks versioning of files that reach the filesystems specific name limit](https://github.com/owncloud/core/issues/28095)
### EOS Storage Driver
The CERN eos storage has evolved with ownCloud and natively supports id based lookup, ETag propagation, subtree size accounting, sharing, trash and versions. To use it you need to change the default configuration of the `ocis-reva storage-home` command (or have a look at the Makefile ̀ eos-start` target):
```
export REVA_STORAGE_HOME_DRIVER=eos
export REVA_STORAGE_EOS_NAMESPACE=/eos
export REVA_STORAGE_EOS_MASTER_URL="root://eos-mgm1.eoscluster.cern.ch:1094"
export REVA_STORAGE_EOS_ENABLE_HOME=true
export REVA_STORAGE_EOS_LAYOUT="dockertest/{{.Username}}"
```
Running it locally also requires the `eos` and `xrootd` binaries. Running it using `make eos-start` will use CentOS based containers that already have the necessary packages installed.
{{< hint info >}}
Pull requests to add explicit `reva storage-(s3|custom|...)` commands with working defaults are welcome.
{{< /hint >}}
### S3 Storage Driver
A naive driver that treats the keys in an S3 capable storage as `/` delimited path names. While it does not support MOVE or ETag propagation it can be used to read and write files. Better integration with native capabilities like versioning is possible but depends on the Use Case. Several storage solutions that provide an S3 interface also support some form of notifications that can be used to implement ETag propagation.
## Data Providers
Clients using the CS3 API use an [InitiateFileDownload](https://cs3org.github.io/cs3apis/#cs3.storage.provider.v1beta1.InitiateFileDownloadRequest) and ]InitiateUpload](https://cs3org.github.io/cs3apis/#cs3.storage.provider.v1beta1.InitiateFileUploadRequest) request at the [reva gateway](https://cs3org.github.io/cs3apis/#cs3.gateway.v1beta1.GatewayAPI) to obtain a URL endpoint that can be used to either GET the file content or upload content using the resumable [tus.io](https://tus.io) protocol.
The *data provider* uses the same *storage driver* as the *storage provider* but can be scaled independently.
The dataprovider allows uploading the file to a quarantine area where further data analysis may happen before making the file accessible again. One use case for this is anti virus scanning for files coming from untrusted sources.
## Future work
### FUSE overlay filesystem
We are planning to further separate the concerns and use a local storage provider with a FUSE filesystem overlaying the actual POSIX storage that can be used to capture deletes and writes that might happen outside of ocis/reva.
It would allow us to extend the local storage driver with missing storage aspects while keeping a tree like filesystem that end users are used to see when sshing into the machine.
### Upload to Quarantine area
Antivirus scanning of random files uploaded from untrusted sources and executing metadata extraction or thumbnail generation should happen in a sandboxed system to prevent malicious users from gaining any information about the system. By spawning a new container with access to only the uploaded data we can further limit the attack surface.

148
reva/docs/testing.md Normal file
View File

@@ -0,0 +1,148 @@
---
title: "Testing"
date: 2018-05-02T00:00:00+00:00
weight: 37
geekdocRepo: https://github.com/owncloud/ocis-reva
geekdocEditPath: edit/master/docs
geekdocFilePath: testing.md
---
## API Acceptance tests
We are using the ownCloud 10 API acceptance testsuite against ocis. To set this up you need the owncloud 10 core repo, a ldap server that the acceptance tests can use to manage users, a redis server for file-versions and the ocis-reva code.
### Getting the tests
All you need to do to get the acceptance tests is check out the core repo:
```
git clone https://github.com/owncloud/core.git
```
### Run a ldap server in a docker container
The ownCloud 10 acceptance tests will need write permission. You can start a suitable ldap server in a docker container with:
```
docker run --hostname ldap.my-company.com \
-e LDAP_TLS_VERIFY_CLIENT=never \
-e LDAP_DOMAIN=owncloud.com \
-e LDAP_ORGANISATION=ownCloud \
-e LDAP_ADMIN_PASSWORD=admin \
--name docker-slapd \
-p 127.0.0.1:389:389 \
-p 636:636 -d osixia/openldap
```
### Run a redis server in a docker container
File versions need a redis server. Start one with docker by using:
`docker run -e REDIS_DATABASES=1 -p 6379:6379 -d webhippie/redis:latest`
### Run ocis-reva with that ldap server
`ocis-reva` provides multiple subcommands. To configure them all via env vars you can export these environment variables.
```
export REVA_USERS_DRIVER=ldap
export REVA_LDAP_HOSTNAME=localhost
export REVA_LDAP_PORT=636
export REVA_LDAP_BASE_DN='dc=owncloud,dc=com'
export REVA_LDAP_USERFILTER='(&(objectclass=posixAccount)(cn=%s))'
export REVA_LDAP_GROUPFILTER='(&(objectclass=posixGroup)(cn=%s))'
export REVA_LDAP_BIND_DN='cn=admin,dc=owncloud,dc=com'
export REVA_LDAP_BIND_PASSWORD=admin
export REVA_LDAP_SCHEMA_UID=uid
export REVA_LDAP_SCHEMA_MAIL=mail
export REVA_LDAP_SCHEMA_DISPLAYNAME=displayName
export REVA_LDAP_SCHEMA_CN=cn
export REVA_FRONTEND_URL=http://localhost:9140 # needed because the proxy is not started
export REVA_DATAGATEWAY_URL=http://localhost:9140/data # needed because the proxy is not started
```
Then you need to start the ocis-reva services
```
bin/ocis-reva frontend & \
bin/ocis-reva gateway & \
bin/ocis-reva auth-basic & \
bin/ocis-reva auth-bearer & \
bin/ocis-reva sharing & \
bin/ocis-reva storage-home & \
bin/ocis-reva storage-home-data & \
bin/ocis-reva storage-oc & \
bin/ocis-reva storage-oc-data & \
bin/ocis-reva users &
```
### Run the API acceptance tests
In the ownCloud 10 core repo run
```
make test-acceptance-api \
TEST_SERVER_URL=http://localhost:9140 \
TEST_EXTERNAL_USER_BACKENDS=true \
TEST_OCIS=true \
OCIS_REVA_DATA_ROOT=/var/tmp/reva/ \
BEHAT_FILTER_TAGS='~@notToImplementOnOCIS&&~@toImplementOnOCIS&&~@preview-extension-required' \
SKELETON_DIR=apps/testing/data/apiSkeleton
```
Make sure to adjust the settings `TEST_SERVER_URL`,`OCIS_REVA_DATA_ROOT` and `SKELETON_DIR` according to your environment.
This will run all tests that are relevant to OCIS.
To run a single test add `BEHAT_FEATURE=<feature file>` and specify the path to the feature file and an optional line number. For example: `BEHAT_FEATURE='tests/acceptance/features/apiWebdavUpload1/uploadFile.feature:12'`
### use existing tests for BDD
As a lot of scenarios are written for oC10, we can use those tests for Behaviour driven development in ocis.
Every scenario that does not work in OCIS with OC storage, is listed in `tests/acceptance/expected-failures-on-OC-storage.txt` with a link to the related issue.
Similarly, scenarios that do not work in OCIS with EOS storage are listed in `tests/acceptance/expected-failures-on-EOS-storage.txt`.
Scenarios from the oC10 API acceptance tests 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.
Additionally, some issues have scenarios that demonstrate the current buggy behaviour in ocis(reva).
Those scenarios are in this ocis-reva repository in `tests/acceptance/features/apiOcisSpecific`.
Have a look into the [documentation](https://doc.owncloud.com/server/developer_manual/testing/acceptance-tests.html#writing-scenarios-for-bugs) to understand why we are writing those tests.
Also, ocis behaves partly differently with EOS-Storage and OC-Storage. There are scenarios that do not work in OCIS when run on EOS-storage, but works when on OC-Storage, and vice-versa. For those kind of scenarios, ` @skipOnOcis-EOS-Storage` and `@skipOnOcis-OC-Storage` tags are used. For instance, for a scenario that fails on EOS-Storage but passes on OC-Storage, we use `@skipOnOcis-EOS-Storage` tag to let it run on OC-Storage, where it works as expected, instead of skipping the test completely.
If you want to work on a specific issue
1. adjust the core commit id to the latest commit in core so that CI will run the latest test code and scenarios from core.
For that change `coreCommit` in the `config` section:
config = {
'apiTests': {
'coreBranch': 'master',
'coreCommit': 'a06b1bd5ba8e5244bfaf7fa04f441961e6fb0daa',
'numberOfParts': 2
}
}
2. locally run each of the tests marked with that issue in the expected failures file:
E.g.:
```
make test-acceptance-api \
TEST_SERVER_URL=http://localhost:9140 \
TEST_EXTERNAL_USER_BACKENDS=true \
TEST_OCIS=true \
OCIS_REVA_DATA_ROOT=/var/tmp/reva/ \
BEHAT_FEATURE='tests/acceptance/features/apiComments/comments.feature:123'
```
3. the tests will fail, try to understand how and why they are failing
4. fix the code
5. go back to 2. and repeat till the tests are passing.
6. remove those tests from the expected failures file.
7. run each of the local tests that were demonstrating the **buggy** behavior. They should fail.
8. delete each of the local tests that were demonstrating the **buggy** behavior.
9. make a PR that has the fixed code, relevant lines removed from the expected failures file and bug demonstration tests deleted.
If the changes also affect the `ocis` repository make sure the changes get ported over there.
That will need the fixed code in `ocis-reva` to be applied to `ocis` along with the test-related changes.
### Notes
- in a normal case the test-code cleans up users after the test-run, but if a test-run is interrupted (e.g. by CTRL+C) users might have been left on the LDAP server. In that case rerunning the tests requires wiping the users in the ldap server, otherwise the tests will fail when trying to populate the users. This can be done by simply running `docker stop docker-slapd && docker rm docker-slapd` and [restarting the LDAP server container](#run-a-ldap-server-in-a-docker-container)
- the tests usually create users in the OU `TestUsers` with usernames specified in the feature file. If not defined in the feature file, most users have the password `123456`, defined by `regularUserPassword` in `behat.yml`, but other passwords are also used, see [`\FeatureContext::getPasswordForUser()`](https://github.com/owncloud/core/blob/master/tests/acceptance/features/bootstrap/FeatureContext.php#L386) for mapping and [`\FeatureContext::__construct`](https://github.com/owncloud/core/blob/master/tests/acceptance/features/bootstrap/FeatureContext.php#L1668) for the password definitions.

19
reva/docs/updating.md Normal file
View File

@@ -0,0 +1,19 @@
---
title: "Updating reva"
date: 2020-05-22T00:00:00+00:00
weight: 50
geekdocRepo: https://github.com/owncloud/ocis-reva
geekdocEditPath: edit/master/docs
geekdocFilePath: updating.md
---
{{< toc >}}
## Updating reva
1. Run `go get github.com/cs3org/reva@master`
2. Create a changelog entry containing changes that were done in [reva](https://github.com/cs3org/reva/commits/master)
3. Create a Pull Request to ocis-reva master with those changes
4. If test issues appear, you might need to [adjust the tests]({{< ref "testing.md" >}})
5. After the PR is merged, consider doing a [release of ocis-reva]({{< ref "releasing.md" >}})

52
reva/docs/users.md Normal file
View File

@@ -0,0 +1,52 @@
---
title: "Users"
date: 2020-01-16T00:00:00+00:00
weight: 35
geekdocRepo: https://github.com/owncloud/ocis-reva
geekdocEditPath: edit/master/docs
geekdocFilePath: users.md
---
### Demo driver
This is a simple user driver for testing. It contains three users:
```
einstein:relativity
marie:radioactivty
richard:superfluidity
```
In order to use the `demo` driver you need to export the relevant environment variable:
```
export REVA_USERS_DRIVER=demo
```
### JSON driver
In order to switch from the `ldap` driver to JSON based users you need to export the relevant environment variables:
```
export REVA_USERS_DRIVER=json
export REVA_USERS_JSON=/path/to/users.json
```
For the format of the users.json have a look at the [reva examples](https://github.com/cs3org/reva/blob/master/examples/separate/users.demo.json)
### LDAP driver
This is the default user driver.
If the below defaults don't match your environment change them accordingly:
```
export REVA_LDAP_HOSTNAME=localhost
export REVA_LDAP_PORT=9126
export REVA_LDAP_BASE_DN='dc=example,dc=org'
export REVA_LDAP_USERFILTER='(&(objectclass=posixAccount)(cn=%s))'
export REVA_LDAP_GROUPFILTER='(&(objectclass=posixGroup)(cn=%s))'
export REVA_LDAP_BIND_DN='cn=reva,ou=sysusers,dc=example,dc=org'
export REVA_LDAP_BIND_PASSWORD=reva
export REVA_LDAP_SCHEMA_UID=uid
export REVA_LDAP_SCHEMA_MAIL=mail
export REVA_LDAP_SCHEMA_DISPLAYNAME=sn
export REVA_LDAP_SCHEMA_CN=cn
```
Then restart the `bin/ocis-reva users` and `bin/ocis-reva auth-basic` services for the changes to take effect.

20
reva/go.mod Normal file
View File

@@ -0,0 +1,20 @@
module github.com/owncloud/ocis-reva
go 1.13
require (
github.com/cs3org/reva v1.2.1-0.20200911111727-51649e37df2d
github.com/gofrs/uuid v3.3.0+incompatible
github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e // indirect
github.com/micro/cli/v2 v2.1.1
github.com/micro/go-micro v1.18.0
github.com/micro/go-micro/v2 v2.0.0
github.com/oklog/run v1.0.0
github.com/owncloud/flaex v0.0.0-20200411150708-dce59891a203
github.com/owncloud/ocis-pkg/v2 v2.2.1
github.com/pelletier/go-toml v1.6.0 // indirect
github.com/prometheus/client_golang v1.7.1 // indirect
github.com/restic/calens v0.2.0
github.com/spf13/viper v1.6.1
gopkg.in/ini.v1 v1.51.1 // indirect
)

1369
reva/go.sum Normal file
View File

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,191 @@
package command
import (
"context"
"os"
"os/signal"
"path"
"time"
"github.com/cs3org/reva/cmd/revad/runtime"
"github.com/gofrs/uuid"
"github.com/micro/cli/v2"
"github.com/oklog/run"
"github.com/owncloud/ocis-reva/pkg/config"
"github.com/owncloud/ocis-reva/pkg/flagset"
"github.com/owncloud/ocis-reva/pkg/server/debug"
)
// AuthBasic is the entrypoint for the auth-basic command.
func AuthBasic(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "auth-basic",
Usage: "Start reva authprovider for basic auth",
Flags: flagset.AuthBasicWithConfig(cfg),
Before: func(c *cli.Context) error {
cfg.Reva.AuthBasic.Services = c.StringSlice("service")
return nil
},
Action: func(c *cli.Context) error {
logger := NewLogger(cfg)
if cfg.Tracing.Enabled {
switch t := cfg.Tracing.Type; t {
case "agent":
logger.Error().
Str("type", t).
Msg("Reva only supports the jaeger tracing backend")
case "jaeger":
logger.Info().
Str("type", t).
Msg("configuring reva to use the jaeger tracing backend")
case "zipkin":
logger.Error().
Str("type", t).
Msg("Reva only supports the jaeger tracing backend")
default:
logger.Warn().
Str("type", t).
Msg("Unknown tracing backend")
}
} else {
logger.Debug().
Msg("Tracing is not enabled")
}
var (
gr = run.Group{}
ctx, cancel = context.WithCancel(context.Background())
//metrics = metrics.New()
)
defer cancel()
{
uuid := uuid.Must(uuid.NewV4())
pidFile := path.Join(os.TempDir(), "revad-"+c.Command.Name+"-"+uuid.String()+".pid")
rcfg := map[string]interface{}{
"core": map[string]interface{}{
"max_cpus": cfg.Reva.Users.MaxCPUs,
"tracing_enabled": cfg.Tracing.Enabled,
"tracing_endpoint": cfg.Tracing.Endpoint,
"tracing_collector": cfg.Tracing.Collector,
"tracing_service_name": "auth-basic",
},
"shared": map[string]interface{}{
"jwt_secret": cfg.Reva.JWTSecret,
},
"grpc": map[string]interface{}{
"network": cfg.Reva.AuthBasic.Network,
"address": cfg.Reva.AuthBasic.Addr,
// TODO build services dynamically
"services": map[string]interface{}{
"authprovider": map[string]interface{}{
"auth_manager": cfg.Reva.AuthProvider.Driver,
"auth_managers": map[string]interface{}{
"json": map[string]interface{}{
"users": cfg.Reva.AuthProvider.JSON,
},
"ldap": map[string]interface{}{
"hostname": cfg.Reva.LDAP.Hostname,
"port": cfg.Reva.LDAP.Port,
"base_dn": cfg.Reva.LDAP.BaseDN,
"loginfilter": cfg.Reva.LDAP.LoginFilter,
"bind_username": cfg.Reva.LDAP.BindDN,
"bind_password": cfg.Reva.LDAP.BindPassword,
"idp": cfg.Reva.LDAP.IDP,
"schema": map[string]interface{}{
"dn": "dn",
"uid": cfg.Reva.LDAP.Schema.UID,
"mail": cfg.Reva.LDAP.Schema.Mail,
"displayName": cfg.Reva.LDAP.Schema.DisplayName,
"cn": cfg.Reva.LDAP.Schema.CN,
},
},
},
},
},
},
}
gr.Add(func() error {
runtime.RunWithOptions(
rcfg,
pidFile,
runtime.WithLogger(&logger.Logger),
)
return nil
}, func(_ error) {
logger.Info().
Str("server", c.Command.Name).
Msg("Shutting down server")
cancel()
})
}
{
server, err := debug.Server(
debug.Name(c.Command.Name+"-debug"),
debug.Addr(cfg.Reva.AuthBasic.DebugAddr),
debug.Logger(logger),
debug.Context(ctx),
debug.Config(cfg),
)
if err != nil {
logger.Info().
Err(err).
Str("server", "debug").
Msg("Failed to initialize server")
return err
}
gr.Add(func() error {
return server.ListenAndServe()
}, func(_ error) {
ctx, timeout := context.WithTimeout(ctx, 5*time.Second)
defer timeout()
defer cancel()
if err := server.Shutdown(ctx); err != nil {
logger.Info().
Err(err).
Str("server", "debug").
Msg("Failed to shutdown server")
} else {
logger.Info().
Str("server", "debug").
Msg("Shutting down server")
}
})
}
{
stop := make(chan os.Signal, 1)
gr.Add(func() error {
signal.Notify(stop, os.Interrupt)
<-stop
return nil
}, func(err error) {
close(stop)
cancel()
})
}
return gr.Run()
},
}
}

View File

@@ -0,0 +1,179 @@
package command
import (
"context"
"os"
"os/signal"
"path"
"time"
"github.com/cs3org/reva/cmd/revad/runtime"
"github.com/gofrs/uuid"
"github.com/micro/cli/v2"
"github.com/oklog/run"
"github.com/owncloud/ocis-reva/pkg/config"
"github.com/owncloud/ocis-reva/pkg/flagset"
"github.com/owncloud/ocis-reva/pkg/server/debug"
)
// AuthBearer is the entrypoint for the auth-bearer command.
func AuthBearer(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "auth-bearer",
Usage: "Start reva authprovider for bearer auth",
Flags: flagset.AuthBearerWithConfig(cfg),
Before: func(c *cli.Context) error {
cfg.Reva.AuthBearer.Services = c.StringSlice("service")
return nil
},
Action: func(c *cli.Context) error {
logger := NewLogger(cfg)
if cfg.Tracing.Enabled {
switch t := cfg.Tracing.Type; t {
case "agent":
logger.Error().
Str("type", t).
Msg("Reva only supports the jaeger tracing backend")
case "jaeger":
logger.Info().
Str("type", t).
Msg("configuring reva to use the jaeger tracing backend")
case "zipkin":
logger.Error().
Str("type", t).
Msg("Reva only supports the jaeger tracing backend")
default:
logger.Warn().
Str("type", t).
Msg("Unknown tracing backend")
}
} else {
logger.Debug().
Msg("Tracing is not enabled")
}
var (
gr = run.Group{}
ctx, cancel = context.WithCancel(context.Background())
//metrics = metrics.New()
)
defer cancel()
{
uuid := uuid.Must(uuid.NewV4())
pidFile := path.Join(os.TempDir(), "revad-"+c.Command.Name+"-"+uuid.String()+".pid")
rcfg := map[string]interface{}{
"core": map[string]interface{}{
"max_cpus": cfg.Reva.Users.MaxCPUs,
"tracing_enabled": cfg.Tracing.Enabled,
"tracing_endpoint": cfg.Tracing.Endpoint,
"tracing_collector": cfg.Tracing.Collector,
"tracing_service_name": "auth-bearer",
},
"shared": map[string]interface{}{
"jwt_secret": cfg.Reva.JWTSecret,
},
"grpc": map[string]interface{}{
"network": cfg.Reva.AuthBearer.Network,
"address": cfg.Reva.AuthBearer.Addr,
// TODO build services dynamically
"services": map[string]interface{}{
"authprovider": map[string]interface{}{
"auth_manager": "oidc",
"auth_managers": map[string]interface{}{
"oidc": map[string]interface{}{
"issuer": cfg.Reva.OIDC.Issuer,
"insecure": cfg.Reva.OIDC.Insecure,
"id_claim": cfg.Reva.OIDC.IDClaim,
"uid_claim": cfg.Reva.OIDC.UIDClaim,
"gid_claim": cfg.Reva.OIDC.GIDClaim,
},
},
},
},
},
}
gr.Add(func() error {
runtime.RunWithOptions(
rcfg,
pidFile,
runtime.WithLogger(&logger.Logger),
)
return nil
}, func(_ error) {
logger.Info().
Str("server", c.Command.Name).
Msg("Shutting down server")
cancel()
})
}
{
server, err := debug.Server(
debug.Name(c.Command.Name+"-debug"),
debug.Addr(cfg.Reva.AuthBearer.DebugAddr),
debug.Logger(logger),
debug.Context(ctx),
debug.Config(cfg),
)
if err != nil {
logger.Info().
Err(err).
Str("server", "debug").
Msg("Failed to initialize server")
return err
}
gr.Add(func() error {
return server.ListenAndServe()
}, func(_ error) {
ctx, timeout := context.WithTimeout(ctx, 5*time.Second)
defer timeout()
defer cancel()
if err := server.Shutdown(ctx); err != nil {
logger.Info().
Err(err).
Str("server", "debug").
Msg("Failed to shutdown server")
} else {
logger.Info().
Str("server", "debug").
Msg("Shutting down server")
}
})
}
{
stop := make(chan os.Signal, 1)
gr.Add(func() error {
signal.Notify(stop, os.Interrupt)
<-stop
return nil
}, func(err error) {
close(stop)
cancel()
})
}
return gr.Run()
},
}
}

102
reva/pkg/command/drivers.go Normal file
View File

@@ -0,0 +1,102 @@
package command
import (
"github.com/owncloud/ocis-reva/pkg/config"
)
func drivers(cfg *config.Config) map[string]interface{} {
return map[string]interface{}{
"eos": map[string]interface{}{
"namespace": cfg.Reva.Storages.EOS.Root,
"shadow_namespace": cfg.Reva.Storages.EOS.ShadowNamespace,
"uploads_namespace": cfg.Reva.Storages.EOS.UploadsNamespace,
"share_folder": cfg.Reva.Storages.EOS.ShareFolder,
"eos_binary": cfg.Reva.Storages.EOS.EosBinary,
"xrdcopy_binary": cfg.Reva.Storages.EOS.XrdcopyBinary,
"master_url": cfg.Reva.Storages.EOS.MasterURL,
"slave_url": cfg.Reva.Storages.EOS.SlaveURL,
"cache_directory": cfg.Reva.Storages.EOS.CacheDirectory,
"sec_protocol": cfg.Reva.Storages.EOS.SecProtocol,
"keytab": cfg.Reva.Storages.EOS.Keytab,
"single_username": cfg.Reva.Storages.EOS.SingleUsername,
"enable_logging": cfg.Reva.Storages.EOS.EnableLogging,
"show_hidden_sys_files": cfg.Reva.Storages.EOS.ShowHiddenSysFiles,
"force_single_user_mode": cfg.Reva.Storages.EOS.ForceSingleUserMode,
"use_keytab": cfg.Reva.Storages.EOS.UseKeytab,
"gatewaysvc": cfg.Reva.Storages.EOS.GatewaySVC,
},
"eoshome": map[string]interface{}{
"namespace": cfg.Reva.Storages.EOS.Root,
"shadow_namespace": cfg.Reva.Storages.EOS.ShadowNamespace,
"uploads_namespace": cfg.Reva.Storages.EOS.UploadsNamespace,
"share_folder": cfg.Reva.Storages.EOS.ShareFolder,
"eos_binary": cfg.Reva.Storages.EOS.EosBinary,
"xrdcopy_binary": cfg.Reva.Storages.EOS.XrdcopyBinary,
"master_url": cfg.Reva.Storages.EOS.MasterURL,
"slave_url": cfg.Reva.Storages.EOS.SlaveURL,
"cache_directory": cfg.Reva.Storages.EOS.CacheDirectory,
"sec_protocol": cfg.Reva.Storages.EOS.SecProtocol,
"keytab": cfg.Reva.Storages.EOS.Keytab,
"single_username": cfg.Reva.Storages.EOS.SingleUsername,
"user_layout": cfg.Reva.Storages.EOS.UserLayout,
"enable_logging": cfg.Reva.Storages.EOS.EnableLogging,
"show_hidden_sys_files": cfg.Reva.Storages.EOS.ShowHiddenSysFiles,
"force_single_user_mode": cfg.Reva.Storages.EOS.ForceSingleUserMode,
"use_keytab": cfg.Reva.Storages.EOS.UseKeytab,
"gatewaysvc": cfg.Reva.Storages.EOS.GatewaySVC,
},
"eosgrpc": map[string]interface{}{
"namespace": cfg.Reva.Storages.EOS.Root,
"shadow_namespace": cfg.Reva.Storages.EOS.ShadowNamespace,
"share_folder": cfg.Reva.Storages.EOS.ShareFolder,
"eos_binary": cfg.Reva.Storages.EOS.EosBinary,
"xrdcopy_binary": cfg.Reva.Storages.EOS.XrdcopyBinary,
"master_url": cfg.Reva.Storages.EOS.MasterURL,
"master_grpc_uri": cfg.Reva.Storages.EOS.GrpcURI,
"slave_url": cfg.Reva.Storages.EOS.SlaveURL,
"cache_directory": cfg.Reva.Storages.EOS.CacheDirectory,
"sec_protocol": cfg.Reva.Storages.EOS.SecProtocol,
"keytab": cfg.Reva.Storages.EOS.Keytab,
"single_username": cfg.Reva.Storages.EOS.SingleUsername,
"user_layout": cfg.Reva.Storages.EOS.UserLayout,
"enable_logging": cfg.Reva.Storages.EOS.EnableLogging,
"show_hidden_sys_files": cfg.Reva.Storages.EOS.ShowHiddenSysFiles,
"force_single_user_mode": cfg.Reva.Storages.EOS.ForceSingleUserMode,
"use_keytab": cfg.Reva.Storages.EOS.UseKeytab,
"enable_home": cfg.Reva.Storages.EOS.EnableHome,
"gatewaysvc": cfg.Reva.Storages.EOS.GatewaySVC,
},
"local": map[string]interface{}{
"root": cfg.Reva.Storages.Local.Root,
"share_folder": cfg.Reva.Storages.Local.ShareFolder,
},
"localhome": map[string]interface{}{
"root": cfg.Reva.Storages.Local.Root,
"share_folder": cfg.Reva.Storages.Local.ShareFolder,
"user_layout": cfg.Reva.Storages.Local.UserLayout,
},
"owncloud": map[string]interface{}{
"datadirectory": cfg.Reva.Storages.OwnCloud.Root,
"upload_info_dir": cfg.Reva.Storages.OwnCloud.UploadInfoDir,
"sharedirectory": cfg.Reva.Storages.OwnCloud.ShareFolder,
"user_layout": cfg.Reva.Storages.OwnCloud.UserLayout,
"redis": cfg.Reva.Storages.OwnCloud.Redis,
"enable_home": cfg.Reva.Storages.OwnCloud.EnableHome,
"scan": cfg.Reva.Storages.OwnCloud.Scan,
"userprovidersvc": cfg.Reva.Users.URL,
},
"ocis": map[string]interface{}{
"root": cfg.Reva.Storages.Common.Root,
"enable_home": cfg.Reva.Storages.Common.EnableHome,
"user_layout": cfg.Reva.Storages.Common.UserLayout,
},
"s3": map[string]interface{}{
"region": cfg.Reva.Storages.S3.Region,
"access_key": cfg.Reva.Storages.S3.AccessKey,
"secret_key": cfg.Reva.Storages.S3.SecretKey,
"endpoint": cfg.Reva.Storages.S3.Endpoint,
"bucket": cfg.Reva.Storages.S3.Bucket,
"prefix": cfg.Reva.Storages.S3.Root,
},
}
}

View File

@@ -0,0 +1,310 @@
package command
import (
"context"
"fmt"
"os"
"os/signal"
"path"
"strings"
"time"
"github.com/cs3org/reva/cmd/revad/runtime"
"github.com/gofrs/uuid"
"github.com/micro/cli/v2"
"github.com/oklog/run"
"github.com/owncloud/ocis-reva/pkg/config"
"github.com/owncloud/ocis-reva/pkg/flagset"
"github.com/owncloud/ocis-reva/pkg/server/debug"
)
// Frontend is the entrypoint for the frontend command.
func Frontend(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "frontend",
Usage: "Start reva frontend service",
Flags: flagset.FrontendWithConfig(cfg),
Before: func(c *cli.Context) error {
cfg.Reva.Frontend.Services = c.StringSlice("service")
return nil
},
Action: func(c *cli.Context) error {
logger := NewLogger(cfg)
if cfg.Tracing.Enabled {
switch t := cfg.Tracing.Type; t {
case "agent":
logger.Error().
Str("type", t).
Msg("Reva only supports the jaeger tracing backend")
case "jaeger":
logger.Info().
Str("type", t).
Msg("configuring reva to use the jaeger tracing backend")
case "zipkin":
logger.Error().
Str("type", t).
Msg("Reva only supports the jaeger tracing backend")
default:
logger.Warn().
Str("type", t).
Msg("Unknown tracing backend")
}
} else {
logger.Debug().
Msg("Tracing is not enabled")
}
var (
gr = run.Group{}
ctx, cancel = context.WithCancel(context.Background())
//metrics = metrics.New()
)
defer cancel()
{
uuid := uuid.Must(uuid.NewV4())
pidFile := path.Join(os.TempDir(), "revad-"+c.Command.Name+"-"+uuid.String()+".pid")
// pregenerate list of valid localhost ports for the desktop redirect_uri
// TODO use custom scheme like "owncloud://localhost/user/callback" tracked in
var desktopRedirectURIs [65535 - 1024]string
for port := 0; port < len(desktopRedirectURIs); port++ {
desktopRedirectURIs[port] = fmt.Sprintf("http://localhost:%d", (port + 1024))
}
filesCfg := map[string]interface{}{
"private_links": false,
"bigfilechunking": false,
"blacklisted_files": []string{},
"undelete": true,
"versioning": true,
}
if !cfg.Reva.UploadDisableTus {
filesCfg["tus_support"] = map[string]interface{}{
"version": "1.0.0",
"resumable": "1.0.0",
"extension": "creation,creation-with-upload",
"http_method_override": cfg.Reva.UploadHTTPMethodOverride,
"max_chunk_size": int(cfg.Reva.UploadMaxChunkSize),
}
}
rcfg := map[string]interface{}{
"core": map[string]interface{}{
"max_cpus": cfg.Reva.Users.MaxCPUs,
"tracing_enabled": cfg.Tracing.Enabled,
"tracing_endpoint": cfg.Tracing.Endpoint,
"tracing_collector": cfg.Tracing.Collector,
"tracing_service_name": "frontend",
},
"shared": map[string]interface{}{
"jwt_secret": cfg.Reva.JWTSecret,
"gatewaysvc": cfg.Reva.Gateway.URL, // Todo or address?
},
"http": map[string]interface{}{
"network": cfg.Reva.Frontend.Network,
"address": cfg.Reva.Frontend.Addr,
"middlewares": map[string]interface{}{
"cors": map[string]interface{}{
"allow_credentials": true,
},
},
// TODO build services dynamically
"services": map[string]interface{}{
"datagateway": map[string]interface{}{
"prefix": cfg.Reva.Frontend.DatagatewayPrefix,
"transfer_shared_secret": cfg.Reva.TransferSecret,
"timeout": 86400,
"insecure": true,
},
"ocdav": map[string]interface{}{
"prefix": cfg.Reva.Frontend.OCDavPrefix,
"chunk_folder": "/var/tmp/reva/chunks",
"files_namespace": cfg.Reva.OCDav.DavFilesNamespace,
"webdav_namespace": cfg.Reva.OCDav.WebdavNamespace,
"timeout": 86400,
"insecure": true,
"disable_tus": cfg.Reva.UploadDisableTus,
},
"ocs": map[string]interface{}{
"prefix": cfg.Reva.Frontend.OCSPrefix,
"config": map[string]interface{}{
"version": "1.8",
"website": "reva",
"host": urlWithScheme(cfg.Reva.Frontend.URL),
"contact": "admin@localhost",
"ssl": "false",
},
"disable_tus": cfg.Reva.UploadDisableTus,
"capabilities": map[string]interface{}{
"capabilities": map[string]interface{}{
"core": map[string]interface{}{
"poll_interval": 60,
"webdav_root": "remote.php/webdav",
"status": map[string]interface{}{
"installed": true,
"maintenance": false,
"needsDbUpgrade": false,
"version": "10.0.11.5",
"versionstring": "10.0.11",
"edition": "community",
"productname": "reva",
"hostname": "",
},
"support_url_signing": true,
},
"checksums": map[string]interface{}{
"supported_types": []string{"SHA256"},
"preferred_upload_type": "SHA256",
},
"files": filesCfg,
"dav": map[string]interface{}{},
"files_sharing": map[string]interface{}{
"api_enabled": true,
"resharing": true,
"group_sharing": true,
"auto_accept_share": true,
"share_with_group_members_only": true,
"share_with_membership_groups_only": true,
"default_permissions": 22,
"search_min_length": 3,
"public": map[string]interface{}{
"enabled": true,
"send_mail": true,
"social_share": true,
"upload": true,
"multiple": true,
"supports_upload_only": true,
"password": map[string]interface{}{
"enforced": true,
"enforced_for": map[string]interface{}{
"read_only": true,
"read_write": true,
"upload_only": true,
},
},
"expire_date": map[string]interface{}{
"enabled": true,
},
},
"user": map[string]interface{}{
"send_mail": true,
},
"user_enumeration": map[string]interface{}{
"enabled": true,
"group_members_only": true,
},
"federation": map[string]interface{}{
"outgoing": true,
"incoming": true,
},
},
"notifications": map[string]interface{}{
"endpoints": []string{"disable"},
},
},
"version": map[string]interface{}{
"edition": "reva",
"major": 10,
"minor": 0,
"micro": 11,
"string": "10.0.11",
},
},
},
},
},
}
gr.Add(func() error {
runtime.RunWithOptions(
rcfg,
pidFile,
runtime.WithLogger(&logger.Logger),
)
return nil
}, func(_ error) {
logger.Info().
Str("server", c.Command.Name).
Msg("Shutting down server")
cancel()
})
}
{
server, err := debug.Server(
debug.Name(c.Command.Name+"-debug"),
debug.Addr(cfg.Reva.Frontend.DebugAddr),
debug.Logger(logger),
debug.Context(ctx),
debug.Config(cfg),
)
if err != nil {
logger.Info().
Err(err).
Str("server", "debug").
Msg("Failed to initialize server")
return err
}
gr.Add(func() error {
return server.ListenAndServe()
}, func(_ error) {
ctx, timeout := context.WithTimeout(ctx, 5*time.Second)
defer timeout()
defer cancel()
if err := server.Shutdown(ctx); err != nil {
logger.Info().
Err(err).
Str("server", "debug").
Msg("Failed to shutdown server")
} else {
logger.Info().
Str("server", "debug").
Msg("Shutting down server")
}
})
}
{
stop := make(chan os.Signal, 1)
gr.Add(func() error {
signal.Notify(stop, os.Interrupt)
<-stop
return nil
}, func(err error) {
close(stop)
cancel()
})
}
return gr.Run()
},
}
}
// urlWithScheme checks if the given string is prefixed with "http". If it is not, "http://" will be added as prefix.
// As we can't tell if http or https should be the preferred scheme, the correct approach would be to fail on urls
// without scheme. As long as we have default urls in our flagsets which don't have a scheme, this is a feasible workaround.
func urlWithScheme(str string) string {
if !strings.HasPrefix(str, "http") {
str = "http://" + str
}
return str
}

259
reva/pkg/command/gateway.go Normal file
View File

@@ -0,0 +1,259 @@
package command
import (
"context"
"os"
"os/signal"
"path"
"strings"
"time"
"github.com/cs3org/reva/cmd/revad/runtime"
"github.com/gofrs/uuid"
"github.com/micro/cli/v2"
"github.com/oklog/run"
"github.com/owncloud/ocis-reva/pkg/config"
"github.com/owncloud/ocis-reva/pkg/flagset"
"github.com/owncloud/ocis-reva/pkg/server/debug"
"github.com/owncloud/ocis-reva/pkg/service/external"
)
// Gateway is the entrypoint for the gateway command.
func Gateway(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "gateway",
Usage: "Start reva gateway",
Flags: flagset.GatewayWithConfig(cfg),
Before: func(c *cli.Context) error {
cfg.Reva.Gateway.Services = c.StringSlice("service")
cfg.Reva.StorageRegistry.Rules = c.StringSlice("storage-registry-rule")
return nil
},
Action: func(c *cli.Context) error {
logger := NewLogger(cfg)
if cfg.Tracing.Enabled {
switch t := cfg.Tracing.Type; t {
case "agent":
logger.Error().
Str("type", t).
Msg("Reva only supports the jaeger tracing backend")
case "jaeger":
logger.Info().
Str("type", t).
Msg("configuring reva to use the jaeger tracing backend")
case "zipkin":
logger.Error().
Str("type", t).
Msg("Reva only supports the jaeger tracing backend")
default:
logger.Warn().
Str("type", t).
Msg("Unknown tracing backend")
}
} else {
logger.Debug().
Msg("Tracing is not enabled")
}
var (
gr = run.Group{}
ctx, cancel = context.WithCancel(context.Background())
//metrics = metrics.New()
)
defer cancel()
{
uuid := uuid.Must(uuid.NewV4())
pidFile := path.Join(os.TempDir(), "revad-"+c.Command.Name+"-"+uuid.String()+".pid")
rcfg := map[string]interface{}{
"core": map[string]interface{}{
"max_cpus": cfg.Reva.Users.MaxCPUs,
"tracing_enabled": cfg.Tracing.Enabled,
"tracing_endpoint": cfg.Tracing.Endpoint,
"tracing_collector": cfg.Tracing.Collector,
"tracing_service_name": "gateway",
},
"shared": map[string]interface{}{
"jwt_secret": cfg.Reva.JWTSecret,
"gatewaysvc": cfg.Reva.Gateway.URL, // Todo or address?
},
"grpc": map[string]interface{}{
"network": cfg.Reva.Gateway.Network,
"address": cfg.Reva.Gateway.Addr,
// TODO build services dynamically
"services": map[string]interface{}{
"gateway": map[string]interface{}{
// registries is located on the gateway
"authregistrysvc": cfg.Reva.Gateway.URL,
"storageregistrysvc": cfg.Reva.Gateway.URL,
"appregistrysvc": cfg.Reva.Gateway.URL,
// user metadata is located on the users services
"preferencessvc": cfg.Reva.Users.URL,
"userprovidersvc": cfg.Reva.Users.URL,
// sharing is located on the sharing service
"usershareprovidersvc": cfg.Reva.Sharing.URL,
"publicshareprovidersvc": cfg.Reva.Sharing.URL,
"ocmshareprovidersvc": cfg.Reva.Sharing.URL,
"commit_share_to_storage_grant": cfg.Reva.Gateway.CommitShareToStorageGrant,
"commit_share_to_storage_ref": cfg.Reva.Gateway.CommitShareToStorageRef,
"share_folder": cfg.Reva.Gateway.ShareFolder, // ShareFolder is the location where to create shares in the recipient's storage provider.
// other
"disable_home_creation_on_login": cfg.Reva.Gateway.DisableHomeCreationOnLogin,
"datagateway": urlWithScheme(cfg.Reva.DataGateway.URL),
"transfer_shared_secret": cfg.Reva.TransferSecret,
"transfer_expires": cfg.Reva.TransferExpires,
},
"authregistry": map[string]interface{}{
"driver": "static",
"drivers": map[string]interface{}{
"static": map[string]interface{}{
"rules": map[string]interface{}{
"basic": cfg.Reva.AuthBasic.URL,
"bearer": cfg.Reva.AuthBearer.URL,
"publicshares": cfg.Reva.StoragePublicLink.URL,
},
},
},
},
"storageregistry": map[string]interface{}{
"driver": cfg.Reva.StorageRegistry.Driver,
"drivers": map[string]interface{}{
"static": map[string]interface{}{
"home_provider": cfg.Reva.StorageRegistry.HomeProvider,
"rules": rules(cfg),
},
},
},
},
},
}
gr.Add(func() error {
err := external.RegisterGRPCEndpoint(
ctx,
"com.owncloud.reva",
uuid.String(),
cfg.Reva.Gateway.Addr,
logger,
)
if err != nil {
return err
}
runtime.RunWithOptions(
rcfg,
pidFile,
runtime.WithLogger(&logger.Logger),
)
return nil
}, func(_ error) {
logger.Info().
Str("server", c.Command.Name).
Msg("Shutting down server")
cancel()
})
}
{
server, err := debug.Server(
debug.Name(c.Command.Name+"-debug"),
debug.Addr(cfg.Reva.Gateway.DebugAddr),
debug.Logger(logger),
debug.Context(ctx),
debug.Config(cfg),
)
if err != nil {
logger.Info().
Err(err).
Str("server", "debug").
Msg("Failed to initialize server")
return err
}
gr.Add(func() error {
return server.ListenAndServe()
}, func(_ error) {
ctx, timeout := context.WithTimeout(ctx, 5*time.Second)
defer timeout()
defer cancel()
if err := server.Shutdown(ctx); err != nil {
logger.Info().
Err(err).
Str("server", "debug").
Msg("Failed to shutdown server")
} else {
logger.Info().
Str("server", "debug").
Msg("Shutting down server")
}
})
}
{
stop := make(chan os.Signal, 1)
gr.Add(func() error {
signal.Notify(stop, os.Interrupt)
<-stop
return nil
}, func(err error) {
close(stop)
cancel()
})
}
return gr.Run()
},
}
}
func rules(cfg *config.Config) map[string]interface{} {
// if a list of rules is given it overrides the generated rules from below
if len(cfg.Reva.StorageRegistry.Rules) > 0 {
rules := map[string]interface{}{}
for i := range cfg.Reva.StorageRegistry.Rules {
parts := strings.SplitN(cfg.Reva.StorageRegistry.Rules[i], "=", 2)
rules[parts[0]] = parts[1]
}
return rules
}
// generate rules based on default config
return map[string]interface{}{
cfg.Reva.StorageRoot.MountPath: cfg.Reva.StorageRoot.URL,
cfg.Reva.StorageRoot.MountID: cfg.Reva.StorageRoot.URL,
cfg.Reva.StorageHome.MountPath: cfg.Reva.StorageHome.URL,
cfg.Reva.StorageHome.MountID: cfg.Reva.StorageHome.URL,
cfg.Reva.StorageEOS.MountPath: cfg.Reva.StorageEOS.URL,
cfg.Reva.StorageEOS.MountID: cfg.Reva.StorageEOS.URL,
cfg.Reva.StorageOC.MountPath: cfg.Reva.StorageOC.URL,
cfg.Reva.StorageOC.MountID: cfg.Reva.StorageOC.URL,
cfg.Reva.StorageS3.MountPath: cfg.Reva.StorageS3.URL,
cfg.Reva.StorageS3.MountID: cfg.Reva.StorageS3.URL,
cfg.Reva.StorageWND.MountPath: cfg.Reva.StorageWND.URL,
cfg.Reva.StorageWND.MountID: cfg.Reva.StorageWND.URL,
cfg.Reva.StorageCustom.MountPath: cfg.Reva.StorageCustom.URL,
cfg.Reva.StorageCustom.MountID: cfg.Reva.StorageCustom.URL,
cfg.Reva.StoragePublicLink.MountPath: cfg.Reva.StoragePublicLink.URL,
// public link storage returns the mount id of the actual storage
}
}

View File

@@ -0,0 +1,49 @@
package command
import (
"fmt"
"net/http"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis-reva/pkg/config"
"github.com/owncloud/ocis-reva/pkg/flagset"
)
// Health is the entrypoint for the health command.
func Health(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "health",
Usage: "Check health status",
Flags: flagset.HealthWithConfig(cfg),
Action: func(c *cli.Context) error {
logger := NewLogger(cfg)
resp, err := http.Get(
fmt.Sprintf(
"http://%s/healthz",
cfg.Debug.Addr,
),
)
if err != nil {
logger.Fatal().
Err(err).
Msg("Failed to request health check")
}
defer resp.Body.Close()
if resp.StatusCode != 200 {
logger.Fatal().
Int("code", resp.StatusCode).
Msg("Health seems to be in bad state")
}
logger.Debug().
Int("code", resp.StatusCode).
Msg("Health got a good state")
return nil
},
}
}

116
reva/pkg/command/root.go Normal file
View File

@@ -0,0 +1,116 @@
package command
import (
"os"
"strings"
"github.com/micro/cli/v2"
"github.com/owncloud/ocis-pkg/v2/log"
"github.com/owncloud/ocis-reva/pkg/config"
"github.com/owncloud/ocis-reva/pkg/flagset"
"github.com/owncloud/ocis-reva/pkg/version"
"github.com/spf13/viper"
)
// Execute is the entry point for the ocis-reva command.
func Execute() error {
cfg := config.New()
app := &cli.App{
Name: "ocis-reva",
Version: version.String,
Usage: "Example service for Reva/oCIS",
Compiled: version.Compiled(),
Authors: []*cli.Author{
{
Name: "ownCloud GmbH",
Email: "support@owncloud.com",
},
},
Flags: flagset.RootWithConfig(cfg),
Before: func(c *cli.Context) error {
logger := NewLogger(cfg)
viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
viper.SetEnvPrefix("REVA")
viper.AutomaticEnv()
if c.IsSet("config-file") {
viper.SetConfigFile(c.String("config-file"))
} else {
viper.SetConfigName("reva")
viper.AddConfigPath("/etc/ocis")
viper.AddConfigPath("$HOME/.ocis")
viper.AddConfigPath("./config")
}
if err := viper.ReadInConfig(); err != nil {
switch err.(type) {
case viper.ConfigFileNotFoundError:
logger.Info().
Msg("Continue without config")
case viper.UnsupportedConfigError:
logger.Fatal().
Err(err).
Msg("Unsupported config type")
default:
logger.Fatal().
Err(err).
Msg("Failed to read config")
}
}
if err := viper.Unmarshal(&cfg); err != nil {
logger.Fatal().
Err(err).
Msg("Failed to parse config")
}
return nil
},
Commands: []*cli.Command{
Frontend(cfg),
Gateway(cfg),
Users(cfg),
AuthBasic(cfg),
AuthBearer(cfg),
Sharing(cfg),
StorageRoot(cfg),
StorageHome(cfg),
StorageHomeData(cfg),
StoragePublicLink(cfg),
StorageOC(cfg),
StorageOCData(cfg),
StorageEOS(cfg),
StorageEOSData(cfg),
Health(cfg),
},
}
cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}
cli.VersionFlag = &cli.BoolFlag{
Name: "version,v",
Usage: "Print the version",
}
return app.Run(os.Args)
}
// NewLogger initializes a service-specific logger instance.
func NewLogger(cfg *config.Config) log.Logger {
return log.NewLogger(
log.Name("reva"),
log.Level(cfg.Log.Level),
log.Pretty(cfg.Log.Pretty),
log.Color(cfg.Log.Color),
)
}

178
reva/pkg/command/sharing.go Normal file
View File

@@ -0,0 +1,178 @@
package command
import (
"context"
"os"
"os/signal"
"path"
"time"
"github.com/cs3org/reva/cmd/revad/runtime"
"github.com/gofrs/uuid"
"github.com/micro/cli/v2"
"github.com/oklog/run"
"github.com/owncloud/ocis-reva/pkg/config"
"github.com/owncloud/ocis-reva/pkg/flagset"
"github.com/owncloud/ocis-reva/pkg/server/debug"
)
// Sharing is the entrypoint for the sharing command.
func Sharing(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "sharing",
Usage: "Start reva sharing service",
Flags: flagset.SharingWithConfig(cfg),
Before: func(c *cli.Context) error {
cfg.Reva.Sharing.Services = c.StringSlice("service")
return nil
},
Action: func(c *cli.Context) error {
logger := NewLogger(cfg)
if cfg.Tracing.Enabled {
switch t := cfg.Tracing.Type; t {
case "agent":
logger.Error().
Str("type", t).
Msg("Reva only supports the jaeger tracing backend")
case "jaeger":
logger.Info().
Str("type", t).
Msg("configuring reva to use the jaeger tracing backend")
case "zipkin":
logger.Error().
Str("type", t).
Msg("Reva only supports the jaeger tracing backend")
default:
logger.Warn().
Str("type", t).
Msg("Unknown tracing backend")
}
} else {
logger.Debug().
Msg("Tracing is not enabled")
}
var (
gr = run.Group{}
ctx, cancel = context.WithCancel(context.Background())
//metrics = metrics.New()
)
defer cancel()
{
uuid := uuid.Must(uuid.NewV4())
pidFile := path.Join(os.TempDir(), "revad-"+c.Command.Name+"-"+uuid.String()+".pid")
rcfg := map[string]interface{}{
"core": map[string]interface{}{
"max_cpus": cfg.Reva.Users.MaxCPUs,
"tracing_enabled": cfg.Tracing.Enabled,
"tracing_endpoint": cfg.Tracing.Endpoint,
"tracing_collector": cfg.Tracing.Collector,
"tracing_service_name": "sharing",
},
"shared": map[string]interface{}{
"jwt_secret": cfg.Reva.JWTSecret,
},
"grpc": map[string]interface{}{
"network": cfg.Reva.Sharing.Network,
"address": cfg.Reva.Sharing.Addr,
// TODO build services dynamically
"services": map[string]interface{}{
"usershareprovider": map[string]interface{}{
"driver": cfg.Reva.Sharing.UserDriver,
"drivers": map[string]interface{}{
"json": map[string]interface{}{
"file": cfg.Reva.Sharing.UserJSONFile,
},
},
},
"publicshareprovider": map[string]interface{}{
"driver": cfg.Reva.Sharing.PublicDriver,
},
},
},
}
gr.Add(func() error {
runtime.RunWithOptions(
rcfg,
pidFile,
runtime.WithLogger(&logger.Logger),
)
return nil
}, func(_ error) {
logger.Info().
Str("server", c.Command.Name).
Msg("Shutting down server")
cancel()
})
}
{
server, err := debug.Server(
debug.Name(c.Command.Name+"-debug"),
debug.Addr(cfg.Reva.Sharing.DebugAddr),
debug.Logger(logger),
debug.Context(ctx),
debug.Config(cfg),
)
if err != nil {
logger.Info().
Err(err).
Str("server", c.Command.Name+"-debug").
Msg("Failed to initialize server")
return err
}
gr.Add(func() error {
return server.ListenAndServe()
}, func(_ error) {
ctx, timeout := context.WithTimeout(ctx, 5*time.Second)
defer timeout()
defer cancel()
if err := server.Shutdown(ctx); err != nil {
logger.Info().
Err(err).
Str("server", c.Command.Name+"-debug").
Msg("Failed to shutdown server")
} else {
logger.Info().
Str("server", c.Command.Name+"-debug").
Msg("Shutting down server")
}
})
}
{
stop := make(chan os.Signal, 1)
gr.Add(func() error {
signal.Notify(stop, os.Interrupt)
<-stop
return nil
}, func(err error) {
close(stop)
cancel()
})
}
return gr.Run()
},
}
}

View File

@@ -0,0 +1,175 @@
package command
import (
"context"
"os"
"os/signal"
"path"
"time"
"github.com/cs3org/reva/cmd/revad/runtime"
"github.com/gofrs/uuid"
"github.com/micro/cli/v2"
"github.com/oklog/run"
"github.com/owncloud/ocis-reva/pkg/config"
"github.com/owncloud/ocis-reva/pkg/flagset"
"github.com/owncloud/ocis-reva/pkg/server/debug"
)
// StorageEOS is the entrypoint for the storage-eos command.
func StorageEOS(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "storage-eos",
Usage: "Start reva storage-eos service",
Flags: flagset.StorageEOSWithConfig(cfg),
Before: func(c *cli.Context) error {
cfg.Reva.StorageEOS.Services = c.StringSlice("service")
return nil
},
Action: func(c *cli.Context) error {
logger := NewLogger(cfg)
if cfg.Tracing.Enabled {
switch t := cfg.Tracing.Type; t {
case "agent":
logger.Error().
Str("type", t).
Msg("Reva only supports the jaeger tracing backend")
case "jaeger":
logger.Info().
Str("type", t).
Msg("configuring reva to use the jaeger tracing backend")
case "zipkin":
logger.Error().
Str("type", t).
Msg("Reva only supports the jaeger tracing backend")
default:
logger.Warn().
Str("type", t).
Msg("Unknown tracing backend")
}
} else {
logger.Debug().
Msg("Tracing is not enabled")
}
var (
gr = run.Group{}
ctx, cancel = context.WithCancel(context.Background())
//metrics = metrics.New()
)
defer cancel()
{
uuid := uuid.Must(uuid.NewV4())
pidFile := path.Join(os.TempDir(), "revad-"+c.Command.Name+"-"+uuid.String()+".pid")
rcfg := map[string]interface{}{
"core": map[string]interface{}{
"max_cpus": cfg.Reva.StorageEOS.MaxCPUs,
"tracing_enabled": cfg.Tracing.Enabled,
"tracing_endpoint": cfg.Tracing.Endpoint,
"tracing_collector": cfg.Tracing.Collector,
"tracing_service_name": "storage-eos",
},
"shared": map[string]interface{}{
"jwt_secret": cfg.Reva.JWTSecret,
},
"grpc": map[string]interface{}{
"network": cfg.Reva.StorageEOS.Network,
"address": cfg.Reva.StorageEOS.Addr,
// TODO build services dynamically
"services": map[string]interface{}{
"storageprovider": map[string]interface{}{
"driver": cfg.Reva.StorageEOS.Driver,
"drivers": drivers(cfg),
"mount_path": cfg.Reva.StorageEOS.MountPath,
"mount_id": cfg.Reva.StorageEOS.MountID,
"expose_data_server": cfg.Reva.StorageEOS.ExposeDataServer,
// TODO use cfg.Reva.SStorageEOSData.URL, ?
"data_server_url": cfg.Reva.StorageEOS.DataServerURL,
},
},
},
}
gr.Add(func() error {
runtime.RunWithOptions(
rcfg,
pidFile,
runtime.WithLogger(&logger.Logger),
)
return nil
}, func(_ error) {
logger.Info().
Str("server", c.Command.Name).
Msg("Shutting down server")
cancel()
})
}
{
server, err := debug.Server(
debug.Name(c.Command.Name+"-debug"),
debug.Addr(cfg.Reva.StorageEOS.DebugAddr),
debug.Logger(logger),
debug.Context(ctx),
debug.Config(cfg),
)
if err != nil {
logger.Info().
Err(err).
Str("server", c.Command.Name+"-debug").
Msg("Failed to initialize server")
return err
}
gr.Add(func() error {
return server.ListenAndServe()
}, func(_ error) {
ctx, timeout := context.WithTimeout(ctx, 5*time.Second)
defer timeout()
defer cancel()
if err := server.Shutdown(ctx); err != nil {
logger.Info().
Err(err).
Str("server", c.Command.Name+"-debug").
Msg("Failed to shutdown server")
} else {
logger.Info().
Str("server", c.Command.Name+"-debug").
Msg("Shutting down server")
}
})
}
{
stop := make(chan os.Signal, 1)
gr.Add(func() error {
signal.Notify(stop, os.Interrupt)
<-stop
return nil
}, func(err error) {
close(stop)
cancel()
})
}
return gr.Run()
},
}
}

View File

@@ -0,0 +1,175 @@
package command
import (
"context"
"os"
"os/signal"
"path"
"time"
"github.com/cs3org/reva/cmd/revad/runtime"
"github.com/gofrs/uuid"
"github.com/micro/cli/v2"
"github.com/oklog/run"
"github.com/owncloud/ocis-reva/pkg/config"
"github.com/owncloud/ocis-reva/pkg/flagset"
"github.com/owncloud/ocis-reva/pkg/server/debug"
)
// StorageEOSData is the entrypoint for the storage-oc-data command.
func StorageEOSData(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "storage-eos-data",
Usage: "Start reva storage-eos-data service",
Flags: flagset.StorageEOSDataWithConfig(cfg),
Before: func(c *cli.Context) error {
cfg.Reva.StorageEOSData.Services = c.StringSlice("service")
return nil
},
Action: func(c *cli.Context) error {
logger := NewLogger(cfg)
if cfg.Tracing.Enabled {
switch t := cfg.Tracing.Type; t {
case "agent":
logger.Error().
Str("type", t).
Msg("Reva only supports the jaeger tracing backend")
case "jaeger":
logger.Info().
Str("type", t).
Msg("configuring reva to use the jaeger tracing backend")
case "zipkin":
logger.Error().
Str("type", t).
Msg("Reva only supports the jaeger tracing backend")
default:
logger.Warn().
Str("type", t).
Msg("Unknown tracing backend")
}
} else {
logger.Debug().
Msg("Tracing is not enabled")
}
var (
gr = run.Group{}
ctx, cancel = context.WithCancel(context.Background())
//metrics = metrics.New()
)
defer cancel()
{
uuid := uuid.Must(uuid.NewV4())
pidFile := path.Join(os.TempDir(), "revad-"+c.Command.Name+"-"+uuid.String()+".pid")
rcfg := map[string]interface{}{
"core": map[string]interface{}{
"max_cpus": cfg.Reva.StorageEOSData.MaxCPUs,
"tracing_enabled": cfg.Tracing.Enabled,
"tracing_endpoint": cfg.Tracing.Endpoint,
"tracing_collector": cfg.Tracing.Collector,
"tracing_service_name": "storage-eos-data",
},
"shared": map[string]interface{}{
"jwt_secret": cfg.Reva.JWTSecret,
"gatewaysvc": cfg.Reva.Gateway.URL, // Todo or address?
},
"http": map[string]interface{}{
"network": cfg.Reva.StorageEOSData.Network,
"address": cfg.Reva.StorageEOSData.Addr,
// TODO build services dynamically
"services": map[string]interface{}{
"dataprovider": map[string]interface{}{
"prefix": cfg.Reva.StorageEOSData.Prefix,
"driver": cfg.Reva.StorageEOSData.Driver,
"drivers": drivers(cfg),
"timeout": 86400,
"insecure": true,
"disable_tus": false,
},
},
},
}
gr.Add(func() error {
runtime.RunWithOptions(
rcfg,
pidFile,
runtime.WithLogger(&logger.Logger),
)
return nil
}, func(_ error) {
logger.Info().
Str("server", c.Command.Name).
Msg("Shutting down server")
cancel()
})
}
{
server, err := debug.Server(
debug.Name(c.Command.Name+"-debug"),
debug.Addr(cfg.Reva.StorageEOSData.DebugAddr),
debug.Logger(logger),
debug.Context(ctx),
debug.Config(cfg),
)
if err != nil {
logger.Info().
Err(err).
Str("server", c.Command.Name+"-debug").
Msg("Failed to initialize server")
return err
}
gr.Add(func() error {
return server.ListenAndServe()
}, func(_ error) {
ctx, timeout := context.WithTimeout(ctx, 5*time.Second)
defer timeout()
defer cancel()
if err := server.Shutdown(ctx); err != nil {
logger.Info().
Err(err).
Str("server", c.Command.Name+"-debug").
Msg("Failed to shutdown server")
} else {
logger.Info().
Str("server", c.Command.Name+"-debug").
Msg("Shutting down server")
}
})
}
{
stop := make(chan os.Signal, 1)
gr.Add(func() error {
signal.Notify(stop, os.Interrupt)
<-stop
return nil
}, func(err error) {
close(stop)
cancel()
})
}
return gr.Run()
},
}
}

View File

@@ -0,0 +1,183 @@
package command
import (
"context"
"os"
"os/signal"
"path"
"time"
"github.com/cs3org/reva/cmd/revad/runtime"
"github.com/gofrs/uuid"
"github.com/micro/cli/v2"
"github.com/oklog/run"
"github.com/owncloud/ocis-reva/pkg/config"
"github.com/owncloud/ocis-reva/pkg/flagset"
"github.com/owncloud/ocis-reva/pkg/server/debug"
)
// StorageHome is the entrypoint for the storage-home command.
func StorageHome(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "storage-home",
Usage: "Start reva storage-home service",
Flags: flagset.StorageHomeWithConfig(cfg),
Before: func(c *cli.Context) error {
cfg.Reva.StorageHome.Services = c.StringSlice("service")
return nil
},
Action: func(c *cli.Context) error {
logger := NewLogger(cfg)
if cfg.Tracing.Enabled {
switch t := cfg.Tracing.Type; t {
case "agent":
logger.Error().
Str("type", t).
Msg("Reva only supports the jaeger tracing backend")
case "jaeger":
logger.Info().
Str("type", t).
Msg("configuring reva to use the jaeger tracing backend")
case "zipkin":
logger.Error().
Str("type", t).
Msg("Reva only supports the jaeger tracing backend")
default:
logger.Warn().
Str("type", t).
Msg("Unknown tracing backend")
}
} else {
logger.Debug().
Msg("Tracing is not enabled")
}
var (
gr = run.Group{}
ctx, cancel = context.WithCancel(context.Background())
//metrics = metrics.New()
)
defer cancel()
{
uuid := uuid.Must(uuid.NewV4())
pidFile := path.Join(os.TempDir(), "revad-"+c.Command.Name+"-"+uuid.String()+".pid")
// override driver enable home option with home config
if cfg.Reva.Storages.Home.EnableHome {
cfg.Reva.Storages.Common.EnableHome = true
cfg.Reva.Storages.EOS.EnableHome = true
cfg.Reva.Storages.Local.EnableHome = true
cfg.Reva.Storages.OwnCloud.EnableHome = true
cfg.Reva.Storages.S3.EnableHome = true
}
rcfg := map[string]interface{}{
"core": map[string]interface{}{
"max_cpus": cfg.Reva.Users.MaxCPUs,
"tracing_enabled": cfg.Tracing.Enabled,
"tracing_endpoint": cfg.Tracing.Endpoint,
"tracing_collector": cfg.Tracing.Collector,
"tracing_service_name": "storage-home",
},
"shared": map[string]interface{}{
"jwt_secret": cfg.Reva.JWTSecret,
},
"grpc": map[string]interface{}{
"network": cfg.Reva.StorageHome.Network,
"address": cfg.Reva.StorageHome.Addr,
// TODO build services dynamically
"services": map[string]interface{}{
"storageprovider": map[string]interface{}{
"driver": cfg.Reva.StorageHome.Driver,
"drivers": drivers(cfg),
"mount_path": cfg.Reva.StorageHome.MountPath,
"mount_id": cfg.Reva.StorageHome.MountID,
"expose_data_server": cfg.Reva.StorageHome.ExposeDataServer,
// TODO use cfg.Reva.StorageHomeData.URL, ?
"data_server_url": cfg.Reva.StorageHome.DataServerURL,
},
},
},
}
gr.Add(func() error {
runtime.RunWithOptions(
rcfg,
pidFile,
runtime.WithLogger(&logger.Logger),
)
return nil
}, func(_ error) {
logger.Info().
Str("server", c.Command.Name).
Msg("Shutting down server")
cancel()
})
}
{
server, err := debug.Server(
debug.Name(c.Command.Name+"-debug"),
debug.Addr(cfg.Reva.StorageHome.DebugAddr),
debug.Logger(logger),
debug.Context(ctx),
debug.Config(cfg),
)
if err != nil {
logger.Info().
Err(err).
Str("server", c.Command.Name+"-debug").
Msg("Failed to initialize server")
return err
}
gr.Add(func() error {
return server.ListenAndServe()
}, func(_ error) {
ctx, timeout := context.WithTimeout(ctx, 5*time.Second)
defer timeout()
defer cancel()
if err := server.Shutdown(ctx); err != nil {
logger.Info().
Err(err).
Str("server", c.Command.Name+"-debug").
Msg("Failed to shutdown server")
} else {
logger.Info().
Str("server", c.Command.Name+"-debug").
Msg("Shutting down server")
}
})
}
{
stop := make(chan os.Signal, 1)
gr.Add(func() error {
signal.Notify(stop, os.Interrupt)
<-stop
return nil
}, func(err error) {
close(stop)
cancel()
})
}
return gr.Run()
},
}
}

View File

@@ -0,0 +1,183 @@
package command
import (
"context"
"os"
"os/signal"
"path"
"time"
"github.com/cs3org/reva/cmd/revad/runtime"
"github.com/gofrs/uuid"
"github.com/micro/cli/v2"
"github.com/oklog/run"
"github.com/owncloud/ocis-reva/pkg/config"
"github.com/owncloud/ocis-reva/pkg/flagset"
"github.com/owncloud/ocis-reva/pkg/server/debug"
)
// StorageHomeData is the entrypoint for the storage-home-data command.
func StorageHomeData(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "storage-home-data",
Usage: "Start reva storage-home-data service",
Flags: flagset.StorageHomeDataWithConfig(cfg),
Before: func(c *cli.Context) error {
cfg.Reva.StorageHomeData.Services = c.StringSlice("service")
return nil
},
Action: func(c *cli.Context) error {
logger := NewLogger(cfg)
if cfg.Tracing.Enabled {
switch t := cfg.Tracing.Type; t {
case "agent":
logger.Error().
Str("type", t).
Msg("Reva only supports the jaeger tracing backend")
case "jaeger":
logger.Info().
Str("type", t).
Msg("configuring reva to use the jaeger tracing backend")
case "zipkin":
logger.Error().
Str("type", t).
Msg("Reva only supports the jaeger tracing backend")
default:
logger.Warn().
Str("type", t).
Msg("Unknown tracing backend")
}
} else {
logger.Debug().
Msg("Tracing is not enabled")
}
var (
gr = run.Group{}
ctx, cancel = context.WithCancel(context.Background())
//metrics = metrics.New()
)
defer cancel()
{
uuid := uuid.Must(uuid.NewV4())
pidFile := path.Join(os.TempDir(), "revad-"+c.Command.Name+"-"+uuid.String()+".pid")
// override driver enable home option with home config
if cfg.Reva.Storages.Home.EnableHome {
cfg.Reva.Storages.Common.EnableHome = true
cfg.Reva.Storages.EOS.EnableHome = true
cfg.Reva.Storages.Local.EnableHome = true
cfg.Reva.Storages.OwnCloud.EnableHome = true
cfg.Reva.Storages.S3.EnableHome = true
}
rcfg := map[string]interface{}{
"core": map[string]interface{}{
"max_cpus": cfg.Reva.Users.MaxCPUs,
"tracing_enabled": cfg.Tracing.Enabled,
"tracing_endpoint": cfg.Tracing.Endpoint,
"tracing_collector": cfg.Tracing.Collector,
"tracing_service_name": "storage-home-data",
},
"shared": map[string]interface{}{
"jwt_secret": cfg.Reva.JWTSecret,
"gatewaysvc": cfg.Reva.Gateway.URL, // Todo or address?
},
"http": map[string]interface{}{
"network": cfg.Reva.StorageHomeData.Network,
"address": cfg.Reva.StorageHomeData.Addr,
// TODO build services dynamically
"services": map[string]interface{}{
"dataprovider": map[string]interface{}{
"prefix": cfg.Reva.StorageHomeData.Prefix,
"driver": cfg.Reva.StorageHomeData.Driver,
"drivers": drivers(cfg),
"timeout": 86400,
"insecure": true,
"disable_tus": false,
},
},
},
}
gr.Add(func() error {
runtime.RunWithOptions(
rcfg,
pidFile,
runtime.WithLogger(&logger.Logger),
)
return nil
}, func(_ error) {
logger.Info().
Str("server", c.Command.Name).
Msg("Shutting down server")
cancel()
})
}
{
server, err := debug.Server(
debug.Name(c.Command.Name+"-debug"),
debug.Addr(cfg.Reva.StorageHomeData.DebugAddr),
debug.Logger(logger),
debug.Context(ctx),
debug.Config(cfg),
)
if err != nil {
logger.Info().
Err(err).
Str("server", c.Command.Name+"-debug").
Msg("Failed to initialize server")
return err
}
gr.Add(func() error {
return server.ListenAndServe()
}, func(_ error) {
ctx, timeout := context.WithTimeout(ctx, 5*time.Second)
defer timeout()
defer cancel()
if err := server.Shutdown(ctx); err != nil {
logger.Info().
Err(err).
Str("server", c.Command.Name+"-debug").
Msg("Failed to shutdown server")
} else {
logger.Info().
Str("server", c.Command.Name+"-debug").
Msg("Shutting down server")
}
})
}
{
stop := make(chan os.Signal, 1)
gr.Add(func() error {
signal.Notify(stop, os.Interrupt)
<-stop
return nil
}, func(err error) {
close(stop)
cancel()
})
}
return gr.Run()
},
}
}

View File

@@ -0,0 +1,175 @@
package command
import (
"context"
"os"
"os/signal"
"path"
"time"
"github.com/cs3org/reva/cmd/revad/runtime"
"github.com/gofrs/uuid"
"github.com/micro/cli/v2"
"github.com/oklog/run"
"github.com/owncloud/ocis-reva/pkg/config"
"github.com/owncloud/ocis-reva/pkg/flagset"
"github.com/owncloud/ocis-reva/pkg/server/debug"
)
// StorageOC is the entrypoint for the storage-oc command.
func StorageOC(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "storage-oc",
Usage: "Start reva storage-oc service",
Flags: flagset.StorageOCWithConfig(cfg),
Before: func(c *cli.Context) error {
cfg.Reva.StorageOC.Services = c.StringSlice("service")
return nil
},
Action: func(c *cli.Context) error {
logger := NewLogger(cfg)
if cfg.Tracing.Enabled {
switch t := cfg.Tracing.Type; t {
case "agent":
logger.Error().
Str("type", t).
Msg("Reva only supports the jaeger tracing backend")
case "jaeger":
logger.Info().
Str("type", t).
Msg("configuring reva to use the jaeger tracing backend")
case "zipkin":
logger.Error().
Str("type", t).
Msg("Reva only supports the jaeger tracing backend")
default:
logger.Warn().
Str("type", t).
Msg("Unknown tracing backend")
}
} else {
logger.Debug().
Msg("Tracing is not enabled")
}
var (
gr = run.Group{}
ctx, cancel = context.WithCancel(context.Background())
//metrics = metrics.New()
)
defer cancel()
{
uuid := uuid.Must(uuid.NewV4())
pidFile := path.Join(os.TempDir(), "revad-"+c.Command.Name+"-"+uuid.String()+".pid")
rcfg := map[string]interface{}{
"core": map[string]interface{}{
"max_cpus": cfg.Reva.StorageOC.MaxCPUs,
"tracing_enabled": cfg.Tracing.Enabled,
"tracing_endpoint": cfg.Tracing.Endpoint,
"tracing_collector": cfg.Tracing.Collector,
"tracing_service_name": "storage-oc",
},
"shared": map[string]interface{}{
"jwt_secret": cfg.Reva.JWTSecret,
},
"grpc": map[string]interface{}{
"network": cfg.Reva.StorageOC.Network,
"address": cfg.Reva.StorageOC.Addr,
// TODO build services dynamically
"services": map[string]interface{}{
"storageprovider": map[string]interface{}{
"driver": cfg.Reva.StorageOC.Driver,
"drivers": drivers(cfg),
"mount_path": cfg.Reva.StorageOC.MountPath,
"mount_id": cfg.Reva.StorageOC.MountID,
"expose_data_server": cfg.Reva.StorageOC.ExposeDataServer,
// TODO use cfg.Reva.SStorageOCData.URL, ?
"data_server_url": cfg.Reva.StorageOC.DataServerURL,
},
},
},
}
gr.Add(func() error {
runtime.RunWithOptions(
rcfg,
pidFile,
runtime.WithLogger(&logger.Logger),
)
return nil
}, func(_ error) {
logger.Info().
Str("server", c.Command.Name).
Msg("Shutting down server")
cancel()
})
}
{
server, err := debug.Server(
debug.Name(c.Command.Name+"-debug"),
debug.Addr(cfg.Reva.StorageOC.DebugAddr),
debug.Logger(logger),
debug.Context(ctx),
debug.Config(cfg),
)
if err != nil {
logger.Info().
Err(err).
Str("server", c.Command.Name+"-debug").
Msg("Failed to initialize server")
return err
}
gr.Add(func() error {
return server.ListenAndServe()
}, func(_ error) {
ctx, timeout := context.WithTimeout(ctx, 5*time.Second)
defer timeout()
defer cancel()
if err := server.Shutdown(ctx); err != nil {
logger.Info().
Err(err).
Str("server", c.Command.Name+"-debug").
Msg("Failed to shutdown server")
} else {
logger.Info().
Str("server", c.Command.Name+"-debug").
Msg("Shutting down server")
}
})
}
{
stop := make(chan os.Signal, 1)
gr.Add(func() error {
signal.Notify(stop, os.Interrupt)
<-stop
return nil
}, func(err error) {
close(stop)
cancel()
})
}
return gr.Run()
},
}
}

View File

@@ -0,0 +1,175 @@
package command
import (
"context"
"os"
"os/signal"
"path"
"time"
"github.com/cs3org/reva/cmd/revad/runtime"
"github.com/gofrs/uuid"
"github.com/micro/cli/v2"
"github.com/oklog/run"
"github.com/owncloud/ocis-reva/pkg/config"
"github.com/owncloud/ocis-reva/pkg/flagset"
"github.com/owncloud/ocis-reva/pkg/server/debug"
)
// StorageOCData is the entrypoint for the storage-oc-data command.
func StorageOCData(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "storage-oc-data",
Usage: "Start reva storage-oc-data service",
Flags: flagset.StorageOCDataWithConfig(cfg),
Before: func(c *cli.Context) error {
cfg.Reva.StorageOCData.Services = c.StringSlice("service")
return nil
},
Action: func(c *cli.Context) error {
logger := NewLogger(cfg)
if cfg.Tracing.Enabled {
switch t := cfg.Tracing.Type; t {
case "agent":
logger.Error().
Str("type", t).
Msg("Reva only supports the jaeger tracing backend")
case "jaeger":
logger.Info().
Str("type", t).
Msg("configuring reva to use the jaeger tracing backend")
case "zipkin":
logger.Error().
Str("type", t).
Msg("Reva only supports the jaeger tracing backend")
default:
logger.Warn().
Str("type", t).
Msg("Unknown tracing backend")
}
} else {
logger.Debug().
Msg("Tracing is not enabled")
}
var (
gr = run.Group{}
ctx, cancel = context.WithCancel(context.Background())
//metrics = metrics.New()
)
defer cancel()
{
uuid := uuid.Must(uuid.NewV4())
pidFile := path.Join(os.TempDir(), "revad-"+c.Command.Name+"-"+uuid.String()+".pid")
rcfg := map[string]interface{}{
"core": map[string]interface{}{
"max_cpus": cfg.Reva.StorageOCData.MaxCPUs,
"tracing_enabled": cfg.Tracing.Enabled,
"tracing_endpoint": cfg.Tracing.Endpoint,
"tracing_collector": cfg.Tracing.Collector,
"tracing_service_name": "storage-oc-data",
},
"shared": map[string]interface{}{
"jwt_secret": cfg.Reva.JWTSecret,
"gatewaysvc": cfg.Reva.Gateway.URL, // Todo or address?
},
"http": map[string]interface{}{
"network": cfg.Reva.StorageOCData.Network,
"address": cfg.Reva.StorageOCData.Addr,
// TODO build services dynamically
"services": map[string]interface{}{
"dataprovider": map[string]interface{}{
"prefix": cfg.Reva.StorageOCData.Prefix,
"driver": cfg.Reva.StorageOCData.Driver,
"drivers": drivers(cfg),
"timeout": 86400,
"insecure": true,
"disable_tus": false,
},
},
},
}
gr.Add(func() error {
runtime.RunWithOptions(
rcfg,
pidFile,
runtime.WithLogger(&logger.Logger),
)
return nil
}, func(_ error) {
logger.Info().
Str("server", c.Command.Name).
Msg("Shutting down server")
cancel()
})
}
{
server, err := debug.Server(
debug.Name(c.Command.Name+"-debug"),
debug.Addr(cfg.Reva.StorageOCData.DebugAddr),
debug.Logger(logger),
debug.Context(ctx),
debug.Config(cfg),
)
if err != nil {
logger.Info().
Err(err).
Str("server", c.Command.Name+"-debug").
Msg("Failed to initialize server")
return err
}
gr.Add(func() error {
return server.ListenAndServe()
}, func(_ error) {
ctx, timeout := context.WithTimeout(ctx, 5*time.Second)
defer timeout()
defer cancel()
if err := server.Shutdown(ctx); err != nil {
logger.Info().
Err(err).
Str("server", c.Command.Name+"-debug").
Msg("Failed to shutdown server")
} else {
logger.Info().
Str("server", c.Command.Name+"-debug").
Msg("Shutting down server")
}
})
}
{
stop := make(chan os.Signal, 1)
gr.Add(func() error {
signal.Notify(stop, os.Interrupt)
<-stop
return nil
}, func(err error) {
close(stop)
cancel()
})
}
return gr.Run()
},
}
}

View File

@@ -0,0 +1,176 @@
package command
import (
"context"
"os"
"os/signal"
"path"
"time"
"github.com/cs3org/reva/cmd/revad/runtime"
"github.com/gofrs/uuid"
"github.com/micro/cli/v2"
"github.com/oklog/run"
"github.com/owncloud/ocis-reva/pkg/config"
"github.com/owncloud/ocis-reva/pkg/flagset"
"github.com/owncloud/ocis-reva/pkg/server/debug"
)
// StoragePublicLink is the entrypoint for the reva-storage-public-link command.
func StoragePublicLink(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "reva-storage-public-link",
Usage: "Start reva storage-public-link service",
Flags: flagset.StoragePublicLink(cfg),
Category: "Extensions",
Action: func(c *cli.Context) error {
logger := NewLogger(cfg)
if cfg.Tracing.Enabled {
switch t := cfg.Tracing.Type; t {
case "agent":
logger.Error().
Str("type", t).
Msg("Reva only supports the jaeger tracing backend")
case "jaeger":
logger.Info().
Str("type", t).
Msg("configuring reva to use the jaeger tracing backend")
case "zipkin":
logger.Error().
Str("type", t).
Msg("Reva only supports the jaeger tracing backend")
default:
logger.Warn().
Str("type", t).
Msg("Unknown tracing backend")
}
} else {
logger.Debug().
Msg("Tracing is not enabled")
}
var (
gr = run.Group{}
ctx, cancel = context.WithCancel(context.Background())
//metrics = metrics.New()
)
defer cancel()
{
uuid := uuid.Must(uuid.NewV4())
pidFile := path.Join(os.TempDir(), "revad-"+c.Command.Name+"-"+uuid.String()+".pid")
rcfg := map[string]interface{}{
"core": map[string]interface{}{
"max_cpus": cfg.Reva.StoragePublicLink.MaxCPUs,
"tracing_enabled": cfg.Tracing.Enabled,
"tracing_endpoint": cfg.Tracing.Endpoint,
"tracing_collector": cfg.Tracing.Collector,
"tracing_service_name": "storage-public-link",
},
"shared": map[string]interface{}{
"jwt_secret": cfg.Reva.JWTSecret,
},
"grpc": map[string]interface{}{
"network": cfg.Reva.StoragePublicLink.Network,
"address": cfg.Reva.StoragePublicLink.Addr,
"interceptors": map[string]interface{}{
"log": map[string]interface{}{},
},
"services": map[string]interface{}{
"publicstorageprovider": map[string]interface{}{
"mount_path": cfg.Reva.StoragePublicLink.MountPath,
"gateway_addr": cfg.Reva.Gateway.URL,
},
"authprovider": map[string]interface{}{
"auth_manager": "publicshares",
"auth_managers": map[string]interface{}{
"publicshares": map[string]interface{}{
"gateway_addr": cfg.Reva.Gateway.URL,
},
},
},
},
},
}
gr.Add(func() error {
runtime.RunWithOptions(
rcfg,
pidFile,
runtime.WithLogger(&logger.Logger),
)
return nil
}, func(_ error) {
logger.Info().
Str("server", c.Command.Name).
Msg("Shutting down server")
cancel()
})
}
{
server, err := debug.Server(
debug.Name(c.Command.Name+"-debug"),
debug.Addr(cfg.Reva.StoragePublicLink.DebugAddr),
debug.Logger(logger),
debug.Context(ctx),
debug.Config(cfg),
)
if err != nil {
logger.Info().
Err(err).
Str("server", c.Command.Name+"-debug").
Msg("Failed to initialize server")
return err
}
gr.Add(func() error {
return server.ListenAndServe()
}, func(_ error) {
ctx, timeout := context.WithTimeout(ctx, 5*time.Second)
defer timeout()
defer cancel()
if err := server.Shutdown(ctx); err != nil {
logger.Info().
Err(err).
Str("server", c.Command.Name+"-debug").
Msg("Failed to shutdown server")
} else {
logger.Info().
Str("server", c.Command.Name+"-debug").
Msg("Shutting down server")
}
})
}
{
stop := make(chan os.Signal, 1)
gr.Add(func() error {
signal.Notify(stop, os.Interrupt)
<-stop
return nil
}, func(err error) {
close(stop)
cancel()
})
}
return gr.Run()
},
}
}

View File

@@ -0,0 +1,174 @@
package command
import (
"context"
"os"
"os/signal"
"path"
"time"
"github.com/cs3org/reva/cmd/revad/runtime"
"github.com/gofrs/uuid"
"github.com/micro/cli/v2"
"github.com/oklog/run"
"github.com/owncloud/ocis-reva/pkg/config"
"github.com/owncloud/ocis-reva/pkg/flagset"
"github.com/owncloud/ocis-reva/pkg/server/debug"
)
// StorageRoot is the entrypoint for the storage-root command.
func StorageRoot(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "storage-root",
Usage: "Start reva storage-root service",
Flags: flagset.StorageRootWithConfig(cfg),
Before: func(c *cli.Context) error {
cfg.Reva.StorageRoot.Services = c.StringSlice("service")
return nil
},
Action: func(c *cli.Context) error {
logger := NewLogger(cfg)
if cfg.Tracing.Enabled {
switch t := cfg.Tracing.Type; t {
case "agent":
logger.Error().
Str("type", t).
Msg("Reva only supports the jaeger tracing backend")
case "jaeger":
logger.Info().
Str("type", t).
Msg("configuring reva to use the jaeger tracing backend")
case "zipkin":
logger.Error().
Str("type", t).
Msg("Reva only supports the jaeger tracing backend")
default:
logger.Warn().
Str("type", t).
Msg("Unknown tracing backend")
}
} else {
logger.Debug().
Msg("Tracing is not enabled")
}
var (
gr = run.Group{}
ctx, cancel = context.WithCancel(context.Background())
//metrics = metrics.New()
)
defer cancel()
{
uuid := uuid.Must(uuid.NewV4())
pidFile := path.Join(os.TempDir(), "revad-"+c.Command.Name+"-"+uuid.String()+".pid")
rcfg := map[string]interface{}{
"core": map[string]interface{}{
"max_cpus": cfg.Reva.StorageRoot.MaxCPUs,
"tracing_enabled": cfg.Tracing.Enabled,
"tracing_endpoint": cfg.Tracing.Endpoint,
"tracing_collector": cfg.Tracing.Collector,
"tracing_service_name": "storage-root",
},
"shared": map[string]interface{}{
"jwt_secret": cfg.Reva.JWTSecret,
},
"grpc": map[string]interface{}{
"network": cfg.Reva.StorageRoot.Network,
"address": cfg.Reva.StorageRoot.Addr,
// TODO build services dynamically
"services": map[string]interface{}{
"storageprovider": map[string]interface{}{
"driver": cfg.Reva.StorageRoot.Driver,
"drivers": drivers(cfg),
"mount_path": cfg.Reva.StorageRoot.MountPath,
"mount_id": cfg.Reva.StorageRoot.MountID,
"expose_data_server": cfg.Reva.StorageRoot.ExposeDataServer,
"data_server_url": cfg.Reva.StorageRoot.DataServerURL,
},
},
},
}
gr.Add(func() error {
runtime.RunWithOptions(
rcfg,
pidFile,
runtime.WithLogger(&logger.Logger),
)
return nil
}, func(_ error) {
logger.Info().
Str("server", c.Command.Name).
Msg("Shutting down server")
cancel()
})
}
{
server, err := debug.Server(
debug.Name(c.Command.Name+"-debug"),
debug.Addr(cfg.Reva.StorageRoot.DebugAddr),
debug.Logger(logger),
debug.Context(ctx),
debug.Config(cfg),
)
if err != nil {
logger.Info().
Err(err).
Str("server", c.Command.Name+"-debug").
Msg("Failed to initialize server")
return err
}
gr.Add(func() error {
return server.ListenAndServe()
}, func(_ error) {
ctx, timeout := context.WithTimeout(ctx, 5*time.Second)
defer timeout()
defer cancel()
if err := server.Shutdown(ctx); err != nil {
logger.Info().
Err(err).
Str("server", c.Command.Name+"-debug").
Msg("Failed to shutdown server")
} else {
logger.Info().
Str("server", c.Command.Name+"-debug").
Msg("Shutting down server")
}
})
}
{
stop := make(chan os.Signal, 1)
gr.Add(func() error {
signal.Notify(stop, os.Interrupt)
<-stop
return nil
}, func(err error) {
close(stop)
cancel()
})
}
return gr.Run()
},
}
}

Some files were not shown because too many files have changed in this diff Show More