Compare commits

...
305 Commits
Author SHA1 Message Date
Michael Barz c8abd60525 prepare changelog, bump version 2022-03-29 11:30:09 +02:00
Willy Kloucek 5dd03dd50a Merge pull request #3415 from owncloud/pie
use trimpath and buildmode=pie for binaries
2022-03-29 11:24:28 +02:00
Willy Kloucek dbaefed8ee Merge pull request #3413 from owncloud/dependabot/go_modules/go.opentelemetry.io/otel/exporters/jaeger-1.6.1
Bump go.opentelemetry.io/otel/exporters/jaeger from 1.6.0 to 1.6.1
2022-03-29 11:02:48 +02:00
Michael Barz 3ce88ceb95 Automated changelog update [skip ci] 2022-03-29 08:58:50 +00:00
Michael Barz 84bb03acd6 Merge pull request #3416 from owncloud/reva-2.1.0
[full-ci] update reva to v2.1.0
2022-03-29 10:57:57 +02:00
Ralf Haferkamp 0a22512488 Merge pull request #3406 from rhafer/graph-attr
graph: Fix handling of required attributes for users and groups
2022-03-29 10:21:36 +02:00
Michael Barz a322f2362a update reva to v2.1.0 2022-03-29 10:19:01 +02:00
Ralf Haferkamp 9efa21bec3 Automated changelog update [skip ci] 2022-03-29 08:11:48 +00:00
Ralf Haferkamp ec0b3b10af Merge pull request #3376 from rhafer/graph-user-patch
graph: Allow PATCH on user without 'mail' in body
2022-03-29 10:11:19 +02:00
Willy Kloucek 61cd1a3e13 add comment about buildmode=pie for arm 2022-03-29 09:40:58 +02:00
Willy Kloucek f66ee2c855 fix os-arch order 2022-03-29 09:28:04 +02:00
Willy Kloucek cdd72e3a3d use trimpath and buildmode=pie for binaries 2022-03-29 09:16:47 +02:00
dependabot[bot] a811a1f8a4 Bump go.opentelemetry.io/otel/exporters/jaeger from 1.6.0 to 1.6.1
Bumps [go.opentelemetry.io/otel/exporters/jaeger](https://github.com/open-telemetry/opentelemetry-go) from 1.6.0 to 1.6.1.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.6.0...v1.6.1)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel/exporters/jaeger
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-29 07:14:47 +00:00
Michael Barz c34503ef53 Automated changelog update [skip ci] 2022-03-29 07:13:56 +00:00
Michael Barz c523ae80b5 Merge pull request #3365 from owncloud/fix-shares-graph
[full-ci] Fix shares graph
2022-03-29 09:13:26 +02:00
Michael Barz f3e02e0954 update reva to latest edge 2022-03-29 08:19:39 +02:00
Michael Barz 9788b534dc add pdf viewer app to expected failures 2022-03-28 22:27:49 +02:00
Michael Barz ab00331db4 add pdf viewer to web config 2022-03-28 21:50:07 +02:00
Michael Barz d04d93bc82 fix list spaces tests 2022-03-28 20:06:45 +02:00
Michael Barz 6be6c569ba update acceptance tests 2022-03-28 18:26:16 +02:00
Michael Barz e573990487 use utc timezone 2022-03-28 17:18:55 +02:00
Michael Barz 88e704ee07 refactor unit test 2022-03-28 17:18:55 +02:00
Michael Barz 35c17d71de add unit test 2022-03-28 17:18:55 +02:00
Michael Barz 88968c948e add remote item and fix mountpoint 2022-03-28 17:18:52 +02:00
Willy Kloucek 4a0592d248 Automated changelog update [skip ci] 2022-03-28 15:09:05 +00:00
Willy Kloucek 8d13e11c7d Merge pull request #3405 from owncloud/update-reva-28-3-2022
[full-ci] update reva
2022-03-28 17:07:59 +02:00
Willy Kloucek 7ecb7cc2e1 Merge branch 'master' into update-reva-28-3-2022 2022-03-28 16:20:51 +02:00
Willy Kloucek bc15db125f Automated changelog update [skip ci] 2022-03-28 13:29:18 +00:00
Willy Kloucek 8e49026545 Merge pull request #3366 from owncloud/drop-json-config-support
drop json config support
2022-03-28 15:28:44 +02:00
David Christofas 19bc15e124 include windows build fix 2022-03-28 14:56:18 +02:00
Michael Barz 83c13e3965 Merge pull request #3407 from owncloud/dependabot/go_modules/github.com/owncloud/libre-graph-api-go-0.13.2
Bump github.com/owncloud/libre-graph-api-go from 0.13.1 to 0.13.2
2022-03-28 14:52:38 +02:00
David Christofas 2b0d9aa9b0 improve quota handling in the graph API 2022-03-28 13:24:54 +02:00
Willy Kloucek cc7144d9d1 fix config for CI parallel deployment 2022-03-28 13:13:16 +02:00
Willy Kloucek 0f410479de fix PROXY_OIDC_ISSUER 2022-03-28 13:09:13 +02:00
Willy Kloucek 3d4293c7a0 add changelog 2022-03-28 12:54:28 +02:00
Willy Kloucek 7f65dfba34 remove example config files 2022-03-28 12:54:28 +02:00
Willy Kloucek f67e6242ee fix config edit path 2022-03-28 12:54:28 +02:00
Willy Kloucek 5d19062075 switch tests to yaml config 2022-03-28 12:54:28 +02:00
Willy Kloucek a81ba03d55 switch deployment examples to yaml config 2022-03-28 12:54:28 +02:00
Willy Kloucek 551e38e21f drop json config support 2022-03-28 12:54:28 +02:00
dependabot[bot] 3f64fb0cf9 Bump github.com/owncloud/libre-graph-api-go from 0.13.1 to 0.13.2
Bumps [github.com/owncloud/libre-graph-api-go](https://github.com/owncloud/libre-graph-api-go) from 0.13.1 to 0.13.2.
- [Release notes](https://github.com/owncloud/libre-graph-api-go/releases)
- [Commits](https://github.com/owncloud/libre-graph-api-go/compare/v0.13.1...v0.13.2)

---
updated-dependencies:
- dependency-name: github.com/owncloud/libre-graph-api-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-28 10:49:28 +00:00
Willy Kloucek 4f16d470b4 Merge pull request #3400 from owncloud/dependabot/go_modules/github.com/onsi/gomega-1.19.0
Bump github.com/onsi/gomega from 1.18.1 to 1.19.0
2022-03-28 12:48:16 +02:00
Willy Kloucek 53e57200e6 Merge pull request #3401 from owncloud/dependabot/go_modules/github.com/golang-jwt/jwt/v4-4.4.1
Bump github.com/golang-jwt/jwt/v4 from 4.3.0 to 4.4.1
2022-03-28 12:47:06 +02:00
Ralf Haferkamp 4c4ce98d9d Merge pull request #3396 from owncloud/update-lico
update lico to get libregraph/lico#32
2022-03-28 12:28:37 +02:00
Willy Kloucek a9e0ecf12e update reva 2022-03-28 11:51:56 +02:00
Ralf Haferkamp 6fffe04120 graph: Fix handling of required attributes for users and groups
Fix a possible panic when checking for missing attribute ('err' was used
without actually being set). Return more helpful messages when required
attributes of a user or group are missing.
2022-03-28 11:23:23 +02:00
dependabot[bot] 5a8ea03312 Bump github.com/golang-jwt/jwt/v4 from 4.3.0 to 4.4.1
Bumps [github.com/golang-jwt/jwt/v4](https://github.com/golang-jwt/jwt) from 4.3.0 to 4.4.1.
- [Release notes](https://github.com/golang-jwt/jwt/releases)
- [Changelog](https://github.com/golang-jwt/jwt/blob/main/VERSION_HISTORY.md)
- [Commits](https://github.com/golang-jwt/jwt/compare/v4.3.0...v4.4.1)

---
updated-dependencies:
- dependency-name: github.com/golang-jwt/jwt/v4
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-28 06:18:24 +00:00
dependabot[bot] 981bd81fdc Bump github.com/onsi/gomega from 1.18.1 to 1.19.0
Bumps [github.com/onsi/gomega](https://github.com/onsi/gomega) from 1.18.1 to 1.19.0.
- [Release notes](https://github.com/onsi/gomega/releases)
- [Changelog](https://github.com/onsi/gomega/blob/master/CHANGELOG.md)
- [Commits](https://github.com/onsi/gomega/compare/v1.18.1...v1.19.0)

---
updated-dependencies:
- dependency-name: github.com/onsi/gomega
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-28 06:18:10 +00:00
Viktor Scharf 1d25f03deb [tests-only] ApiTests: sharing subItems inside of space (#3354)
* add apiTests share subItem inside of space
2022-03-27 21:36:13 +02:00
Artur Neumann 6fe417e729 Merge pull request #3390 from owncloud/bump-commit-id-20220325
[tests-only][full-ci] Bump core commit id for tests
2022-03-25 20:12:04 +05:45
Willy Kloucek b2ac10e925 update lico to get libregraph/lico#32 2022-03-25 14:26:24 +01:00
saw-jan 13e06bb18c bump core commit id for tests 2022-03-25 17:03:54 +05:45
Willy Kloucek 44d85913f3 Merge pull request #3389 from owncloud/dependabot/go_modules/github.com/blevesearch/bleve/v2-2.3.2
Bump github.com/blevesearch/bleve/v2 from 2.3.1 to 2.3.2
2022-03-25 08:19:38 +01:00
dependabot[bot] 26040a0c15 Bump github.com/blevesearch/bleve/v2 from 2.3.1 to 2.3.2
Bumps [github.com/blevesearch/bleve/v2](https://github.com/blevesearch/bleve) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/blevesearch/bleve/releases)
- [Commits](https://github.com/blevesearch/bleve/compare/v2.3.1...v2.3.2)

---
updated-dependencies:
- dependency-name: github.com/blevesearch/bleve/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-25 05:52:54 +00:00
Willy Kloucek 49d275cb33 Merge pull request #3387 from owncloud/update-deps-24-03
update dependencies
2022-03-25 06:51:52 +01:00
Willy Kloucek 6acf998329 revert go-jwt update because of lico incompatibility 2022-03-24 16:44:36 +01:00
Willy Kloucek a4406805fe update dependencies 2022-03-24 15:59:36 +01:00
Willy Kloucek 23571e7d47 Merge pull request #3356 from owncloud/dependabot/go_modules/github.com/grpc-ecosystem/grpc-gateway/v2-2.10.0
Bump github.com/grpc-ecosystem/grpc-gateway/v2 from 2.8.0 to 2.10.0
2022-03-24 14:47:22 +01:00
Willy Kloucek 3a0f43a4ab Merge pull request #3336 from owncloud/rename-space-manager-to-space-admin
rename space manager to space admin
2022-03-24 13:35:02 +01:00
Willy Kloucek 64f4a963cc Automated changelog update [skip ci] 2022-03-24 12:08:49 +00:00
Willy Kloucek 4f13ac6fef Merge pull request #3192 from owncloud/nats-check-for-error
[full-ci] use NATS JetStream
2022-03-24 13:08:15 +01:00
Willy Kloucek 90d5ef3c9d Merge branch 'master' into nats-check-for-error 2022-03-24 12:27:15 +01:00
Jörn Friedrich Dreyer b0745e115f Automated changelog update [skip ci] 2022-03-24 09:58:08 +00:00
Jörn Friedrich Dreyer 1024fe3e88 use publicstorage rewrite (#3349)
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2022-03-24 10:57:13 +01:00
Ralf Haferkamp f4d338b825 Merge pull request #3372 from rhafer/idm-doc
[docs-only] Add a few words about idm and how to enable it
2022-03-24 08:41:10 +01:00
Phil Davis cf67d2502b Merge pull request #3381 from owncloud/grammar-2022-03-24
[docs-only] Some grammar that the IDE noticed while I had these docs open
2022-03-24 13:25:40 +05:45
Ralf Haferkamp 31f2bb778d Merge pull request #3371 from rhafer/svc-user-settings
Add service user for settings service
2022-03-24 08:38:06 +01:00
Phil Davis 02a9247e80 Some grammar that the IDE noticed while I had these docs open 2022-03-24 13:05:26 +05:45
Willy Kloucek b2b11c4de8 update reva to have cs3org/reva#2574 2022-03-24 08:18:57 +01:00
Willy Kloucek e91cf64a7b let nats start jetstream by itself 2022-03-24 08:10:07 +01:00
Artur Neumann a6b1bae29e Merge pull request #3374 from owncloud/bump-core-commit-id-20220323-b
[tests-only] Bump core commit id to include cofre PR 39914
2022-03-24 09:03:19 +05:45
Pascal Wengerter 1c2d8d97ad Automated changelog update [skip ci] 2022-03-23 15:47:06 +00:00
Pascal Wengerter cf266429cd Merge pull request #3375 from owncloud/bump-web-v5.3.0
[full-ci] Bump web to v5.3.0
2022-03-23 16:46:42 +01:00
Ralf Haferkamp 517356f176 graph: Allow PATCH on user without 'mail' in body
Skip the mail validator if 'mail' attribute is not present in the
request.
2022-03-23 15:56:31 +01:00
Ralf Haferkamp 1f185c1fe6 [docs-only] Add a few words about idm and how to enable it 2022-03-23 14:58:48 +01:00
Pascal Wengerter 0f6308448a Bump web to v5.3.0 2022-03-23 14:31:17 +01:00
Phil Davis 20125eff9d Bump core commit id to include cofre PR 39914 2022-03-23 18:00:41 +05:45
PKiran a99f725c00 Merge pull request #3369 from owncloud/bump-commit-id-2022-03-23
[tests-only] Bump core commit id 2022-03-23
2022-03-23 17:58:10 +05:45
Ralf Haferkamp 1090d3c961 Add service user for settings service
This is a quick workaround to make the settings service work with idm
after b7c934b1b1. We need to to provide a better solution for service
users like that (they shouldn't need to be present in ldap)
2022-03-23 12:34:24 +01:00
Michael Barz 0e9c1e5a68 Update settings.yml 2022-03-23 11:54:17 +01:00
Sawjan Gurung 6c555e25d0 Merge pull request #3367 from owncloud/fix-deploy-image
[full-ci] Fix image name for deploy pipeline
2022-03-23 16:08:49 +05:45
Willy Kloucek c049a3ecfb rename space manager to space admin 2022-03-23 10:40:36 +01:00
Willy Kloucek 09021c02a1 make cluster id configurable 2022-03-23 10:36:02 +01:00
Phil Davis 763d294a9b Bump core commit id 2022-03-23 2022-03-23 15:10:37 +05:45
Willy Kloucek 10f190d7f4 make nats jetstream store dir configurable 2022-03-23 10:15:27 +01:00
saw-jan 081ad66b89 fix image name for deploy pipeline 2022-03-23 14:54:52 +05:45
Willy Kloucek 6d0ac681c8 add changelog 2022-03-23 09:56:44 +01:00
Willy Kloucek 17ca9c4165 update github.com/asim/go-micro/plugins/events/natsjs 2022-03-23 09:56:44 +01:00
Willy Kloucek 536bf301f7 revert reva replace 2022-03-23 09:56:44 +01:00
Willy Kloucek 6571d42377 fix nats clients for audit and notifications 2022-03-23 09:56:44 +01:00
Willy Kloucek 1271b67758 switch to NATS JetStream 2022-03-23 09:56:43 +01:00
Michael Barz 3f39567373 Merge pull request #3350 from aduffeck/use-cs3-publicshare-manager
[full-ci] Add support for the cs3 publicshare manager
2022-03-22 20:30:51 +01:00
André Duffeck fd6b0016b4 Add support for the cs3 publicshare manager 2022-03-22 18:35:12 +01:00
Phil Davis 213956c58f Merge pull request #3358 from owncloud/bump-core-commit-id-20220322
[tests-only] [full-ci] Bump CORE_COMMITID
2022-03-22 18:32:57 +05:45
Ralf Haferkamp 31f08da4a7 Automated changelog update [skip ci] 2022-03-22 12:39:33 +00:00
Ralf Haferkamp 0b96121ea3 Merge pull request #3357 from rhafer/graph-getuser-err
Fix error handling in GetUsers
2022-03-22 13:39:08 +01:00
Phil Davis 6eac77b7d7 Bump CORE_COMMITID 2022-03-22 17:16:12 +05:45
Ralf Haferkamp 3c16713869 Fix error handling in GetUsers
A missing return statement caused GetUsers to return misleading results
when the identity backend returned an error.
2022-03-22 10:08:32 +01:00
dependabot[bot] cf0f096bb0 Bump github.com/grpc-ecosystem/grpc-gateway/v2 from 2.8.0 to 2.10.0
Bumps [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway) from 2.8.0 to 2.10.0.
- [Release notes](https://github.com/grpc-ecosystem/grpc-gateway/releases)
- [Changelog](https://github.com/grpc-ecosystem/grpc-gateway/blob/master/.goreleaser.yml)
- [Commits](https://github.com/grpc-ecosystem/grpc-gateway/compare/v2.8.0...v2.10.0)

---
updated-dependencies:
- dependency-name: github.com/grpc-ecosystem/grpc-gateway/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-22 06:21:30 +00:00
Phil Davis 1265fd6bc2 Merge pull request #3347 from owncloud/update-drone-star-file
[CI] Updated drone.star file to match latest changes
2022-03-22 10:19:59 +05:45
Phil Davis a463984c56 Sort image constants in .drone.star 2022-03-22 03:19:51 +05:45
Prarup Gurung e187072d38 Updated drone star file 2022-03-22 03:13:46 +05:45
Willy Kloucek 10b3a61f43 Merge pull request #3355 from rhafer/idm-dflt-cfg
Fix default config for idm
2022-03-21 18:31:59 +01:00
Ralf Haferkamp e47466ca22 bump libregraph/idm to lastest master 2022-03-21 17:27:18 +01:00
Ralf Haferkamp 59770ef968 Fix default config for idm
It seems some defaults got lost when moving default to defaults/defaultconfig.go
2022-03-21 16:15:01 +00:00
kobergj 7bc6596924 Space events audit logging (#3346)
* space created event

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

* space renamed event

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

* disable, enable & delete events

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

* use edge reva

Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-21 11:01:08 +01:00
Andre Duffeck ed417ea1c9 Add support for the cs3 metadata storage share manager (#3290)
* Add support for the cs3 share manager

* Name the cs3 storage config options generically so they can be reused

* Set default value for CS3ServiceUserIdp
2022-03-21 10:19:48 +01:00
kobergj 40062ca6d6 Automated changelog update [skip ci] 2022-03-18 10:54:41 +00:00
kobergj fd99aef90b File events audit logging (#3332)
* use feature reva & file config

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

* pre-implementation

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

* add changelog

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

* prerequesists for unit tests

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

* file created event

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

* remaining tests & events

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

* use edge reva

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

* improvements from manual testing

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

* use utils package to generate itemID

Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-18 11:53:50 +01:00
David Christofas 4cc088d0ea Automated changelog update [skip ci] 2022-03-18 08:13:27 +00:00
David Christofas e0a35d37c3 Merge pull request #3329 from owncloud/password-reset-link
add password reset link to login page
2022-03-18 09:09:06 +01:00
Pascal Wengerter ae50a4d507 Merge pull request #3306 from owncloud/dependabot/npm_and_yarn/settings/babel/register-7.17.0
Bump @babel/register from 7.15.3 to 7.17.0 in /settings
2022-03-17 19:31:34 +01:00
Pascal Wengerter 1e35c983a1 Merge pull request #3307 from owncloud/dependabot/npm_and_yarn/settings/babel/plugin-proposal-export-default-from-7.16.7
Bump @babel/plugin-proposal-export-default-from from 7.14.5 to 7.16.7 in /settings
2022-03-17 19:30:56 +01:00
Willy Kloucek 00f614497d Merge pull request #3338 from owncloud/dependabot/go_modules/github.com/urfave/cli/v2-2.4.0
Bump github.com/urfave/cli/v2 from 2.3.0 to 2.4.0
2022-03-17 12:50:06 +01:00
dependabot[bot] ade7a1c675 Bump github.com/urfave/cli/v2 from 2.3.0 to 2.4.0
Bumps [github.com/urfave/cli/v2](https://github.com/urfave/cli) from 2.3.0 to 2.4.0.
- [Release notes](https://github.com/urfave/cli/releases)
- [Changelog](https://github.com/urfave/cli/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/urfave/cli/compare/v2.3.0...v2.4.0)

---
updated-dependencies:
- dependency-name: github.com/urfave/cli/v2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-17 10:29:14 +00:00
Willy Kloucek 6e2ebc068d Merge pull request #3335 from owncloud/dependabot/go_modules/go.opentelemetry.io/otel/sdk-1.5.0
Bump go.opentelemetry.io/otel/sdk from 1.4.1 to 1.5.0
2022-03-17 11:26:44 +01:00
dependabot[bot] 781cd3d6a3 Bump go.opentelemetry.io/otel/sdk from 1.4.1 to 1.5.0
Bumps [go.opentelemetry.io/otel/sdk](https://github.com/open-telemetry/opentelemetry-go) from 1.4.1 to 1.5.0.
- [Release notes](https://github.com/open-telemetry/opentelemetry-go/releases)
- [Changelog](https://github.com/open-telemetry/opentelemetry-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/open-telemetry/opentelemetry-go/compare/v1.4.1...v1.5.0)

---
updated-dependencies:
- dependency-name: go.opentelemetry.io/otel/sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-17 06:16:41 +00:00
Phil Davis cd8c539cbb Automated changelog update [skip ci] 2022-03-16 22:55:29 +00:00
Phil Davis 026b970c54 Merge pull request #3330 from owncloud/update-reva
[full-ci] update reva to v2.0.0-20220316045927-99115670eb33
2022-03-17 04:39:49 +05:45
Willy Kloucek eec49616d0 fix go.mod conflict and remove passing test from expected failure 2022-03-16 22:26:59 +01:00
Michael Barz 0cf3810009 Automated changelog update [skip ci] 2022-03-16 20:37:13 +00:00
Michael Barz cc825d5658 Merge pull request #3283 from owncloud/drive-alias
[full-ci] add driveAlias to the graphAPI
2022-03-16 21:36:39 +01:00
Michael Barz 7a0e28a420 add drive alias to unit tests 2022-03-16 20:15:23 +01:00
Ralf Haferkamp 439c20307d Merge pull request #3323 from rhafer/defaultrole
Fix CreateHome for external users
2022-03-16 18:21:28 +01:00
Michael Barz ec93e423bd fix expected failures 2022-03-16 17:25:34 +01:00
Michael Barz 0773b66325 add space alias config to s3ng and ocis driver 2022-03-16 16:38:32 +01:00
Ralf Haferkamp 6abf38dd3a Fix CreateHome for external users
External users, when logging in for the first time, have no role
assigned and are unable to create their home because that requires the
create-space permission. This assigns users that don't have a role assigned
to the default user role and persists that assignment in the settings
service so that CreateHome can pick it up when checking permissions
later.

This also disables the auto creation of the user's home in the reva
auth provider (i.e. when using basic auth) as the role assignement has
not happenend at that point. So the home creation will now always happen
in the CreateHome middleware in the proxy.
2022-03-16 15:58:19 +01:00
David Christofas 661baaab67 add password reset link to login page 2022-03-16 15:50:45 +01:00
Michael Barz 3a59c7ec4c add driveAlias to the graphAPI 2022-03-16 15:38:40 +01:00
David Christofas 5bf1829231 update reva to v2.0.0-20220316045927-99115670eb33 2022-03-16 15:23:41 +01:00
Jörn Friedrich Dreyer b3a1a14740 Merge pull request #3322 from owncloud/docsaddnfs
[docsonly] Documentation about a test running oCIS over NFS.
2022-03-16 11:41:44 +01:00
Michael Barz 380f1c9dcc Merge pull request #3326 from owncloud/dependabot/go_modules/github.com/owncloud/libre-graph-api-go-0.13.1
Bump github.com/owncloud/libre-graph-api-go from 0.12.0 to 0.13.1
2022-03-16 09:39:44 +01:00
David Christofas 1960080c59 Merge pull request #3327 from owncloud/dependabot/go_modules/github.com/stretchr/testify-1.7.1
Bump github.com/stretchr/testify from 1.7.0 to 1.7.1
2022-03-16 09:37:47 +01:00
dependabot[bot] ad6c2e1d6d Bump github.com/stretchr/testify from 1.7.0 to 1.7.1
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.0...v1.7.1)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-16 06:15:10 +00:00
dependabot[bot] e3e1c79bb5 Bump github.com/owncloud/libre-graph-api-go from 0.12.0 to 0.13.1
Bumps [github.com/owncloud/libre-graph-api-go](https://github.com/owncloud/libre-graph-api-go) from 0.12.0 to 0.13.1.
- [Release notes](https://github.com/owncloud/libre-graph-api-go/releases)
- [Commits](https://github.com/owncloud/libre-graph-api-go/compare/v0.12.0...v0.13.1)

---
updated-dependencies:
- dependency-name: github.com/owncloud/libre-graph-api-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-16 06:15:05 +00:00
Phil Davis c7b23e1956 Merge pull request #3325 from owncloud/bump-core-commit-id-20220316
[tests-only] [full-ci] Bump core commit id
2022-03-16 11:34:25 +05:45
Phil Davis e98b180c11 Bump core commit id 2022-03-16 10:19:35 +05:45
Artur Neumann e39bb860ae Merge pull request #3316 from owncloud/bump-core-commit-id-20220315
[tests-only] [full-ci] Bump core commit id
2022-03-16 09:40:37 +05:45
ownClouders 3890ecd99d [tx] updated from transifex 2022-03-16 01:23:11 +00:00
Phil Davis 62824341b2 Adjust expected-failures 2022-03-16 03:55:03 +05:45
Phil Davis 7d17d3f5a0 Bump core commit id 2022-03-16 03:55:03 +05:45
Willy Kloucek 8550a4f07e Automated changelog update [skip ci] 2022-03-15 20:53:43 +00:00
Willy Kloucek 5a67a2098c Merge pull request #3232 from kobergj/StoreSettingsViaMetadata
[full-ci] Store settings via metadata
2022-03-15 21:49:58 +01:00
Willy Kloucek b0ea1deb91 Merge pull request #3321 from rhafer/bump-idp
Bump lico to v0.54.0
2022-03-15 21:25:57 +01:00
Klaas Freitag 58ac0ce367 Documentation about a test running oCIS over NFS. 2022-03-15 17:34:57 +01:00
Ralf Haferkamp 100fb99d1a Bump lico to v0.54.0 2022-03-15 17:16:30 +01:00
David Christofas 0309dd532c Merge pull request #3320 from owncloud/fix-graph-jwt-secret
fix graph jwt secret
2022-03-15 17:11:21 +01:00
Willy Kloucek 67b5458894 fix graph jwt secret from OCS_JWT_SECRET to GRAPH_JWT_SECRET 2022-03-15 15:58:02 +01:00
jkoberg d54f75df8b don't store service user data in metadataservice
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-15 12:11:52 +01:00
jkoberg b7c934b1b1 use service user / hardcode idp
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-15 10:37:34 +01:00
André Duffeck edf845225a Only add the service user to the index once (lazily)
Adding and removing it again with each ListAccounts() call was a huge
overhead. This is a temporary workaround, the whole service is gonna be
replaced by the idm service soon anyway.
2022-03-15 10:07:19 +01:00
jkoberg 65b3c97a6c Merge branch 'master' into StoreSettingsViaMetadata 2022-03-14 16:26:30 +01:00
Willy Kloucek 51d1eb0182 Merge pull request #3313 from owncloud/audit-config-docs
fix audit config docs generation
2022-03-14 16:23:46 +01:00
Willy Kloucek 899510b158 fix config package import 2022-03-14 15:26:32 +01:00
Willy Kloucek e5cae733b1 fix audit config docs 2022-03-14 14:21:37 +01:00
jkoberg 2d4d90ad3c Merge branch 'master' into StoreSettingsViaMetadata
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-14 13:48:04 +01:00
Willy Kloucek 6cd3827e2d Automated changelog update [skip ci] 2022-03-14 12:10:25 +00:00
Willy Kloucek 417b112863 Merge pull request #3301 from kobergj/ShareEventsForAuditLogging
Share events for audit logging
2022-03-14 13:09:56 +01:00
Willy Kloucek a7fe756004 Merge pull request #3287 from owncloud/config-example-yaml-v2
Generate config file documentation
2022-03-14 13:09:14 +01:00
Willy Kloucek 7f02ab1652 Merge pull request #3312 from owncloud/audit-docs
add audit docs section
2022-03-14 13:08:45 +01:00
jkoberg 5ea1cec83a use UTC timezone to avoid confusion
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-14 11:03:30 +01:00
jkoberg 50d3ef44a4 bump reva & run unit tests
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-14 10:44:29 +01:00
Benedikt Kulmann 96ad1708fd Merge pull request #3297 from owncloud/katherine-johnson
add katherine to demo users
2022-03-14 09:14:38 +01:00
Willy Kloucek 6afa610f08 Automated changelog update [skip ci] 2022-03-14 08:12:19 +00:00
Willy Kloucek 2d44e9e07b Merge pull request #3238 from rpocklin/ocis-individual-services-fix-external-network
fix: remove need for external ocis-net network
2022-03-14 09:11:46 +01:00
Willy KloucekandPascal Wengerter 0d362aec3f Update changelog/unreleased/fix-network-on-individual-services.md
Co-authored-by: Pascal Wengerter <pascal@wengerter.info>
2022-03-14 09:07:24 +01:00
Robert Pocklington 6b3775af9c Added changelog item 2022-03-14 09:07:24 +01:00
Robert Pocklington 3964fc9aa9 fix: remove need for external ocis-net network 2022-03-14 09:07:24 +01:00
Willy Kloucek 5bd453c5a5 add audit docs section 2022-03-14 09:04:42 +01:00
dependabot[bot] 959bbbe9c7 Bump @babel/plugin-proposal-export-default-from in /settings
Bumps [@babel/plugin-proposal-export-default-from](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-proposal-export-default-from) from 7.14.5 to 7.16.7.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.16.7/packages/babel-plugin-proposal-export-default-from)

---
updated-dependencies:
- dependency-name: "@babel/plugin-proposal-export-default-from"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 06:03:35 +00:00
dependabot[bot] a60c686de4 Bump @babel/register from 7.15.3 to 7.17.0 in /settings
Bumps [@babel/register](https://github.com/babel/babel/tree/HEAD/packages/babel-register) from 7.15.3 to 7.17.0.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.17.0/packages/babel-register)

---
updated-dependencies:
- dependency-name: "@babel/register"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-14 06:03:26 +00:00
jkoberg 22bb75a5e4 link access events
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-12 14:32:23 +01:00
jkoberg f01263859b share accepted/declined events
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-12 14:19:41 +01:00
jkoberg 2fa08495f7 more unit tests and events
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-12 13:43:51 +01:00
jkoberg ef642ac135 refactor unit tests
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-12 13:08:46 +01:00
Willy Kloucek 5f5e935f7a Automated changelog update [skip ci] 2022-03-12 10:06:03 +00:00
Willy Kloucek 41bdfb6668 Merge pull request #3305 from owncloud/improve-gif-thumbnails
improve gif thumbnail generation
2022-03-12 11:03:25 +01:00
David Christofas a01cd1f0ee improve gif thumbnail generation 2022-03-11 18:29:06 +01:00
Willy Kloucek 1a9d4462b6 resolve conflicts 2022-03-11 16:24:08 +01:00
Willy Kloucek 43321cc2cf make the space manager role work 2022-03-11 15:46:59 +01:00
jkoberg 0de5dac34c share/link removed events
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-11 13:49:34 +01:00
Willy Kloucek c829dbe577 remove error form accounts' EnsureDefaults() function 2022-03-11 13:43:34 +01:00
Willy Kloucek 6aeb80f771 add spacemanager role 2022-03-11 13:17:08 +01:00
Willy Kloucek 343fc0a73c add katherine to demo users 2022-03-11 13:17:08 +01:00
Willy Kloucek 46643b049e Merge pull request #3300 from owncloud/doc-fix-single-bin-start
[docs-only] Fix the location of the identifier-registration.yaml.
2022-03-11 12:55:01 +01:00
jkoberg 5f45e77967 add changelog
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-11 12:51:35 +01:00
jkoberg 7f0fff0806 link created/updated event
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-11 12:46:24 +01:00
jkoberg c7952c247d share updated event
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-11 12:14:46 +01:00
Willy Kloucek 9a4737d3ed exclude config items not inteded to be used from un/marshalling 2022-03-11 12:12:44 +01:00
Phil Davis 0264f09b6c Merge pull request #3298 from owncloud/bump-commit-id-20220311
[full-ci][tests-only] Bump core commit id
2022-03-11 16:32:46 +05:45
Klaas Freitag 249d4eae97 Fix the location of the identifier-registration.yaml. 2022-03-11 11:31:35 +01:00
Christian Richter 351733c110 Update template to render directly to docs includes directory
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-03-11 11:06:47 +01:00
Christian Richter a9d713d267 Fix broken template for env variables
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-03-11 10:21:41 +01:00
sushmita56 5ac6bfa1be bumped core commit id in ocis 2022-03-11 14:58:31 +05:45
Benedikt Kulmann 6b2953a357 Merge pull request #3270 from owncloud/migrate-port-ranges-from-wiki
migrate GH wiki to owncloud.dev
2022-03-11 09:15:59 +01:00
Swikriti Tripathi fb5c3859eb update expected to fail file 2022-03-11 13:19:10 +05:45
Christian Richter 2fa5788ca4 Change target of example config YAML
Signed-off-by: Christian Richter <crichter@owncloud.com>
2022-03-11 08:09:46 +01:00
Christian Richter 3a34e64dde Fix tests 2022-03-11 08:08:33 +01:00
Willy Kloucek 4bafd761f4 Merge pull request #3299 from owncloud/dependabot/go_modules/github.com/spf13/cobra-1.4.0
Bump github.com/spf13/cobra from 1.3.0 to 1.4.0
2022-03-11 07:59:14 +01:00
Willy Kloucek a88c532e9c Merge pull request #3294 from owncloud/dependabot/go_modules/google.golang.org/grpc-1.45.0
Bump google.golang.org/grpc from 1.44.0 to 1.45.0
2022-03-11 07:57:59 +01:00
Swikriti Tripathi ab35492578 update id 2022-03-11 12:24:52 +05:45
dependabot[bot] b69f3a0a7d Bump github.com/spf13/cobra from 1.3.0 to 1.4.0
Bumps [github.com/spf13/cobra](https://github.com/spf13/cobra) from 1.3.0 to 1.4.0.
- [Release notes](https://github.com/spf13/cobra/releases)
- [Changelog](https://github.com/spf13/cobra/blob/master/CHANGELOG.md)
- [Commits](https://github.com/spf13/cobra/compare/v1.3.0...v1.4.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/cobra
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-11 06:15:26 +00:00
Prarup Gurung 911f648769 Updated expected to fail for apiWebdavLocks and apiWebdavPreviews 2022-03-11 10:27:50 +05:45
Swikriti Tripathi 1bb17b19d7 update expected to fail for apiWebdavMove2 2022-03-11 10:14:24 +05:45
Swikriti Tripathi a86176838d bump core commit id 2022-03-11 09:22:23 +05:45
Christian Richter 59eaf7c1b8 Output example yaml 2022-03-10 15:35:02 +01:00
Michael Barz c7d6aa6186 Merge pull request #3295 from owncloud/download-mirror
adapt new folder layout on the download mirror
2022-03-10 14:41:27 +01:00
Christian Richter 77d9e77e91 Update configextractor to support multiple templates 2022-03-10 14:12:27 +01:00
Christian Richter 9734b000b3 Add defaultconfig to extensions 2022-03-10 14:12:26 +01:00
Willy Kloucek f2e8c90067 proof of concept 2022-03-10 14:11:44 +01:00
dependabot[bot] 9283a0bc35 Bump google.golang.org/grpc from 1.44.0 to 1.45.0
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.44.0 to 1.45.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.44.0...v1.45.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-10 13:09:41 +00:00
Willy Kloucek ee584bf865 Merge pull request #3293 from owncloud/dependabot/go_modules/github.com/nats-io/nats-streaming-server-0.24.3
Bump github.com/nats-io/nats-streaming-server from 0.24.2 to 0.24.3
2022-03-10 14:08:23 +01:00
Willy Kloucek bc3be2d640 format starlark 2022-03-10 13:07:05 +01:00
Pascal Wengerter 77e3e5a900 Automated changelog update [skip ci] 2022-03-10 11:50:55 +00:00
Pascal Wengerter 002b77019b Merge pull request #3291 from owncloud/update-web-5-3-0-rc1
[full-ci] Bump web to v5.3.0-rc.1
2022-03-10 12:50:22 +01:00
Pascal Wengerter a01dbd789a Merge pull request #3281 from owncloud/dependabot/npm_and_yarn/settings/eslint-7.32.0
Bump eslint from 7.22.0 to 7.32.0 in /settings
2022-03-10 10:47:11 +01:00
Pascal Wengerter 3a854d8349 Bump web to v5.3.0-rc.1 2022-03-10 10:20:26 +01:00
Willy Kloucek 71235e1e2d adapt new folder layout on the download mirror 2022-03-10 09:50:56 +01:00
dependabot[bot] 3084fa8341 Bump github.com/nats-io/nats-streaming-server from 0.24.2 to 0.24.3
Bumps [github.com/nats-io/nats-streaming-server](https://github.com/nats-io/nats-streaming-server) from 0.24.2 to 0.24.3.
- [Release notes](https://github.com/nats-io/nats-streaming-server/releases)
- [Changelog](https://github.com/nats-io/nats-streaming-server/blob/main/.goreleaser.yml)
- [Commits](https://github.com/nats-io/nats-streaming-server/compare/v0.24.2...v0.24.3)

---
updated-dependencies:
- dependency-name: github.com/nats-io/nats-streaming-server
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-10 08:45:41 +00:00
Willy Kloucek a1d170c9f7 Merge pull request #3292 from owncloud/dependabot/go_modules/github.com/nats-io/nats-server/v2-2.7.4
Bump github.com/nats-io/nats-server/v2 from 2.7.3 to 2.7.4
2022-03-10 09:44:13 +01:00
Willy Kloucek 4017d20cb2 Merge pull request #3288 from kobergj/BringAuditToMonorepo
Bring audit to monorepo
2022-03-10 09:37:59 +01:00
Viktor Scharf 3e2d1582a3 [tests-only] ApiTest: set space image/description to space (#3289)
* add tests: set space image/description to space

* php style fix. add checking that file exists
2022-03-10 09:29:26 +01:00
dependabot[bot] 0edbf9147c Bump github.com/nats-io/nats-server/v2 from 2.7.3 to 2.7.4
Bumps [github.com/nats-io/nats-server/v2](https://github.com/nats-io/nats-server) from 2.7.3 to 2.7.4.
- [Release notes](https://github.com/nats-io/nats-server/releases)
- [Changelog](https://github.com/nats-io/nats-server/blob/main/.goreleaser.yml)
- [Commits](https://github.com/nats-io/nats-server/compare/v2.7.3...v2.7.4)

---
updated-dependencies:
- dependency-name: github.com/nats-io/nats-server/v2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-10 06:16:08 +00:00
Ralf Haferkamp f0954b2197 Merge pull request #3260 from rhafer/idm-demousers
idm: Allow to create demo and service users on startup
2022-03-09 18:20:12 +01:00
Ralf Haferkamp 26abb6361b bump libregraph/idm to lastest master 2022-03-09 15:18:15 +01:00
Ralf Haferkamp 436399e8ea idm: Allow to create demo and service users on startup
Uses go:embed to include the demo and service users from LDIF.
Using a template file for the service users to be able to set
custom passwords via config/env.

In order to switch ocis to use idm instead of accounts/glauth it
currently needs to be started with this env:

GRAPH_IDENTITY_BACKEND=ldap
GRAPH_LDAP_URI=ldaps://localhost:9235
GRAPH_LDAP_BIND_DN="uid=libregraph,ou=sysusers,o=libregraph-idm"
GRAPH_LDAP_BIND_PASSWORD=idm
GRAPH_LDAP_USER_EMAIL_ATTRIBUTE=mail
GRAPH_LDAP_USER_NAME_ATTRIBUTE=uid
GRAPH_LDAP_USER_BASE_DN="ou=users,o=libregraph-idm"
GRAPH_LDAP_GROUP_BASE_DN="ou=groups,o=libregraph-idm"
GRAPH_LDAP_SERVER_WRITE_ENABLED="true"
IDP_LDAP_FILTER="(&(objectclass=inetOrgPerson)(objectClass=owncloud))"
IDP_LDAP_URI=ldaps://localhost:9235
IDP_LDAP_BIND_DN="uid=idp,ou=sysusers,o=libregraph-idm"
IDP_LDAP_BIND_PASSWORD="idp"
IDP_LDAP_BASE_DN="ou=users,o=libregraph-idm"
IDP_LDAP_LOGIN_ATTRIBUTE=uid
IDP_LDAP_UUID_ATTRIBUTE="ownclouduuid"
IDP_LDAP_UUID_ATTRIBUTE_TYPE=binary
PROXY_ACCOUNT_BACKEND_TYPE=cs3
OCS_ACCOUNT_BACKEND_TYPE=cs3
STORAGE_LDAP_HOSTNAME=localhost
STORAGE_LDAP_PORT=9235
STORAGE_LDAP_INSECURE="true"
STORAGE_LDAP_BASE_DN="o=libregraph-idm"
STORAGE_LDAP_BIND_DN="uid=reva,ou=sysusers,o=libregraph-idm"
STORAGE_LDAP_BIND_PASSWORD=reva
STORAGE_LDAP_LOGINFILTER='(&(objectclass=inetOrgPerson)(objectclass=owncloud)(|(uid={{login}})(mail={{login}})))'
STORAGE_LDAP_USERFILTER='(&(objectclass=inetOrgPerson)(objectclass=owncloud)(|(ownclouduuid={{.OpaqueId}})(uid={{.OpaqueId}})))'
STORAGE_LDAP_USERATTRIBUTEFILTER='(&(objectclass=owncloud)({{attr}}={{value}}))'
STORAGE_LDAP_USERFINDFILTER='(&(objectclass=owncloud)(|(uid={{query}}*)(cn={{query}}*)(displayname={{query}}*)(mail={{query}}*)(description={{query}}*)))'
STORAGE_LDAP_GROUPFILTER='(&(objectclass=groupOfNames)(objectclass=owncloud)(ownclouduuid={{.OpaqueId}}*))'
OCIS_INSECURE=true
2022-03-09 15:18:15 +01:00
Jörn Friedrich Dreyer dc324b2e2b Automated changelog update [skip ci] 2022-03-09 11:07:11 +00:00
Jörn Friedrich Dreyer 139e437b97 Merge pull request #3272 from owncloud/animated-gif-thumbnails
Change thumbnails API and implement gif thumbnails
2022-03-09 12:06:16 +01:00
jkoberg cb5e38f4cb review suggestions I
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-09 10:50:19 +01:00
jkoberg 7c85fafb54 final touches
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-09 10:11:27 +01:00
David Christofas 95ae3b8762 rewrite thumbnails API
Improved the thumbnails API so that the binary files won't be
transported via GRPC. GRPC has a limited message size and isn't very
effiefficient with large binary data.
2022-03-08 23:12:43 +01:00
jkoberg 70afcf52eb unit test for audit service
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-08 16:16:55 +01:00
jkoberg 773ada6873 refactor audit logging
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-08 15:41:49 +01:00
jkoberg 1609bb3a7c make service start
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-08 14:44:39 +01:00
jkoberg f0671015f8 initial draft
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-08 11:25:26 +01:00
Ralf Haferkamp 0dcf9524f0 Merge pull request #3285 from owncloud/dependabot/go_modules/github.com/owncloud/libre-graph-api-go-0.12.0
Bump github.com/owncloud/libre-graph-api-go from 0.11.0 to 0.12.0
2022-03-08 11:19:46 +01:00
jkoberg 40cfa90b28 rebase to edge reva
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-08 10:33:28 +01:00
dependabot[bot] 0487ed994f Bump github.com/owncloud/libre-graph-api-go from 0.11.0 to 0.12.0
Bumps [github.com/owncloud/libre-graph-api-go](https://github.com/owncloud/libre-graph-api-go) from 0.11.0 to 0.12.0.
- [Release notes](https://github.com/owncloud/libre-graph-api-go/releases)
- [Commits](https://github.com/owncloud/libre-graph-api-go/compare/v0.11.0...v0.12.0)

---
updated-dependencies:
- dependency-name: github.com/owncloud/libre-graph-api-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-08 06:13:27 +00:00
jkoberg 2f55febc52 Merge branch 'master' into StoreSettingsViaMetadata 2022-03-07 17:49:13 +01:00
dependabot[bot] 8393a7789c Bump eslint from 7.22.0 to 7.32.0 in /settings
Bumps [eslint](https://github.com/eslint/eslint) from 7.22.0 to 7.32.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v7.22.0...v7.32.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 16:31:25 +00:00
Pascal Wengerter c15738716f Merge pull request #3274 from owncloud/dependabot/npm_and_yarn/settings/rollup-plugin-filesize-9.1.2
Bump rollup-plugin-filesize from 9.1.1 to 9.1.2 in /settings
2022-03-07 17:28:35 +01:00
Pascal Wengerter a12f228b71 Merge pull request #3273 from owncloud/dependabot/npm_and_yarn/settings/ldapjs-2.3.2
Bump ldapjs from 2.3.1 to 2.3.2 in /settings
2022-03-07 17:27:32 +01:00
jkoberg 9f8e7e8a93 TMP: use adminuser/disable service user
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-07 16:41:58 +01:00
jkoberg f4619dbb47 make service user configurable
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-07 11:55:33 +01:00
jkoberg 7bfeb162bc use settings user
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-07 11:12:57 +01:00
Michael Barz 64fdc09fc5 Automated changelog update [skip ci] 2022-03-07 09:54:47 +00:00
Michael Barz b7ce1c6815 Merge pull request #3279 from owncloud/release-1.18.0
Release 1.18.0
2022-03-07 10:54:16 +01:00
Michael Barz c14903cfe7 fix changelog for reva 2022-03-07 10:03:40 +01:00
Willy Kloucek eea1e23d1b Merge pull request #3268 from owncloud/nats-stan-fixes
[full-ci] NATS integration fixes
2022-03-07 09:59:08 +01:00
Willy Kloucek 37b56d920e incorporate review feedback 2022-03-07 08:15:50 +01:00
dependabot[bot] d7d6a33aaf Bump rollup-plugin-filesize from 9.1.1 to 9.1.2 in /settings
Bumps [rollup-plugin-filesize](https://github.com/ritz078/rollup-plugin-filesize) from 9.1.1 to 9.1.2.
- [Release notes](https://github.com/ritz078/rollup-plugin-filesize/releases)
- [Commits](https://github.com/ritz078/rollup-plugin-filesize/commits)

---
updated-dependencies:
- dependency-name: rollup-plugin-filesize
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 06:03:22 +00:00
dependabot[bot] 98e5a320a8 Bump ldapjs from 2.3.1 to 2.3.2 in /settings
Bumps [ldapjs](https://github.com/ldapjs/node-ldapjs) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/ldapjs/node-ldapjs/releases)
- [Changelog](https://github.com/ldapjs/node-ldapjs/blob/master/CHANGES.md)
- [Commits](https://github.com/ldapjs/node-ldapjs/compare/v2.3.1...v2.3.2)

---
updated-dependencies:
- dependency-name: ldapjs
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-07 06:03:14 +00:00
jkoberg 0af1c98d38 Revert "tmp: use custom web branch to uncover the error"
This reverts commit b8aaed66a0.
2022-03-05 13:47:13 +01:00
jkoberg d8242232e4 clean up
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-05 13:46:10 +01:00
jkoberg 429ed2ee76 use different user
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-05 13:11:09 +01:00
jkoberg 1205d3489e illustrate the problem
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-05 13:01:11 +01:00
jkoberg 1d98e4827e add caching
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-05 12:57:57 +01:00
David Christofas d6182a4ea1 generate animated thumbnails for animated gifs 2022-03-04 19:13:48 +01:00
jkoberg fc5a67c45e sonarcloud part II
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-04 16:04:40 +01:00
jkoberg 6ff9df9f58 Merge branch 'master' into StoreSettingsViaMetadata 2022-03-04 15:51:03 +01:00
Willy Kloucek f1257a5a37 disable the wiki 2022-03-04 15:48:40 +01:00
Willy Kloucek 3892598bbb add port ranges from the wiki (rephrased) 2022-03-04 15:47:56 +01:00
jkoberg 2ae4959afb sonarcloud suggestions
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-04 15:42:46 +01:00
David Christofas 0849563810 Automated changelog update [skip ci] 2022-03-04 14:06:10 +00:00
David Christofas 78962ec498 Merge pull request #3267 from owncloud/spaces-etags
include spaces etags in drives listing
2022-03-04 15:05:10 +01:00
David Christofas 66f4198e12 include spaces etags in drives listing 2022-03-04 14:23:37 +01:00
jkoberg b8aaed66a0 tmp: use custom web branch to uncover the error
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-04 14:11:03 +01:00
Willy Kloucek 26852f1850 make nats killable 2022-03-04 13:46:02 +01:00
Willy Kloucek 3a60056bb3 transfer logic into nats server package 2022-03-04 13:46:02 +01:00
Willy Kloucek 4306c22860 check running nats server for errors 2022-03-04 13:46:01 +01:00
Patrick Maier 13600c2225 Merge pull request #3265 from owncloud/1.18_release_notes
[docs-only] oCIS 1.18 Release Notes
2022-03-04 13:44:55 +01:00
Patrick Maier 914e979d28 Update release_notes.md 2022-03-04 12:59:43 +01:00
Michael BarzandPascal Wengerter 6c973fe10a Update docs/ocis/release_notes.md
Co-authored-by: Pascal Wengerter <pwengerter@owncloud.com>
2022-03-04 12:49:12 +01:00
Patrick Maier 396adf2306 oCIS 1.18 Release Notes 2022-03-04 12:13:51 +01:00
jkoberg 634c69e2b8 bump web master
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-04 12:11:06 +01:00
jkoberg d7e48b8721 Merge branch 'master' into StoreSettingsViaMetadata
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-04 09:31:36 +01:00
jkoberg da3fc4c898 don't log fatal on startup
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-03 16:47:51 +01:00
jkoberg 8f10226963 next reva bump
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-03 16:45:52 +01:00
jkoberg ba698aa6d9 next reva version
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-03 16:19:20 +01:00
jkoberg 15ac5d8999 make it configurable
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-03 16:06:33 +01:00
jkoberg 085dcd9a14 Merge branch 'master' into StoreSettingsViaMetadata 2022-03-03 11:16:51 +01:00
jkoberg 1cde2fa36b use feature reva
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-03 11:15:36 +01:00
jkoberg 0d49316495 downgrade reva temporarilly
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-02 13:11:01 +01:00
jkoberg 62ec3cf801 add new defaults
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-02 12:41:57 +01:00
jkoberg fd78a662fd Merge branch 'master' into StoreSettingsViaMetadata 2022-03-02 10:18:12 +01:00
jkoberg 7731de91f1 create id for values if not given
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-02 10:14:27 +01:00
jkoberg c80022b0c6 ReadSetting unit test & implementation
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-01 15:52:57 +01:00
jkoberg a647f56bb0 unitests for list values
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-01 15:22:19 +01:00
jkoberg f64280188a refine initialization logic again
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-01 14:54:28 +01:00
jkoberg 7fcf6f5aa0 implement permission unit tests
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-01 12:15:39 +01:00
jkoberg a873fdc942 return default values when mdc is not initialized
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-03-01 10:55:47 +01:00
jkoberg 492419ec7b rework initialization logic
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-02-28 17:15:24 +01:00
jkoberg 4c22c07711 add test for appendSetting
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-02-28 16:39:07 +01:00
jkoberg e23448f581 return listaccounts permission when mdc is not yet set
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-02-28 15:35:33 +01:00
jkoberg 588a731d6d delay creation of default roles
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-02-26 14:00:39 +01:00
jkoberg 2452d01506 lazy initialize metadataclient
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-02-26 13:18:27 +01:00
jkoberg 11a8b75b2e use cs3storage in metadatastorage
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-02-25 17:28:36 +01:00
jkoberg 721026654d make values unit tests green
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-02-25 15:58:48 +01:00
jkoberg 45c85f4237 make bundle unit tests green
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-02-24 18:41:55 +01:00
jkoberg a762e3cf69 make assignment unittests green
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-02-24 18:16:58 +01:00
jkoberg 25191fe7d7 Merge branch 'master' into StoreSettingsViaMetadata 2022-02-24 16:18:52 +01:00
jkoberg 297a0063ab add changelog
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-02-24 15:17:13 +01:00
jkoberg 0d4f8df2f6 Settings: activate metadata store to see tests failing
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-02-24 15:13:06 +01:00
jkoberg 534e561f2e Merge branch 'master' into StoreSettingsViaMetadata 2022-02-24 15:12:49 +01:00
jkoberg 59527e118d Settings: add metadata store
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2022-02-24 15:09:25 +01:00
330 changed files with 9646 additions and 3894 deletions

No files matched your search

-7
View File
@@ -47,12 +47,6 @@ $(GOLANGCI_LINT): $(BINGO_DIR)/golangci-lint.mod
@echo "(re)installing $(GOBIN)/golangci-lint-v1.43.0"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=golangci-lint.mod -o=$(GOBIN)/golangci-lint-v1.43.0 "github.com/golangci/golangci-lint/cmd/golangci-lint"
GOX := $(GOBIN)/gox-v1.0.1
$(GOX): $(BINGO_DIR)/gox.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/gox-v1.0.1"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=gox.mod -o=$(GOBIN)/gox-v1.0.1 "github.com/mitchellh/gox"
HUGO := $(GOBIN)/hugo-v0.91.0
$(HUGO): $(BINGO_DIR)/hugo.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@@ -106,4 +100,3 @@ $(REFLEX): $(BINGO_DIR)/reflex.mod
@# Install binary/ries using Go 1.14+ build command. This is using bwplotka/bingo-controlled, separate go module with pinned dependencies.
@echo "(re)installing $(GOBIN)/reflex-v0.3.1"
@cd $(BINGO_DIR) && $(GO) build -mod=mod -modfile=reflex.mod -o=$(GOBIN)/reflex-v0.3.1 "github.com/cespare/reflex"
-5
View File
@@ -1,5 +0,0 @@
module _ // Auto generated by https://github.com/bwplotka/bingo. DO NOT EDIT
go 1.17
require github.com/mitchellh/gox v1.0.1
-6
View File
@@ -1,6 +0,0 @@
github.com/hashicorp/go-version v1.0.0 h1:21MVWPKDphxa7ineQQTrCU5brh7OuVVAzGOCnnCPtE8=
github.com/hashicorp/go-version v1.0.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/mitchellh/gox v1.0.1 h1:x0jD3dcHk9a9xPSDN6YEL4xL6Qz0dvNYm8yZqui5chI=
github.com/mitchellh/gox v1.0.1/go.mod h1:ED6BioOGXMswlXa2zxfh/xdd5QhwYliBFn9V18Ap4z4=
github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY=
github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY=
-3
View File
@@ -18,8 +18,6 @@ CALENS="${GOBIN}/calens-v0.2.0"
GOLANGCI_LINT="${GOBIN}/golangci-lint-v1.43.0"
GOX="${GOBIN}/gox-v1.0.1"
HUGO="${GOBIN}/hugo-v0.91.0"
MOCKERY="${GOBIN}/mockery-v2.9.4"
@@ -37,4 +35,3 @@ PROTOC_GEN_MICROWEB="${GOBIN}/protoc-gen-microweb-v0.0.0-20211219183901-997c02ca
PROTOC_GEN_OPENAPIV2="${GOBIN}/protoc-gen-openapiv2-v2.7.2"
REFLEX="${GOBIN}/reflex-v0.3.1"
+3 -3
View File
@@ -1,7 +1,7 @@
# The test runner source for API tests
CORE_COMMITID=4512f46e7196a8c1f1cfc56ec397628cbf540407
CORE_COMMITID=df1a1eb2816775fe9c202c50ec8e8a1e01ecb256
CORE_BRANCH=master
# The test runner source for UI tests
WEB_COMMITID=b240ba9117e998edc0cd7d1d5586ba19591e1511
WEB_BRANCH=master
WEB_COMMITID=80d9bb6962cb034dc861116f59ae25f39fb3a52c
WEB_BRANCH=no-shares-folder
+83 -63
View File
@@ -2,20 +2,48 @@
"""
# images
OC_CI_ALPINE = "owncloudci/alpine:latest"
OC_CI_GOLANG = "owncloudci/golang:1.17"
OC_CI_NODEJS = "owncloudci/nodejs:14"
OC_CI_PHP = "owncloudci/php:7.4"
OC_CI_WAIT_FOR = "owncloudci/wait-for:latest"
OC_TESTING_MIDDLEWARE = "owncloud/owncloud-test-middleware:1.3.1"
ALPINE_GIT = "alpine/git:latest"
CHKO_DOCKER_PUSHRM = "chko/docker-pushrm:1"
DRONE_CLI = "drone/cli:alpine"
MARIADB = "mariadb:10.6"
MELTWATER_DRONE_CACHE = "meltwater/drone-cache:v1"
MINIO_MC = "minio/mc:RELEASE.2021-10-07T04-19-58Z"
OC_CI_ALPINE = "owncloudci/alpine:latest"
OC_CI_BAZEL_BUILDIFIER = "owncloudci/bazel-buildifier:latest"
OC_CI_DRONE_ANSIBLE = "owncloudci/drone-ansible:latest"
OC_CI_DRONE_CANCEL_PREVIOUS_BUILDS = "owncloudci/drone-cancel-previous-builds"
OC_CI_DRONE_SKIP_PIPELINE = "owncloudci/drone-skip-pipeline"
OC_CI_GOLANG = "owncloudci/golang:1.17"
OC_CI_NODEJS = "owncloudci/nodejs:%s"
OC_CI_PHP = "owncloudci/php:%s"
OC_CI_WAIT_FOR = "owncloudci/wait-for:latest"
OC_OC_TEST_MIDDLEWARE = "owncloud/owncloud-test-middleware:1.3.1"
OC_SERVER = "owncloud/server:10"
OC_UBUNTU = "owncloud/ubuntu:18.04"
OSIXIA_OPEN_LDAP = "osixia/openldap:latest"
PLUGINS_CODACY = "plugins/codacy:1"
PLUGINS_DOCKER = "plugins/docker:latest"
PLUGINS_DOWNSTREAM = "plugins/downstream:latest"
PLUGINS_GH_PAGES = "plugins/gh-pages:1"
PLUGINS_GITHUB_RELEASE = "plugins/github-release:1"
PLUGINS_GIT_ACTION = "plugins/git-action:1"
PLUGINS_MANIFEST = "plugins/manifest:1"
PLUGINS_S3 = "plugins/s3:latest"
PLUGINS_SLACK = "plugins/slack:1"
REDIS = "redis:6-alpine"
SELENIUM_STANDALONE_CHROME_DEBUG = "selenium/standalone-chrome-debug:3.141.59"
SONARSOURCE_SONAR_SCANNER_CLI = "sonarsource/sonar-scanner-cli:latest"
THEGEEKLAB_DRONE_GITHUB_COMMENT = "thegeeklab/drone-github-comment:1"
DEFAULT_PHP_VERSION = "7.4"
DEFAULT_NODEJS_VERSION = "14"
# configuration
config = {
"modules": [
# if you add a module here please also add it to the root level Makefile
"accounts",
"audit",
"glauth",
"graph-explorer",
"graph",
@@ -217,7 +245,7 @@ def cancelPreviousBuilds():
},
"steps": [{
"name": "cancel-previous-builds",
"image": "owncloudci/drone-cancel-previous-builds",
"image": OC_CI_DRONE_CANCEL_PREVIOUS_BUILDS,
"settings": {
"DRONE_TOKEN": {
"from_secret": "drone_token",
@@ -281,7 +309,7 @@ def testOcisModule(ctx, module):
},
{
"name": "scan-result-cache",
"image": "plugins/s3:latest",
"image": PLUGINS_S3,
"settings": {
"endpoint": {
"from_secret": "cache_s3_endpoint",
@@ -378,7 +406,7 @@ def uploadScanResults(ctx):
"steps": [
{
"name": "clone",
"image": "alpine/git:latest",
"image": ALPINE_GIT,
"commands": [
# Always use the owncloud/ocis repository as base to have an up to date default branch.
# This is needed for the skipIfUnchanged step, since it references a commit on master (which could be absent on a fork)
@@ -404,7 +432,7 @@ def uploadScanResults(ctx):
},
{
"name": "codacy",
"image": "plugins/codacy:1",
"image": PLUGINS_CODACY,
"settings": {
"token": {
"from_secret": "codacy_token",
@@ -413,7 +441,7 @@ def uploadScanResults(ctx):
},
{
"name": "sonarcloud",
"image": "sonarsource/sonar-scanner-cli:latest",
"image": SONARSOURCE_SONAR_SCANNER_CLI,
"environment": sonar_env,
},
{
@@ -454,7 +482,7 @@ def localApiTests(ctx, storage, suite, accounts_hash_difficulty = 4):
cloneCoreRepos() + [
{
"name": "localApiTests-%s-%s" % (suite, storage),
"image": OC_CI_PHP,
"image": OC_CI_PHP % DEFAULT_PHP_VERSION,
"environment": {
"TEST_SERVER_URL": "https://ocis-server:9200",
"OCIS_REVA_DATA_ROOT": "%s" % ("/srv/app/tmp/ocis/owncloud/data/" if storage == "owncloud" else ""),
@@ -503,7 +531,7 @@ def coreApiTests(ctx, part_number = 1, number_of_parts = 1, storage = "ocis", ac
cloneCoreRepos() + [
{
"name": "oC10ApiTests-%s-storage-%s" % (storage, part_number),
"image": OC_CI_PHP,
"image": OC_CI_PHP % DEFAULT_PHP_VERSION,
"environment": {
"TEST_SERVER_URL": "https://ocis-server:9200",
"OCIS_REVA_DATA_ROOT": "%s" % ("/srv/app/tmp/ocis/owncloud/data/" if storage == "owncloud" else ""),
@@ -613,7 +641,7 @@ def uiTestPipeline(ctx, filterTags, early_fail, runPart = 1, numberOfParts = 1,
ocisServer(storage, accounts_hash_difficulty, [stepVolumeOC10Tests]) + waitForSeleniumService() + waitForMiddlewareService() + [
{
"name": "webUITests",
"image": OC_CI_NODEJS,
"image": OC_CI_NODEJS % DEFAULT_NODEJS_VERSION,
"environment": {
"SERVER_HOST": "https://ocis-server:9200",
"BACKEND_HOST": "https://ocis-server:9200",
@@ -672,7 +700,7 @@ def accountsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
ocisServer(storage, accounts_hash_difficulty, [stepVolumeOC10Tests]) + waitForSeleniumService() + waitForMiddlewareService() + [
{
"name": "WebUIAcceptanceTests",
"image": OC_CI_NODEJS,
"image": OC_CI_NODEJS % DEFAULT_NODEJS_VERSION,
"environment": {
"SERVER_HOST": "https://ocis-server:9200",
"BACKEND_HOST": "https://ocis-server:9200",
@@ -736,7 +764,7 @@ def settingsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
ocisServer(storage, accounts_hash_difficulty, [stepVolumeOC10Tests]) + waitForSeleniumService() + waitForMiddlewareService() + [
{
"name": "WebUIAcceptanceTests",
"image": OC_CI_NODEJS,
"image": OC_CI_NODEJS % DEFAULT_NODEJS_VERSION,
"environment": {
"SERVER_HOST": "https://ocis-server:9200",
"BACKEND_HOST": "https://ocis-server:9200",
@@ -772,7 +800,7 @@ def settingsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
"services": [
{
"name": "redis",
"image": "redis:6-alpine",
"image": REDIS,
},
] + selenium() + middlewareService(),
"volumes": [stepVolumeOC10Tests] +
@@ -807,7 +835,7 @@ def failEarly(ctx, early_fail):
return [
{
"name": "github-comment",
"image": "thegeeklab/drone-github-comment:1",
"image": THEGEEKLAB_DRONE_GITHUB_COMMENT,
"settings": {
"message": ":boom: Acceptance test [<strong>${DRONE_STAGE_NAME}</strong>](${DRONE_BUILD_LINK}/${DRONE_STAGE_NUMBER}/1) failed. Further test are cancelled...",
"key": "pr-${DRONE_PULL_REQUEST}", #TODO: we could delete the comment after a successful CI run
@@ -827,7 +855,7 @@ def failEarly(ctx, early_fail):
},
{
"name": "stop-build",
"image": "drone/cli:alpine",
"image": DRONE_CLI,
# # https://github.com/drone/runner-go/blob/0bd0f8fc31c489817572060d17c6e24aaa487470/pipeline/runtime/const.go#L95-L102
# "failure": "fail-fast",
# would be an alternative, but is currently broken
@@ -894,7 +922,7 @@ def dockerRelease(ctx, arch):
},
{
"name": "dryrun",
"image": "plugins/docker:latest",
"image": PLUGINS_DOCKER,
"settings": {
"dry_run": True,
"context": "ocis",
@@ -913,7 +941,7 @@ def dockerRelease(ctx, arch):
},
{
"name": "docker",
"image": "plugins/docker:latest",
"image": PLUGINS_DOCKER,
"settings": {
"username": {
"from_secret": "docker_username",
@@ -956,11 +984,16 @@ def binaryReleases(ctx):
return pipelines
def binaryRelease(ctx, name):
# uploads binary to https://download.owncloud.com/ocis/ocis/testing/
target = "/ocis/%s/testing" % (ctx.repo.name.replace("ocis-", ""))
# uploads binary to https://download.owncloud.com/ocis/ocis/daily/
target = "/ocis/%s/daily" % (ctx.repo.name.replace("ocis-", ""))
if ctx.build.event == "tag":
# uploads binary to eg. https://download.owncloud.com/ocis/ocis/1.0.0-beta9/
target = "/ocis/%s/%s" % (ctx.repo.name.replace("ocis-", ""), ctx.build.ref.replace("refs/tags/v", ""))
folder = "stable"
buildref = ctx.build.ref.replace("refs/tags/v", "")
buildref = buildref.lower()
if buildref.find("-") != -1: # "x.x.x-alpha", "x.x.x-beta", "x.x.x-rc"
folder = "testing"
target = "/ocis/%s/%s/%s" % (ctx.repo.name.replace("ocis-", ""), folder, buildref)
settings = {
"endpoint": {
@@ -1014,7 +1047,7 @@ def binaryRelease(ctx, name):
},
{
"name": "upload",
"image": "plugins/s3:latest",
"image": PLUGINS_S3,
"settings": settings,
"when": {
"ref": [
@@ -1037,7 +1070,7 @@ def binaryRelease(ctx, name):
},
{
"name": "release",
"image": "plugins/github-release:1",
"image": PLUGINS_GITHUB_RELEASE,
"settings": {
"api_key": {
"from_secret": "github_token",
@@ -1084,7 +1117,7 @@ def releaseSubmodule(ctx):
"steps": [
{
"name": "release-submodule",
"image": "plugins/github-release:1",
"image": PLUGINS_GITHUB_RELEASE,
"settings": {
"api_key": {
"from_secret": "github_token",
@@ -1123,7 +1156,7 @@ def releaseDockerManifest(ctx):
"steps": [
{
"name": "execute",
"image": "plugins/manifest:1",
"image": PLUGINS_MANIFEST,
"settings": {
"username": {
"from_secret": "docker_username",
@@ -1178,7 +1211,7 @@ def changelog(ctx):
},
{
"name": "publish",
"image": "plugins/git-action:1",
"image": PLUGINS_GIT_ACTION,
"settings": {
"actions": [
"commit",
@@ -1225,7 +1258,7 @@ def releaseDockerReadme(ctx):
"steps": [
{
"name": "execute",
"image": "chko/docker-pushrm:1",
"image": CHKO_DOCKER_PUSHRM,
"environment": {
"DOCKER_USER": {
"from_secret": "docker_username",
@@ -1278,7 +1311,7 @@ def docs(ctx):
},
{
"name": "publish",
"image": "plugins/gh-pages:1",
"image": PLUGINS_GH_PAGES,
"settings": {
"username": {
"from_secret": "github_username",
@@ -1307,7 +1340,7 @@ def docs(ctx):
},
{
"name": "downstream",
"image": "plugins/downstream:latest",
"image": PLUGINS_DOWNSTREAM,
"settings": {
"server": "https://drone.owncloud.com/",
"token": {
@@ -1342,7 +1375,7 @@ def makeNodeGenerate(module):
return [
{
"name": "generate nodejs",
"image": OC_CI_NODEJS,
"image": OC_CI_NODEJS % DEFAULT_NODEJS_VERSION,
"commands": [
"%s ci-node-generate" % (make),
],
@@ -1377,7 +1410,7 @@ def notify(ctx):
"steps": [
{
"name": "notify-rocketchat",
"image": "plugins/slack:1",
"image": PLUGINS_SLACK,
"settings": {
"webhook": {
"from_secret": config["rocketchat"]["from_secret"],
@@ -1421,7 +1454,7 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on =
user = "33:33"
environment = {
# Keycloak IDP specific configuration
"PROXY_OIDC_ISSUER": "https://keycloak/auth/realmsowncloud",
"PROXY_OIDC_ISSUER": "https://keycloak/auth/realms/owncloud",
"WEB_OIDC_AUTHORITY": "https://keycloak/auth/realms/owncloud",
"WEB_OIDC_CLIENT_ID": "ocis-web",
"WEB_OIDC_METADATA_URL": "https://keycloak/auth/realms/owncloud/.well-known/openid-configuration",
@@ -1520,7 +1553,7 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on =
},
{
"name": "wait-for-ocis-server",
"image": "owncloudci/wait-for:latest",
"image": OC_CI_WAIT_FOR,
"commands": [
"wait-for -it ocis-server:9200 -t 300",
],
@@ -1531,7 +1564,7 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on =
def middlewareService():
return [{
"name": "middleware",
"image": OC_TESTING_MIDDLEWARE,
"image": OC_OC_TEST_MIDDLEWARE,
"environment": {
"BACKEND_HOST": "https://ocis-server:9200",
"OCIS_REVA_DATA_ROOT": "/srv/app/tmp/ocis/storage/owncloud/",
@@ -1593,7 +1626,7 @@ def selenium():
return [
{
"name": "selenium",
"image": "selenium/standalone-chrome-debug:3.141.59",
"image": SELENIUM_STANDALONE_CHROME_DEBUG,
"volumes": [{
"name": "uploads",
"path": "/uploads",
@@ -1653,8 +1686,7 @@ def skipIfUnchanged(ctx, type):
return [{
"name": "skip-if-unchanged",
"image": "owncloudci/drone-skip-pipeline",
"pull": "always",
"image": OC_CI_DRONE_SKIP_PIPELINE,
"settings": {
"ALLOW_SKIP_CHANGED": skip,
},
@@ -1713,7 +1745,7 @@ def deploy(ctx, config, rebuild):
"steps": [
{
"name": "clone continuous deployment playbook",
"image": "alpine/git:latest",
"image": ALPINE_GIT,
"commands": [
"cd deployments/continuous-deployment-config",
"git clone https://github.com/owncloud-devops/continuous-deployment.git",
@@ -1721,7 +1753,7 @@ def deploy(ctx, config, rebuild):
},
{
"name": "deploy",
"image": "owncloudci/drone-ansible:latest",
"image": OC_CI_DRONE_ANSIBLE,
"failure": "ignore",
"environment": {
"CONTINUOUS_DEPLOY_SERVERS_CONFIG": "../%s" % (config),
@@ -1760,14 +1792,14 @@ def checkStarlark():
"steps": [
{
"name": "format-check-starlark",
"image": "owncloudci/bazel-buildifier:latest",
"image": OC_CI_BAZEL_BUILDIFIER,
"commands": [
"buildifier --mode=check .drone.star",
],
},
{
"name": "show-diff",
"image": "owncloudci/bazel-buildifier:latest",
"image": OC_CI_BAZEL_BUILDIFIER,
"commands": [
"buildifier --mode=fix .drone.star",
"git diff",
@@ -1799,7 +1831,7 @@ def genericCache(name, action, mounts, cache_key):
step = {
"name": "%s_%s" % (action, name),
"image": "meltwater/drone-cache:v1",
"image": MELTWATER_DRONE_CACHE,
"environment": {
"AWS_ACCESS_KEY_ID": {
"from_secret": "cache_s3_access_key",
@@ -1948,12 +1980,6 @@ def pipelineSanityChecks(ctx, pipelines):
"""Parallel Deployment configs
"""
#images
OC_OC10 = "owncloud/server:10"
OC_UBUNTU = "owncloud/ubuntu:18.04"
MARIADB = "mariadb:10.6"
OSIXIA_OPENLDAP = "osixia/openldap:latest"
# configs
OCIS_URL = "https://ocis-server:9200"
OCIS_DOMAIN = "ocis-server:9200"
@@ -2118,7 +2144,7 @@ def parallelAcceptance(env):
return [{
"name": "acceptance-tests",
"image": OC_CI_PHP,
"image": OC_CI_PHP % DEFAULT_PHP_VERSION,
"environment": environment,
"commands": [
"make test-paralleldeployment-api",
@@ -2135,8 +2161,7 @@ def parallelDeploymentOC10Server():
return [
{
"name": "oc10",
"image": OC_OC10,
"pull": "always",
"image": OC_SERVER,
"detach": True,
"environment": {
# can be switched to "web"
@@ -2204,8 +2229,7 @@ def parallelDeploymentOC10Server():
def ldapService():
return [{
"name": "openldap",
"image": OSIXIA_OPENLDAP,
"pull": "always",
"image": OSIXIA_OPEN_LDAP,
"environment": {
"LDAP_TLS_VERIFY_CLIENT": "never",
"LDAP_DOMAIN": "owncloud.com",
@@ -2227,7 +2251,6 @@ def oc10DbService():
{
"name": "oc10-db",
"image": MARIADB,
"pull": "always",
"environment": {
"MYSQL_ROOT_PASSWORD": "owncloud",
"MYSQL_USER": "owncloud",
@@ -2245,12 +2268,11 @@ def oc10DbService():
def copyConfigs():
return [{
"name": "copy-configs",
"image": OC_OC10,
"pull": "always",
"image": OC_SERVER,
"commands": [
# ocis proxy config
"mkdir -p /etc/ocis",
"cp %s/ocis/proxy.json /etc/ocis/proxy.json" % (PARALLEL_DEPLOY_CONFIG_PATH),
"cp %s/ocis/proxy.yaml /etc/ocis/proxy.yaml" % (PARALLEL_DEPLOY_CONFIG_PATH),
# oc10 configs
"mkdir -p /etc/templates",
"mkdir -p /etc/pre_server.d",
@@ -2269,7 +2291,6 @@ def owncloudLog():
return [{
"name": "owncloud-log",
"image": OC_UBUNTU,
"pull": "always",
"detach": True,
"commands": [
"tail -f /mnt/data/owncloud.log",
@@ -2283,8 +2304,7 @@ def owncloudLog():
def fixSharedDataPermissions():
return [{
"name": "fix-shared-data-permissions",
"image": OC_CI_PHP,
"pull": "always",
"image": OC_CI_PHP % DEFAULT_PHP_VERSION,
"commands": [
"chown -R 33:33 /var/www/owncloud", # www-data user
"chmod -R 777 /var/www/owncloud",
+3 -2
View File
@@ -10,7 +10,7 @@ repository:
private: false
has_issues: true
has_projects: false
has_wiki: true
has_wiki: false
has_downloads: false
default_branch: master
@@ -35,7 +35,7 @@ labels:
color: "#3F7A62"
- name: Storage:ownCloudSQL
color: "#3F7A62"
teams:
- name: ci
permission: admin
@@ -65,3 +65,4 @@ branches:
- employees
...
+104 -12
View File
@@ -11,26 +11,118 @@ release-dirs:
# docker specific packaging flags
DOCKER_LDFLAGS += -X "$(OCIS_REPO)/ocis-pkg/config/defaults.BaseDataPathType=path" -X "$(OCIS_REPO)/ocis-pkg/config/defaults.BaseDataPathValue=/var/lib/ocis"
release-linux-docker-amd64: $(GOX) release-dirs
@$(GOX) -tags 'netgo $(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS) $(DOCKER_LDFLAGS)' -os 'linux' -arch 'amd64' -output '$(DIST)/binaries/$(EXECUTABLE)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
release-linux-docker-arm: $(GOX) release-dirs
@$(GOX) -tags 'netgo $(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS) $(DOCKER_LDFLAGS)' -os 'linux' -arch 'arm' -output '$(DIST)/binaries/$(EXECUTABLE)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
release-linux-docker-amd64: release-dirs
GOOS=linux \
GOARCH=amd64 \
go build \
-tags 'netgo $(TAGS)' \
-buildmode=pie \
-trimpath \
-ldflags '-extldflags "-static" $(LDFLAGS) $(DOCKER_LDFLAGS)' \
-o '$(DIST)/binaries/$(EXECUTABLE)-linux-amd64' \
./cmd/$(NAME)
release-linux-docker-arm64: $(GOX) release-dirs
@$(GOX) -tags 'netgo $(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS) $(DOCKER_LDFLAGS)' -os 'linux' -arch 'arm64' -output '$(DIST)/binaries/$(EXECUTABLE)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
release-linux-docker-arm: release-dirs
GOOS=linux \
GOARCH=arm \
go build \
-tags 'netgo $(TAGS)' \
-trimpath \
-ldflags '-extldflags "-static" $(LDFLAGS) $(DOCKER_LDFLAGS)' \
-o '$(DIST)/binaries/$(EXECUTABLE)-linux-arm' \
./cmd/$(NAME)
@# https://github.com/golang/go/issues/50405
@# -buildmode=pie not easily doable for arm
release-linux-docker-arm64: release-dirs
GOOS=linux \
GOARCH=arm64 \
go build \
-tags 'netgo $(TAGS)' \
-buildmode=pie \
-trimpath \
-ldflags '-extldflags "-static" $(LDFLAGS) $(DOCKER_LDFLAGS)' \
-o '$(DIST)/binaries/$(EXECUTABLE)-linux-arm64' \
./cmd/$(NAME)
.PHONY: release-linux
release-linux: $(GOX) release-dirs
@$(GOX) -tags 'netgo $(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS)' -os 'linux' -arch 'amd64 386 arm64 arm' -output '$(DIST)/binaries/$(EXECUTABLE)-$(OUTPUT)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
release-linux: release-dirs
GOOS=linux \
GOARCH=amd64 \
go build \
-tags 'netgo $(TAGS)' \
-buildmode=pie \
-trimpath \
-ldflags '-extldflags "-static" $(LDFLAGS)' \
-o '$(DIST)/binaries/$(EXECUTABLE)-linux-amd64' \
./cmd/$(NAME)
GOOS=linux \
GOARCH=386 \
go build \
-tags 'netgo $(TAGS)' \
-trimpath \
-ldflags '-extldflags "-static" $(LDFLAGS)' \
-o '$(DIST)/binaries/$(EXECUTABLE)-linux-386' \
./cmd/$(NAME)
GOOS=linux \
GOARCH=arm64 \
go build \
-tags 'netgo $(TAGS)' \
-buildmode=pie \
-trimpath \
-ldflags '-extldflags "-static" $(LDFLAGS)' \
-o '$(DIST)/binaries/$(EXECUTABLE)-linux-arm64' \
./cmd/$(NAME)
GOOS=linux \
GOARCH=arm \
go build \
-tags 'netgo $(TAGS)' \
-trimpath \
-ldflags '-extldflags "-static" $(LDFLAGS)' \
-o '$(DIST)/binaries/$(EXECUTABLE)-linux-arm' \
./cmd/$(NAME)
@# https://github.com/golang/go/issues/50405
@# -buildmode=pie not easily doable for arm
.PHONY: release-windows
release-windows: $(GOX) release-dirs
@$(GOX) -tags 'netgo $(TAGS)' -ldflags '-extldflags "-static" $(LDFLAGS)' -os 'windows' -arch 'amd64' -output '$(DIST)/binaries/$(EXECUTABLE)-$(OUTPUT)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
release-windows: release-dirs
GOOS=windows \
GOARCH=amd64 \
go build \
-tags 'netgo $(TAGS)' \
-buildmode=pie \
-trimpath \
-ldflags '-extldflags "-static" $(LDFLAGS)' \
-o '$(DIST)/binaries/$(EXECUTABLE)-windows-amd64' \
./cmd/$(NAME)
.PHONY: release-darwin
release-darwin: $(GOX) release-dirs
@$(GOX) -tags 'netgo $(TAGS)' -ldflags '$(LDFLAGS)' -os 'darwin' -arch 'amd64 arm64' -output '$(DIST)/binaries/$(EXECUTABLE)-$(OUTPUT)-{{.OS}}-{{.Arch}}' ./cmd/$(NAME)
release-darwin: release-dirs
GOOS=darwin \
GOARCH=amd64 \
go build \
-tags 'netgo $(TAGS)' \
-buildmode=pie \
-trimpath \
-ldflags '$(LDFLAGS)' \
-o '$(DIST)/binaries/$(EXECUTABLE)-darwin-amd64' \
./cmd/$(NAME)
GOOS=darwin \
GOARCH=arm64 \
go build \
-tags 'netgo $(TAGS)' \
-buildmode=pie \
-trimpath \
-ldflags '$(LDFLAGS)' \
-o '$(DIST)/binaries/$(EXECUTABLE)-darwin-arm64' \
./cmd/$(NAME)
.PHONY: release-copy
release-copy:
+175 -2
View File
@@ -2,7 +2,180 @@
The following sections list the changes for unreleased.
[unreleased]: https://github.com/owncloud/ocis/compare/v1.17.0...master
[unreleased]: https://github.com/owncloud/ocis/compare/v1.18.0...master
## Summary
* Bugfix - Network configuration in individiual_services example: [#3238](https://github.com/owncloud/ocis/pull/3238)
* Bugfix - Improve gif thumbnails: [#3305](https://github.com/owncloud/ocis/pull/3305)
* Bugfix - Fix error handling in GraphAPI GetUsers call: [#3357](https://github.com/owncloud/ocis/pull/3357)
* Bugfix - Fix request validation on GraphAPI User updates: [#3167](https://github.com/owncloud/ocis/issues/3167)
* Bugfix - Replace public mountpoint fileid with grant fileid: [#3349](https://github.com/owncloud/ocis/pull/3349)
* Change - Add remote item to mountpoint and fix spaceID: [#3365](https://github.com/owncloud/ocis/pull/3365)
* Change - Switch NATS backend: [#3192](https://github.com/owncloud/ocis/pull/3192)
* Change - Drop json config file support: [#3366](https://github.com/owncloud/ocis/pull/3366)
* Change - Settings service now stores its data via metadata service: [#3232](https://github.com/owncloud/ocis/pull/3232)
* Enhancement - Audit logger will now log file events: [#3332](https://github.com/owncloud/ocis/pull/3332)
* Enhancement - Add password reset link to login page: [#3329](https://github.com/owncloud/ocis/pull/3329)
* Enhancement - Log sharing events in audit service: [#3301](https://github.com/owncloud/ocis/pull/3301)
* Enhancement - Add space aliases: [#3283](https://github.com/owncloud/ocis/pull/3283)
* Enhancement - Include etags in drives listing: [#3267](https://github.com/owncloud/ocis/pull/3267)
* Enhancement - Improve thumbnails API: [#3272](https://github.com/owncloud/ocis/pull/3272)
* Enhancement - Update reva to v2.1.0: [#3330](https://github.com/owncloud/ocis/pull/3330)
* Enhancement - Update ownCloud Web to v5.3.0: [#6561](https://github.com/owncloud/web/pull/6561)
## Details
* Bugfix - Network configuration in individiual_services example: [#3238](https://github.com/owncloud/ocis/pull/3238)
Tidy up the deployments/examples/ocis_individual_services example so that the
instructions work.
https://github.com/owncloud/ocis/pull/3238
* Bugfix - Improve gif thumbnails: [#3305](https://github.com/owncloud/ocis/pull/3305)
Improved the gif thumbnail generation for gifs with different disposal strategies.
https://github.com/owncloud/ocis/pull/3305
* Bugfix - Fix error handling in GraphAPI GetUsers call: [#3357](https://github.com/owncloud/ocis/pull/3357)
A missing return statement caused GetUsers to return misleading results when the identity
backend returned an error.
https://github.com/owncloud/ocis/pull/3357
* Bugfix - Fix request validation on GraphAPI User updates: [#3167](https://github.com/owncloud/ocis/issues/3167)
Fix PATCH on graph/v1.0/users when no 'mail' attribute is present in the request body
https://github.com/owncloud/ocis/issues/3167
* Bugfix - Replace public mountpoint fileid with grant fileid: [#3349](https://github.com/owncloud/ocis/pull/3349)
We now show the same resoucre id for resources when accessing them via a public links as when
using a logged in user. This allows the web ui to start a WOPI session with the correct resource
id.
https://github.com/owncloud/ocis/pull/3349
* Change - Add remote item to mountpoint and fix spaceID: [#3365](https://github.com/owncloud/ocis/pull/3365)
A mountpoint represents the mounted share on the share receivers side. The original resource
is located where the grant has been set. This item is now shown as libregraph remoteItem on the
mountpoint. While adding this, we fixed the spaceID for mountpoints.
https://github.com/owncloud/ocis/pull/3365
* Change - Switch NATS backend: [#3192](https://github.com/owncloud/ocis/pull/3192)
We've switched the NATS backend from Streaming to JetStream, since NATS Streaming is
depreciated.
https://github.com/owncloud/ocis/pull/3192
https://github.com/cs3org/reva/pull/2574
* Change - Drop json config file support: [#3366](https://github.com/owncloud/ocis/pull/3366)
We've remove the support to configure oCIS and it's service with a json file. From now on we only
support yaml configuration files, since they have the possibility to add comments.
https://github.com/owncloud/ocis/pull/3366
* Change - Settings service now stores its data via metadata service: [#3232](https://github.com/owncloud/ocis/pull/3232)
Instead of writing files to disk it will use metadata service to do so
https://github.com/owncloud/ocis/pull/3232
* Enhancement - Audit logger will now log file events: [#3332](https://github.com/owncloud/ocis/pull/3332)
See full list of supported events in `audit/pkg/types/types.go`
https://github.com/owncloud/ocis/pull/3332
* Enhancement - Add password reset link to login page: [#3329](https://github.com/owncloud/ocis/pull/3329)
Added a configurable passwort reset link to the login page. It can be set via
`IDP_PASSWORD_RESET_URI`. If the option is not set the link will not be shown.
https://github.com/owncloud/ocis/pull/3329
* Enhancement - Log sharing events in audit service: [#3301](https://github.com/owncloud/ocis/pull/3301)
Contains sharing related events. See full list in audit/pkg/types/events.go
https://github.com/owncloud/ocis/pull/3301
* Enhancement - Add space aliases: [#3283](https://github.com/owncloud/ocis/pull/3283)
Space aliases can be used to resolve spaceIDs in a client.
https://github.com/owncloud/ocis/pull/3283
* Enhancement - Include etags in drives listing: [#3267](https://github.com/owncloud/ocis/pull/3267)
Added etags in the response of list drives.
https://github.com/owncloud/ocis/pull/3267
* Enhancement - Improve thumbnails API: [#3272](https://github.com/owncloud/ocis/pull/3272)
Changed the thumbnails API to no longer transfer images via GRPC. GRPC has a limited message
size and isn't very efficient with large binary data. The new API transports the images over
HTTP.
https://github.com/owncloud/ocis/pull/3272
* Enhancement - Update reva to v2.1.0: [#3330](https://github.com/owncloud/ocis/pull/3330)
Updated reva to version 2.1.0. This update includes:
* Fix [cs3org/reva#2636](https://github.com/cs3org/reva/pull/2636): Delay reconnect log for events
* Fix [cs3org/reva#2645](https://github.com/cs3org/reva/pull/2645): Avoid warning about missing .flock files
* Fix [cs3org/reva#2625](https://github.com/cs3org/reva/pull/2625): Fix locking on publik links and the decomposed filesystem
* Fix [cs3org/reva#2643](https://github.com/cs3org/reva/pull/2643): Emit linkaccessfailed event when share is nil
* Fix [cs3org/reva#2646](https://github.com/cs3org/reva/pull/2646): Replace public mountpoint fileid with grant fileid in ocdav
* Fix [cs3org/reva#2612](https://github.com/cs3org/reva/pull/2612): Adjust the scope handling to support the spaces architecture
* Fix [cs3org/reva#2621](https://github.com/cs3org/reva/pull/2621): Send events only if response code is `OK`
* Chg [cs3org/reva#2574](https://github.com/cs3org/reva/pull/2574): Switch NATS backend
* Chg [cs3org/reva#2667](https://github.com/cs3org/reva/pull/2667): Allow LDAP groups to have no gidNumber
* Chg [cs3org/reva#3233](https://github.com/cs3org/reva/pull/3233): Improve quota handling
* Chg [cs3org/reva#2600](https://github.com/cs3org/reva/pull/2600): Use the cs3 share api to manage spaces
* Enh [cs3org/reva#2644](https://github.com/cs3org/reva/pull/2644): Add new public share manager
* Enh [cs3org/reva#2626](https://github.com/cs3org/reva/pull/2626): Add new share manager
* Enh [cs3org/reva#2624](https://github.com/cs3org/reva/pull/2624): Add etags to virtual spaces
* Enh [cs3org/reva#2639](https://github.com/cs3org/reva/pull/2639): File Events
* Enh [cs3org/reva#2627](https://github.com/cs3org/reva/pull/2627): Add events for sharing action
* Enh [cs3org/reva#2664](https://github.com/cs3org/reva/pull/2664): Add grantID to mountpoint
* Enh [cs3org/reva#2622](https://github.com/cs3org/reva/pull/2622): Allow listing shares in spaces via the OCS API
* Enh [cs3org/reva#2623](https://github.com/cs3org/reva/pull/2623): Add space aliases
* Enh [cs3org/reva#2647](https://github.com/cs3org/reva/pull/2647): Add space specific events
* Enh [cs3org/reva#3345](https://github.com/cs3org/reva/pull/3345): Add the spaceid to propfind responses
* Enh [cs3org/reva#2616](https://github.com/cs3org/reva/pull/2616): Add etag to spaces response
* Enh [cs3org/reva#2628](https://github.com/cs3org/reva/pull/2628): Add spaces aware trash-bin API
https://github.com/owncloud/ocis/pull/3330
https://github.com/owncloud/ocis/pull/3405
https://github.com/owncloud/ocis/pull/3416
* Enhancement - Update ownCloud Web to v5.3.0: [#6561](https://github.com/owncloud/web/pull/6561)
Tags: web
We updated ownCloud Web to v5.3.0. Please refer to the changelog (linked) for details on the web
release.
https://github.com/owncloud/web/pull/6561
https://github.com/owncloud/ocis/pull/3291
https://github.com/owncloud/ocis/pull/3375
https://github.com/owncloud/web/releases/tag/v5.3.0
# Changelog for [1.18.0] (2022-03-03)
The following sections list the changes for 1.18.0.
[1.18.0]: https://github.com/owncloud/ocis/compare/v1.17.0...v1.18.0
## Summary
@@ -197,7 +370,7 @@ The following sections list the changes for unreleased.
* Enh [cs3org/reva#2526](https://github.com/cs3org/reva/pull/2526) : Upgrade ginkgo to v2
https://github.com/owncloud/ocis/pull/3231
https://github.com/owncloud/ocis/pull/3231
https://github.com/owncloud/ocis/pull/3258
* Enhancement - Update ownCloud Web to v5.2.0: [#6506](https://github.com/owncloud/web/pull/6506)
+1
View File
@@ -17,6 +17,7 @@ L10N_MODULES := $(shell find . -path '*.tx*' -name 'config' | sed 's|/[^/]*$$||'
# if you add a module here please also add it to the .drone.star file
OCIS_MODULES = \
accounts \
audit \
glauth \
graph \
graph-explorer \
+2 -2
View File
@@ -4,11 +4,11 @@ import (
"os"
"github.com/owncloud/ocis/accounts/pkg/command"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/accounts/pkg/config/defaults"
)
func main() {
if err := command.Execute(config.DefaultConfig()); err != nil {
if err := command.Execute(defaults.DefaultConfig()); err != nil {
os.Exit(1)
}
}
+27
View File
@@ -0,0 +1,27 @@
package main
import (
"fmt"
accountsdefaults "github.com/owncloud/ocis/accounts/pkg/config/defaults"
idpdefaults "github.com/owncloud/ocis/idp/pkg/config/defaults"
"gopkg.in/yaml.v2"
)
func main() {
fn1 := accountsdefaults.FullDefaultConfig
fn2 := idpdefaults.FullDefaultConfig
b, err := yaml.Marshal(fn1())
if err != nil {
return
}
fmt.Println(string(b))
b, err = yaml.Marshal(fn2())
if err != nil {
return
}
fmt.Println(string(b))
}
+3 -3
View File
@@ -8,9 +8,9 @@ import (
// Config combines all available configuration parts.
type Config struct {
*shared.Commons
*shared.Commons `ocisConfig:"-" yaml:"-"`
Service Service
Service Service `ocisConfig:"-" yaml:"-"`
Tracing *Tracing `ocisConfig:"tracing"`
Log *Log `ocisConfig:"log"`
@@ -28,7 +28,7 @@ type Config struct {
HashDifficulty int `ocisConfig:"hash_difficulty" env:"ACCOUNTS_HASH_DIFFICULTY" desc:"The hash difficulty makes sure that validating a password takes at least a certain amount of time."`
DemoUsersAndGroups bool `ocisConfig:"demo_users_and_groups" env:"ACCOUNTS_DEMO_USERS_AND_GROUPS" desc:"If this flag is set the service will setup the demo users and groups."`
Context context.Context
Context context.Context `ocisConfig:"-" yaml:"-"`
}
// Asset defines the available asset configuration.
-68
View File
@@ -1,68 +0,0 @@
package config
import (
"path"
"github.com/owncloud/ocis/ocis-pkg/config/defaults"
)
func DefaultConfig() *Config {
return &Config{
Debug: Debug{
Addr: "127.0.0.1:9182",
Token: "",
Pprof: false,
Zpages: false,
},
HTTP: HTTP{
Addr: "127.0.0.1:9181",
Namespace: "com.owncloud.web",
Root: "/",
CacheTTL: 604800, // 7 days
CORS: CORS{
AllowedOrigins: []string{"*"},
AllowedMethods: []string{"GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"},
AllowedHeaders: []string{"Authorization", "Origin", "Content-Type", "Accept", "X-Requested-With"},
AllowCredentials: true,
},
},
GRPC: GRPC{
Addr: "127.0.0.1:9180",
Namespace: "com.owncloud.api",
},
Service: Service{
Name: "accounts",
},
Asset: Asset{},
TokenManager: TokenManager{
JWTSecret: "Pive-Fumkiu4",
},
HashDifficulty: 11,
DemoUsersAndGroups: true,
Repo: Repo{
Backend: "CS3",
Disk: Disk{
Path: path.Join(defaults.BaseDataPath(), "accounts"),
},
CS3: CS3{
ProviderAddr: "localhost:9215",
},
},
Index: Index{
UID: UIDBound{
Lower: 0,
Upper: 1000,
},
GID: GIDBound{
Lower: 0,
Upper: 1000,
},
},
ServiceUser: ServiceUser{
UUID: "95cb8724-03b2-11eb-a0a6-c33ef8ef53ad",
Username: "",
UID: 0,
GID: 0,
},
}
}
@@ -0,0 +1,112 @@
package defaults
import (
"path"
"strings"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/ocis-pkg/config/defaults"
)
func FullDefaultConfig() *config.Config {
cfg := DefaultConfig()
EnsureDefaults(cfg)
Sanitize(cfg)
return cfg
}
func DefaultConfig() *config.Config {
return &config.Config{
Debug: config.Debug{
Addr: "127.0.0.1:9182",
Token: "",
Pprof: false,
Zpages: false,
},
HTTP: config.HTTP{
Addr: "127.0.0.1:9181",
Namespace: "com.owncloud.web",
Root: "/",
CacheTTL: 604800, // 7 days
CORS: config.CORS{
AllowedOrigins: []string{"*"},
AllowedMethods: []string{"GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"},
AllowedHeaders: []string{"Authorization", "Origin", "Content-Type", "Accept", "X-Requested-With"},
AllowCredentials: true,
},
},
GRPC: config.GRPC{
Addr: "127.0.0.1:9180",
Namespace: "com.owncloud.api",
},
Service: config.Service{
Name: "accounts",
},
Asset: config.Asset{},
TokenManager: config.TokenManager{
JWTSecret: "Pive-Fumkiu4",
},
HashDifficulty: 11,
DemoUsersAndGroups: true,
Repo: config.Repo{
Backend: "CS3",
Disk: config.Disk{
Path: path.Join(defaults.BaseDataPath(), "accounts"),
},
CS3: config.CS3{
ProviderAddr: "localhost:9215",
},
},
Index: config.Index{
UID: config.UIDBound{
Lower: 0,
Upper: 1000,
},
GID: config.GIDBound{
Lower: 0,
Upper: 1000,
},
},
ServiceUser: config.ServiceUser{
UUID: "95cb8724-03b2-11eb-a0a6-c33ef8ef53ad",
Username: "95cb8724-03b2-11eb-a0a6-c33ef8ef53ad",
UID: 0,
GID: 0,
},
}
}
func EnsureDefaults(cfg *config.Config) {
// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
cfg.Log = &config.Log{
Level: cfg.Commons.Log.Level,
Pretty: cfg.Commons.Log.Pretty,
Color: cfg.Commons.Log.Color,
File: cfg.Commons.Log.File,
}
} else if cfg.Log == nil {
cfg.Log = &config.Log{}
}
// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil {
cfg.Tracing = &config.Tracing{
Enabled: cfg.Commons.Tracing.Enabled,
Type: cfg.Commons.Tracing.Type,
Endpoint: cfg.Commons.Tracing.Endpoint,
Collector: cfg.Commons.Tracing.Collector,
}
} else if cfg.Tracing == nil {
cfg.Tracing = &config.Tracing{}
}
}
func Sanitize(cfg *config.Config) {
// sanitize config
if cfg.HTTP.Root != "/" {
cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
}
cfg.Repo.Backend = strings.ToLower(cfg.Repo.Backend)
}
+1 -1
View File
@@ -3,5 +3,5 @@ package config
// GRPC defines the available grpc configuration.
type GRPC struct {
Addr string `ocisConfig:"addr" env:"ACCOUNTS_GRPC_ADDR" desc:"The address of the grpc service."`
Namespace string
Namespace string `ocisConfig:"-" yaml:"-"`
}
+2 -2
View File
@@ -3,10 +3,10 @@ package config
// HTTP defines the available http configuration.
type HTTP struct {
Addr string `ocisConfig:"addr" env:"ACCOUNTS_HTTP_ADDR" desc:"The address of the http service."`
Namespace string
Namespace string `ocisConfig:"-" yaml:"-"`
Root string `ocisConfig:"root" env:"ACCOUNTS_HTTP_ROOT" desc:"The root path of the http service."`
CacheTTL int `ocisConfig:"cache_ttl" env:"ACCOUNTS_CACHE_TTL" desc:"The cache time for the static assets."`
CORS CORS
CORS CORS `ocisConfig:"cors"`
}
// CORS defines the available cors configuration.
+5 -30
View File
@@ -2,11 +2,11 @@ package parser
import (
"errors"
"strings"
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
"github.com/owncloud/ocis/accounts/pkg/config"
defaults "github.com/owncloud/ocis/accounts/pkg/config/defaults"
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
"github.com/owncloud/ocis/ocis-pkg/config/envdecode"
)
@@ -17,28 +17,7 @@ func ParseConfig(cfg *config.Config) error {
return err
}
// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
cfg.Log = &config.Log{
Level: cfg.Commons.Log.Level,
Pretty: cfg.Commons.Log.Pretty,
Color: cfg.Commons.Log.Color,
File: cfg.Commons.Log.File,
}
} else if cfg.Log == nil {
cfg.Log = &config.Log{}
}
// provide with defaults for shared tracing, since we need a valid destination address for BindEnv.
if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil {
cfg.Tracing = &config.Tracing{
Enabled: cfg.Commons.Tracing.Enabled,
Type: cfg.Commons.Tracing.Type,
Endpoint: cfg.Commons.Tracing.Endpoint,
Collector: cfg.Commons.Tracing.Collector,
}
} else if cfg.Tracing == nil {
cfg.Tracing = &config.Tracing{}
}
defaults.EnsureDefaults(cfg)
// load all env variables relevant to the config in the current context.
if err := envdecode.Decode(cfg); err != nil {
@@ -48,11 +27,7 @@ func ParseConfig(cfg *config.Config) error {
}
}
// sanitize config
if cfg.HTTP.Root != "/" {
cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
}
cfg.Repo.Backend = strings.ToLower(cfg.Repo.Backend)
defaults.Sanitize(cfg)
return nil
}
+1 -1
View File
@@ -2,5 +2,5 @@ package config
// Service defines the available service configuration.
type Service struct {
Name string
Name string `ocisConfig:"-" yaml:"-"`
}
-29
View File
@@ -99,33 +99,6 @@ func (s Service) hasSelfManagementPermissions(ctx context.Context) bool {
return s.RoleManager.FindPermissionByID(ctx, roleIDs, SelfManagementPermissionID) != nil
}
// serviceUserToIndex temporarily adds a service user to the index, which is supposed to be removed before the lock on the handler function is released
func (s Service) serviceUserToIndex() (teardownServiceUser func()) {
if s.Config.ServiceUser.Username != "" && s.Config.ServiceUser.UUID != "" {
_, err := s.index.Add(s.getInMemoryServiceUser())
if err != nil {
s.log.Logger.Err(err).Msg("service user was configured but failed to be added to the index")
} else {
return func() {
_ = s.index.Delete(s.getInMemoryServiceUser())
}
}
}
return func() {}
}
func (s Service) getInMemoryServiceUser() accountsmsg.Account {
return accountsmsg.Account{
AccountEnabled: true,
Id: s.Config.ServiceUser.UUID,
PreferredName: s.Config.ServiceUser.Username,
OnPremisesSamAccountName: s.Config.ServiceUser.Username,
DisplayName: s.Config.ServiceUser.Username,
UidNumber: s.Config.ServiceUser.UID,
GidNumber: s.Config.ServiceUser.GID,
}
}
// ListAccounts implements the AccountsServiceHandler interface
// the query contains account properties
func (s Service) ListAccounts(ctx context.Context, in *accountssvc.ListAccountsRequest, out *accountssvc.ListAccountsResponse) (err error) {
@@ -145,8 +118,6 @@ func (s Service) ListAccounts(ctx context.Context, in *accountssvc.ListAccountsR
}
onlySelf := hasSelf && !hasManagement
teardownServiceUser := s.serviceUserToIndex()
defer teardownServiceUser()
match, authRequest := getAuthQueryMatch(in.Query)
if authRequest {
password := match[2]
@@ -13,7 +13,7 @@ import (
accountssvc "github.com/owncloud/ocis/protogen/gen/ocis/services/accounts/v0"
"github.com/golang/protobuf/ptypes/empty"
"github.com/owncloud/ocis/accounts/pkg/config"
config "github.com/owncloud/ocis/accounts/pkg/config/defaults"
olog "github.com/owncloud/ocis/ocis-pkg/log"
"github.com/owncloud/ocis/ocis-pkg/middleware"
"github.com/owncloud/ocis/ocis-pkg/roles"
+47
View File
@@ -86,9 +86,33 @@ func New(opts ...Option) (s *Service, err error) {
if err = s.createDefaultGroups(cfg.DemoUsersAndGroups); err != nil {
return nil, err
}
s.serviceUserToIndex()
return
}
// serviceUserToIndex temporarily adds a service user to the index, which is supposed to be removed before the lock on the handler function is released
func (s Service) serviceUserToIndex() {
if s.Config.ServiceUser.Username != "" && s.Config.ServiceUser.UUID != "" {
_, err := s.index.Add(s.getInMemoryServiceUser())
if err != nil {
s.log.Logger.Err(err).Msg("service user was configured but failed to be added to the index")
}
}
}
func (s Service) getInMemoryServiceUser() accountsmsg.Account {
return accountsmsg.Account{
AccountEnabled: true,
Id: s.Config.ServiceUser.UUID,
PreferredName: s.Config.ServiceUser.Username,
OnPremisesSamAccountName: s.Config.ServiceUser.Username,
DisplayName: s.Config.ServiceUser.Username,
UidNumber: s.Config.ServiceUser.UID,
GidNumber: s.Config.ServiceUser.GID,
}
}
func (s Service) buildIndex() (*indexer.Indexer, error) {
var indexcfg *idxcfg.Config
@@ -253,6 +277,25 @@ func (s Service) createDefaultAccounts(withDemoAccounts bool) (err error) {
{Id: "509a9dcd-bb37-4f4f-a01a-19dca27d9cfa"}, // users
},
},
{
Id: "534bb038-6f9d-4093-946f-133be61fa4e7",
PreferredName: "katherine",
OnPremisesSamAccountName: "katherine",
Mail: "katherine@example.org",
DisplayName: "Katherine Johnson",
UidNumber: 20005,
GidNumber: 30000,
PasswordProfile: &accountsmsg.PasswordProfile{
Password: "$2a$11$6SIBlZ.8BzjBsDTRrThUyuz6OvP.XLo7101oFiwHHB.jufKGS9.Ji",
},
AccountEnabled: true,
MemberOf: []*accountsmsg.Group{
{Id: "509a9dcd-bb37-4f4f-a01a-19dca27d9cfa"}, // users
{Id: "6040aa17-9c64-4fef-9bd0-77234d71bad0"}, // sailing-lovers
{Id: "a1726108-01f8-4c30-88df-2b1a9d1cba1a"}, // quantum-lovers
{Id: "262982c1-2362-4afa-bfdf-8cbfef64a06e"}, // physics-lovers
},
},
// technical users for kopano and reva
{
Id: "820ba2a1-3f54-4538-80a4-2d73007e30bf",
@@ -353,9 +396,11 @@ func (s Service) createDefaultGroups(withDemoGroups bool) (err error) {
{Id: "4c510ada-c86b-4815-8820-42cdf82c3d51"}, // einstein
{Id: "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c"}, // marie
{Id: "932b4540-8d16-481e-8ef4-588e4b6b151c"}, // feynman
{Id: "534bb038-6f9d-4093-946f-133be61fa4e7"}, // katherine
}},
{Id: "6040aa17-9c64-4fef-9bd0-77234d71bad0", GidNumber: 30001, OnPremisesSamAccountName: "sailing-lovers", DisplayName: "Sailing lovers", Members: []*accountsmsg.Account{
{Id: "4c510ada-c86b-4815-8820-42cdf82c3d51"}, // einstein
{Id: "534bb038-6f9d-4093-946f-133be61fa4e7"}, // katherine
}},
{Id: "dd58e5ec-842e-498b-8800-61f2ec6f911f", GidNumber: 30002, OnPremisesSamAccountName: "violin-haters", DisplayName: "Violin haters", Members: []*accountsmsg.Account{
{Id: "4c510ada-c86b-4815-8820-42cdf82c3d51"}, // einstein
@@ -368,6 +413,7 @@ func (s Service) createDefaultGroups(withDemoGroups bool) (err error) {
}},
{Id: "a1726108-01f8-4c30-88df-2b1a9d1cba1a", GidNumber: 30005, OnPremisesSamAccountName: "quantum-lovers", DisplayName: "Quantum lovers", Members: []*accountsmsg.Account{
{Id: "932b4540-8d16-481e-8ef4-588e4b6b151c"}, // feynman
{Id: "534bb038-6f9d-4093-946f-133be61fa4e7"}, // katherine
}},
{Id: "167cbee2-0518-455a-bfb2-031fe0621e5d", GidNumber: 30006, OnPremisesSamAccountName: "philosophy-haters", DisplayName: "Philosophy haters", Members: []*accountsmsg.Account{
{Id: "932b4540-8d16-481e-8ef4-588e4b6b151c"}, // feynman
@@ -376,6 +422,7 @@ func (s Service) createDefaultGroups(withDemoGroups bool) (err error) {
{Id: "4c510ada-c86b-4815-8820-42cdf82c3d51"}, // einstein
{Id: "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c"}, // marie
{Id: "932b4540-8d16-481e-8ef4-588e4b6b151c"}, // feynman
{Id: "534bb038-6f9d-4093-946f-133be61fa4e7"}, // katherine
}},
}
+55
View File
@@ -0,0 +1,55 @@
SHELL := bash
NAME := audit
include ../.make/recursion.mk
.PHONY: test-acceptance-webui
test-acceptance-webui:
./ui/tests/run-acceptance-test.sh $(FEATURE_PATH)
############ tooling ############
ifneq (, $(shell which go 2> /dev/null)) # suppress `command not found warnings` for non go targets in CI
include ../.bingo/Variables.mk
endif
############ go tooling ############
include ../.make/go.mk
############ release ############
include ../.make/release.mk
############ docs generate ############
include ../.make/docs.mk
############ l10n ############
include ../.make/l10n.mk
.PHONY: docs-generate
docs-generate: config-docs-generate \
grpc-docs-generate
############ generate ############
include ../.make/generate.mk
.PHONY: ci-go-generate
ci-go-generate: protobuf # CI runs ci-node-generate automatically before this target
.PHONY: ci-node-generate
ci-node-generate: yarn-build
.PHONY: yarn-build
yarn-build: node_modules
yarn lint
yarn test
yarn build
.PHONY: node_modules
node_modules:
yarn install --immutable
############ protobuf ############
include ../.make/protobuf.mk
.PHONY: protobuf
protobuf: buf-generate
+14
View File
@@ -0,0 +1,14 @@
package main
import (
"os"
"github.com/owncloud/ocis/audit/pkg/command"
"github.com/owncloud/ocis/audit/pkg/config/defaults"
)
func main() {
if err := command.Execute(defaults.DefaultConfig()); err != nil {
os.Exit(1)
}
}
+18
View File
@@ -0,0 +1,18 @@
package command
import (
"github.com/owncloud/ocis/audit/pkg/config"
"github.com/urfave/cli/v2"
)
// Health is the entrypoint for the health command.
func Health(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "health",
Usage: "Check health status",
Action: func(c *cli.Context) error {
// Not implemented
return nil
},
}
}
+64
View File
@@ -0,0 +1,64 @@
package command
import (
"context"
"os"
"github.com/owncloud/ocis/audit/pkg/config"
"github.com/owncloud/ocis/ocis-pkg/clihelper"
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
"github.com/thejerf/suture/v4"
"github.com/urfave/cli/v2"
)
// GetCommands provides all commands for this service
func GetCommands(cfg *config.Config) cli.Commands {
return []*cli.Command{
// start this service
Server(cfg),
// interaction with this service
// infos about this service
Health(cfg),
Version(cfg),
}
}
// Execute is the entry point for the audit command.
func Execute(cfg *config.Config) error {
app := clihelper.DefaultApp(&cli.App{
Name: "audit",
Usage: "starts audit service",
Commands: GetCommands(cfg),
})
cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}
return app.Run(os.Args)
}
// SutureService allows for the audit command to be embedded and supervised by a suture supervisor tree.
type SutureService struct {
cfg *config.Config
}
// NewSutureService creates a new audit.SutureService
func NewSutureService(cfg *ociscfg.Config) suture.Service {
cfg.Settings.Commons = cfg.Commons
return SutureService{
cfg: cfg.Audit,
}
}
func (s SutureService) Serve(ctx context.Context) error {
s.cfg.Context = ctx
if err := Execute(s.cfg); err != nil {
return err
}
return nil
}
+54
View File
@@ -0,0 +1,54 @@
package command
import (
"context"
"fmt"
"github.com/asim/go-micro/plugins/events/natsjs/v4"
"github.com/cs3org/reva/v2/pkg/events"
"github.com/cs3org/reva/v2/pkg/events/server"
"github.com/owncloud/ocis/audit/pkg/config"
"github.com/owncloud/ocis/audit/pkg/config/parser"
"github.com/owncloud/ocis/audit/pkg/logging"
svc "github.com/owncloud/ocis/audit/pkg/service"
"github.com/owncloud/ocis/audit/pkg/types"
"github.com/urfave/cli/v2"
)
// Server is the entrypoint for the server command.
func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: fmt.Sprintf("start %s extension without runtime (unsupervised mode)", cfg.Service.Name),
Category: "server",
Before: func(c *cli.Context) error {
return parser.ParseConfig(cfg)
},
Action: func(c *cli.Context) error {
logger := logging.Configure(cfg.Service.Name, cfg.Log)
ctx := cfg.Context
if ctx == nil {
ctx = context.Background()
}
ctx, cancel := context.WithCancel(ctx)
defer cancel()
evtsCfg := cfg.Events
client, err := server.NewNatsStream(
natsjs.Address(evtsCfg.Endpoint),
natsjs.ClusterID(evtsCfg.Cluster),
)
if err != nil {
return err
}
evts, err := events.Consume(client, evtsCfg.ConsumerGroup, types.RegisteredEvents()...)
if err != nil {
return err
}
svc.AuditLoggerFromConfig(ctx, cfg.Auditlog, evts, logger)
return nil
},
}
}
+19
View File
@@ -0,0 +1,19 @@
package command
import (
"github.com/owncloud/ocis/audit/pkg/config"
"github.com/urfave/cli/v2"
)
// Version prints the service versions of all running instances.
func Version(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "print the version of this binary and the running extension instances",
Category: "info",
Action: func(c *cli.Context) error {
// not implemented
return nil
},
}
}
+37
View File
@@ -0,0 +1,37 @@
package config
import (
"context"
"github.com/owncloud/ocis/ocis-pkg/shared"
)
// Config combines all available configuration parts.
type Config struct {
*shared.Commons `ocisConfig:"-" yaml:"-"`
Service Service `ocisConfig:"-" yaml:"-"`
Log *Log `ocisConfig:"log"`
Debug Debug `ocisConfig:"debug"`
Events Events `ocisConfig:"events"`
Auditlog Auditlog `ocisConfig:"auditlog"`
Context context.Context `ocisConfig:"-" yaml:"-"`
}
// Events combines the configuration options for the event bus.
type Events struct {
Endpoint string `ocisConfig:"events_endpoint" env:"AUDIT_EVENTS_ENDPOINT" desc:"the address of the streaming service"`
Cluster string `ocisConfig:"events_cluster" env:"AUDIT_EVENTS_CLUSTER" desc:"the clusterID of the streaming service. Mandatory when using nats"`
ConsumerGroup string `ocisConfig:"events_group" env:"AUDIT_EVENTS_GROUP" desc:"the customergroup of the service. One group will only get one vopy of an event"`
}
// Auditlog holds audit log information
type Auditlog struct {
LogToConsole bool `ocisConfig:"log_to_console" env:"AUDIT_LOG_TO_CONSOLE" desc:"logs to Stdout if true"`
LogToFile bool `ocisConfig:"log_to_file" env:"AUDIT_LOG_TO_FILE" desc:"logs to file if true"`
FilePath string `ocisConfig:"filepath" env:"AUDIT_FILEPATH" desc:"filepath to the logfile. Mandatory if LogToFile is true"`
Format string `ocisConfig:"format" env:"AUDIT_FORMAT" desc:"log format. using json is advised"`
}
+9
View File
@@ -0,0 +1,9 @@
package config
// Debug defines the available debug configuration.
type Debug struct {
Addr string `ocisConfig:"addr" env:"AUDIT_DEBUG_ADDR"`
Token string `ocisConfig:"token" env:"AUDIT_DEBUG_TOKEN"`
Pprof bool `ocisConfig:"pprof" env:"AUDIT_DEBUG_PPROF"`
Zpages bool `ocisConfig:"zpages" env:"AUDIT_DEBUG_ZPAGES"`
}
@@ -0,0 +1,49 @@
package defaults
import (
"github.com/owncloud/ocis/audit/pkg/config"
)
func FullDefaultConfig() *config.Config {
cfg := DefaultConfig()
EnsureDefaults(cfg)
Sanitize(cfg)
return cfg
}
func DefaultConfig() *config.Config {
return &config.Config{
Service: config.Service{
Name: "audit",
},
Events: config.Events{
Endpoint: "127.0.0.1:9233",
Cluster: "ocis-cluster",
ConsumerGroup: "audit",
},
Auditlog: config.Auditlog{
LogToConsole: true,
Format: "json",
},
}
}
func EnsureDefaults(cfg *config.Config) {
// provide with defaults for shared logging, since we need a valid destination address for BindEnv.
if cfg.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
cfg.Log = &config.Log{
Level: cfg.Commons.Log.Level,
Pretty: cfg.Commons.Log.Pretty,
Color: cfg.Commons.Log.Color,
File: cfg.Commons.Log.File,
}
} else if cfg.Log == nil {
cfg.Log = &config.Log{}
}
}
func Sanitize(cfg *config.Config) {
// sanitize config
}
+9
View File
@@ -0,0 +1,9 @@
package config
// Log defines the available log configuration.
type Log struct {
Level string `mapstructure:"level" env:"OCIS_LOG_LEVEL;AUDIT_LOG_LEVEL"`
Pretty bool `mapstructure:"pretty" env:"OCIS_LOG_PRETTY;AUDIT_LOG_PRETTY"`
Color bool `mapstructure:"color" env:"OCIS_LOG_COLOR;AUDIT_LOG_COLOR"`
File string `mapstructure:"file" env:"OCIS_LOG_FILE;AUDIT_LOG_FILE"`
}
+33
View File
@@ -0,0 +1,33 @@
package parser
import (
"errors"
"github.com/owncloud/ocis/audit/pkg/config"
"github.com/owncloud/ocis/audit/pkg/config/defaults"
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
"github.com/owncloud/ocis/ocis-pkg/config/envdecode"
)
// ParseConfig loads accounts configuration from known paths.
func ParseConfig(cfg *config.Config) error {
_, err := ociscfg.BindSourcesToStructs(cfg.Service.Name, cfg)
if err != nil {
return err
}
defaults.EnsureDefaults(cfg)
// load all env variables relevant to the config in the current context.
if err := envdecode.Decode(cfg); err != nil {
// no environment variable set for this config is an expected "error"
if !errors.Is(err, envdecode.ErrNoTargetFieldsAreSet) {
return err
}
}
defaults.Sanitize(cfg)
return nil
}
+6
View File
@@ -0,0 +1,6 @@
package config
// Service defines the available service configuration.
type Service struct {
Name string `ocisConfig:"-" yaml:"-"`
}
+17
View File
@@ -0,0 +1,17 @@
package logging
import (
"github.com/owncloud/ocis/audit/pkg/config"
"github.com/owncloud/ocis/ocis-pkg/log"
)
// LoggerFromConfig initializes a service-specific logger instance.
func Configure(name string, cfg *config.Log) log.Logger {
return log.NewLogger(
log.Name(name),
log.Level(cfg.Level),
log.Pretty(cfg.Pretty),
log.Color(cfg.Color),
log.File(cfg.File),
)
}
+154
View File
@@ -0,0 +1,154 @@
package svc
import (
"context"
"encoding/json"
"fmt"
"os"
"github.com/cs3org/reva/v2/pkg/events"
"github.com/owncloud/ocis/audit/pkg/config"
"github.com/owncloud/ocis/audit/pkg/types"
"github.com/owncloud/ocis/ocis-pkg/log"
)
// Log is used to log to different outputs
type Log func([]byte)
// Marshaller is used to marshal events
type Marshaller func(interface{}) ([]byte, error)
// AuditLoggerFromConfig will start a new AuditLogger generated from the config
func AuditLoggerFromConfig(ctx context.Context, cfg config.Auditlog, ch <-chan interface{}, log log.Logger) {
var logs []Log
if cfg.LogToConsole {
logs = append(logs, WriteToStdout())
}
if cfg.LogToFile {
logs = append(logs, WriteToFile(cfg.FilePath, log))
}
StartAuditLogger(ctx, ch, log, Marshal(cfg.Format, log), logs...)
}
// StartAuditLogger will block. run in seperate go routine
func StartAuditLogger(ctx context.Context, ch <-chan interface{}, log log.Logger, marshaller Marshaller, logto ...Log) {
for {
select {
case <-ctx.Done():
return
case i := <-ch:
var auditEvent interface{}
switch ev := i.(type) {
case events.ShareCreated:
auditEvent = types.ShareCreated(ev)
case events.LinkCreated:
auditEvent = types.LinkCreated(ev)
case events.ShareUpdated:
auditEvent = types.ShareUpdated(ev)
case events.LinkUpdated:
auditEvent = types.LinkUpdated(ev)
case events.ShareRemoved:
auditEvent = types.ShareRemoved(ev)
case events.LinkRemoved:
auditEvent = types.LinkRemoved(ev)
case events.ReceivedShareUpdated:
auditEvent = types.ReceivedShareUpdated(ev)
case events.LinkAccessed:
auditEvent = types.LinkAccessed(ev)
case events.LinkAccessFailed:
auditEvent = types.LinkAccessFailed(ev)
case events.FileUploaded:
auditEvent = types.FileUploaded(ev)
case events.FileDownloaded:
auditEvent = types.FileDownloaded(ev)
case events.ItemMoved:
auditEvent = types.ItemMoved(ev)
case events.ItemTrashed:
auditEvent = types.ItemTrashed(ev)
case events.ItemPurged:
auditEvent = types.ItemPurged(ev)
case events.ItemRestored:
auditEvent = types.ItemRestored(ev)
case events.FileVersionRestored:
auditEvent = types.FileVersionRestored(ev)
case events.SpaceCreated:
auditEvent = types.SpaceCreated(ev)
case events.SpaceRenamed:
auditEvent = types.SpaceRenamed(ev)
case events.SpaceDisabled:
auditEvent = types.SpaceDisabled(ev)
case events.SpaceEnabled:
auditEvent = types.SpaceEnabled(ev)
case events.SpaceDeleted:
auditEvent = types.SpaceDeleted(ev)
default:
log.Error().Interface("event", ev).Msg(fmt.Sprintf("can't handle event of type '%T'", ev))
continue
}
b, err := marshaller(auditEvent)
if err != nil {
log.Error().Err(err).Msg("error marshaling the event")
continue
}
for _, l := range logto {
l(b)
}
}
}
}
// WriteToFile returns a Log function writing to a file
func WriteToFile(path string, log log.Logger) Log {
return func(content []byte) {
file, err := os.OpenFile(path, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0644)
if err != nil {
log.Error().Err(err).Msgf("error opening file '%s'", path)
return
}
defer file.Close()
if _, err := fmt.Fprintln(file, string(content)); err != nil {
log.Error().Err(err).Msgf("error writing to file '%s'", path)
}
}
}
// WriteToStdout return a Log function writing to Stdout
func WriteToStdout() Log {
return func(content []byte) {
fmt.Println(string(content))
}
}
// Marshal returns a Marshaller from the `format` string
func Marshal(format string, log log.Logger) Marshaller {
switch format {
default:
log.Error().Msgf("unknown format '%s'", format)
return nil
case "json":
return json.Marshal
case "minimal":
return func(ev interface{}) ([]byte, error) {
b, err := json.Marshal(ev)
if err != nil {
return nil, err
}
m := make(map[string]interface{})
if err := json.Unmarshal(b, &m); err != nil {
return nil, err
}
format := fmt.Sprintf("%s)\n %s", m["Action"], m["Message"])
return []byte(format), nil
}
}
}
+635
View File
@@ -0,0 +1,635 @@
package svc
import (
"context"
"encoding/json"
"testing"
"github.com/cs3org/reva/v2/pkg/events"
"github.com/owncloud/ocis/audit/pkg/types"
"github.com/owncloud/ocis/ocis-pkg/log"
"github.com/test-go/testify/require"
group "github.com/cs3org/go-cs3apis/cs3/identity/group/v1beta1"
user "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
collaboration "github.com/cs3org/go-cs3apis/cs3/sharing/collaboration/v1beta1"
link "github.com/cs3org/go-cs3apis/cs3/sharing/link/v1beta1"
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
rtypes "github.com/cs3org/go-cs3apis/cs3/types/v1beta1"
)
var testCases = []struct {
Alias string
SystemEvent interface{}
CheckAuditEvent func(*testing.T, []byte)
}{
{
Alias: "ShareCreated - user",
SystemEvent: events.ShareCreated{
Sharer: userID("sharing-userid"),
GranteeUserID: userID("beshared-userid"),
GranteeGroupID: nil,
ItemID: resourceID("storage-1", "itemid-1"),
CTime: timestamp(0),
},
CheckAuditEvent: func(t *testing.T, b []byte) {
ev := types.AuditEventShareCreated{}
require.NoError(t, json.Unmarshal(b, &ev))
// AuditEvent fields
checkBaseAuditEvent(t, ev.AuditEvent, "sharing-userid", "1970-01-01T00:00:00Z", "user 'sharing-userid' shared file 'itemid-1' with 'beshared-userid'", "file_shared")
// AuditEventSharing fields
checkSharingAuditEvent(t, ev.AuditEventSharing, "itemid-1", "sharing-userid", "")
// AuditEventShareCreated fields
require.Equal(t, "", ev.ItemType)
require.Equal(t, "", ev.ExpirationDate)
require.Equal(t, false, ev.SharePass)
//require.Equal(t, "stat:true ", ev.Permissions) // TODO: BUG! Should work
require.Equal(t, "user", ev.ShareType)
require.Equal(t, "beshared-userid", ev.ShareWith)
require.Equal(t, "sharing-userid", ev.ShareOwner)
require.Equal(t, "", ev.ShareToken)
},
}, {
Alias: "ShareCreated - group",
SystemEvent: events.ShareCreated{
Sharer: userID("sharing-userid"),
GranteeUserID: nil,
GranteeGroupID: groupID("beshared-groupid"),
ItemID: resourceID("storage-1", "itemid-1"),
CTime: timestamp(10e8),
},
CheckAuditEvent: func(t *testing.T, b []byte) {
ev := types.AuditEventShareCreated{}
require.NoError(t, json.Unmarshal(b, &ev))
// AuditEvent fields
checkBaseAuditEvent(t, ev.AuditEvent, "sharing-userid", "2001-09-09T01:46:40Z", "user 'sharing-userid' shared file 'itemid-1' with 'beshared-groupid'", "file_shared")
// AuditEventSharing fields
checkSharingAuditEvent(t, ev.AuditEventSharing, "itemid-1", "sharing-userid", "")
// AuditEventShareCreated fields
require.Equal(t, "", ev.ItemType)
require.Equal(t, "", ev.ExpirationDate)
require.Equal(t, false, ev.SharePass)
//require.Equal(t, "stat:true ", ev.Permissions) // TODO: BUG! Should work
require.Equal(t, "group", ev.ShareType)
require.Equal(t, "beshared-groupid", ev.ShareWith)
require.Equal(t, "sharing-userid", ev.ShareOwner)
require.Equal(t, "", ev.ShareToken)
},
}, {
Alias: "ShareUpdated",
SystemEvent: events.ShareUpdated{
ShareID: shareID("shareid"),
Sharer: userID("sharing-userid"),
GranteeUserID: nil,
GranteeGroupID: groupID("beshared-groupid"),
ItemID: resourceID("storage-1", "itemid-1"),
Permissions: sharePermissions("stat", "get_quota"),
MTime: timestamp(10e8),
Updated: "permissions",
},
CheckAuditEvent: func(t *testing.T, b []byte) {
ev := types.AuditEventShareUpdated{}
require.NoError(t, json.Unmarshal(b, &ev))
// AuditEvent fields
checkBaseAuditEvent(t, ev.AuditEvent, "sharing-userid", "2001-09-09T01:46:40Z", "user 'sharing-userid' updated field 'permissions' of share 'shareid'", "share_permission_updated")
// AuditEventSharing fields
checkSharingAuditEvent(t, ev.AuditEventSharing, "itemid-1", "sharing-userid", "shareid")
// AuditEventShareUpdated fields
require.Equal(t, "", ev.ItemType) // not implemented atm
require.Equal(t, "", ev.ExpirationDate) // no expiration for shares
require.Equal(t, false, ev.SharePass)
require.Equal(t, "get_quota:true stat:true ", ev.Permissions)
require.Equal(t, "group", ev.ShareType)
require.Equal(t, "beshared-groupid", ev.ShareWith)
require.Equal(t, "sharing-userid", ev.ShareOwner)
require.Equal(t, "", ev.ShareToken) // token not filled for shares
},
}, {
Alias: "LinkUpdated - permissions",
SystemEvent: events.LinkUpdated{
ShareID: linkID("shareid"),
Sharer: userID("sharing-userid"),
ItemID: resourceID("storage-1", "itemid-1"),
Permissions: linkPermissions("stat"),
CTime: timestamp(10e8),
DisplayName: "link",
Expiration: timestamp(10e8 + 10e5),
PasswordProtected: true,
Token: "token-123",
FieldUpdated: "permissions",
},
CheckAuditEvent: func(t *testing.T, b []byte) {
ev := types.AuditEventShareUpdated{}
require.NoError(t, json.Unmarshal(b, &ev))
// AuditEvent fields
checkBaseAuditEvent(t, ev.AuditEvent, "sharing-userid", "2001-09-09T01:46:40Z", "user 'sharing-userid' updated field 'permissions' of public link 'shareid'", "share_permission_updated")
// AuditEventSharing fields
checkSharingAuditEvent(t, ev.AuditEventSharing, "itemid-1", "sharing-userid", "shareid")
// AuditEventShareUpdated fields
require.Equal(t, "", ev.ItemType) // not implemented atm
require.Equal(t, "2001-09-20T15:33:20Z", ev.ExpirationDate)
require.Equal(t, true, ev.SharePass)
require.Equal(t, "stat:true ", ev.Permissions)
require.Equal(t, "link", ev.ShareType)
require.Equal(t, "", ev.ShareWith) // not filled on links
require.Equal(t, "sharing-userid", ev.ShareOwner)
require.Equal(t, "token-123", ev.ShareToken)
},
}, {
Alias: "ShareRemoved",
SystemEvent: events.ShareRemoved{
ShareID: shareID("shareid"),
ShareKey: nil,
},
CheckAuditEvent: func(t *testing.T, b []byte) {
ev := types.AuditEventShareRemoved{}
require.NoError(t, json.Unmarshal(b, &ev))
// AuditEvent fields
checkBaseAuditEvent(t, ev.AuditEvent, "", "", "share id:'shareid' uid:'' item-id:'' was removed", "file_unshared")
// AuditEventSharing fields
checkSharingAuditEvent(t, ev.AuditEventSharing, "", "", "shareid")
// AuditEventShareUpdated fields
require.Equal(t, "", ev.ItemType) // not implemented atm
require.Equal(t, "", ev.ShareType)
require.Equal(t, "", ev.ShareWith) // not filled on links
},
}, {
Alias: "LinkRemoved - id",
SystemEvent: events.LinkRemoved{
ShareID: linkID("shareid"),
ShareToken: "",
},
CheckAuditEvent: func(t *testing.T, b []byte) {
ev := types.AuditEventShareRemoved{}
require.NoError(t, json.Unmarshal(b, &ev))
// AuditEvent fields
checkBaseAuditEvent(t, ev.AuditEvent, "", "", "public link id:'shareid' was removed", "file_unshared")
// AuditEventSharing fields
checkSharingAuditEvent(t, ev.AuditEventSharing, "", "", "shareid")
// AuditEventShareUpdated fields
require.Equal(t, "", ev.ItemType) // not implemented atm
require.Equal(t, "link", ev.ShareType)
require.Equal(t, "", ev.ShareWith) // not filled on links
},
}, {
Alias: "LinkRemoved - token",
SystemEvent: events.LinkRemoved{
ShareID: nil,
ShareToken: "token-123",
},
CheckAuditEvent: func(t *testing.T, b []byte) {
ev := types.AuditEventShareRemoved{}
require.NoError(t, json.Unmarshal(b, &ev))
// AuditEvent fields
checkBaseAuditEvent(t, ev.AuditEvent, "", "", "public link id:'token-123' was removed", "file_unshared")
// AuditEventSharing fields
checkSharingAuditEvent(t, ev.AuditEventSharing, "", "", "token-123")
// AuditEventShareUpdated fields
require.Equal(t, "", ev.ItemType) // not implemented atm
require.Equal(t, "link", ev.ShareType)
require.Equal(t, "", ev.ShareWith) // not filled on links
},
}, {
Alias: "Share accepted",
SystemEvent: events.ReceivedShareUpdated{
ShareID: shareID("shareid"),
ItemID: resourceID("storageid-1", "itemid-1"),
Permissions: sharePermissions("get_quota"),
GranteeUserID: userID("beshared-userid"),
GranteeGroupID: nil,
Sharer: userID("sharing-userid"),
MTime: timestamp(10e8),
State: "SHARE_STATE_ACCEPTED",
},
CheckAuditEvent: func(t *testing.T, b []byte) {
ev := types.AuditEventReceivedShareUpdated{}
require.NoError(t, json.Unmarshal(b, &ev))
// AuditEvent fields
checkBaseAuditEvent(t, ev.AuditEvent, "beshared-userid", "2001-09-09T01:46:40Z", "user 'beshared-userid' accepted share 'shareid' from user 'sharing-userid'", "share_accepted")
// AuditEventSharing fields
checkSharingAuditEvent(t, ev.AuditEventSharing, "itemid-1", "sharing-userid", "shareid")
// AuditEventShareUpdated fields
require.Equal(t, "", ev.ItemType)
require.Equal(t, "user", ev.ShareType)
require.Equal(t, "beshared-userid", ev.ShareWith)
},
}, {
Alias: "Share declined",
SystemEvent: events.ReceivedShareUpdated{
ShareID: shareID("shareid"),
ItemID: resourceID("storageid-1", "itemid-1"),
Permissions: sharePermissions("get_quota"),
GranteeUserID: userID("beshared-userid"),
GranteeGroupID: nil,
Sharer: userID("sharing-userid"),
MTime: timestamp(10e8),
State: "SHARE_STATE_DECLINED",
},
CheckAuditEvent: func(t *testing.T, b []byte) {
ev := types.AuditEventReceivedShareUpdated{}
require.NoError(t, json.Unmarshal(b, &ev))
// AuditEvent fields
checkBaseAuditEvent(t, ev.AuditEvent, "beshared-userid", "2001-09-09T01:46:40Z", "user 'beshared-userid' declined share 'shareid' from user 'sharing-userid'", "share_declined")
// AuditEventSharing fields
checkSharingAuditEvent(t, ev.AuditEventSharing, "itemid-1", "sharing-userid", "shareid")
// AuditEventShareUpdated fields
require.Equal(t, "", ev.ItemType)
require.Equal(t, "user", ev.ShareType)
require.Equal(t, "beshared-userid", ev.ShareWith)
},
}, {
Alias: "Link accessed - success",
SystemEvent: events.LinkAccessed{
ShareID: linkID("shareid"),
Sharer: userID("sharing-userid"),
ItemID: resourceID("storage-1", "itemid-1"),
Permissions: linkPermissions("stat"),
DisplayName: "link",
Expiration: timestamp(10e8 + 10e5),
PasswordProtected: true,
CTime: timestamp(10e8),
Token: "token-123",
},
CheckAuditEvent: func(t *testing.T, b []byte) {
ev := types.AuditEventLinkAccessed{}
require.NoError(t, json.Unmarshal(b, &ev))
// AuditEvent fields
checkBaseAuditEvent(t, ev.AuditEvent, "sharing-userid", "2001-09-09T01:46:40Z", "link 'shareid' was accessed. Success: true", "public_link_accessed")
// AuditEventSharing fields
checkSharingAuditEvent(t, ev.AuditEventSharing, "itemid-1", "sharing-userid", "shareid")
// AuditEventShareUpdated fields
require.Equal(t, "", ev.ItemType) // not implemented atm
require.Equal(t, "token-123", ev.ShareToken)
require.Equal(t, true, ev.Success)
},
}, {
Alias: "Link accessed - failure",
SystemEvent: events.LinkAccessFailed{
ShareID: linkID("shareid"),
Token: "token-123",
Status: 8,
Message: "access denied",
},
CheckAuditEvent: func(t *testing.T, b []byte) {
ev := types.AuditEventLinkAccessed{}
require.NoError(t, json.Unmarshal(b, &ev))
// AuditEvent fields
checkBaseAuditEvent(t, ev.AuditEvent, "", "", "link 'shareid' was accessed. Success: false", "public_link_accessed")
// AuditEventSharing fields
checkSharingAuditEvent(t, ev.AuditEventSharing, "", "", "shareid")
// AuditEventShareUpdated fields
require.Equal(t, "", ev.ItemType) // not implemented atm
require.Equal(t, "token-123", ev.ShareToken)
require.Equal(t, false, ev.Success)
},
}, {
Alias: "File created",
SystemEvent: events.FileUploaded{
FileID: reference("sto-123", "iid-123", "./item"),
Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva
},
CheckAuditEvent: func(t *testing.T, b []byte) {
ev := types.AuditEventFileCreated{}
require.NoError(t, json.Unmarshal(b, &ev))
// AuditEvent fields
checkBaseAuditEvent(t, ev.AuditEvent, "uid-123", "", "File 'sto-123!iid-123/item' was created", "file_create")
// AuditEventSharing fields
checkFilesAuditEvent(t, ev.AuditEventFiles, "sto-123!iid-123/item", "uid-123", "./item")
},
}, {
Alias: "File read",
SystemEvent: events.FileDownloaded{
FileID: reference("sto-123", "iid-123", "./item"),
Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva
},
CheckAuditEvent: func(t *testing.T, b []byte) {
ev := types.AuditEventFileRead{}
require.NoError(t, json.Unmarshal(b, &ev))
// AuditEvent fields
checkBaseAuditEvent(t, ev.AuditEvent, "uid-123", "", "File 'sto-123!iid-123/item' was read", "file_read")
// AuditEventSharing fields
checkFilesAuditEvent(t, ev.AuditEventFiles, "sto-123!iid-123/item", "uid-123", "./item")
},
}, {
Alias: "File trashed",
SystemEvent: events.ItemTrashed{
FileID: reference("sto-123", "iid-123", "./item"),
Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva
},
CheckAuditEvent: func(t *testing.T, b []byte) {
ev := types.AuditEventFileDeleted{}
require.NoError(t, json.Unmarshal(b, &ev))
// AuditEvent fields
checkBaseAuditEvent(t, ev.AuditEvent, "uid-123", "", "File 'sto-123!iid-123/item' was trashed", "file_delete")
// AuditEventSharing fields
checkFilesAuditEvent(t, ev.AuditEventFiles, "sto-123!iid-123/item", "uid-123", "./item")
},
}, {
Alias: "File renamed",
SystemEvent: events.ItemMoved{
FileID: reference("sto-123", "iid-123", "./item"),
OldReference: reference("sto-123", "iid-123", "./anotheritem"),
Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva
},
CheckAuditEvent: func(t *testing.T, b []byte) {
ev := types.AuditEventFileRenamed{}
require.NoError(t, json.Unmarshal(b, &ev))
// AuditEvent fields
checkBaseAuditEvent(t, ev.AuditEvent, "uid-123", "", "File 'sto-123!iid-123/item' was moved from './anotheritem' to './item'", "file_rename")
// AuditEventSharing fields
checkFilesAuditEvent(t, ev.AuditEventFiles, "sto-123!iid-123/item", "uid-123", "./item")
// AuditEventFileRenamed fields
require.Equal(t, "./anotheritem", ev.OldPath)
},
}, {
Alias: "File purged",
SystemEvent: events.ItemPurged{
FileID: reference("sto-123", "iid-123", "./item"),
Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva
},
CheckAuditEvent: func(t *testing.T, b []byte) {
ev := types.AuditEventFilePurged{}
require.NoError(t, json.Unmarshal(b, &ev))
// AuditEvent fields
checkBaseAuditEvent(t, ev.AuditEvent, "uid-123", "", "File 'sto-123!iid-123/item' was removed from trashbin", "file_trash_delete")
// AuditEventSharing fields
checkFilesAuditEvent(t, ev.AuditEventFiles, "sto-123!iid-123/item", "uid-123", "./item")
},
}, {
Alias: "File restored",
SystemEvent: events.ItemRestored{
FileID: reference("sto-123", "iid-123", "./item"),
Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva
OldReference: reference("sto-123", "sto-123!iid-123/item", "./oldpath"),
Key: "",
},
CheckAuditEvent: func(t *testing.T, b []byte) {
ev := types.AuditEventFileRestored{}
require.NoError(t, json.Unmarshal(b, &ev))
// AuditEvent fields
checkBaseAuditEvent(t, ev.AuditEvent, "uid-123", "", "File 'sto-123!iid-123/item' was restored from trashbin to './item'", "file_trash_restore")
// AuditEventSharing fields
checkFilesAuditEvent(t, ev.AuditEventFiles, "sto-123!iid-123/item", "uid-123", "./item")
// AuditEventFileRestored fields
require.Equal(t, "./oldpath", ev.OldPath)
},
}, {
Alias: "File version restored",
SystemEvent: events.FileVersionRestored{
FileID: reference("sto-123", "iid-123", "./item"),
Owner: userID("uid-123"), // NOTE: owner not yet implemented in reva
Key: "v1",
},
CheckAuditEvent: func(t *testing.T, b []byte) {
ev := types.AuditEventFileVersionRestored{}
require.NoError(t, json.Unmarshal(b, &ev))
// AuditEvent fields
checkBaseAuditEvent(t, ev.AuditEvent, "uid-123", "", "File 'sto-123!iid-123/item' was restored in version 'v1'", "file_version_restore")
// AuditEventSharing fields
checkFilesAuditEvent(t, ev.AuditEventFiles, "sto-123!iid-123/item", "uid-123", "./item")
// AuditEventFileRestored fields
require.Equal(t, "v1", ev.Key)
},
}, {
Alias: "Space created",
SystemEvent: events.SpaceCreated{
ID: &provider.StorageSpaceId{OpaqueId: "space-123"},
Owner: userID("uid-123"),
Root: resourceID("sto-123", "iid-123"),
Name: "test-space",
Type: "project",
Quota: nil, // Quota not interesting atm
MTime: timestamp(10e9),
},
CheckAuditEvent: func(t *testing.T, b []byte) {
ev := types.AuditEventSpaceCreated{}
require.NoError(t, json.Unmarshal(b, &ev))
// AuditEvent fields
checkBaseAuditEvent(t, ev.AuditEvent, "", "2286-11-20T17:46:40Z", "Space 'space-123' with name 'test-space' was created", "space_created")
// AuditEventSpaces fields
checkSpacesAuditEvent(t, ev.AuditEventSpaces, "space-123")
// AuditEventFileRestored fields
require.Equal(t, "uid-123", ev.Owner)
require.Equal(t, "sto-123!iid-123", ev.RootItem)
require.Equal(t, "test-space", ev.Name)
require.Equal(t, "project", ev.Type)
},
}, {
Alias: "Space renamed",
SystemEvent: events.SpaceRenamed{
ID: &provider.StorageSpaceId{OpaqueId: "space-123"},
Owner: userID("uid-123"),
Name: "new-name",
},
CheckAuditEvent: func(t *testing.T, b []byte) {
ev := types.AuditEventSpaceRenamed{}
require.NoError(t, json.Unmarshal(b, &ev))
// AuditEvent fields
checkBaseAuditEvent(t, ev.AuditEvent, "", "", "Space 'space-123' was renamed to 'new-name'", "space_renamed")
// AuditEventSpaces fields
checkSpacesAuditEvent(t, ev.AuditEventSpaces, "space-123")
// AuditEventSpaceRenamed fields
require.Equal(t, "new-name", ev.NewName)
},
}, {
Alias: "Space disabled",
SystemEvent: events.SpaceDisabled{
ID: &provider.StorageSpaceId{OpaqueId: "space-123"},
},
CheckAuditEvent: func(t *testing.T, b []byte) {
ev := types.AuditEventSpaceDisabled{}
require.NoError(t, json.Unmarshal(b, &ev))
// AuditEvent fields
checkBaseAuditEvent(t, ev.AuditEvent, "", "", "Space 'space-123' was disabled", "space_disabled")
// AuditEventSpaces fields
checkSpacesAuditEvent(t, ev.AuditEventSpaces, "space-123")
},
}, {
Alias: "Space enabled",
SystemEvent: events.SpaceEnabled{
ID: &provider.StorageSpaceId{OpaqueId: "space-123"},
},
CheckAuditEvent: func(t *testing.T, b []byte) {
ev := types.AuditEventSpaceEnabled{}
require.NoError(t, json.Unmarshal(b, &ev))
// AuditEvent fields
checkBaseAuditEvent(t, ev.AuditEvent, "", "", "Space 'space-123' was (re-) enabled", "space_enabled")
// AuditEventSpaces fields
checkSpacesAuditEvent(t, ev.AuditEventSpaces, "space-123")
},
}, {
Alias: "Space deleted",
SystemEvent: events.SpaceDeleted{
ID: &provider.StorageSpaceId{OpaqueId: "space-123"},
},
CheckAuditEvent: func(t *testing.T, b []byte) {
ev := types.AuditEventSpaceDeleted{}
require.NoError(t, json.Unmarshal(b, &ev))
// AuditEvent fields
checkBaseAuditEvent(t, ev.AuditEvent, "", "", "Space 'space-123' was deleted", "space_deleted")
// AuditEventSpaces fields
checkSpacesAuditEvent(t, ev.AuditEventSpaces, "space-123")
},
},
}
func TestAuditLogging(t *testing.T) {
log := log.NewLogger()
inch := make(chan interface{})
defer close(inch)
outch := make(chan []byte)
defer close(outch)
ctx, cancel := context.WithCancel(context.TODO())
defer cancel()
go StartAuditLogger(ctx, inch, log, Marshal("json", log), func(b []byte) {
outch <- b
})
for i := range testCases {
tc := testCases[i]
t.Run(tc.Alias, func(t *testing.T) {
inch <- tc.SystemEvent
tc.CheckAuditEvent(t, <-outch)
})
}
}
func checkBaseAuditEvent(t *testing.T, ev types.AuditEvent, user string, time string, message string, action string) {
require.Equal(t, "", ev.RemoteAddr) // not implemented atm
require.Equal(t, user, ev.User)
require.Equal(t, "", ev.URL) // not implemented atm
require.Equal(t, "", ev.Method) // not implemented atm
require.Equal(t, "", ev.UserAgent) // not implemented atm
require.Equal(t, time, ev.Time)
require.Equal(t, "admin_audit", ev.App)
require.Equal(t, message, ev.Message)
require.Equal(t, action, ev.Action)
require.Equal(t, false, ev.CLI) // not implemented atm
require.Equal(t, 1, ev.Level)
}
func checkSharingAuditEvent(t *testing.T, ev types.AuditEventSharing, itemID string, owner string, shareID string) {
require.Equal(t, itemID, ev.FileID)
require.Equal(t, owner, ev.Owner)
require.Equal(t, "", ev.Path) // not implemented atm
require.Equal(t, shareID, ev.ShareID)
}
func checkFilesAuditEvent(t *testing.T, ev types.AuditEventFiles, itemID string, owner string, path string) {
require.Equal(t, itemID, ev.FileID)
require.Equal(t, owner, ev.Owner)
require.Equal(t, path, ev.Path)
}
func checkSpacesAuditEvent(t *testing.T, ev types.AuditEventSpaces, spaceID string) {
require.Equal(t, spaceID, ev.SpaceID)
}
func shareID(id string) *collaboration.ShareId {
return &collaboration.ShareId{
OpaqueId: id,
}
}
func linkID(id string) *link.PublicShareId {
return &link.PublicShareId{
OpaqueId: id,
}
}
func userID(id string) *user.UserId {
return &user.UserId{
OpaqueId: id,
Idp: "idp",
}
}
func groupID(id string) *group.GroupId {
return &group.GroupId{
OpaqueId: id,
Idp: "idp",
}
}
func resourceID(sid, oid string) *provider.ResourceId {
return &provider.ResourceId{
StorageId: sid,
OpaqueId: oid,
}
}
func reference(sid, oid, path string) *provider.Reference {
return &provider.Reference{
ResourceId: resourceID(sid, oid),
Path: path,
}
}
func timestamp(seconds uint64) *rtypes.Timestamp {
return &rtypes.Timestamp{
Seconds: seconds,
Nanos: 0,
}
}
func sharePermissions(perms ...string) *collaboration.SharePermissions {
return &collaboration.SharePermissions{
Permissions: permissions(perms...),
}
}
func linkPermissions(perms ...string) *link.PublicSharePermissions {
return &link.PublicSharePermissions{
Permissions: permissions(perms...),
}
}
func permissions(permissions ...string) *provider.ResourcePermissions {
perms := &provider.ResourcePermissions{}
for _, p := range permissions {
switch p {
case "stat":
perms.Stat = true
case "get_path":
perms.GetPath = true
case "list_container":
perms.ListContainer = true
case "get_quota":
perms.GetQuota = true
}
}
return perms
}
+138
View File
@@ -0,0 +1,138 @@
package types
import "fmt"
// short identifiers for audit actions
const (
// Sharing
ActionShareCreated = "file_shared"
ActionSharePermissionUpdated = "share_permission_updated"
ActionShareDisplayNameUpdated = "share_name_updated"
ActionSharePasswordUpdated = "share_password_updated"
ActionShareExpirationUpdated = "share_expiration_updated"
ActionShareRemoved = "file_unshared"
ActionShareAccepted = "share_accepted"
ActionShareDeclined = "share_declined"
ActionLinkAccessed = "public_link_accessed"
// Files
ActionFileCreated = "file_create"
ActionFileRead = "file_read"
ActionFileTrashed = "file_delete"
ActionFileRenamed = "file_rename"
ActionFilePurged = "file_trash_delete"
ActionFileRestored = "file_trash_restore"
ActionFileVersionRestored = "file_version_restore"
// Spaces
ActionSpaceCreated = "space_created"
ActionSpaceRenamed = "space_renamed"
ActionSpaceDisabled = "space_disabled"
ActionSpaceEnabled = "space_enabled"
ActionSpaceDeleted = "space_deleted"
)
// MessageShareCreated returns the human readable string that describes the action
func MessageShareCreated(sharer, item, grantee string) string {
return fmt.Sprintf("user '%s' shared file '%s' with '%s'", sharer, item, grantee)
}
// MessageLinkCreated returns the human readable string that describes the action
func MessageLinkCreated(sharer, item, shareid string) string {
return fmt.Sprintf("user '%s' created a public to file '%s' with id '%s'", sharer, item, shareid)
}
// MessageShareUpdated returns the human readable string that describes the action
func MessageShareUpdated(sharer, shareID, fieldUpdated string) string {
return fmt.Sprintf("user '%s' updated field '%s' of share '%s'", sharer, fieldUpdated, shareID)
}
// MessageLinkUpdated returns the human readable string that describes the action
func MessageLinkUpdated(sharer, shareid, fieldUpdated string) string {
return fmt.Sprintf("user '%s' updated field '%s' of public link '%s'", sharer, fieldUpdated, shareid)
}
// MessageShareRemoved returns the human readable string that describes the action
func MessageShareRemoved(sharer, shareid, itemid string) string {
return fmt.Sprintf("share id:'%s' uid:'%s' item-id:'%s' was removed", shareid, sharer, itemid)
}
// MessageLinkRemoved returns the human readable string that describes the action
func MessageLinkRemoved(shareid string) string {
return fmt.Sprintf("public link id:'%s' was removed", shareid)
}
// MessageShareAccepted returns the human readable string that describes the action
func MessageShareAccepted(userid, shareid, sharerid string) string {
return fmt.Sprintf("user '%s' accepted share '%s' from user '%s'", userid, shareid, sharerid)
}
// MessageShareDeclined returns the human readable string that describes the action
func MessageShareDeclined(userid, shareid, sharerid string) string {
return fmt.Sprintf("user '%s' declined share '%s' from user '%s'", userid, shareid, sharerid)
}
// MessageLinkAccessed returns the human readable string that describes the action
func MessageLinkAccessed(linkid string, success bool) string {
return fmt.Sprintf("link '%s' was accessed. Success: %v", linkid, success)
}
// MessageFileCreated returns the human readable string that describes the action
func MessageFileCreated(item string) string {
return fmt.Sprintf("File '%s' was created", item)
}
// MessageFileRead returns the human readable string that describes the action
func MessageFileRead(item string) string {
return fmt.Sprintf("File '%s' was read", item)
}
// MessageFileTrashed returns the human readable string that describes the action
func MessageFileTrashed(item string) string {
return fmt.Sprintf("File '%s' was trashed", item)
}
// MessageFileRenamed returns the human readable string that describes the action
func MessageFileRenamed(item, oldpath, newpath string) string {
return fmt.Sprintf("File '%s' was moved from '%s' to '%s'", item, oldpath, newpath)
}
// MessageFilePurged returns the human readable string that describes the action
func MessageFilePurged(item string) string {
return fmt.Sprintf("File '%s' was removed from trashbin", item)
}
// MessageFileRestored returns the human readable string that describes the action
func MessageFileRestored(item, path string) string {
return fmt.Sprintf("File '%s' was restored from trashbin to '%s'", item, path)
}
// MessageFileVersionRestored returns the human readable string that describes the action
func MessageFileVersionRestored(item string, version string) string {
return fmt.Sprintf("File '%s' was restored in version '%s'", item, version)
}
// MessageSpaceCreated returns the human readable string that describes the action
func MessageSpaceCreated(spaceID string, name string) string {
return fmt.Sprintf("Space '%s' with name '%s' was created", spaceID, name)
}
// MessageSpaceRenamed returns the human readable string that describes the action
func MessageSpaceRenamed(spaceID string, name string) string {
return fmt.Sprintf("Space '%s' was renamed to '%s'", spaceID, name)
}
// MessageSpaceDisabled returns the human readable string that describes the action
func MessageSpaceDisabled(spaceID string) string {
return fmt.Sprintf("Space '%s' was disabled", spaceID)
}
// MessageSpaceEnabled returns the human readable string that describes the action
func MessageSpaceEnabled(spaceID string) string {
return fmt.Sprintf("Space '%s' was (re-) enabled", spaceID)
}
// MessageSpaceDeleted returns the human readable string that describes the action
func MessageSpaceDeleted(spaceID string) string {
return fmt.Sprintf("Space '%s' was deleted", spaceID)
}
+422
View File
@@ -0,0 +1,422 @@
package types
import (
"fmt"
"time"
"github.com/cs3org/reva/v2/pkg/events"
"github.com/cs3org/reva/v2/pkg/utils"
group "github.com/cs3org/go-cs3apis/cs3/identity/group/v1beta1"
user "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
provider "github.com/cs3org/go-cs3apis/cs3/storage/provider/v1beta1"
types "github.com/cs3org/go-cs3apis/cs3/types/v1beta1"
)
// BasicAuditEvent creates an AuditEvent from given values
func BasicAuditEvent(uid string, ctime string, msg string, action string) AuditEvent {
return AuditEvent{
User: uid,
Time: ctime,
App: "admin_audit",
Message: msg,
Action: action,
Level: 1,
// NOTE: those values are not in the events and can therefore not be filled at the moment
RemoteAddr: "",
URL: "",
Method: "",
UserAgent: "",
CLI: false,
}
}
// SharingAuditEvent creates an AuditEventSharing from given values
func SharingAuditEvent(shareid string, fileid string, uid string, base AuditEvent) AuditEventSharing {
return AuditEventSharing{
AuditEvent: base,
FileID: fileid,
Owner: uid,
ShareID: shareid,
// NOTE: those values are not in the events and can therefore not be filled at the moment
Path: "",
}
}
// ShareCreated converts a ShareCreated Event to an AuditEventShareCreated
func ShareCreated(ev events.ShareCreated) AuditEventShareCreated {
uid := ev.Sharer.OpaqueId
with, typ := extractGrantee(ev.GranteeUserID, ev.GranteeGroupID)
base := BasicAuditEvent(uid, formatTime(ev.CTime), MessageShareCreated(uid, ev.ItemID.OpaqueId, with), ActionShareCreated)
return AuditEventShareCreated{
AuditEventSharing: SharingAuditEvent("", ev.ItemID.OpaqueId, uid, base),
ShareOwner: uid,
ShareWith: with,
ShareType: typ,
// NOTE: those values are not in the event and can therefore not be filled at the moment
ItemType: "",
ExpirationDate: "",
SharePass: false,
Permissions: "",
ShareToken: "",
}
}
// LinkCreated converts a ShareCreated Event to an AuditEventShareCreated
func LinkCreated(ev events.LinkCreated) AuditEventShareCreated {
uid := ev.Sharer.OpaqueId
with, typ := "", "link"
base := BasicAuditEvent(uid, formatTime(ev.CTime), MessageLinkCreated(uid, ev.ItemID.OpaqueId, ev.ShareID.OpaqueId), ActionShareCreated)
return AuditEventShareCreated{
AuditEventSharing: SharingAuditEvent("", ev.ItemID.OpaqueId, uid, base),
ShareOwner: uid,
ShareWith: with,
ShareType: typ,
ExpirationDate: formatTime(ev.Expiration),
SharePass: ev.PasswordProtected,
Permissions: ev.Permissions.String(),
ShareToken: ev.Token,
// NOTE: those values are not in the event and can therefore not be filled at the moment
ItemType: "",
}
}
// ShareUpdated converts a ShareUpdated event to an AuditEventShareUpdated
func ShareUpdated(ev events.ShareUpdated) AuditEventShareUpdated {
uid := ev.Sharer.OpaqueId
with, typ := extractGrantee(ev.GranteeUserID, ev.GranteeGroupID)
base := BasicAuditEvent(uid, formatTime(ev.MTime), MessageShareUpdated(uid, ev.ShareID.OpaqueId, ev.Updated), updateType(ev.Updated))
return AuditEventShareUpdated{
AuditEventSharing: SharingAuditEvent(ev.ShareID.GetOpaqueId(), ev.ItemID.OpaqueId, uid, base),
ShareOwner: uid,
ShareWith: with,
ShareType: typ,
Permissions: ev.Permissions.Permissions.String(),
// NOTE: those values are not in the event and can therefore not be filled at the moment
ItemType: "",
ExpirationDate: "",
SharePass: false,
ShareToken: "",
}
}
// LinkUpdated converts a LinkUpdated event to an AuditEventShareUpdated
func LinkUpdated(ev events.LinkUpdated) AuditEventShareUpdated {
uid := ev.Sharer.OpaqueId
with, typ := "", "link"
base := BasicAuditEvent(uid, formatTime(ev.CTime), MessageLinkUpdated(uid, ev.ShareID.OpaqueId, ev.FieldUpdated), updateType(ev.FieldUpdated))
return AuditEventShareUpdated{
AuditEventSharing: SharingAuditEvent(ev.ShareID.GetOpaqueId(), ev.ItemID.OpaqueId, uid, base),
ShareOwner: uid,
ShareWith: with,
ShareType: typ,
Permissions: ev.Permissions.Permissions.String(),
ExpirationDate: formatTime(ev.Expiration),
SharePass: ev.PasswordProtected,
ShareToken: ev.Token,
// NOTE: those values are not in the event and can therefore not be filled at the moment
ItemType: "",
}
}
// ShareRemoved converts a ShareRemoved event to an AuditEventShareRemoved
func ShareRemoved(ev events.ShareRemoved) AuditEventShareRemoved {
sid, uid, iid, with, typ := "", "", "", "", ""
if ev.ShareID != nil {
sid = ev.ShareID.GetOpaqueId()
}
if ev.ShareKey != nil {
uid = ev.ShareKey.GetOwner().GetOpaqueId()
iid = ev.ShareKey.GetResourceId().GetOpaqueId()
with, typ = extractGrantee(ev.ShareKey.GetGrantee().GetUserId(), ev.ShareKey.GetGrantee().GetGroupId())
}
base := BasicAuditEvent(uid, "", MessageShareRemoved(uid, sid, iid), ActionShareRemoved)
return AuditEventShareRemoved{
AuditEventSharing: SharingAuditEvent(sid, iid, uid, base),
ShareWith: with,
ShareType: typ,
// NOTE: those values are not in the event and can therefore not be filled at the moment
ItemType: "",
}
}
// LinkRemoved converts a LinkRemoved event to an AuditEventShareRemoved
func LinkRemoved(ev events.LinkRemoved) AuditEventShareRemoved {
uid, sid, typ := "", "", "link"
if ev.ShareID != nil {
sid = ev.ShareID.GetOpaqueId()
} else {
sid = ev.ShareToken
}
base := BasicAuditEvent(uid, "", MessageLinkRemoved(sid), ActionShareRemoved)
return AuditEventShareRemoved{
AuditEventSharing: SharingAuditEvent(sid, "", uid, base),
ShareWith: "",
ShareType: typ,
// NOTE: those values are not in the event and can therefore not be filled at the moment
ItemType: "",
}
}
// ReceivedShareUpdated converts a ReceivedShareUpdated event to an AuditEventReceivedShareUpdated
func ReceivedShareUpdated(ev events.ReceivedShareUpdated) AuditEventReceivedShareUpdated {
uid := ev.Sharer.GetOpaqueId()
sid := ev.ShareID.GetOpaqueId()
with, typ := extractGrantee(ev.GranteeUserID, ev.GranteeGroupID)
itemID := ev.ItemID.GetOpaqueId()
msg, utype := "", ""
switch ev.State {
case "SHARE_STATE_ACCEPTED":
msg = MessageShareAccepted(with, sid, uid)
utype = ActionShareAccepted
case "SHARE_STATE_DECLINED":
msg = MessageShareDeclined(with, sid, uid)
utype = ActionShareDeclined
}
base := BasicAuditEvent(with, formatTime(ev.MTime), msg, utype)
return AuditEventReceivedShareUpdated{
AuditEventSharing: SharingAuditEvent(sid, itemID, uid, base),
ShareType: typ,
ShareWith: with,
// NOTE: those values are not in the event and can therefore not be filled at the moment
ItemType: "",
}
}
// LinkAccessed converts a LinkAccessed event to an AuditEventLinkAccessed
func LinkAccessed(ev events.LinkAccessed) AuditEventLinkAccessed {
uid := ev.Sharer.OpaqueId
base := BasicAuditEvent(uid, formatTime(ev.CTime), MessageLinkAccessed(ev.ShareID.GetOpaqueId(), true), ActionLinkAccessed)
return AuditEventLinkAccessed{
AuditEventSharing: SharingAuditEvent(ev.ShareID.GetOpaqueId(), ev.ItemID.OpaqueId, uid, base),
ShareToken: ev.Token,
Success: true,
// NOTE: those values are not in the event and can therefore not be filled at the moment
ItemType: "",
}
}
// LinkAccessFailed converts a LinkAccessFailed event to an AuditEventLinkAccessed
func LinkAccessFailed(ev events.LinkAccessFailed) AuditEventLinkAccessed {
base := BasicAuditEvent("", "", MessageLinkAccessed(ev.ShareID.GetOpaqueId(), false), ActionLinkAccessed)
return AuditEventLinkAccessed{
AuditEventSharing: SharingAuditEvent(ev.ShareID.GetOpaqueId(), "", "", base),
ShareToken: ev.Token,
Success: false,
// NOTE: those values are not in the event and can therefore not be filled at the moment
ItemType: "",
}
}
// FilesAuditEvent creates an AuditEventFiles from the given values
func FilesAuditEvent(base AuditEvent, itemid, owner, path string) AuditEventFiles {
return AuditEventFiles{
AuditEvent: base,
FileID: itemid,
Owner: owner,
Path: path,
}
}
// FileUploaded converts a FileUploaded event to an AuditEventFileCreated
func FileUploaded(ev events.FileUploaded) AuditEventFileCreated {
iid, path, uid := extractFileDetails(ev.FileID, ev.Owner)
base := BasicAuditEvent(uid, "", MessageFileCreated(iid), ActionFileCreated)
return AuditEventFileCreated{
AuditEventFiles: FilesAuditEvent(base, iid, uid, path),
}
}
// FileDownloaded converts a FileDownloaded event to an AuditEventFileRead
func FileDownloaded(ev events.FileDownloaded) AuditEventFileRead {
iid, path, uid := extractFileDetails(ev.FileID, ev.Owner)
base := BasicAuditEvent(uid, "", MessageFileRead(iid), ActionFileRead)
return AuditEventFileRead{
AuditEventFiles: FilesAuditEvent(base, iid, uid, path),
}
}
// ItemMoved converts a ItemMoved event to an AuditEventFileRenamed
func ItemMoved(ev events.ItemMoved) AuditEventFileRenamed {
iid, path, uid := extractFileDetails(ev.FileID, ev.Owner)
oldpath := ""
if ev.OldReference != nil {
oldpath = ev.OldReference.GetPath()
}
base := BasicAuditEvent(uid, "", MessageFileRenamed(iid, oldpath, path), ActionFileRenamed)
return AuditEventFileRenamed{
AuditEventFiles: FilesAuditEvent(base, iid, uid, path),
OldPath: oldpath,
}
}
// ItemTrashed converts a ItemTrashed event to an AuditEventFileDeleted
func ItemTrashed(ev events.ItemTrashed) AuditEventFileDeleted {
iid, path, uid := extractFileDetails(ev.FileID, ev.Owner)
base := BasicAuditEvent(uid, "", MessageFileTrashed(iid), ActionFileTrashed)
return AuditEventFileDeleted{
AuditEventFiles: FilesAuditEvent(base, iid, uid, path),
}
}
// ItemPurged converts a ItemPurged event to an AuditEventFilePurged
func ItemPurged(ev events.ItemPurged) AuditEventFilePurged {
iid, path, uid := extractFileDetails(ev.FileID, ev.Owner)
base := BasicAuditEvent(uid, "", MessageFilePurged(iid), ActionFilePurged)
return AuditEventFilePurged{
AuditEventFiles: FilesAuditEvent(base, iid, uid, path),
}
}
// ItemRestored converts a ItemRestored event to an AuditEventFileRestored
func ItemRestored(ev events.ItemRestored) AuditEventFileRestored {
iid, path, uid := extractFileDetails(ev.FileID, ev.Owner)
oldpath := ""
if ev.OldReference != nil {
oldpath = ev.OldReference.GetPath()
}
base := BasicAuditEvent(uid, "", MessageFileRestored(iid, path), ActionFileRestored)
return AuditEventFileRestored{
AuditEventFiles: FilesAuditEvent(base, iid, uid, path),
OldPath: oldpath,
}
}
// FileVersionRestored converts a FileVersionRestored event to an AuditEventFileVersionRestored
func FileVersionRestored(ev events.FileVersionRestored) AuditEventFileVersionRestored {
iid, path, uid := extractFileDetails(ev.FileID, ev.Owner)
base := BasicAuditEvent(uid, "", MessageFileVersionRestored(iid, ev.Key), ActionFileVersionRestored)
return AuditEventFileVersionRestored{
AuditEventFiles: FilesAuditEvent(base, iid, uid, path),
Key: ev.Key,
}
}
// SpacesAuditEvent creates an AuditEventSpaces from the given values
func SpacesAuditEvent(base AuditEvent, spaceID string) AuditEventSpaces {
return AuditEventSpaces{
AuditEvent: base,
SpaceID: spaceID,
}
}
// SpaceCreated converts a SpaceCreated event to an AuditEventSpaceCreated
func SpaceCreated(ev events.SpaceCreated) AuditEventSpaceCreated {
sid := ev.ID.GetOpaqueId()
iid, _, owner := extractFileDetails(&provider.Reference{ResourceId: ev.Root}, ev.Owner)
base := BasicAuditEvent("", formatTime(ev.MTime), MessageSpaceCreated(sid, ev.Name), ActionSpaceCreated)
return AuditEventSpaceCreated{
AuditEventSpaces: SpacesAuditEvent(base, sid),
Owner: owner,
RootItem: iid,
Name: ev.Name,
Type: ev.Type,
}
}
// SpaceRenamed converts a SpaceRenamed event to an AuditEventSpaceRenamed
func SpaceRenamed(ev events.SpaceRenamed) AuditEventSpaceRenamed {
sid := ev.ID.GetOpaqueId()
base := BasicAuditEvent("", "", MessageSpaceRenamed(sid, ev.Name), ActionSpaceRenamed)
return AuditEventSpaceRenamed{
AuditEventSpaces: SpacesAuditEvent(base, sid),
NewName: ev.Name,
}
}
// SpaceDisabled converts a SpaceDisabled event to an AuditEventSpaceDisabled
func SpaceDisabled(ev events.SpaceDisabled) AuditEventSpaceDisabled {
sid := ev.ID.GetOpaqueId()
base := BasicAuditEvent("", "", MessageSpaceDisabled(sid), ActionSpaceDisabled)
return AuditEventSpaceDisabled{
AuditEventSpaces: SpacesAuditEvent(base, sid),
}
}
// SpaceEnabled converts a SpaceEnabled event to an AuditEventSpaceEnabled
func SpaceEnabled(ev events.SpaceEnabled) AuditEventSpaceEnabled {
sid := ev.ID.GetOpaqueId()
base := BasicAuditEvent("", "", MessageSpaceEnabled(sid), ActionSpaceEnabled)
return AuditEventSpaceEnabled{
AuditEventSpaces: SpacesAuditEvent(base, sid),
}
}
// SpaceDeleted converts a SpaceDeleted event to an AuditEventSpaceDeleted
func SpaceDeleted(ev events.SpaceDeleted) AuditEventSpaceDeleted {
sid := ev.ID.GetOpaqueId()
base := BasicAuditEvent("", "", MessageSpaceDeleted(sid), ActionSpaceDeleted)
return AuditEventSpaceDeleted{
AuditEventSpaces: SpacesAuditEvent(base, sid),
}
}
func extractGrantee(uid *user.UserId, gid *group.GroupId) (string, string) {
switch {
case uid != nil && uid.OpaqueId != "":
return uid.OpaqueId, "user"
case gid != nil && gid.OpaqueId != "":
return gid.OpaqueId, "group"
}
return "", ""
}
func extractFileDetails(ref *provider.Reference, owner *user.UserId) (string, string, string) {
id, path := "", ""
if ref != nil {
path = ref.GetPath()
id, _ = utils.FormatStorageSpaceReference(ref)
}
uid := ""
if owner != nil {
uid = owner.GetOpaqueId()
}
return id, path, uid
}
func formatTime(t *types.Timestamp) string {
if t == nil {
return ""
}
return time.Unix(int64(t.Seconds), int64(t.Nanos)).UTC().Format(time.RFC3339)
}
func updateType(u string) string {
switch {
case u == "permissions":
return ActionSharePermissionUpdated
case u == "displayname":
return ActionShareDisplayNameUpdated
case u == "TYPE_PERMISSIONS":
return ActionSharePermissionUpdated
case u == "TYPE_DISPLAYNAME":
return ActionShareDisplayNameUpdated
case u == "TYPE_PASSWORD":
return ActionSharePasswordUpdated
case u == "TYPE_EXPIRATION":
return ActionShareExpirationUpdated
default:
fmt.Println("Unknown update type", u)
return ""
}
}
+32
View File
@@ -0,0 +1,32 @@
package types
import (
"github.com/cs3org/reva/v2/pkg/events"
)
// RegisteredEvents returns the events the service is registered for
func RegisteredEvents() []events.Unmarshaller {
return []events.Unmarshaller{
events.ShareCreated{},
events.ShareUpdated{},
events.LinkCreated{},
events.LinkUpdated{},
events.ShareRemoved{},
events.LinkRemoved{},
events.ReceivedShareUpdated{},
events.LinkAccessed{},
events.LinkAccessFailed{},
events.FileUploaded{},
events.FileDownloaded{},
events.ItemTrashed{},
events.ItemMoved{},
events.ItemPurged{},
events.ItemRestored{},
events.FileVersionRestored{},
events.SpaceCreated{},
events.SpaceRenamed{},
events.SpaceEnabled{},
events.SpaceDisabled{},
events.SpaceDeleted{},
}
}
+199
View File
@@ -0,0 +1,199 @@
package types
// AuditEvent is the basic audit event
type AuditEvent struct {
RemoteAddr string // the remote client IP
User string // the UID of the user performing the action. Or "IP x.x.x.x.", "cron", "CLI", "unknown"
URL string // the process request URI
Method string // the HTTP request method
UserAgent string // the HTTP request user agent
Time string // the time of the event eg: 2018-05-08T08:26:00+00:00
App string // always 'admin_audit'
Message string // sentence explaining the action
Action string // unique action identifier eg: file_delete or public_link_created
CLI bool // if the action was performed from the CLI
Level int // the log level of the entry (usually 1 for audit events)
}
/*
Sharing
*/
// AuditEventSharing is the basic audit event for shares
type AuditEventSharing struct {
AuditEvent
FileID string // The file identifier for the item shared.
Owner string // The UID of the owner of the shared item.
Path string // The path to the shared item.
ShareID string // The sharing identifier. (not available for public_link_accessed or when recipient unshares)
}
// AuditEventShareCreated is the event logged when a share is created
type AuditEventShareCreated struct {
AuditEventSharing
ItemType string // file or folder
ExpirationDate string // The text expiration date in format 'yyyy-mm-dd'
SharePass bool // If the share is password protected.
Permissions string // The permissions string eg: "READ"
ShareType string // group user or link
ShareWith string // The UID or GID of the share recipient. (not available for public link)
ShareOwner string // The UID of the share owner.
ShareToken string // For link shares the unique token, else null
}
// AuditEventShareUpdated is the event logged when a share is updated
type AuditEventShareUpdated struct {
AuditEventSharing
ItemType string // file or folder
ExpirationDate string // The text expiration date in format 'yyyy-mm-dd'
SharePass bool // If the share is password protected.
Permissions string // The permissions string eg: "READ"
ShareType string // group user or link
ShareWith string // The UID or GID of the share recipient. (not available for public link)
ShareOwner string // The UID of the share owner.
ShareToken string // For link shares the unique token, else null
}
// AuditEventShareRemoved is the event logged when a share is removed
type AuditEventShareRemoved struct {
AuditEventSharing
ItemType string // file or folder
ShareType string // group user or link
ShareWith string // The UID or GID of the share recipient.
}
// AuditEventReceivedShareUpdated is the event logged when a share is accepted or declined
type AuditEventReceivedShareUpdated struct {
AuditEventSharing
ItemType string // file or folder
ShareType string // group user or link
ShareWith string // The UID or GID of the share recipient.
}
// AuditEventLinkAccessed is the event logged when a link is accessed
type AuditEventLinkAccessed struct {
AuditEventSharing
ShareToken string // The share token.
Success bool // If the request was successful.
ItemType string // file or folder
}
/*
Files
*/
// AuditEventFiles is the basic audit event for files
type AuditEventFiles struct {
AuditEvent
Path string // The full path to the create file.
Owner string // The UID of the owner of the file.
FileID string // The newly created files identifier.
}
// AuditEventFileCreated is the event logged when a file is created
type AuditEventFileCreated struct {
AuditEventFiles
}
// AuditEventFileRead is the event logged when a file is read (aka downloaded)
type AuditEventFileRead struct {
AuditEventFiles
}
// AuditEventFileUpdated is the event logged when a file is updated
// TODO: How to differentiate between new uploads and new version uploads?
// FIXME: implement
type AuditEventFileUpdated struct {
AuditEventFiles
}
// AuditEventFileDeleted is the event logged when a file is deleted (aka trashed)
type AuditEventFileDeleted struct {
AuditEventFiles
}
// AuditEventFileCopied is the event logged when a file is copied
// TODO: copy is a download&upload for now. How to know it was a copy?
// FIXME: implement
type AuditEventFileCopied struct {
AuditEventFiles
}
// AuditEventFileRenamed is the event logged when a file is renamed (moved)
type AuditEventFileRenamed struct {
AuditEventFiles
OldPath string
}
// AuditEventFilePurged is the event logged when a file is purged (deleted from trashbin)
type AuditEventFilePurged struct {
AuditEventFiles
}
// AuditEventFileRestored is the event logged when a file is restored (from trashbin)
type AuditEventFileRestored struct {
AuditEventFiles
OldPath string
}
// AuditEventFileVersionRestored is the event logged when a file version is restored
type AuditEventFileVersionRestored struct {
AuditEventFiles
Key string
}
// AuditEventFileVersionDeleted is the event logged when a file version is deleted
// TODO: is this even possible?
type AuditEventFileVersionDeleted struct {
AuditEventFiles
}
/*
Spaces
*/
// AuditEventSpaces is the basic audit event for spaces
type AuditEventSpaces struct {
AuditEvent
SpaceID string
}
// AuditEventSpaceCreated is the event logged when a space is created
type AuditEventSpaceCreated struct {
AuditEventSpaces
Owner string
RootItem string
Name string
Type string
}
// AuditEventSpaceRenamed is the event logged when a space is renamed
type AuditEventSpaceRenamed struct {
AuditEventSpaces
NewName string
}
// AuditEventSpaceDisabled is the event logged when a space is disabled
type AuditEventSpaceDisabled struct {
AuditEventSpaces
}
// AuditEventSpaceEnabled is the event logged when a space is (re-)enabled
type AuditEventSpaceEnabled struct {
AuditEventSpaces
}
// AuditEventSpaceDeleted is the event logged when a space is deleted
type AuditEventSpaceDeleted struct {
AuditEventSpaces
}
+1 -2
View File
@@ -96,5 +96,4 @@ We updated reva to the version 2.0.0.
* Enh [cs3org/reva#2526](https://github.com/cs3org/reva/pull/2526) : Upgrade ginkgo to v2
https://github.com/owncloud/ocis/pull/3231
https://github.com/owncloud/ocis/pull/3231
https://github.com/owncloud/ocis/pull/3258
@@ -0,0 +1,5 @@
Change: Add remote item to mountpoint and fix spaceID
A mountpoint represents the mounted share on the share receivers side. The original resource is located where the grant has been set. This item is now shown as libregraph remoteItem on the mountpoint. While adding this, we fixed the spaceID for mountpoints.
https://github.com/owncloud/ocis/pull/3365
@@ -0,0 +1,6 @@
Change: Switch NATS backend
We've switched the NATS backend from Streaming to JetStream, since NATS Streaming is depreciated.
https://github.com/owncloud/ocis/pull/3192
https://github.com/cs3org/reva/pull/2574
@@ -0,0 +1,7 @@
Change: Drop json config file support
We've remove the support to configure oCIS and it's service with a json file.
From now on we only support yaml configuration files, since they have the possibility
to add comments.
https://github.com/owncloud/ocis/pull/3366
@@ -0,0 +1,5 @@
Enhancement: Audit logger will now log file events
See full list of supported events in `audit/pkg/types/types.go`
https://github.com/owncloud/ocis/pull/3332
@@ -0,0 +1,5 @@
Bugfix: Network configuration in individiual_services example
Tidy up the deployments/examples/ocis_individual_services example so that the instructions work.
https://github.com/owncloud/ocis/pull/3238
@@ -0,0 +1,5 @@
Bugfix: Improve gif thumbnails
Improved the gif thumbnail generation for gifs with different disposal strategies.
https://github.com/owncloud/ocis/pull/3305
@@ -0,0 +1,6 @@
Bugfix: Fix error handling in GraphAPI GetUsers call
A missing return statement caused GetUsers to return misleading results when
the identity backend returned an error.
https://github.com/owncloud/ocis/pull/3357
@@ -0,0 +1,6 @@
Bugfix: Fix request validation on GraphAPI User updates
Fix PATCH on graph/v1.0/users when no 'mail' attribute
is present in the request body
https://github.com/owncloud/ocis/issues/3167
@@ -0,0 +1,7 @@
Enhancement: Add password reset link to login page
Added a configurable passwort reset link to the login page.
It can be set via `IDP_PASSWORD_RESET_URI`. If the option is not set
the link will not be shown.
https://github.com/owncloud/ocis/pull/3329
@@ -0,0 +1,5 @@
Bugfix: replace public mountpoint fileid with grant fileid
We now show the same resoucre id for resources when accessing them via a public links as when using a logged in user. This allows the web ui to start a WOPI session with the correct resource id.
https://github.com/owncloud/ocis/pull/3349
@@ -0,0 +1,5 @@
Enhancement: log sharing events in audit service
Contains sharing related events. See full list in audit/pkg/types/events.go
https://github.com/owncloud/ocis/pull/3301
@@ -0,0 +1,5 @@
Enhancement: Add space aliases
Space aliases can be used to resolve spaceIDs in a client.
https://github.com/owncloud/ocis/pull/3283
@@ -0,0 +1,5 @@
Enhancement: Include etags in drives listing
Added etags in the response of list drives.
https://github.com/owncloud/ocis/pull/3267
@@ -0,0 +1,5 @@
Change: settings service now stores its data via metadata service
Instead of writing files to disk it will use metadata service to do so
https://github.com/owncloud/ocis/pull/3232
@@ -0,0 +1,7 @@
Enhancement: Improve thumbnails API
Changed the thumbnails API to no longer transfer images via GRPC.
GRPC has a limited message size and isn't very efficient with large binary data.
The new API transports the images over HTTP.
https://github.com/owncloud/ocis/pull/3272
@@ -0,0 +1,31 @@
Enhancement: update reva to v2.1.0
Updated reva to version 2.1.0. This update includes:
* Fix [cs3org/reva#2636](https://github.com/cs3org/reva/pull/2636): Delay reconnect log for events
* Fix [cs3org/reva#2645](https://github.com/cs3org/reva/pull/2645): Avoid warning about missing .flock files
* Fix [cs3org/reva#2625](https://github.com/cs3org/reva/pull/2625): Fix locking on publik links and the decomposed filesystem
* Fix [cs3org/reva#2643](https://github.com/cs3org/reva/pull/2643): Emit linkaccessfailed event when share is nil
* Fix [cs3org/reva#2646](https://github.com/cs3org/reva/pull/2646): Replace public mountpoint fileid with grant fileid in ocdav
* Fix [cs3org/reva#2612](https://github.com/cs3org/reva/pull/2612): Adjust the scope handling to support the spaces architecture
* Fix [cs3org/reva#2621](https://github.com/cs3org/reva/pull/2621): Send events only if response code is `OK`
* Chg [cs3org/reva#2574](https://github.com/cs3org/reva/pull/2574): Switch NATS backend
* Chg [cs3org/reva#2667](https://github.com/cs3org/reva/pull/2667): Allow LDAP groups to have no gidNumber
* Chg [cs3org/reva#3233](https://github.com/cs3org/reva/pull/3233): Improve quota handling
* Chg [cs3org/reva#2600](https://github.com/cs3org/reva/pull/2600): Use the cs3 share api to manage spaces
* Enh [cs3org/reva#2644](https://github.com/cs3org/reva/pull/2644): Add new public share manager
* Enh [cs3org/reva#2626](https://github.com/cs3org/reva/pull/2626): Add new share manager
* Enh [cs3org/reva#2624](https://github.com/cs3org/reva/pull/2624): Add etags to virtual spaces
* Enh [cs3org/reva#2639](https://github.com/cs3org/reva/pull/2639): File Events
* Enh [cs3org/reva#2627](https://github.com/cs3org/reva/pull/2627): Add events for sharing action
* Enh [cs3org/reva#2664](https://github.com/cs3org/reva/pull/2664): Add grantID to mountpoint
* Enh [cs3org/reva#2622](https://github.com/cs3org/reva/pull/2622): Allow listing shares in spaces via the OCS API
* Enh [cs3org/reva#2623](https://github.com/cs3org/reva/pull/2623): Add space aliases
* Enh [cs3org/reva#2647](https://github.com/cs3org/reva/pull/2647): Add space specific events
* Enh [cs3org/reva#3345](https://github.com/cs3org/reva/pull/3345): Add the spaceid to propfind responses
* Enh [cs3org/reva#2616](https://github.com/cs3org/reva/pull/2616): Add etag to spaces response
* Enh [cs3org/reva#2628](https://github.com/cs3org/reva/pull/2628): Add spaces aware trash-bin API
https://github.com/owncloud/ocis/pull/3330
https://github.com/owncloud/ocis/pull/3405
https://github.com/owncloud/ocis/pull/3416
@@ -0,0 +1,10 @@
Enhancement: Update ownCloud Web to v5.3.0
Tags: web
We updated ownCloud Web to v5.3.0. Please refer to the changelog (linked) for details on the web release.
https://github.com/owncloud/web/pull/6561
https://github.com/owncloud/ocis/pull/3291
https://github.com/owncloud/ocis/pull/3375
https://github.com/owncloud/web/releases/tag/v5.3.0
@@ -1,109 +0,0 @@
{
"log": {
"level": "PROXY_LOG_LEVEL"
},
"policy_selector": {
"claims": {
"default_policy": "oc10",
"unauthenticated_policy": "oc10"
}
},
"policies": [
{
"name": "ocis",
"routes": [
{
"endpoint": "/",
"backend": "http://localhost:9100"
},
{
"endpoint": "/.well-known/",
"backend": "http://localhost:9130"
},
{
"type": "regex",
"endpoint": "/ocs/v[12].php/cloud/user/signing-key",
"backend": "http://localhost:9110"
},
{
"endpoint": "/ocs/",
"backend": "http://localhost:9140"
},
{
"type": "query",
"endpoint": "/remote.php/?preview=1",
"backend": "http://localhost:9115"
},
{
"endpoint": "/remote.php/",
"backend": "http://localhost:9140"
},
{
"endpoint": "/dav/",
"backend": "http://localhost:9140"
},
{
"endpoint": "/webdav/",
"backend": "http://localhost:9140"
},
{
"endpoint": "/status.php",
"backend": "http://localhost:9140"
},
{
"endpoint": "/index.php/",
"backend": "http://localhost:9140"
},
{
"endpoint": "/index.php/login",
"backend": "http://localhost:9100"
},
{
"endpoint": "/login",
"backend": "http://localhost:9100"
},
{
"endpoint": "/data",
"backend": "http://localhost:9140"
},
{
"endpoint": "/graph/",
"backend": "http://localhost:9120"
},
{
"endpoint": "/app/",
"backend": "http://localhost:9140"
},
{
"endpoint": "/archiver",
"backend": "http://localhost:9140"
},
{
"endpoint": "/graph-explorer/",
"backend": "http://localhost:9135"
},
{
"endpoint": "/api/v0/settings",
"backend": "http://localhost:9190"
},
{
"endpoint": "/settings.js",
"backend": "http://localhost:9190"
}
]
},
{
"name": "oc10",
"routes": [
{
"endpoint": "/",
"backend": "http://oc10:8080"
},
{
"endpoint": "/data",
"backend": "http://localhost:9140"
}
]
}
]
}
@@ -0,0 +1,54 @@
---
policy_selector:
claims:
default_policy: oc10
unauthenticated_policy: oc10
policies:
- name: ocis
routes:
- endpoint: "/"
backend: http://localhost:9100
- endpoint: "/.well-known/"
backend: http://localhost:9130
- type: regex
endpoint: "/ocs/v[12].php/cloud/user/signing-key"
backend: http://localhost:9110
- endpoint: "/ocs/"
backend: http://localhost:9140
- type: query
endpoint: "/remote.php/?preview=1"
backend: http://localhost:9115
- endpoint: "/remote.php/"
backend: http://localhost:9140
- endpoint: "/dav/"
backend: http://localhost:9140
- endpoint: "/webdav/"
backend: http://localhost:9140
- endpoint: "/status.php"
backend: http://localhost:9140
- endpoint: "/index.php/"
backend: http://localhost:9140
- endpoint: "/index.php/login"
backend: http://localhost:9100
- endpoint: "/login"
backend: http://localhost:9100
- endpoint: "/data"
backend: http://localhost:9140
- endpoint: "/graph/"
backend: http://localhost:9120
- endpoint: "/app/"
backend: http://localhost:9140
- endpoint: "/archiver"
backend: http://localhost:9140
- endpoint: "/graph-explorer/"
backend: http://localhost:9135
- endpoint: "/api/v0/settings"
backend: http://localhost:9190
- endpoint: "/settings.js"
backend: http://localhost:9190
- name: oc10
routes:
- endpoint: "/"
backend: http://oc10:8080
- endpoint: "/data"
backend: http://localhost:9140
@@ -116,7 +116,6 @@ services:
OCIS_LOG_LEVEL: ${OCIS_LOG_LEVEL:-error} # make oCIS less verbose
OCIS_URL: https://${CLOUD_DOMAIN:-cloud.owncloud.test}
PROXY_TLS: "false" # do not use SSL between Traefik and oCIS
PROXY_CONFIG_FILE: "/var/tmp/ocis/.config/proxy-config.json"
# change default secrets
OCIS_JWT_SECRET: ${OCIS_JWT_SECRET:-Pive-Fumkiu4}
STORAGE_TRANSFER_SECRET: ${STORAGE_TRANSFER_SECRET:-replace-me-with-a-transfer-secret}
@@ -126,7 +125,7 @@ services:
# basic auth (not recommended, but needed for eg. WebDav clients that do not support OpenID Connect)
PROXY_ENABLE_BASIC_AUTH: "${PROXY_ENABLE_BASIC_AUTH:-false}"
volumes:
- ./config/ocis/proxy.json:/etc/ocis/proxy.json
- ./config/ocis/proxy.yaml:/etc/ocis/proxy.yaml
- ocis-data:/var/lib/ocis
# shared volume with oC10
- oc10-data:/mnt/data
@@ -1,111 +0,0 @@
{
"HTTP": {
"Namespace": "com.owncloud"
},
"policy_selector": {
"static": {
"policy": "ocis"
}
},
"policies": [
{
"name": "ocis",
"routes": [
{
"endpoint": "/",
"backend": "http://localhost:9100"
},
{
"endpoint": "/.well-known/",
"backend": "http://localhost:9130"
},
{
"endpoint": "/konnect/",
"backend": "http://localhost:9130"
},
{
"endpoint": "/signin/",
"backend": "http://localhost:9130"
},
{
"type": "regex",
"endpoint": "/ocs/v[12].php/cloud/(users?|groups)",
"backend": "http://localhost:9110"
},
{
"endpoint": "/ocs/",
"backend": "http://localhost:9140"
},
{
"type": "query",
"endpoint": "/remote.php/?preview=1",
"backend": "http://localhost:9115"
},
{
"endpoint": "/remote.php/",
"backend": "http://localhost:9140"
},
{
"endpoint": "/dav/",
"backend": "http://localhost:9140"
},
{
"endpoint": "/webdav/",
"backend": "http://localhost:9140"
},
{
"endpoint": "/status.php",
"backend": "http://localhost:9140"
},
{
"endpoint": "/index.php/",
"backend": "http://localhost:9140"
},
{
"endpoint": "/data",
"backend": "http://localhost:9140"
},
{
"endpoint": "/app/",
"backend": "http://localhost:9140"
},
{
"endpoint": "/archiver",
"backend": "http://localhost:9140"
},
{
"endpoint": "/graph/",
"backend": "http://localhost:9120"
},
{
"endpoint": "/graph-explorer/",
"backend": "http://localhost:9135"
},
{
"endpoint": "/api/v0/accounts",
"backend": "http://localhost:9181"
},
{
"endpoint": "/accounts.js",
"backend": "http://localhost:9181"
},
{
"endpoint": "/api/v0/settings",
"backend": "http://localhost:9190"
},
{
"endpoint": "/settings.js",
"backend": "http://localhost:9190"
},
{
"endpoint": "/api/v0/greet",
"backend": "http://ocis-hello:9105"
},
{
"endpoint": "/hello.js",
"backend": "http://ocis-hello:9105"
}
]
}
]
}
@@ -0,0 +1,55 @@
---
policy_selector:
static:
policy: ocis
policies:
- name: ocis
routes:
- endpoint: "/"
backend: http://localhost:9100
- endpoint: "/.well-known/"
backend: http://localhost:9130
- endpoint: "/konnect/"
backend: http://localhost:9130
- endpoint: "/signin/"
backend: http://localhost:9130
- type: regex
endpoint: "/ocs/v[12].php/cloud/(users?|groups)"
backend: http://localhost:9110
- endpoint: "/ocs/"
backend: http://localhost:9140
- type: query
endpoint: "/remote.php/?preview=1"
backend: http://localhost:9115
- endpoint: "/remote.php/"
backend: http://localhost:9140
- endpoint: "/dav/"
backend: http://localhost:9140
- endpoint: "/webdav/"
backend: http://localhost:9140
- endpoint: "/status.php"
backend: http://localhost:9140
- endpoint: "/index.php/"
backend: http://localhost:9140
- endpoint: "/data"
backend: http://localhost:9140
- endpoint: "/app/"
backend: http://localhost:9140
- endpoint: "/archiver"
backend: http://localhost:9140
- endpoint: "/graph/"
backend: http://localhost:9120
- endpoint: "/graph-explorer/"
backend: http://localhost:9135
- endpoint: "/api/v0/accounts"
backend: http://localhost:9181
- endpoint: "/accounts.js"
backend: http://localhost:9181
- endpoint: "/api/v0/settings"
backend: http://localhost:9190
- endpoint: "/settings.js"
backend: http://localhost:9190
- endpoint: "/api/v0/greet"
backend: http://ocis-hello:9105
- endpoint: "/hello.js"
backend: http://ocis-hello:9105
@@ -71,7 +71,7 @@ services:
volumes:
- ./config/ocis/entrypoint-override.sh:/entrypoint-override.sh
- ./config/ocis/web-config.dist.json:/config/web-config.dist.json
- ./config/ocis/proxy.json:/etc/ocis/proxy.json
- ./config/ocis/proxy.yaml:/etc/ocis/proxy.yaml
- ocis-data:/var/lib/ocis
labels:
- "traefik.enable=true"
@@ -1,103 +0,0 @@
{
"HTTP": {
"Namespace": "com.owncloud"
},
"policy_selector": {
"static": {
"policy": "ocis"
}
},
"policies": [
{
"name": "ocis",
"routes": [
{
"endpoint": "/",
"backend": "http://web:9100"
},
{
"endpoint": "/.well-known/",
"backend": "http://idp:9130"
},
{
"endpoint": "/konnect/",
"backend": "http://idp:9130"
},
{
"endpoint": "/signin/",
"backend": "http://idp:9130"
},
{
"type": "regex",
"endpoint": "/ocs/v[12].php/cloud/(users?|groups)",
"backend": "http://ocs:9110"
},
{
"endpoint": "/ocs/",
"backend": "http://storage-frontend:9140"
},
{
"type": "query",
"endpoint": "/remote.php/?preview=1",
"backend": "http://webdav:9115"
},
{
"endpoint": "/remote.php/",
"backend": "http://storage-frontend:9140"
},
{
"endpoint": "/dav/",
"backend": "http://storage-frontend:9140"
},
{
"endpoint": "/webdav/",
"backend": "http://storage-frontend:9140"
},
{
"endpoint": "/status.php",
"backend": "http://storage-frontend:9140"
},
{
"endpoint": "/index.php/",
"backend": "http://storage-frontend:9140"
},
{
"endpoint": "/data",
"backend": "http://storage-frontend:9140"
},
{
"endpoint": "/app/",
"backend": "http://storage-frontend:9140"
},
{
"endpoint": "/archiver",
"backend": "http://storage-frontend:9140"
},
{
"endpoint": "/graph/",
"backend": "http://graph:9120"
},
{
"endpoint": "/graph-explorer/",
"backend": "http://graph-explorer:9135"
},
{
"endpoint": "/api/v0/accounts",
"backend": "http://accounts:9181"
},
{
"endpoint": "/accounts.js",
"backend": "http://accounts:9181"
},
{
"endpoint": "/api/v0/settings",
"backend": "http://settings:9190"
},
{
"endpoint": "/settings.js",
"backend": "http://settings:9190"
}
]
}
]
}
@@ -0,0 +1,51 @@
---
policy_selector:
static:
policy: ocis
policies:
- name: ocis
routes:
- endpoint: "/"
backend: http://web:9100
- endpoint: "/.well-known/"
backend: http://idp:9130
- endpoint: "/konnect/"
backend: http://idp:9130
- endpoint: "/signin/"
backend: http://idp:9130
- type: regex
endpoint: "/ocs/v[12].php/cloud/(users?|groups)"
backend: http://ocs:9110
- endpoint: "/ocs/"
backend: http://storage-frontend:9140
- type: query
endpoint: "/remote.php/?preview=1"
backend: http://webdav:9115
- endpoint: "/remote.php/"
backend: http://storage-frontend:9140
- endpoint: "/dav/"
backend: http://storage-frontend:9140
- endpoint: "/webdav/"
backend: http://storage-frontend:9140
- endpoint: "/status.php"
backend: http://storage-frontend:9140
- endpoint: "/index.php/"
backend: http://storage-frontend:9140
- endpoint: "/data"
backend: http://storage-frontend:9140
- endpoint: "/app/"
backend: http://storage-frontend:9140
- endpoint: "/archiver"
backend: http://storage-frontend:9140
- endpoint: "/graph/"
backend: http://graph:9120
- endpoint: "/graph-explorer/"
backend: http://graph-explorer:9135
- endpoint: "/api/v0/accounts"
backend: http://accounts:9181
- endpoint: "/accounts.js"
backend: http://accounts:9181
- endpoint: "/api/v0/settings"
backend: http://settings:9190
- endpoint: "/settings.js"
backend: http://settings:9190
@@ -47,7 +47,7 @@ services:
deploy:
replicas: ${OCIS_SCALE:-1}
networks:
ocis-net: null
ocis-net:
entrypoint:
- ocis
- proxy
@@ -72,7 +72,7 @@ services:
PROXY_HTTP_ADDR: 0.0.0.0:9200
volumes:
- "./config/proxy/proxy.json:/etc/ocis/proxy.json"
- "./config/proxy/proxy.yaml:/etc/ocis/proxy.yaml"
labels:
- "traefik.enable=true"
- "traefik.http.routers.ocis.entrypoints=https"
@@ -90,7 +90,7 @@ services:
deploy:
replicas: 1
networks:
ocis-net: null
ocis-net:
entrypoint:
- ocis
- nats-server
@@ -111,7 +111,7 @@ services:
deploy:
replicas: 1
networks:
ocis-net: null
ocis-net:
entrypoint:
- /bin/sh
- /entrypoint-override.sh
@@ -145,7 +145,7 @@ services:
deploy:
replicas: ${OCIS_SCALE:-1}
networks:
ocis-net: null
ocis-net:
entrypoint:
- ocis
- glauth
@@ -168,7 +168,7 @@ services:
deploy:
replicas: 1
networks:
ocis-net: null
ocis-net:
entrypoint:
- ocis
- idp
@@ -194,7 +194,7 @@ services:
deploy:
replicas: ${OCIS_SCALE:-1}
networks:
ocis-net: null
ocis-net:
entrypoint:
- ocis
- ocs
@@ -222,7 +222,7 @@ services:
deploy:
replicas: 1
networks:
ocis-net: null
ocis-net:
entrypoint:
- ocis
- settings
@@ -247,7 +247,7 @@ services:
deploy:
replicas: 1
networks:
ocis-net: null
ocis-net:
entrypoint:
- ocis
- store
@@ -269,7 +269,7 @@ services:
deploy:
replicas: ${OCIS_SCALE:-1}
networks:
ocis-net: null
ocis-net:
entrypoint:
- ocis
- thumbnails
@@ -296,7 +296,7 @@ services:
deploy:
replicas: ${OCIS_SCALE:-1}
networks:
ocis-net: null
ocis-net:
entrypoint:
- ocis
- web
@@ -320,7 +320,7 @@ services:
deploy:
replicas: ${OCIS_SCALE:-1}
networks:
ocis-net: null
ocis-net:
entrypoint:
- ocis
- webdav
@@ -343,7 +343,7 @@ services:
deploy:
replicas: ${OCIS_SCALE:-1}
networks:
ocis-net: null
ocis-net:
entrypoint:
- ocis
- graph
@@ -369,7 +369,7 @@ services:
deploy:
replicas: 1
networks:
ocis-net: null
ocis-net:
entrypoint:
- ocis
- storage-metadata
@@ -402,7 +402,7 @@ services:
deploy:
replicas: ${OCIS_SCALE:-1}
networks:
ocis-net: null
ocis-net:
entrypoint:
- ocis
- storage-auth-basic
@@ -426,7 +426,7 @@ services:
deploy:
replicas: ${OCIS_SCALE:-1}
networks:
ocis-net: null
ocis-net:
entrypoint:
- ocis
- storage-auth-machine
@@ -450,7 +450,7 @@ services:
deploy:
replicas: ${OCIS_SCALE:-1}
networks:
ocis-net: null
ocis-net:
entrypoint:
- ocis
- storage-auth-bearer
@@ -474,7 +474,7 @@ services:
deploy:
replicas: ${OCIS_SCALE:-1}
networks:
ocis-net: null
ocis-net:
entrypoint:
- ocis
- storage-shares
@@ -501,7 +501,7 @@ services:
deploy:
replicas: 1
networks:
ocis-net: null
ocis-net:
entrypoint:
- ocis
- storage-users
@@ -535,7 +535,7 @@ services:
deploy:
replicas: ${OCIS_SCALE:-1}
networks:
ocis-net: null
ocis-net:
entrypoint:
- ocis
- storage-public-link
@@ -559,7 +559,7 @@ services:
deploy:
replicas: 1
networks:
ocis-net: null
ocis-net:
entrypoint:
- ocis
- storage-sharing
@@ -592,7 +592,7 @@ services:
deploy:
replicas: ${OCIS_SCALE:-1}
networks:
ocis-net: null
ocis-net:
entrypoint:
- ocis
- storage-userprovider
@@ -623,7 +623,7 @@ services:
deploy:
replicas: ${OCIS_SCALE:-1}
networks:
ocis-net: null
ocis-net:
entrypoint:
- ocis
- storage-groupprovider
@@ -654,7 +654,7 @@ services:
deploy:
replicas: ${OCIS_SCALE:-1}
networks:
ocis-net: null
ocis-net:
entrypoint:
- ocis
- storage-frontend
@@ -684,7 +684,7 @@ services:
deploy:
replicas: ${OCIS_SCALE:-1}
networks:
ocis-net: null
ocis-net:
entrypoint:
- ocis
- storage-gateway
@@ -731,4 +731,3 @@ volumes:
networks:
ocis-net:
external: true
@@ -1,95 +0,0 @@
{
"HTTP": {
"Namespace": "com.owncloud"
},
"policy_selector": {
"static": {
"policy": "ocis"
}
},
"policies": [
{
"name": "ocis",
"routes": [
{
"endpoint": "/",
"backend": "http://localhost:9100"
},
{
"endpoint": "/.well-known/",
"backend": "http://localhost:9130"
},
{
"endpoint": "/konnect/",
"backend": "http://localhost:9130"
},
{
"endpoint": "/signin/",
"backend": "http://localhost:9130"
},
{
"type": "regex",
"endpoint": "/ocs/v[12].php/cloud/user/signing-key",
"backend": "http://localhost:9110"
},
{
"endpoint": "/ocs/",
"backend": "http://localhost:9140"
},
{
"type": "query",
"endpoint": "/remote.php/?preview=1",
"backend": "http://localhost:9115"
},
{
"endpoint": "/remote.php/",
"backend": "http://localhost:9140"
},
{
"endpoint": "/dav/",
"backend": "http://localhost:9140"
},
{
"endpoint": "/webdav/",
"backend": "http://localhost:9140"
},
{
"endpoint": "/status.php",
"backend": "http://localhost:9140"
},
{
"endpoint": "/index.php/",
"backend": "http://localhost:9140"
},
{
"endpoint": "/app/",
"backend": "http://localhost:9140"
},
{
"endpoint": "/archiver",
"backend": "http://localhost:9140"
},
{
"endpoint": "/data",
"backend": "http://localhost:9140"
},
{
"endpoint": "/graph/",
"backend": "http://localhost:9120"
},
{
"endpoint": "/graph-explorer/",
"backend": "http://localhost:9135"
},
{
"endpoint": "/api/v0/settings",
"backend": "http://localhost:9190"
},
{
"endpoint": "/settings.js",
"backend": "http://localhost:9190"
}
]
}
]
}
@@ -0,0 +1,47 @@
---
policy_selector:
static:
policy: ocis
policies:
- name: ocis
routes:
- endpoint: "/"
backend: http://localhost:9100
- endpoint: "/.well-known/"
backend: http://localhost:9130
- endpoint: "/konnect/"
backend: http://localhost:9130
- endpoint: "/signin/"
backend: http://localhost:9130
- type: regex
endpoint: "/ocs/v[12].php/cloud/user/signing-key"
backend: http://localhost:9110
- endpoint: "/ocs/"
backend: http://localhost:9140
- type: query
endpoint: "/remote.php/?preview=1"
backend: http://localhost:9115
- endpoint: "/remote.php/"
backend: http://localhost:9140
- endpoint: "/dav/"
backend: http://localhost:9140
- endpoint: "/webdav/"
backend: http://localhost:9140
- endpoint: "/status.php"
backend: http://localhost:9140
- endpoint: "/index.php/"
backend: http://localhost:9140
- endpoint: "/app/"
backend: http://localhost:9140
- endpoint: "/archiver"
backend: http://localhost:9140
- endpoint: "/data"
backend: http://localhost:9140
- endpoint: "/graph/"
backend: http://localhost:9120
- endpoint: "/graph-explorer/"
backend: http://localhost:9135
- endpoint: "/api/v0/settings"
backend: http://localhost:9190
- endpoint: "/settings.js"
backend: http://localhost:9190
@@ -91,7 +91,7 @@ services:
volumes:
- ./config/ocis/entrypoint-override.sh:/entrypoint-override.sh
- ./config/ocis/web-config.dist.json:/config/web-config.dist.json
- ./config/ocis/proxy.json:/etc/ocis/proxy.json
- ./config/ocis/proxy.yaml:/etc/ocis/proxy.yaml
- ocis-data:/var/lib/ocis
labels:
- "traefik.enable=true"
@@ -12,7 +12,7 @@ geekdocCollapseSection: true
## WebDAV with Basic Authentication
{{< hint danger >}}
Basic Authentication is disabled by default in oCIS because of security considerations. In order to make the following Rclone commands work the oCIS administrator needs to enable Basic Authentication eg. by setting the the environment variable `PROXY_ENABLE_BASIC_AUTH` to `true`.
Basic Authentication is disabled by default in oCIS because of security considerations. In order to make the following Rclone commands work the oCIS administrator needs to enable Basic Authentication e.g. by setting the environment variable `PROXY_ENABLE_BASIC_AUTH` to `true`.
Please consider to use [Rclone with OpenID Connect]({{< ref "webdav-sync-oidc.md" >}}) instead.
{{< /hint >}}
@@ -43,4 +43,4 @@ We now can use Rclone to sync the local folder `/tmp/test` to `/test` in your oC
rclone sync :local:/tmp :webdav:/test
```
If your oCIS doesn't use valid SSL certificates, you may need to use `rclone --no-check-certificate sync ...`.
If your oCIS doesn't use valid SSL certificates, you may need to use `rclone --no-check-certificate sync ...`.
+1
View File
@@ -1 +1,2 @@
*_configvars.md
*-example.yaml
@@ -8,5 +8,8 @@ geekdocFilePath: configuration.md
geekdocCollapseSection: true
---
## Example YAML Config
{{< include file="extensions/_includes/accounts-config-example.yaml" language="yaml" >}}
{{< include file="extensions/_includes/accounts_configvars.md" >}}
+16
View File
@@ -0,0 +1,16 @@
---
title: Audit
date: 2022-03-02T00:00:00+00:00
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/extensions/audit
geekdocFilePath: _index.md
geekdocCollapseSection: true
---
## Abstract
## Table of Contents
{{< toc-tree >}}
+12
View File
@@ -0,0 +1,12 @@
---
title: Service Configuration
date: 2018-05-02T00:00:00+00:00
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/extensions/audit
geekdocFilePath: configuration.md
geekdocCollapseSection: true
---
{{< include file="extensions/_includes/audit_configvars.md" >}}
+3
View File
@@ -8,5 +8,8 @@ geekdocFilePath: configuration.md
geekdocCollapseSection: true
---
## Example YAML Config
{{< include file="extensions/_includes/glauth-config-example.yaml" language="yaml" >}}
{{< include file="extensions/_includes/glauth_configvars.md" >}}
@@ -8,5 +8,8 @@ geekdocFilePath: configuration.md
geekdocCollapseSection: true
---
## Example YAML Config
{{< include file="extensions/_includes/graph-explorer-config-example.yaml" language="yaml" >}}
{{< include file="extensions/_includes/graph-explorer_configvars.md" >}}
+2
View File
@@ -7,6 +7,8 @@ geekdocEditPath: edit/master/docs/extensions/graph
geekdocFilePath: configuration.md
geekdocCollapseSection: true
---
## Example YAML Config
{{< include file="extensions/_includes/graph-config-example.yaml" language="yaml" >}}
{{< include file="extensions/_includes/graph_configvars.md" >}}
+3
View File
@@ -8,5 +8,8 @@ geekdocFilePath: configuration.md
geekdocCollapseSection: true
---
## Example YAML Config
{{< include file="extensions/_includes/idm-config-example.yaml" language="yaml" >}}
{{< include file="extensions/_includes/idm_configvars.md" >}}
+57
View File
@@ -0,0 +1,57 @@
---
title: Service Setup
date: 2022-03-22T00:00:00+00:00
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/extensions/idm
geekdocFilePath: setup.md
geekdocCollapseSection: true
---
{{< toc >}}
## Using ocis with libregraph/idm
Currently, oCIS still runs the accounts and glauth services to manage users. Until the default is switched
to libregraph/idm, oCIS has to be started with a custom configuration in order to use libregraph/idm as
the users and groups backend (this setup also disables the glauth and accounts service):
```
export GRAPH_IDENTITY_BACKEND=ldap
export GRAPH_LDAP_URI=ldaps://localhost:9235
export GRAPH_LDAP_BIND_DN="uid=libregraph,ou=sysusers,o=libregraph-idm"
export GRAPH_LDAP_BIND_PASSWORD=idm
export GRAPH_LDAP_USER_EMAIL_ATTRIBUTE=mail
export GRAPH_LDAP_USER_NAME_ATTRIBUTE=uid
export GRAPH_LDAP_USER_BASE_DN="ou=users,o=libregraph-idm"
export GRAPH_LDAP_GROUP_BASE_DN="ou=groups,o=libregraph-idm"
export GRAPH_LDAP_SERVER_WRITE_ENABLED="true"
export IDP_INSECURE="true"
export IDP_LDAP_FILTER="(&(objectclass=inetOrgPerson)(objectClass=owncloud))"
export IDP_LDAP_URI=ldaps://localhost:9235
export IDP_LDAP_BIND_DN="uid=idp,ou=sysusers,o=libregraph-idm"
export IDP_LDAP_BIND_PASSWORD="idp"
export IDP_LDAP_BASE_DN="ou=users,o=libregraph-idm"
export IDP_LDAP_LOGIN_ATTRIBUTE=uid
export IDP_LDAP_UUID_ATTRIBUTE="ownclouduuid"
export IDP_LDAP_UUID_ATTRIBUTE_TYPE=binary
export PROXY_ACCOUNT_BACKEND_TYPE=cs3
export OCS_ACCOUNT_BACKEND_TYPE=cs3
export STORAGE_LDAP_HOSTNAME=localhost
export STORAGE_LDAP_PORT=9235
export STORAGE_LDAP_INSECURE="true"
export STORAGE_LDAP_BASE_DN="o=libregraph-idm"
export STORAGE_LDAP_BIND_DN="uid=reva,ou=sysusers,o=libregraph-idm"
export STORAGE_LDAP_BIND_PASSWORD=reva
export STORAGE_LDAP_LOGINFILTER='(&(objectclass=inetOrgPerson)(objectclass=owncloud)(|(uid={{login}})(mail={{login}})))'
export STORAGE_LDAP_USERFILTER='(&(objectclass=inetOrgPerson)(objectclass=owncloud)(|(ownclouduuid={{.OpaqueId}})(uid={{.OpaqueId}})))'
export STORAGE_LDAP_USERATTRIBUTEFILTER='(&(objectclass=owncloud)({{attr}}={{value}}))'
export STORAGE_LDAP_USERFINDFILTER='(&(objectclass=owncloud)(|(uid={{query}}*)(cn={{query}}*)(displayname={{query}}*)(mail={{query}}*)(description={{query}}*)))'
export STORAGE_LDAP_USERGROUPFILER='(&(objectclass=groupOfNames)(member={{query}}*))'
export STORAGE_LDAP_GROUPFILTER='(&(objectclass=groupOfNames)(objectclass=owncloud)(ownclouduuid={{.OpaqueId}}*))'
export OCIS_RUN_EXTENSIONS=settings,storage-metadata,graph,graph-explorer,ocs,store,thumbnails,web,webdav,storage-frontend,storage-gateway,storage-userprovider,storage-groupprovider,storage-authbasic,storage-authbearer,storage-authmachine,storage-users,storage-shares,storage-public-link,storage-appprovider,storage-sharing,proxy,idp,nats,idm
export OCIS_INSECURE=true
bin/ocis server
```
+3
View File
@@ -8,5 +8,8 @@ geekdocFilePath: configuration.md
geekdocCollapseSection: true
---
## Example YAML Config
{{< include file="extensions/_includes/idp-config-example.yaml" language="yaml" >}}
{{< include file="extensions/_includes/idp_configvars.md" >}}
+3
View File
@@ -8,5 +8,8 @@ geekdocFilePath: configuration.md
geekdocCollapseSection: true
---
## Example YAML Config
{{< include file="extensions/_includes/nats-config-example.yaml" language="yaml" >}}
{{< include file="extensions/_includes/nats_configvars.md" >}}
@@ -8,5 +8,8 @@ geekdocFilePath: configuration.md
geekdocCollapseSection: true
---
## Example YAML Config
{{< include file="extensions/_includes/notifications-config-example.yaml" language="yaml" >}}
{{< include file="extensions/_includes/notifications_configvars.md" >}}
+3
View File
@@ -8,5 +8,8 @@ geekdocFilePath: configuration.md
geekdocCollapseSection: true
---
## Example YAML Config
{{< include file="extensions/_includes/ocs-config-example.yaml" language="yaml" >}}
{{< include file="extensions/_includes/ocs_configvars.md" >}}
+200
View File
@@ -0,0 +1,200 @@
---
title: Port Ranges
date: 2018-05-02T00:00:00+00:00
weight: 0
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/extensions
geekdocFilePath: port-ranges.go
geekdocCollapseSection: true
---
oCIS extensions often need a port to expose their services to other services or the outside world.
As users may have many different extensions running on the same machine, we should track port usage in the oCIS ecosystem. In the best case we ensure that each extension uses a non colliding port range, to make life of users easier.
This page tracks the knowingly used port ranges.
Feel free to "reserve" a free port range when you're developing an extension by adding your extension to the list (see the edit button in the top right corner).
If you're developing a non-public extension, we recommend using ports outside of the ranges listed below.
We also suggest to use the last port in your extensions' range as a debug/metrics port.
## Allocations
| Port range | Service |
| ---------- | ----------------------------------------------------------------------------- |
| 9000-9010 | [ocis](https://github.com/owncloud/ocis) |
| 9100-9104 | [web](https://github.com/owncloud/ocis/tree/master/web) |
| 9105-9109 | [hello](https://github.com/owncloud/ocis-hello) |
| 9110-9114 | [ocs](https://github.com/owncloud/ocis/tree/master/ocs) |
| 9115-9119 | [webdav](https://github.com/owncloud/ocis/tree/master/webdav) |
| 9120-9124 | [graph](https://github.com/owncloud/ocis/tree/master/graph) |
| 9125-9129 | [glauth](https://github.com/owncloud/ocis/tree/master/devldap) |
| 9130-9134 | [konnectd](https://github.com/owncloud/ocis/tree/master/konnectd) |
| 9135-9139 | [graph-explorer](https://github.com/owncloud/ocis/tree/master/graph-explorer) |
| 9140-9179 | [reva/storage](https://github.com/owncloud/ocis/tree/master/storage) |
| 9180-9184 | [accounts](https://github.com/owncloud/ocis/tree/master/accounts) |
| 9185-9189 | [thumbnails](https://github.com/owncloud/ocis/tree/master/thumbnails) |
| 9190-9194 | [settings](https://github.com/owncloud/ocis/tree/master/settings) |
| 9195-9199 | [store](https://github.com/owncloud/ocis/tree/master/store) |
| 9200-9204 | [proxy](https://github.com/owncloud/ocis/tree/master/proxy) |
| 9205-9209 | [markdown-editor](https://github.com/owncloud/ocis-markdown-editor) |
| 9210-9214 | [reva](https://github.com/owncloud/ocis-reva) unused? |
| 9215-9219 | reva metadata storage |
| 9220-9224 | FREE |
| 9225-9229 | photoprism (state: PoC) |
| 9230-9234 | [nats](https://github.com/owncloud/ocis/tree/master/nats) |
| 9235-9239 | idm TBD |
| 9240-9244 | FREE |
| 9245-9249 | FREE |
| 9250-9254 | oCIS Runtime |
| 9255-9259 | FREE |
| 9260-9264 | FREE |
| 9265-9269 | FREE |
| 9270-9274 | FREE |
| 9275-9279 | FREE |
| 9280-9284 | FREE |
| 9285-9289 | FREE |
| 9290-9294 | FREE |
| 9295-9299 | FREE |
| 9300-9304 | FREE |
| 9305-9309 | FREE |
| 9310-9314 | FREE |
| 9315-9319 | FREE |
| 9320-9324 | FREE |
| 9325-9329 | FREE |
| 9330-9334 | FREE |
| 9335-9339 | FREE |
| 9340-9344 | FREE |
| 9345-9349 | FREE |
| 9350-9354 | FREE |
| 9355-9359 | FREE |
| 9360-9364 | FREE |
| 9365-9369 | FREE |
| 9370-9374 | FREE |
| 9375-9379 | FREE |
| 9380-9384 | FREE |
| 9385-9389 | FREE |
| 9390-9394 | FREE |
| 9395-9399 | FREE |
| 9400-9404 | FREE |
| 9405-9409 | FREE |
| 9410-9414 | FREE |
| 9415-9419 | FREE |
| 9420-9424 | FREE |
| 9425-9429 | FREE |
| 9430-9434 | FREE |
| 9435-9439 | FREE |
| 9440-9444 | FREE |
| 9445-9449 | FREE |
| 9450-9454 | FREE |
| 9455-9459 | FREE |
| 9460-9464 | FREE |
| 9465-9469 | FREE |
| 9470-9474 | FREE |
| 9475-9479 | FREE |
| 9480-9484 | FREE |
| 9485-9489 | FREE |
| 9490-9494 | FREE |
| 9495-9499 | FREE |
| 9500-9504 | FREE |
| 9505-9509 | FREE |
| 9510-9514 | FREE |
| 9515-9519 | FREE |
| 9520-9524 | FREE |
| 9525-9529 | FREE |
| 9530-9534 | FREE |
| 9535-9539 | FREE |
| 9540-9544 | FREE |
| 9545-9549 | FREE |
| 9550-9554 | FREE |
| 9555-9559 | FREE |
| 9560-9564 | FREE |
| 9565-9569 | FREE |
| 9570-9574 | FREE |
| 9575-9579 | FREE |
| 9580-9584 | FREE |
| 9585-9589 | FREE |
| 9590-9594 | FREE |
| 9595-9599 | FREE |
| 9600-9604 | FREE |
| 9605-9609 | FREE |
| 9610-9614 | FREE |
| 9615-9619 | FREE |
| 9620-9624 | FREE |
| 9625-9629 | FREE |
| 9630-9634 | FREE |
| 9635-9639 | FREE |
| 9640-9644 | FREE |
| 9645-9649 | FREE |
| 9650-9654 | FREE |
| 9655-9659 | FREE |
| 9660-9664 | FREE |
| 9665-9669 | FREE |
| 9670-9674 | FREE |
| 9675-9679 | FREE |
| 9680-9684 | FREE |
| 9685-9689 | FREE |
| 9690-9694 | FREE |
| 9695-9699 | FREE |
| 9700-9704 | FREE |
| 9705-9709 | FREE |
| 9710-9714 | FREE |
| 9715-9719 | FREE |
| 9720-9724 | FREE |
| 9725-9729 | FREE |
| 9730-9734 | FREE |
| 9735-9739 | FREE |
| 9740-9744 | FREE |
| 9745-9749 | FREE |
| 9750-9754 | FREE |
| 9755-9759 | FREE |
| 9760-9764 | FREE |
| 9765-9769 | FREE |
| 9770-9774 | FREE |
| 9775-9779 | FREE |
| 9780-9784 | FREE |
| 9785-9789 | FREE |
| 9790-9794 | FREE |
| 9795-9799 | FREE |
| 9800-9804 | FREE |
| 9805-9809 | FREE |
| 9810-9814 | FREE |
| 9815-9819 | FREE |
| 9820-9824 | FREE |
| 9825-9829 | FREE |
| 9830-9834 | FREE |
| 9835-9839 | FREE |
| 9840-9844 | FREE |
| 9845-9849 | FREE |
| 9850-9854 | FREE |
| 9855-9859 | FREE |
| 9860-9864 | FREE |
| 9865-9869 | FREE |
| 9870-9874 | FREE |
| 9875-9879 | FREE |
| 9880-9884 | FREE |
| 9885-9889 | FREE |
| 9890-9894 | FREE |
| 9895-9899 | FREE |
| 9900-9904 | FREE |
| 9905-9909 | FREE |
| 9910-9914 | FREE |
| 9915-9919 | FREE |
| 9920-9924 | FREE |
| 9925-9929 | FREE |
| 9930-9934 | FREE |
| 9935-9939 | FREE |
| 9940-9944 | FREE |
| 9945-9949 | FREE |
| 9950-9954 | FREE |
| 9955-9959 | FREE |
| 9960-9964 | FREE |
| 9965-9969 | FREE |
| 9970-9974 | FREE |
| 9975-9979 | FREE |
| 9980-9984 | FREE |
| 9985-9989 | FREE |
| 9990-9994 | FREE |
| 9995-9999 | FREE |
+3
View File
@@ -8,5 +8,8 @@ geekdocFilePath: configuration.md
geekdocCollapseSection: true
---
## Example YAML Config
{{< include file="extensions/_includes/proxy-config-example.yaml" language="yaml" >}}
{{< include file="extensions/_includes/proxy_configvars.md" >}}
@@ -8,5 +8,8 @@ geekdocFilePath: configuration.md
geekdocCollapseSection: true
---
## Example YAML Config
{{< include file="extensions/_includes/settings-config-example.yaml" language="yaml" >}}
{{< include file="extensions/_includes/settings_configvars.md" >}}
+3
View File
@@ -8,5 +8,8 @@ geekdocFilePath: configuration.md
geekdocCollapseSection: true
---
## Example YAML Config
{{< include file="extensions/_includes/store-config-example.yaml" language="yaml" >}}
{{< include file="extensions/_includes/store_configvars.md" >}}
@@ -8,5 +8,8 @@ geekdocFilePath: configuration.md
geekdocCollapseSection: true
---
## Example YAML Config
{{< include file="extensions/_includes/thumbnails-config-example.yaml" language="yaml" >}}
{{< include file="extensions/_includes/thumbnails_configvars.md" >}}
+3
View File
@@ -8,5 +8,8 @@ geekdocFilePath: configuration.md
geekdocCollapseSection: true
---
## Example YAML Config
{{< include file="extensions/_includes/web-config-example.yaml" language="yaml" >}}
{{< include file="extensions/_includes/web_configvars.md" >}}
+3
View File
@@ -8,5 +8,8 @@ geekdocFilePath: configuration.md
geekdocCollapseSection: true
---
## Example YAML Config
{{< include file="extensions/_includes/webdav-config-example.yaml" language="yaml" >}}
{{< include file="extensions/_includes/webdav_configvars.md" >}}
+26 -11
View File
@@ -6,14 +6,20 @@ import (
"log"
"os"
"os/exec"
"path"
"path/filepath"
"strings"
"text/template"
)
var targets = map[string]string{
"example-config-generator.go.tmpl": "output/exampleconfig/example-config-generator.go",
"extractor.go.tmpl": "output/env/runner.go",
}
func main() {
fmt.Println("Getting relevant packages")
paths, err := filepath.Glob("../../*/pkg/config/defaultconfig.go")
paths, err := filepath.Glob("../../*/pkg/config/defaults/defaultconfig.go")
if err != nil {
log.Fatal(err)
}
@@ -24,27 +30,36 @@ func main() {
for i := range paths {
paths[i] = replacer.Replace(paths[i])
}
content, err := ioutil.ReadFile("extractor.go.tmpl")
for template, output := range targets {
GenerateIntermediateCode(template, output, paths)
RunIntermediateCode(output)
}
fmt.Println("Cleaning up")
os.RemoveAll("output")
}
func GenerateIntermediateCode(templatePath string, intermediateCodePath string, paths []string) {
content, err := ioutil.ReadFile(templatePath)
if err != nil {
log.Fatal(err)
}
fmt.Println("Generating intermediate go code")
fmt.Println("Generating intermediate go code for " + intermediateCodePath + " using template " + templatePath)
tpl := template.Must(template.New("").Parse(string(content)))
os.Mkdir("output", 0700)
runner, err := os.Create("output/runner.go")
os.MkdirAll(path.Dir(intermediateCodePath), 0700)
runner, err := os.Create(intermediateCodePath)
if err != nil {
log.Fatal(err)
}
tpl.Execute(runner, paths)
fmt.Println("Running intermediate go code")
os.Chdir("output")
}
func RunIntermediateCode(intermediateCodePath string) {
fmt.Println("Running intermediate go code for " + intermediateCodePath)
os.Setenv("OCIS_BASE_DATA_PATH", "~/.ocis")
out, err := exec.Command("go", "run", "runner.go").Output()
out, err := exec.Command("go", "run", intermediateCodePath).Output()
if err != nil {
log.Fatal(err)
}
fmt.Println(string(out))
fmt.Println("Cleaning up")
os.Chdir("../")
os.RemoveAll("output")
}
@@ -0,0 +1,53 @@
package main
import (
"fmt"
"log"
"os"
"path/filepath"
"strings"
"gopkg.in/yaml.v2"
{{- range $key, $value := .}}
pkg{{$key}} "{{$value}}"
{{- end}}
)
func main() {
replacer := strings.NewReplacer(
"github.com/owncloud/ocis/", "",
"/pkg/config/defaults", "",
)
cfg := map[string]string{
{{- range $key, $value := .}}
replacer.Replace("{{$value}}"): func() string {
fmt.Println("Generating example YAML config for {{ $value -}}")
c := pkg{{$key}}.DefaultConfig()
pkg{{$key}}.EnsureDefaults(c)
pkg{{$key}}.Sanitize(c)
yml, err := yaml.Marshal(c)
if err != nil {
log.Fatalf("Marshalling yaml for pkg0 failed: %s\n", err)
}
return "# Autogenerated\n" + string(yml)
}(),
{{- end}}
}
for pkg, yml := range cfg {
targetFolders := []string{
// TODO: comment in when it is clear how to commit this to the structure of the master|main branch
// filepath.Join("../../", pkg, "/config"),
"../../docs/extensions/_includes/",
}
for _, targetFolder := range targetFolders {
os.MkdirAll(targetFolder, 0700)
targetYamlFile, err := os.Create(filepath.Join(targetFolder, replacer.Replace(pkg) + "-config-example.yaml"))
if err != nil {
log.Fatalf("Failed to create target file for : %s", err)
}
defer targetYamlFile.Close()
targetYamlFile.WriteString(yml)
}
}
}
+3 -3
View File
@@ -23,13 +23,13 @@ type ConfigField struct {
func main() {
fmt.Println("Generating documentation for environment variables:")
content, err := ioutil.ReadFile("../../../docs/templates/CONFIGURATION.tmpl")
content, err := ioutil.ReadFile("../../docs/templates/CONFIGURATION.tmpl")
if err != nil {
log.Fatal(err)
}
replacer := strings.NewReplacer(
"github.com/owncloud/ocis/", "",
"/pkg/config", "",
"/pkg/config/defaults", "",
)
var fields []ConfigField
var targetFile *os.File
@@ -41,7 +41,7 @@ m := map[string]interface{}{
{{- end }}
}
targetFolder := "../../../docs/extensions/_includes/"
targetFolder := "../../docs/extensions/_includes/"
for pkg, conf := range m {
fields = GetAnnotatedVariables(conf)
if len(fields) > 0 {
+1 -1
View File
@@ -3,7 +3,7 @@ title: "Configuration"
date: "2021-11-09T00:03:16+0100"
weight: 2
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/ocis/templates
geekdocEditPath: edit/master/docs/ocis
geekdocFilePath: config.md
---
+4 -2
View File
@@ -15,10 +15,12 @@ If you need to access oCIS running in a docker container, on a VM or a remote ma
## Start the oCIS fullstack server from binary
Upon first start of the oCIS fullstack server with `./bin/ocis server` it will generate a file `identifier-registration.yml` in the config folder in your current working directory. This file is used to configure the built-in identity provider and therefore contains the OpenID Connect issuer and also information about relying parties, for example ownCloud Web and our desktop and mobile applications.
Upon first start of the oCIS fullstack server with `./bin/ocis server` it will generate a directory tree skeleton in `$HOME/.ocis`. If that is already existing it will not be overwritten as it contains all relevant data for oCIS.
In `$HOME/.ocis/idp` is a file `identifier-registration.yaml`. It is used to configure the built-in identity provider and therefore contains the OpenID Connect issuer and also information about relying parties, for example ownCloud Web and our desktop and mobile applications.
{{< hint warning >}}
The `identifier-registration.yml` file will only be generated if it does not exist yet. If you want to change certain environment variables like `OCIS_URL`, please delete this file first before doing so. Otherwise your changes will not be applied correctly and you will run into errors.
The `identifier-registration.yaml` file will only be generated if it does not exist yet. If you want to change certain environment variables like `OCIS_URL`, please delete this file first before doing so. Otherwise your changes will not be applied correctly and you will run into errors.
{{< /hint >}}
{{< hint warning >}}
+4 -4
View File
@@ -92,9 +92,9 @@ basedn = "dc=ocis,dc=test" # base dn to construct
{{< hint >}}
There is a bug in the config merging for environment variables, cli flags and config files causing log settings not to be picked up from the config file when specifying `--extensions`. That is why I will
* configure most of the config in a file,
* configure most of the config in a file,
* adjust logging using `OCIS_LOG_*` environment variables and
* specify which extension to run using `ocis/bin/ocis server --extensions "comma, separated, list, of, extensions"`.
* specify which extension to run using `ocis/bin/ocis server --extensions "comma, separated, list, of, extensions"`.
{{< /hint >}}
#### Run it!
@@ -129,7 +129,7 @@ To configure LDAP to use our glauth we add this section to the config file:
```toml
[storage.reva.ldap]
idp = "https://ocis.ocis.test"
basedn = "dc=ocis,dc=test"
basedn = "dc=ocis,dc=test"
binddn = "cn=admin,dc=ocis,dc=test" # an admin user in your oc10
bindpassword = "secret"
userschema = { uid = "uid", displayname = "givenname" } # TODO make glauth return an ownclouduuid and displayname attribute
@@ -158,7 +158,7 @@ Please use `exit` or `Ctrl-D` to exit this program.
username: jfd
password: OK
>> whoami
id:<idp:"https://ocis.ocis.test" opaque_id:"jfd" type:USER_TYPE_PRIMARY > username:"jfd" mail:"jfd@butonic.de" display_name:"J\303\266rn" uid_number:99 gid_number:99
id:<idp:"https://ocis.ocis.test" opaque_id:"jfd" type:USER_TYPE_PRIMARY > username:"jfd" mail:"jfd@butonic.de" display_name:"J\303\266rn" uid_number:99 gid_number:99
>> exit
```
+3 -3
View File
@@ -28,7 +28,7 @@ Basically we have two sources for feature tests and test suites:
At the moment both can be applied to oCIS since the api of oCIS is designed to be compatible to ownCloud.
Since we have to offer an migration path to existing users of ownCloud, you can use your existing ownCloud as storage backend for oCIS. As another storage backend we offer oCIS native storage, also called "oCIS". This stores files directly on disk. Which storage backend is used is also reflected in the tests, there are always different tests for oCIS storage and ownCloud storage.
Since we have to offer a migration path to existing users of ownCloud, you can use your existing ownCloud as storage backend for oCIS. As another storage backend we offer oCIS native storage, also called "oCIS". This stores files directly on disk. Which storage backend is used is also reflected in the tests, there are always different tests for oCIS storage and ownCloud storage.
You can invoke two types of test suite runs:
@@ -55,7 +55,7 @@ This must be pointing to a valid feature definition.
### oCIS image to be tested (or: skip build and take existing image)
By default the tests will be run against docker image built from your current working state of the oCIS repository. For some purposes it might also be handy to use a oCIS image from Docker Hub. Therefore you can provide the optional flag `OCIS_IMAGE_TAG=...` which must contain an available docker tag of the [owncloud/ocis registry on Docker Hub](https://hub.docker.com/r/owncloud/ocis) (eg. 'latest').
By default, the tests will be run against the docker image built from your current working state of the oCIS repository. For some purposes it might also be handy to use a oCIS image from Docker Hub. Therefore you can provide the optional flag `OCIS_IMAGE_TAG=...` which must contain an available docker tag of the [owncloud/ocis registry on Docker Hub](https://hub.docker.com/r/owncloud/ocis) (eg. 'latest').
```
make -C tests/acceptance/docker localApiTests-apiAccountsHashDifficulty-ocis OCIS_IMAGE_TAG=latest
@@ -75,7 +75,7 @@ The log output is opened in `less`. You can navigate up and down with your curso
### Cleanup
During testing we start an redis and oCIS docker container. These will not be stopped automatically. You can stop them with:
During testing we start a redis and oCIS docker container. These will not be stopped automatically. You can stop them with:
```
make -C tests/acceptance/docker clean
+2 -2
View File
@@ -22,7 +22,7 @@ We are distributing oCIS as binaries and Docker images.
{{< hint warning >}}
The examples in this document assume that oCIS is accessed from the same host as it is running on (`localhost`). If you would like
to access oCIS remotely please refer to the [Basic Remote Setup]({{< ref "../deployment/basic-remote-setup" >}}) section. Especially
to the notes about setting the `PROXY_HTTP_ADDR` and `OCIS_URL` enviroment variables.
to the notes about setting the `PROXY_HTTP_ADDR` and `OCIS_URL` environment variables.
{{< /hint >}}
You can find more deployment examples in the [deployment section]({{< ref "../deployment" >}}).
@@ -113,7 +113,7 @@ The version command prints the version of your installed oCIS.
ocis --version
{{< / highlight >}}
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.
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 exit 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 health --help
Loaded 100 of 330 files, more files were not shown because too many files have changed in this diff. Show more