Compare commits

..
304 Commits
Author SHA1 Message Date
Willy Kloucek d071a30714 release 1.16.0 2021-12-09 17:42:08 +01:00
Willy Kloucek a2681cb654 Merge pull request #2857 from owncloud/dependabot/go_modules/github.com/golang-jwt/jwt/v4-4.2.0
Bump github.com/golang-jwt/jwt/v4 from 4.1.0 to 4.2.0
2021-12-09 17:39:02 +01:00
Willy Kloucek 480d148446 Merge pull request #2855 from owncloud/wait-for-test-services
[tests-only] wait for selenium and middleware docker images to start
2021-12-09 17:22:11 +01:00
Willy Kloucek f3f8977c74 Merge pull request #2705 from owncloud/app_provider_new_file_docs
[docs-only] app provider new file docs
2021-12-09 17:21:11 +01:00
dependabot[bot] e2d21edaa4 Bump github.com/golang-jwt/jwt/v4 from 4.1.0 to 4.2.0
Bumps [github.com/golang-jwt/jwt/v4](https://github.com/golang-jwt/jwt) from 4.1.0 to 4.2.0.
- [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.1.0...v4.2.0)

---
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>
2021-12-09 16:07:57 +00:00
Willy Kloucek f6c02716ad Automated changelog update [skip ci] 2021-12-09 15:52:50 +00:00
Willy Kloucek 25da2eb1b5 Merge pull request #2850 from owncloud/update-reva-2021-12-08
[full-ci] update REVA to v1.17.0
2021-12-09 16:52:23 +01:00
Willy Kloucek ef8726b5e9 update expected failures 2021-12-09 16:13:11 +01:00
Phil Davis a2d5de07b8 [tests-only] wait for selenium and middleware docker images to start 2021-12-09 20:49:28 +05:45
Willy Kloucek 11a9899735 add https status codes 2021-12-09 15:56:28 +01:00
Willy Kloucek 34b2971cb9 add default_application from cs3org/reva#2230 2021-12-09 15:56:28 +01:00
Willy Kloucek a713c90841 adapt to changes of cs3org/reva#2210 2021-12-09 15:56:28 +01:00
Willy Kloucek 068078a47b add new file action to app provider docs 2021-12-09 15:56:28 +01:00
Willy Kloucek c1d01303d2 update REVA to v1.17.0 2021-12-09 15:36:18 +01:00
Willy Kloucek 54de444c29 update REVA 2021-12-08 13:21:16 +01:00
Pascal Wengerter 68a6370821 Automated changelog update [skip ci] 2021-12-08 11:23:52 +00:00
Pascal WengerterandDipak Acharya 0e1d9b990f [full-ci] Bump web to v4.6.0 (#2846)
* Bump web to v4.6.0

* [full-ci]Bump web commitic in CI

* Start middleware in accounts & settings CI pipelines, update expected failures

Co-authored-by: Dipak Acharya <dpakach@gmail.com>
2021-12-08 12:23:28 +01:00
Willy Kloucek b7d4f2b331 Automated changelog update [skip ci] 2021-12-07 12:19:55 +00:00
Willy Kloucek 0571467cf6 Merge pull request #2241 from owncloud/remove_eos
remove EOS stuff
2021-12-07 13:17:33 +01:00
Jörn Friedrich Dreyer ffe75747d3 Merge pull request #2837 from owncloud/update-reva-a042373b390
[full-ci] update reva, ignoring docker-arm
2021-12-07 13:17:12 +01:00
Phil Davis 8c43c647f0 Merge pull request #2844 from owncloud/bump-commit-id-20211207
[tests-only][full-ci]Bump core commit id for tests
2021-12-07 16:13:23 +05:45
Willy Kloucek c338d32222 add failing tests to expected failures (https://github.com/owncloud/web/issues/4893) 2021-12-07 11:13:15 +01:00
Swikriti Tripathi 9c33e4216b Bump core commit id for tests 2021-12-07 14:35:55 +05:45
Swikriti Tripathi 2f38e551eb Bump core commit id for tests 2021-12-07 14:31:41 +05:45
Jörn Friedrich Dreyer 4246ab1d11 Automated changelog update [skip ci] 2021-12-07 08:28:49 +00:00
Jörn Friedrich Dreyer b5c582aa2d Merge pull request #2843 from owncloud/runtime-supervisor-fixes
[Runtime] Removed trap goroutine in favor of context propagation cancelation
2021-12-07 09:28:18 +01:00
Willy Kloucek 70000ac6c1 remove eos related stuff (leave documentation) 2021-12-07 08:22:10 +01:00
Willy Kloucek 34e755943a add changelog 2021-12-06 17:16:59 +01:00
Willy Kloucek a5accb2ce9 Revert "try without changed paths"
This reverts commit 60d3962ee4.
2021-12-06 17:09:16 +01:00
Willy Kloucek 9109f8843a always unescape url params 2021-12-06 17:04:12 +01:00
Willy Kloucek 60d3962ee4 try without changed paths 2021-12-06 14:54:23 +01:00
A.Unger 8f14fdae1c added changelog 2021-12-06 13:58:08 +01:00
Willy Kloucek ad62e230a6 fix add to groups endpoint 2021-12-06 13:26:28 +01:00
A.Unger e3e3d1ee57 runtime: removed trap goroutine and let the context cancelation do the thing 2021-12-06 12:11:48 +01:00
Willy Kloucek 81408a3568 move up and download to a separate package 2021-12-06 12:01:16 +01:00
Willy Kloucek 122822a87e refactor auth 2021-12-06 12:01:16 +01:00
Willy Kloucek c37800eb72 fix user creation 2021-12-06 12:01:16 +01:00
Willy Kloucek 19a51a4402 fix not found error 2021-12-06 12:01:16 +01:00
Willy Kloucek d961decd64 update reva 2021-12-06 12:01:15 +01:00
David Christofas 08641a8e45 fix download helper for accounts service and indexer 2021-12-06 12:01:15 +01:00
Willy Kloucek 3fd070061d WIP: make the accounts service use the upload workflow 2021-12-06 12:01:15 +01:00
Willy Kloucek c067da5496 update reva 2021-12-06 12:01:15 +01:00
Alex Unger 771b870753 Automated changelog update [skip ci] 2021-12-06 10:01:38 +00:00
Alex Unger a73fd54b85 Merge pull request #2779 from owncloud/claim-selector-basic-auth 2021-12-06 11:01:09 +01:00
Willy Kloucek 0d34ed55f0 Merge pull request #2838 from owncloud/dependabot/go_modules/github.com/libregraph/lico-0.53.0
Bump github.com/libregraph/lico from 0.52.0 to 0.53.0
2021-12-06 08:58:05 +01:00
Viktor Scharf 51526e1983 Merge pull request #2830 from owncloud/apiTestQuota
[tests-only] ApiTest: state of the quota
2021-12-03 11:27:23 +01:00
dependabot[bot] 1256671d28 Bump github.com/libregraph/lico from 0.52.0 to 0.53.0
Bumps [github.com/libregraph/lico](https://github.com/libregraph/lico) from 0.52.0 to 0.53.0.
- [Release notes](https://github.com/libregraph/lico/releases)
- [Changelog](https://github.com/libregraph/lico/blob/master/CHANGELOG.md)
- [Commits](https://github.com/libregraph/lico/compare/v0.52.0...v0.53.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-02 14:00:58 +00:00
Willy Kloucek d91d4933cf Merge pull request #2836 from owncloud/dependabot/go_modules/github.com/grpc-ecosystem/grpc-gateway/v2-2.7.1
Bump github.com/grpc-ecosystem/grpc-gateway/v2 from 2.7.0 to 2.7.1
2021-12-02 14:47:51 +01:00
Willy Kloucek 6a4c6c7c7b Automated changelog update [skip ci] 2021-12-02 13:47:44 +00:00
Willy Kloucek 7be72efddd Merge pull request #2832 from rhafer/user-claim-fallback
OIDC: fallback to "email" if IDP doesn't provide "preferred_username" claim
2021-12-02 14:47:13 +01:00
ScharfViktor be1c190a56 change name of the space(uniq name) 2021-12-02 10:05:28 +01:00
dependabot[bot] 2be06820de Bump github.com/grpc-ecosystem/grpc-gateway/v2 from 2.7.0 to 2.7.1
Bumps [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway) from 2.7.0 to 2.7.1.
- [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.7.0...v2.7.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-02 06:29:48 +00:00
ScharfViktor 216a62cf2e add Given form for steps 2021-12-02 00:01:52 +01:00
Willy Kloucek ddf62111b0 Automated changelog update [skip ci] 2021-12-01 10:09:35 +00:00
Willy Kloucek e8e5a8a41e Merge pull request #2835 from owncloud/update-reva-79fb2995dab9
[full-ci] update reva
2021-12-01 11:09:04 +01:00
Willy Kloucek 1cdd3b1699 update reva 2021-12-01 09:37:20 +01:00
Ralf Haferkamp 5b3af35804 Merge pull request #2804 from rhafer/graph-ldap
Add (read-only) LDAP backend to Graph users/groups endpoints
2021-12-01 09:31:13 +01:00
Ralf Haferkamp c35a0f7553 OIDC: fallback to "email" if IDP doesn't provide "preferred_username" claim
Some IDPs (e.g. Authelia) don't add the "preferred_username" claim.
Fallback to the "email" claim in that case.

Fixes: #2644
2021-11-30 17:53:44 +01:00
ScharfViktor 7a8c513cf7 add failed test to expected failures 2021-11-30 11:22:36 +01:00
ScharfViktor 581bcae709 add quotaTest 2021-11-29 21:21:10 +01:00
Willy Kloucek d85def9b88 check cookie for before we fall back to the default policy 2021-11-29 09:51:39 +01:00
Willy Kloucek 48accc6419 Merge pull request #2827 from owncloud/fix-create-group-no-name
introduce string constants for user / group not found messages
2021-11-29 09:47:23 +01:00
Phil Davis f5bbdbe1eb Merge pull request #2784 from owncloud/php-types-check
[Tests-Only][full-ci] enforce strict type checking for php api tests
2021-11-29 13:53:34 +05:45
Willy Kloucek 1eac1099ae introduce string constants for user / group not found messages 2021-11-29 07:34:54 +01:00
Dipak Acharya f8b0f69dd0 [Test-Only] enforce strict type checking for php api tests 2021-11-29 11:17:20 +05:45
Phil Davis a7dc0ce196 Automated changelog update [skip ci] 2021-11-28 11:22:34 +00:00
Phil Davis c907e249cb Merge pull request #2825 from owncloud/fix-create-group-no-name
[full-ci] Bugfix: Disallow creation of a group with empty name via the OCS api
2021-11-28 17:04:18 +05:45
Willy Kloucek a33b0049fc trade panic for logging on render.Render 2021-11-26 17:38:33 +01:00
Willy Kloucek 20ab79deb4 don't panic 2021-11-26 15:44:18 +01:00
Willy Kloucek 09e821178b remove expected failures 2021-11-26 13:40:55 +01:00
Willy Kloucek 0837a36ad8 Merge pull request #2824 from owncloud/dependabot/go_modules/github.com/gofrs/uuid-4.2.0incompatible
Bump github.com/gofrs/uuid from 4.1.0+incompatible to 4.2.0+incompatible
2021-11-26 13:15:44 +01:00
Willy KloucekandPhil Davis e6ca10cbc4 Update changelog/unreleased/fix-create-group-without-name.md
Co-authored-by: Phil Davis <phil@jankaritech.com>
2021-11-26 13:04:22 +01:00
Willy Kloucek dc5901b25c disallow creation of a group with empty name via the OCS api 2021-11-26 13:03:54 +01:00
Phil Davis 263ba13ffa Merge pull request #2801 from owncloud/bump-commit-id-acceptance-test-changes-waiting-2021-11
[tests-only] [full-ci] Bump commit id to use refactored core API tests
2021-11-26 17:28:03 +05:45
David Christofas 5692f8effa Merge pull request #2723 from owncloud/improver_text_preview
Allow rendering a text preview using custom fonts
2021-11-26 11:38:54 +01:00
Phil Davis 57ae1b99ea Add expected-failures for createPublicLinkShare 2021-11-26 15:41:31 +05:45
Phil Davis 7ee9300549 Add expected-failures for issue 2823 2021-11-26 14:23:58 +05:45
Phil Davis 905a1e50e4 Bump commit id to use refactored core API tests 2021-11-26 14:23:58 +05:45
dependabot[bot] cfeb02b851 Bump github.com/gofrs/uuid from 4.1.0+incompatible to 4.2.0+incompatible
Bumps [github.com/gofrs/uuid](https://github.com/gofrs/uuid) from 4.1.0+incompatible to 4.2.0+incompatible.
- [Release notes](https://github.com/gofrs/uuid/releases)
- [Commits](https://github.com/gofrs/uuid/compare/v4.1.0...v4.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-26 06:32:40 +00:00
Juan Pablo Villafáñez 79e36f08ca Simplify code, remove unneeded condition 2021-11-25 15:42:53 +01:00
Juan Pablo Villafáñez 8dbf0f27f4 Simplify code and add new tests 2021-11-25 15:42:53 +01:00
Juan Pablo Villafáñez 5dcdac6680 Refactor to simplify the code 2021-11-25 15:42:53 +01:00
Juan Pablo Villafáñez a81a85e797 Add tests for the text analyzer and fix related issues 2021-11-25 15:42:53 +01:00
Juan Pablo Villafáñez 38acfb1dbd Allow rendering a text preview using custom fonts 2021-11-25 15:42:53 +01:00
Willy Kloucek 54d450eddd Merge pull request #2817 from owncloud/ldap-deployment-example-workover
[deployment examples]  workover LDAP example
2021-11-25 14:56:23 +01:00
Ralf Haferkamp d21ca0658f graph: Add unit test for LDAP identity backend
This reworks the LDAP backend a bit to allow for mocking the ldap.Client
interface. It also add a couple of unit test for the backend
2021-11-25 14:51:52 +01:00
Ralf Haferkamp b7ec12735b go mod tidy 2021-11-25 14:51:52 +01:00
Ralf Haferkamp 026da000dc LDAP group backend for GraphAPI
This is an initial implementation of the /groups graph endpoint.
Currently it is only showing the ID and Name attributes of the groups.
Listing members is not yet supported.

As the userbackend this is still read-only and doesn't support any
advanced filtering.
2021-11-25 14:51:52 +01:00
Ralf Haferkamp f253f7bc8e graph: Groups convert CS3 code to its own backend
Until the LDAP backend is ready the existing CS3 code should keep
working.

This also adds the initial stubs for the upcoming LDAP Backend.
2021-11-25 14:51:52 +01:00
Ralf Haferkamp 76390f3d4f Rename userBackend to identityBackend
This is suppoosed to handle Groups and Users so adjust the Name
2021-11-25 14:51:52 +01:00
Ralf Haferkamp fbdcdf255c LDAP user backend for GraphAPI
This is still read-only and doesn't support any of the advanced
querying options of the graph API.
2021-11-25 14:51:52 +01:00
Ralf Haferkamp 9130cd29f3 Add helper module for LDAP with automatic reconnect
This module basically wraps ldap.Client and allows us to keep
to keep a long running LDAP connection open, which automatically
reconnects on network errors. Allows it allows to easiliy multiplex
multiple Operations on a single connection.
2021-11-25 14:30:22 +01:00
Ralf Haferkamp 61d65daa89 Make identity backend configurable for GraphAPI
In order to gradually switch to a new LDAP backend move
the existing code talking to CS3 into its own backend.
2021-11-25 14:30:22 +01:00
Alex Unger 18f2fd8f66 Automated changelog update [skip ci] 2021-11-25 13:17:46 +00:00
Alex Unger a6e70ef5e3 Merge pull request #2812 from owncloud/depreceate-app-provider-basic-env 2021-11-25 14:17:12 +01:00
Willy Kloucek 2e0c072d4a add ldap deployment example docs 2021-11-25 14:14:23 +01:00
Willy Kloucek 6d8517db75 add all demo users to the parallel deployment example 2021-11-25 14:14:23 +01:00
Willy Kloucek 7fb85fdecf add missing demo users and groups to ldap example 2021-11-25 14:14:23 +01:00
Willy Kloucek 25c516ab67 rename cs3_users_ocis deployment example to ocis_ldap 2021-11-25 14:14:23 +01:00
Willy Kloucek 5ad7939b78 Merge pull request #2821 from owncloud/fix-monitoring-configuration-deployment-examples
fix typo in debug settings and use unused port for debug
2021-11-25 12:42:01 +01:00
Willy Kloucek 09412992fe fix typo in debug settings and use unused port for debug 2021-11-25 10:40:51 +01:00
Phil Davis 7fee45d7b5 Merge pull request #2820 from owncloud/bump-commitid-20211125
[tests-only][full-ci] Bump core commit id for tests
2021-11-25 14:18:05 +05:45
Saw-jan 90bdddb664 bump core commit id for tests 2021-11-25 13:28:20 +05:45
Willy Kloucek 0fc2efadf2 rename APP_PROVIDER_BASIC_* environment variables, followup of #2811 2021-11-24 15:17:33 +01:00
Willy Kloucek 38d670f1b3 Merge pull request #2811 from owncloud/reenable-metrics-deployment-examples
reenable metrics for the deployment examples
2021-11-24 15:15:51 +01:00
Willy Kloucek bc57d13489 Merge pull request #2815 from owncloud/embed-generate-improvements
go embed / generate improvements
2021-11-24 15:09:17 +01:00
Willy Kloucek a601a2f261 ensure temporary compatiblity, so this is not a breaking PR 2021-11-24 14:15:01 +01:00
Willy Kloucek 0e13b0668f expose debug ports for monitoring in docker-compose-additions for deployment examples 2021-11-24 14:15:00 +01:00
Willy Kloucek 222683d3cd fix app provider env naming 2021-11-24 14:15:00 +01:00
Willy Kloucek 4e4c42bca9 fix debug addresses in example configurations 2021-11-24 14:15:00 +01:00
Willy Kloucek 60eccf1f88 Merge pull request #2800 from owncloud/dependabot/go_modules/github.com/grpc-ecosystem/grpc-gateway/v2-2.7.0
Bump github.com/grpc-ecosystem/grpc-gateway/v2 from 2.6.0 to 2.7.0
2021-11-24 14:04:35 +01:00
Willy Kloucek f3e5b6fac4 Automated changelog update [skip ci] 2021-11-24 13:03:48 +00:00
Willy Kloucek 9cada56222 Merge pull request #2807 from aduffeck/fix_s3ng_metadata_storage
Fix s3ng metadata storage
2021-11-24 14:03:06 +01:00
Willy Kloucek 62ff1f1659 don't run go generate anymore 2021-11-24 13:38:29 +01:00
Willy Kloucek e6df1e466d make *_SERVICE_USER_UUID a consistent option for all drivers 2021-11-24 13:26:58 +01:00
Willy Kloucek 98f11f31d9 apply ServiceUSERUUID also to metadata storage 2021-11-24 13:15:01 +01:00
Willy Kloucek 41e84b6378 add go:generate step for all go:embed steps 2021-11-24 12:56:42 +01:00
Willy Kloucek 3bbbe79683 remove embed rule which is not needed for Web 4.5.0 and later 2021-11-24 12:55:27 +01:00
Willy Kloucek fe30c89383 Automated changelog update [skip ci] 2021-11-24 11:43:59 +00:00
Willy Kloucek 0d8ef24c0b Merge pull request #2813 from owncloud/config-cleanup-1
Cleanup ocis config
2021-11-24 12:43:20 +01:00
A.Unger 36be70c714 added changelog 2021-11-24 11:48:07 +01:00
A.Unger 02b5a9d223 deleted http, grpc and debug from ocis-pkg/config/config.go 2021-11-24 11:44:32 +01:00
Viktor Scharf d9df4907f0 Merge pull request #2799 from owncloud/changeDataOfSpaceTest
Test: change data of space
2021-11-24 09:21:49 +01:00
ScharfViktor f5c763cbec add tests change space 2021-11-23 19:51:15 +01:00
André Duffeck dd6249b691 Add changelog 2021-11-23 14:10:42 +01:00
André Duffeck e221dfd8cb Fix using s3ng as the backend for the metadata storage
Fixes #2668
2021-11-23 14:10:42 +01:00
dependabot[bot] a706e55154 Bump github.com/grpc-ecosystem/grpc-gateway/v2 from 2.6.0 to 2.7.0
Bumps [github.com/grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway) from 2.6.0 to 2.7.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.6.0...v2.7.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>
2021-11-23 12:33:56 +00:00
Alex Unger 02f162c717 Automated changelog update [skip ci] 2021-11-23 12:19:14 +00:00
Alex Unger 1befac2a8f Merge pull request #2708 from owncloud/try-gookikt-config 2021-11-23 13:18:39 +01:00
A.Unger 43af041a04 reword changelog 2021-11-23 12:33:17 +01:00
Willy Kloucek 889f37f37c reimport docs makefile in storage 2021-11-23 11:34:36 +01:00
Willy Kloucek 3bc413b21f Merge pull request #2802 from owncloud/1.15_release_notes
[docs-only] oCIS 1.15 / Web 4.5.0 Release Notes
2021-11-23 11:23:11 +01:00
A.Unger 552a79c23f added changelog 2021-11-23 11:20:58 +01:00
Willy Kloucek ca55576169 fix doc generation and reenable docs pipeline in CI 2021-11-23 11:19:51 +01:00
Willy Kloucek 016bab9372 Merge pull request #2798 from owncloud/release-1.15.0
oCIS 1.15.0 release
2021-11-23 10:49:12 +01:00
Patrick MaierandPhil Davis cfa915c8c6 Update docs/ocis/release_notes.md
Co-authored-by: Phil Davis <phil@jankaritech.com>
2021-11-23 09:53:57 +01:00
A.Unger 8797cf3b5a Revert "removed redundant ocis config parsing"
This reverts commit c700ccab1f.
2021-11-22 22:27:29 +01:00
A.Unger c700ccab1f removed redundant ocis config parsing 2021-11-22 22:11:06 +01:00
Patrick Maier 2b6e5c254b oCIS 1.15 / Web 4.5.0 Release Notes 2021-11-22 13:16:43 +01:00
A.Unger 45a559f707 Revert "comment out .make/docs.mk config-docs-generate target"
This reverts commit 9c3fb1cf4c.
2021-11-20 11:40:47 +01:00
A.Unger 9c3fb1cf4c comment out .make/docs.mk config-docs-generate target 2021-11-20 11:20:36 +01:00
A.Unger 1708149820 comment docs pipeline again 2021-11-19 17:31:27 +01:00
A.Unger 1570e40221 applied review comments by @wkloucek 2021-11-19 17:18:23 +01:00
A.Unger 70da20a777 Merge branch 'master' into try-gookikt-config 2021-11-19 16:27:49 +01:00
A.Unger f64ca1f6ba introduce AlternativeID attribute, which needs some explanation 2021-11-19 16:21:55 +01:00
A.Unger 2601efb9fe Merge branch 'master' into try-gookikt-config 2021-11-19 15:55:30 +01:00
A.Unger 846df226de Merge branch 'master' into try-gookikt-config 2021-11-19 09:28:34 +01:00
A.Unger 24347180fa use ocisConfig as struct tagname to bind config files to strucg attributes 2021-11-19 09:28:23 +01:00
A.Unger c427e623ef need to populate policies in the tests 2021-11-18 11:53:04 +01:00
A.Unger c22d3fc24d prevent gookit/config to merge proxy values with default values 2021-11-18 11:44:08 +01:00
A.Unger fe61ad4154 reordered env var priorities 2021-11-17 23:08:04 +01:00
A.Unger 3d80925a84 Merge branch 'master' into try-gookikt-config 2021-11-17 22:35:53 +01:00
A.Unger ad4fb0e0f9 attempt to revert to the old status. Just triggering a CI run 2021-11-17 19:37:15 +01:00
A.Unger 872cd807e7 Revert "remove dead code from store regarding common propagation"
This reverts commit 1d127c8ab2.
2021-11-17 17:07:25 +01:00
A.Unger 1d127c8ab2 remove dead code from store regarding common propagation 2021-11-17 16:43:02 +01:00
A.Unger 592a91053b restore flags for some account commands 2021-11-17 16:41:51 +01:00
A.Unger a34f5b6434 Revert "refactor config values to constants"
This reverts commit f53504158b.
2021-11-17 13:56:14 +01:00
A.Unger f53504158b refactor config values to constants 2021-11-17 13:43:23 +01:00
A.Unger ff611633f5 Revert "fixed code smells: string literal repetition + cyclomatic complexity"
This reverts commit aa4112e2e2.
2021-11-17 13:19:31 +01:00
A.Unger aa4112e2e2 fixed code smells: string literal repetition + cyclomatic complexity 2021-11-17 12:25:21 +01:00
A.Unger c567eb6eea removed yet more flagsets 2021-11-17 11:39:32 +01:00
A.Unger f87b5bd66c removed all flagset packages 2021-11-17 11:36:28 +01:00
A.Unger c7a43916e4 disable docs pipeline 2021-11-17 11:21:02 +01:00
A.Unger 05825d8fe2 removed docs-generate build target from module storage 2021-11-17 10:24:40 +01:00
A.Unger 017eea8f2b delete storage flagsets 2021-11-17 09:47:00 +01:00
A.Unger 9c7c2b6dc9 empty commit to trigger full ci 2021-11-17 00:10:40 +01:00
A.Unger 5fe1be8611 sneaky bug 2021-11-16 23:14:56 +01:00
A.Unger 26db9afb8a undo const... 2021-11-16 16:56:28 +01:00
A.Unger 7f652ae3b4 migrate all flags to config binding mappings 2021-11-16 16:07:00 +01:00
A.Unger e139a09e49 change logging level back to error 2021-11-16 14:55:19 +01:00
A.Unger d30e776deb add more OCIS_URL missing spots in storage 2021-11-16 14:54:44 +01:00
A.Unger 7617ccaf41 increase log level and remove dead lines 2021-11-16 14:40:18 +01:00
A.Unger f4085f6dac revert ocis log level to error (CI) 2021-11-16 14:16:46 +01:00
A.Unger deba643a5b add set of env variables used on ci to the bootstrap config env parsing 2021-11-16 14:16:18 +01:00
A.Unger 658bf9acce increase logging level to see more on ci 2021-11-16 14:12:01 +01:00
A.Unger 8c307ef2bf add missing OCIS_INSECURE binding on PROXY_OIDC_INSECURE 2021-11-16 13:43:54 +01:00
A.Unger 2aa9c2457e Merge branch 'master' into try-gookikt-config 2021-11-16 13:29:07 +01:00
A.Unger 2ebc0b4a41 add missing authprovider config 2021-11-16 13:11:51 +01:00
A.Unger 8c926f2b53 Merge branch 'master' into try-gookikt-config 2021-11-16 12:25:10 +01:00
A.Unger 9a4df2f8ac Merge branch 'master' into try-gookikt-config 2021-11-16 12:24:59 +01:00
A.Unger 0d7be0d6ad set all previously set on c.StringSlice values on the bootstrap config 2021-11-16 12:22:17 +01:00
A.Unger 097c853894 populate checksum 2021-11-15 19:52:40 +01:00
A.Unger d23ab5a01a Merge branch 'master' into try-gookikt-config 2021-11-15 19:38:05 +01:00
A.Unger cfbe37de61 WIP - replace flags in storage commands 2021-11-15 16:58:22 +01:00
A.Unger fde5e35496 fix commons propagation 2021-11-15 10:38:02 +01:00
A.Unger 2b0f414b46 Revert "fix code smells"
This reverts commit a22342ea28.
2021-11-15 10:16:20 +01:00
A.Unger a22342ea28 fix code smells 2021-11-15 10:03:42 +01:00
A.Unger 242b3e9eb9 Merge branch 'master' into try-gookikt-config 2021-11-15 09:56:40 +01:00
A.Unger 4db1697f89 leftover env variables on thumbnails 2021-11-12 13:53:19 +01:00
A.Unger b6066f361f Merge branch 'master' into try-gookikt-config 2021-11-12 13:03:32 +01:00
A.Unger 732e04ca73 debug config ... trigger CI 2021-11-11 17:06:46 +01:00
A.Unger 23836bbbbc Merge branch 'master' into try-gookikt-config 2021-11-11 16:48:54 +01:00
A.Unger 9c2150422d addded webdav to the new inheritance strategy 2021-11-11 15:59:13 +01:00
A.Unger 4cecd9b5d2 addded web to the new inheritance strategy 2021-11-11 15:56:38 +01:00
A.Unger 5f19300aaa addded thumbnails to the new inheritance strategy 2021-11-11 15:52:56 +01:00
A.Unger 59f53390a8 fix all storages 2021-11-11 15:48:00 +01:00
A.Unger 582649b7d4 fix more inheritance on storages 2021-11-11 15:18:44 +01:00
A.Unger 3580e16771 losing my mind 2021-11-11 15:12:37 +01:00
A.Unger a29f10e764 adapted proxy tests to support shared.Commons 2021-11-11 14:17:24 +01:00
A.Unger 202e63bcb6 made ocs compliant with shared.Commons 2021-11-11 14:15:28 +01:00
A.Unger 34840d62e3 fix individual idp command 2021-11-11 14:06:40 +01:00
A.Unger 48eab0ccc7 add idp common options 2021-11-11 14:03:56 +01:00
A.Unger e8559d17aa fix proxy integration tests 2021-11-11 14:00:42 +01:00
A.Unger 7eb2c25d65 propagate storage common logging config 2021-11-11 13:58:19 +01:00
A.Unger c6191b7404 fix account unit tests 2021-11-11 13:46:07 +01:00
A.Unger f118357a18 graph 2021-11-11 13:18:53 +01:00
A.Unger 6391d94516 glauth 2021-11-11 13:14:19 +01:00
A.Unger 0d1c8accf2 fix deref memory location 2021-11-11 13:06:59 +01:00
A.Unger cfc9738e51 format 2021-11-11 13:06:03 +01:00
A.Unger 9b8c3838e8 Merge branch 'master' into try-gookikt-config 2021-11-11 13:04:38 +01:00
A.Unger 52d55390ab fix inheritance config on accounts command 2021-11-11 12:57:18 +01:00
A.Unger aa67106e04 sane common configurations 2021-11-11 12:51:57 +01:00
A.Unger 04d8ec86ab Merge branch 'master' into try-gookikt-config 2021-11-10 14:31:38 +01:00
A.Unger b961817519 fix proxy default config 2021-11-09 20:40:35 +01:00
A.Unger 51bee0e531 sort out flags precedence 2021-11-09 17:30:31 +01:00
Willy Kloucek 713c0bb3d2 fix oc10 ocis parallel deployment 2021-11-09 16:10:11 +01:00
Willy Kloucek e4742fbb53 fix cs3 users example 2021-11-09 15:40:22 +01:00
Willy Kloucek 16bb92f89c fix hello deployment 2021-11-09 15:22:26 +01:00
A.Unger ee03185b22 add support for json driver 2021-11-09 14:19:28 +01:00
A.Unger c335c4dc29 config dump endpoint for proxy 2021-11-09 14:14:31 +01:00
A.Unger 26aa37c2d7 reword docs 2021-11-09 12:12:34 +01:00
A.Unger 7f557d3109 Merge branch 'master' into try-gookikt-config 2021-11-09 10:20:49 +01:00
A.Unger 82a66b51d9 added shared log values to config template 2021-11-09 10:20:34 +01:00
A.Unger 2c49ee6ab9 first doc draft + glauth logging small refactor 2021-11-09 00:50:27 +01:00
A.Unger e7f9fb3bcb refactor NewLogger away to ocis-pkg 2021-11-08 19:38:40 +01:00
A.Unger 9d0809bd81 update drone star ocis debug level 2021-11-08 14:20:36 +01:00
A.Unger 1d5488a3d5 Merge branch 'master' into try-gookikt-config 2021-11-08 14:20:02 +01:00
A.Unger e308992e85 new config framework in webdav 2021-11-08 14:09:58 +01:00
A.Unger c05c3db392 new config framework in web 2021-11-08 14:08:05 +01:00
A.Unger 96033dc9b3 new config framework in thumbnails 2021-11-08 14:06:29 +01:00
A.Unger ef13618462 new config framework in store 2021-11-08 14:02:36 +01:00
A.Unger 8f99fdc902 new config framework in settings 2021-11-08 14:00:25 +01:00
A.Unger 51dc1715ce new config framework in ocs 2021-11-08 13:58:13 +01:00
A.Unger 261a800b6b new config framework in idp 2021-11-08 13:53:24 +01:00
A.Unger 6da95d3ddd new config framework in graph 2021-11-08 13:50:52 +01:00
A.Unger 3d90b21e3b new config framework in glauth 2021-11-08 13:48:07 +01:00
A.Unger bff4ec48b0 new config framework in accounts 2021-11-08 13:41:59 +01:00
A.Unger 2dd9a7b14c new config framework in proxy 2021-11-08 13:32:58 +01:00
A.Unger 8c2a681937 normalize webdav 2021-11-08 12:32:52 +01:00
A.Unger 185cee04e9 normalize web 2021-11-08 12:29:59 +01:00
A.Unger b1de937c05 fix tests 2021-11-08 12:26:17 +01:00
A.Unger f76dfc9af1 normalize thumbnails 2021-11-08 12:25:15 +01:00
A.Unger 23cfb909eb normalize store 2021-11-08 12:22:56 +01:00
A.Unger db9dc74555 normalize settings 2021-11-08 12:21:12 +01:00
A.Unger e297142529 normalize ocs 2021-11-08 12:19:26 +01:00
A.Unger a515a97c8f normalize idp 2021-11-08 12:17:23 +01:00
A.Unger 22601de351 normalize graph-explorer 2021-11-08 12:08:35 +01:00
A.Unger 4c9e4713cf normalize graph 2021-11-08 12:04:30 +01:00
A.Unger e8b9186ba3 normalize glauth 2021-11-08 12:01:08 +01:00
A.Unger d7828141f6 fix log inheritance for accounts 2021-11-08 11:51:35 +01:00
A.Unger 4999d4a04c fix test 2021-11-08 11:47:20 +01:00
A.Unger 0e9b6d8c52 fix log inheritance 2021-11-08 11:35:41 +01:00
A.Unger 74dae6dad9 add ocis-pkg/config default config + fix logging inheritance 2021-11-08 11:14:26 +01:00
A.Unger 835928b29b Merge branch 'master' into try-gookikt-config 2021-11-07 20:52:47 +01:00
A.Unger 6f27c1a100 refactor env unbinding to ocis-pkg 2021-11-07 20:52:36 +01:00
A.Unger 3206b98359 attempt to fix flags 2021-11-05 16:20:00 +01:00
A.Unger 9466e01a3c change log level to debug 2021-11-05 15:18:34 +01:00
A.Unger a55a0395eb add mapstructure to ocs 2021-11-05 15:16:03 +01:00
A.Unger b94c0e683f fix yet more offenses 2021-11-05 14:26:02 +01:00
A.Unger 8202f7b2ad fix offenses 2021-11-05 14:23:12 +01:00
A.Unger 99f28e601c migrate store to the new config scheme 2021-11-05 14:10:25 +01:00
A.Unger ad72f7574c migrate webdav to the new config scheme 2021-11-05 13:45:15 +01:00
A.Unger ca997e5bfc migrate web to the new config scheme 2021-11-05 13:33:03 +01:00
A.Unger 11855bcaab Merge branch 'master' into try-gookikt-config 2021-11-05 12:50:32 +01:00
A.Unger b44ebce526 continue thumbnails migration 2021-11-05 12:49:52 +01:00
A.Unger 17dbc3d5ee migrate settings to the new config scheme 2021-11-05 12:25:32 +01:00
A.Unger 28b0b8fccd fix ocis root flagset 2021-11-05 12:10:37 +01:00
A.Unger ff7022a256 migrate ocs to the new config scheme 2021-11-05 12:06:35 +01:00
A.Unger be9eff8ba8 add tags to structs 2021-11-05 11:37:16 +01:00
A.Unger 91c766210c migrate graph-explorer to the new config scheme 2021-11-05 11:31:35 +01:00
A.Unger ba1635165b migrate idp to the new config scheme 2021-11-05 11:15:55 +01:00
A.Unger da36ca8cde adjust flagsets 2021-11-04 15:56:01 +01:00
A.Unger a76ad08d12 fix dead code logic 2021-11-04 14:19:41 +01:00
A.Unger cfe1ac30af add graph 2021-11-04 13:50:42 +01:00
A.Unger b61887aca1 hook accounts to env variables 2021-11-04 13:16:16 +01:00
A.Unger e858fa0188 define ocis_url as a shared option in ocis-pkg/config 2021-11-04 12:58:18 +01:00
A.Unger 4194da4e88 add ocis.yaml 2021-11-04 10:53:40 +01:00
A.Unger 3d46e27aae Merge branch 'master' into try-gookikt-config 2021-11-04 09:47:26 +01:00
A.Unger 418cc97fb9 update proxy bindings 2021-11-03 16:32:11 +01:00
A.Unger 572e238dcd infere go type from destination 2021-11-03 16:01:45 +01:00
A.Unger ebd34df703 Merge branch 'master' into try-gookikt-config 2021-11-03 15:29:31 +01:00
A.Unger 7ac71b65f6 backwards compatibility with urfave/cli 2021-11-03 14:56:31 +01:00
A.Unger 90844c5c84 first draft of config loading exclusively using env vars 2021-11-03 14:46:38 +01:00
A.Unger ac373dd004 add mode mappings to proxy config struct 2021-11-03 11:49:40 +01:00
A.Unger 850fe65f4b comments for mappings 2021-11-03 11:39:23 +01:00
A.Unger 09195ffc8c use reflection to set config values from environment 2021-11-03 11:34:56 +01:00
A.Unger d54fc2f5b9 ignoring config/ ignores changes done to extensions config packages 2021-11-03 11:34:43 +01:00
A.Unger 598944bb31 Merge branch 'master' into try-gookikt-config 2021-11-03 10:27:06 +01:00
A.Unger 23d8c26b8a Merge branch 'master' into try-gookikt-config 2021-11-02 16:57:08 +01:00
A.Unger 24b3363310 rename _fs -> dirFS 2021-11-02 14:50:31 +01:00
A.Unger 2a14bb362a fix smells 2021-11-02 14:48:40 +01:00
A.Unger 2d7a394a30 Merge branch 'master' into try-gookikt-config 2021-11-02 14:21:45 +01:00
A.Unger ab1703c2e8 refactor around config parsing 2021-11-02 14:20:07 +01:00
A.Unger 10731c3878 general restructuring 2021-11-02 12:12:09 +01:00
A.Unger a767356bba provide example config + implement parse config on accounts 2021-11-02 12:09:21 +01:00
A.Unger 7ca93450a2 adjust accounts flagset, replace new with defaultconfig 2021-11-02 11:29:52 +01:00
A.Unger 20b6d0a635 add DefaultConfig on accounts 2021-11-02 10:57:25 +01:00
A.Unger 7fa70d7d7e Merge branch 'master' into try-gookikt-config 2021-11-02 10:00:00 +01:00
A.Unger 7df000d06f parse config regardless of supervised / unsupervised 2021-10-31 00:30:48 +02:00
A.Unger 18b55367fa Merge branch 'master' into try-gookikt-config 2021-10-31 00:09:02 +02:00
A.Unger 711acbb354 inherit logging config from ocis.yaml, let extensions overwrite their logging. Considering using a package level global logging... 2021-10-31 00:08:46 +02:00
A.Unger 998df71ae3 poors man struct inheritance and perpetuity 2021-10-29 23:41:41 +02:00
A.Unger 94aeefb7fd first examples of config parsing 2021-10-29 16:15:35 +02:00
A.Unger 34253fcae2 remove flagset on proxy, use default config values 2021-10-29 11:51:08 +02:00
333 changed files with 10668 additions and 10984 deletions

No files matched your search

-2
View File
@@ -12,8 +12,6 @@ exclude_paths:
- 'idp/scripts/**'
- 'settings/rollup.config.js'
- 'accounts/rollup.config.js'
- 'ocis/docker/eos-ocis/Dockerfile'
- 'ocis/docker/eos-ocis-dev/Dockerfile'
- 'deployments/**'
- 'tests/acceptance/expected-failures-*.md'
- 'tests/acceptance/features/bootstrap/**'
+3 -3
View File
@@ -1,7 +1,7 @@
# The test runner source for API tests
CORE_COMMITID=6a55f750d8a3f34c6c7772355f9281ffb8ffb4ca
CORE_BRANCH=master
CORE_COMMITID=4bbd91de68aefdf94c03d2920a3353702f856280
CORE_BRANCH=acceptance-test-changes-waiting-2021-11
# The test runner source for UI tests
WEB_COMMITID=82e69d203bfb44a2a652a4c052fe7ce795bb1100
WEB_COMMITID=ed4a8b32240b59666a6c2b162d95b50ff7191eb8
WEB_BRANCH=master
+55 -83
View File
@@ -1,4 +1,4 @@
"""oCIS CI defintion
"""oCIS CI definition
"""
# images
@@ -6,6 +6,7 @@ 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"
MINIO_MC = "minio/mc:RELEASE.2021-10-07T04-19-58Z"
# configuration
@@ -140,7 +141,6 @@ def main(ctx):
build_release_pipelines = \
dockerReleases(ctx) + \
[dockerEos(ctx)] + \
binaryReleases(ctx) + \
[releaseSubmodule(ctx)]
@@ -578,7 +578,7 @@ def uiTestPipeline(ctx, filterTags, early_fail, runPart = 1, numberOfParts = 1,
"arch": "amd64",
},
"steps": skipIfUnchanged(ctx, "acceptance-tests") + restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin/ocis") +
ocisServer(storage, accounts_hash_difficulty, [stepVolumeOC10Tests]) + [
ocisServer(storage, accounts_hash_difficulty, [stepVolumeOC10Tests]) + waitForSeleniumService() + waitForMiddlewareService() + [
{
"name": "webUITests",
"image": OC_CI_NODEJS,
@@ -595,6 +595,7 @@ def uiTestPipeline(ctx, filterTags, early_fail, runPart = 1, numberOfParts = 1,
"RUN_PART": runPart,
"DIVIDE_INTO_NUM_PARTS": numberOfParts,
"EXPECTED_FAILURES_FILE": "/drone/src/tests/acceptance/expected-failures-webUI-on-%s-storage%s.md" % (storage.upper(), expectedFailuresFileFilterTags),
"MIDDLEWARE_HOST": "http://middleware:3000",
},
"commands": [
". /drone/src/.drone.env",
@@ -616,7 +617,7 @@ def uiTestPipeline(ctx, filterTags, early_fail, runPart = 1, numberOfParts = 1,
}],
},
] + failEarly(ctx, early_fail),
"services": selenium(),
"services": selenium() + middlewareService(),
"volumes": [pipelineVolumeOC10Tests] +
[{
"name": "uploads",
@@ -644,7 +645,7 @@ def accountsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
"arch": "amd64",
},
"steps": skipIfUnchanged(ctx, "acceptance-tests") + restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin/ocis") +
ocisServer(storage, accounts_hash_difficulty, [stepVolumeOC10Tests]) + [
ocisServer(storage, accounts_hash_difficulty, [stepVolumeOC10Tests]) + waitForSeleniumService() + waitForMiddlewareService() + [
{
"name": "WebUIAcceptanceTests",
"image": OC_CI_NODEJS,
@@ -659,6 +660,7 @@ def accountsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
"NODE_TLS_REJECT_UNAUTHORIZED": 0,
"WEB_PATH": "/srv/app/web",
"FEATURE_PATH": "/drone/src/accounts/ui/tests/acceptance/features",
"MIDDLEWARE_HOST": "http://middleware:3000",
},
"commands": [
". /drone/src/.drone.env",
@@ -679,7 +681,7 @@ def accountsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
}],
},
] + failEarly(ctx, early_fail),
"services": selenium(),
"services": selenium() + middlewareService(),
"volumes": [stepVolumeOC10Tests] +
[{
"name": "uploads",
@@ -707,7 +709,7 @@ def settingsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
"arch": "amd64",
},
"steps": skipIfUnchanged(ctx, "acceptance-tests") + restoreBuildArtifactCache(ctx, "ocis-binary-amd64", "ocis/bin/ocis") +
ocisServer(storage, accounts_hash_difficulty, [stepVolumeOC10Tests]) + [
ocisServer(storage, accounts_hash_difficulty, [stepVolumeOC10Tests]) + waitForSeleniumService() + waitForMiddlewareService() + [
{
"name": "WebUIAcceptanceTests",
"image": OC_CI_NODEJS,
@@ -722,6 +724,7 @@ def settingsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
"NODE_TLS_REJECT_UNAUTHORIZED": 0,
"WEB_PATH": "/srv/app/web",
"FEATURE_PATH": "/drone/src/settings/ui/tests/acceptance/features",
"MIDDLEWARE_HOST": "http://middleware:3000",
},
"commands": [
". /drone/src/.drone.env",
@@ -747,7 +750,7 @@ def settingsUITests(ctx, storage = "ocis", accounts_hash_difficulty = 4):
"name": "redis",
"image": "redis:6-alpine",
},
] + selenium(),
] + selenium() + middlewareService(),
"volumes": [stepVolumeOC10Tests] +
[{
"name": "uploads",
@@ -783,7 +786,7 @@ def failEarly(ctx, early_fail):
"image": "thegeeklab/drone-github-comment:1",
"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 successfull CI run
"key": "pr-${DRONE_PULL_REQUEST}", #TODO: we could delete the comment after a successful CI run
"update": "true",
"api_key": {
"from_secret": "github_token",
@@ -921,78 +924,6 @@ def dockerRelease(ctx, arch):
"volumes": [pipelineVolumeGo],
}
def dockerEos(ctx):
return {
"kind": "pipeline",
"type": "docker",
"name": "docker-eos-ocis",
"platform": {
"os": "linux",
"arch": "amd64",
},
"steps": skipIfUnchanged(ctx, "build-docker") +
makeNodeGenerate("") +
makeGoGenerate("") + [
{
"name": "build",
"image": OC_CI_GOLANG,
"commands": [
"make -C ocis release-linux-docker-amd64",
],
},
{
"name": "dryrun-eos-ocis",
"image": "plugins/docker:latest",
"settings": {
"dry_run": True,
"context": "ocis",
"tags": "linux-eos-ocis",
"dockerfile": "ocis/docker/eos-ocis/Dockerfile",
"repo": "owncloud/eos-ocis",
},
"when": {
"ref": {
"include": [
"refs/pull/**",
],
},
},
},
{
"name": "docker-eos-ocis",
"image": "plugins/docker:latest",
"settings": {
"username": {
"from_secret": "docker_username",
},
"password": {
"from_secret": "docker_password",
},
"auto_tag": True,
"context": "ocis",
"dockerfile": "ocis/docker/eos-ocis/Dockerfile",
"repo": "owncloud/eos-ocis",
},
"when": {
"ref": {
"exclude": [
"refs/pull/**",
],
},
},
},
],
"depends_on": getPipelineNames(testOcisModules(ctx) + testPipelines(ctx)),
"trigger": {
"ref": [
"refs/heads/master",
"refs/tags/v*",
"refs/pull/**",
],
},
"volumes": [pipelineVolumeGo],
}
def binaryReleases(ctx):
pipelines = []
for os in config["binaryReleases"]["os"]:
@@ -1490,6 +1421,38 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = []):
},
]
def middlewareService():
return [{
"name": "middleware",
"image": "owncloud/owncloud-test-middleware",
"pull": "always",
"environment": {
"BACKEND_HOST": "https://ocis-server:9200",
"OCIS_REVA_DATA_ROOT": "/srv/app/tmp/ocis/storage/owncloud/",
"RUN_ON_OCIS": "true",
"HOST": "middleware",
"REMOTE_UPLOAD_DIR": "/uploads",
"NODE_TLS_REJECT_UNAUTHORIZED": "0",
"MIDDLEWARE_HOST": "middleware",
},
"volumes": [{
"name": "uploads",
"path": "/uploads",
}, {
"name": "gopath",
"path": "/srv/app",
}],
}]
def waitForMiddlewareService():
return [{
"name": "wait-for-middleware-service",
"image": OC_CI_WAIT_FOR,
"commands": [
"wait-for -it middleware:3000 -t 300",
],
}]
def cloneCoreRepos():
return [
{
@@ -1532,6 +1495,15 @@ def selenium():
},
]
def waitForSeleniumService():
return [{
"name": "wait-for-selenium-service",
"image": OC_CI_WAIT_FOR,
"commands": [
"wait-for -it selenium:4444 -t 300",
],
}]
def build():
return [
{
@@ -1589,7 +1561,7 @@ def skipIfUnchanged(ctx, type):
def example_deploys(ctx):
latest_configs = [
"cs3_users_ocis/latest.yml",
"ocis_ldap/latest.yml",
"ocis_keycloak/latest.yml",
"ocis_traefik/latest.yml",
"ocis_wopi/latest.yml",
@@ -1598,7 +1570,7 @@ def example_deploys(ctx):
"oc10_ocis_parallel/latest.yml",
]
released_configs = [
"cs3_users_ocis/released.yml",
"ocis_ldap/released.yml",
"ocis_keycloak/released.yml",
"ocis_traefik/released.yml",
"ocis_wopi/released.yml",
-1
View File
@@ -13,7 +13,6 @@ node_modules/
ocis/ocis
ocis/cmd/ocis/__debug_bin
ocis/cmd/ocis/config/
config/
.idea
+6 -4
View File
@@ -3,10 +3,12 @@ SKIP_CONFIG_DOCS_GENERATE ?= 0
CONFIG_DOCS_BASE_PATH ?= ../docs/extensions
.PHONY: config-docs-generate
config-docs-generate: $(FLAEX)
@if [ $(SKIP_CONFIG_DOCS_GENERATE) -ne 1 ]; then \
$(FLAEX) >| $(CONFIG_DOCS_BASE_PATH)/$(NAME)/configuration.md \
; fi;
config-docs-generate: #$(FLAEX)
# since https://github.com/owncloud/ocis/pull/2708 flaex can no longer be used
# TODO: how to document configuration
# @if [ $(SKIP_CONFIG_DOCS_GENERATE) -ne 1 ]; then \
# $(FLAEX) >| $(CONFIG_DOCS_BASE_PATH)/$(NAME)/configuration.md \
# ; fi;
.PHONY: grpc-docs-generate
grpc-docs-generate: buf-generate
+2 -2
View File
@@ -20,6 +20,6 @@
// set insecure options because we don't have valid certificates in dev environments
"OCIS_INSECURE": "true",
}
},
}
]
}
}
+127
View File
@@ -1,3 +1,130 @@
# Changelog for [unreleased] (UNRELEASED)
The following sections list the changes for unreleased.
[unreleased]: https://github.com/owncloud/ocis/compare/v1.15.0...master
## Summary
* Bugfix - Fix claim selector based routing for basic auth: [#2779](https://github.com/owncloud/ocis/pull/2779)
* Bugfix - Disallow creation of a group with empty name via the OCS api: [#2825](https://github.com/owncloud/ocis/pull/2825)
* Bugfix - Fix using s3ng as the metadata storage backend: [#2807](https://github.com/owncloud/ocis/pull/2807)
* Bugfix - Use the CS3api up- and download workflow for the accounts service: [#2837](https://github.com/owncloud/ocis/pull/2837)
* Change - Rename `APP_PROVIDER_BASIC_*` environment variables: [#2812](https://github.com/owncloud/ocis/pull/2812)
* Change - Restructure Configuration Parsing: [#2708](https://github.com/owncloud/ocis/pull/2708)
* Change - OIDC: fallback if IDP doesn't provide "preferred_username" claim: [#2644](https://github.com/owncloud/ocis/issues/2644)
* Enhancement - Cleanup ocis-pkg config: [#2813](https://github.com/owncloud/ocis/pull/2813)
* Enhancement - Correct shutdown of services under runtime: [#2843](https://github.com/owncloud/ocis/pull/2843)
* Enhancement - Update REVA to v1.17.0: [#2849](https://github.com/owncloud/ocis/pull/2849)
* Enhancement - Update ownCloud Web to v4.6.0: [#2846](https://github.com/owncloud/ocis/pull/2846)
## Details
* Bugfix - Fix claim selector based routing for basic auth: [#2779](https://github.com/owncloud/ocis/pull/2779)
We've fixed the claim selector based routing for requests using basic auth. Previously
requests using basic auth have always been routed to the DefaultPolicy when using the claim
selector despite the set cookie because the basic auth middleware fakes some OIDC claims.
Now the cookie is checked before routing to the DefaultPolicy and therefore set cookie will
also be respected for requests using basic auth.
https://github.com/owncloud/ocis/pull/2779
* Bugfix - Disallow creation of a group with empty name via the OCS api: [#2825](https://github.com/owncloud/ocis/pull/2825)
We've fixed the behavior for group creation on the OCS api, where it was possible to create a
group with an empty name. This was is not possible on oC10 and is therefore also forbidden on oCIS
to keep compatibility. This PR forbids the creation and also ensures the correct status code
for both OCS v1 and OCS v2 apis.
https://github.com/owncloud/ocis/issues/2823
https://github.com/owncloud/ocis/pull/2825
* Bugfix - Fix using s3ng as the metadata storage backend: [#2807](https://github.com/owncloud/ocis/pull/2807)
It is now possible to use s3ng as the metadata storage backend.
https://github.com/owncloud/ocis/issues/2668
https://github.com/owncloud/ocis/pull/2807
* Bugfix - Use the CS3api up- and download workflow for the accounts service: [#2837](https://github.com/owncloud/ocis/pull/2837)
We've fixed the interaction of the accounts service with the metadata storage after bypassing
the InitiateUpload and InitiateDownload have been removed from various storage drivers. The
accounts service now uses the proper CS3apis workflow for up- and downloads.
https://github.com/owncloud/ocis/pull/2837
https://github.com/cs3org/reva/pull/2309
* Change - Rename `APP_PROVIDER_BASIC_*` environment variables: [#2812](https://github.com/owncloud/ocis/pull/2812)
We've renamed the `APP_PROVIDER_BASIC_*` to `APP_PROVIDER_*` since the `_BASIC_` part is a
copy and paste error. Now all app provider environment variables are consistently starting
with `APP_PROVIDER_*`.
https://github.com/owncloud/ocis/pull/2812
https://github.com/owncloud/ocis/pull/2811
* Change - Restructure Configuration Parsing: [#2708](https://github.com/owncloud/ocis/pull/2708)
Tags: ocis
CLI flags are no longer needed for subcommands, as we rely solely on env variables and config
files. This greatly simplifies configuration and deployment.
https://github.com/owncloud/ocis/pull/2708
* Change - OIDC: fallback if IDP doesn't provide "preferred_username" claim: [#2644](https://github.com/owncloud/ocis/issues/2644)
Some IDPs don't add the "preferred_username" claim. Fallback to the "email" claim in that case
https://github.com/owncloud/ocis/issues/2644
* Enhancement - Cleanup ocis-pkg config: [#2813](https://github.com/owncloud/ocis/pull/2813)
Certain values were of no use when configuring the ocis runtime.
https://github.com/owncloud/ocis/pull/2813
* Enhancement - Correct shutdown of services under runtime: [#2843](https://github.com/owncloud/ocis/pull/2843)
Supervised goroutines now shut themselves down on context cancellation propagation.
https://github.com/owncloud/ocis/pull/2843
* Enhancement - Update REVA to v1.17.0: [#2849](https://github.com/owncloud/ocis/pull/2849)
Updated REVA to v1.17.0 This update includes:
* Fix [cs3org/reva#2305](https://github.com/cs3org/reva/pull/2305): Make sure /app/new takes `target` as absolute path
* Fix [cs3org/reva#2303](https://github.com/cs3org/reva/pull/2303): Fix content disposition header for public links files
* Fix [cs3org/reva#2316](https://github.com/cs3org/reva/pull/2316): Fix the share types in propfinds
* Fix [cs3org/reva#2803](https://github.com/cs3org/reva/pull/2803): Fix app provider for editor public links
* Fix [cs3org/reva#2298](https://github.com/cs3org/reva/pull/2298): Remove share refs from trashbin
* Fix [cs3org/reva#2309](https://github.com/cs3org/reva/pull/2309): Remove early finish for zero byte file uploads
* Fix [cs3org/reva#1941](https://github.com/cs3org/reva/pull/1941): Fix TUS uploads with transfer token only
* Chg [cs3org/reva#2210](https://github.com/cs3org/reva/pull/2210): Fix app provider new file creation and improved error codes
* Enh [cs3org/reva#2217](https://github.com/cs3org/reva/pull/2217): OIDC auth driver for ESCAPE IAM
* Enh [cs3org/reva#2256](https://github.com/cs3org/reva/pull/2256): Return user type in the response of the ocs GET user call
* Enh [cs3org/reva#2315](https://github.com/cs3org/reva/pull/2315): Add new attributes to public link propfinds
* Enh [cs3org/reva#2740](https://github.com/cs3org/reva/pull/2740): Implement space membership endpoints
* Enh [cs3org/reva#2252](https://github.com/cs3org/reva/pull/2252): Add the xattr sys.acl to SysACL (eosgrpc)
* Enh [cs3org/reva#2314](https://github.com/cs3org/reva/pull/2314): OIDC: fallback if IDP doesn't provide "preferred_username" claim
https://github.com/owncloud/ocis/pull/2849
https://github.com/owncloud/ocis/pull/2835
https://github.com/owncloud/ocis/pull/2837
* Enhancement - Update ownCloud Web to v4.6.0: [#2846](https://github.com/owncloud/ocis/pull/2846)
Tags: web
We updated ownCloud Web to v4.6.0. Please refer to the changelog (linked) for details on the web
release.
https://github.com/owncloud/ocis/pull/2846
https://github.com/owncloud/web/releases/tag/v4.6.0
# Changelog for [1.15.0] (2021-11-19)
The following sections list the changes for 1.15.0.
+1
View File
@@ -4,5 +4,6 @@ import (
"embed"
)
//go:generate make generate
//go:embed assets/*
var Assets embed.FS
+1 -1
View File
@@ -8,7 +8,7 @@ import (
)
func main() {
if err := command.Execute(config.New()); err != nil {
if err := command.Execute(config.DefaultConfig()); err != nil {
os.Exit(1)
}
}
+2 -1
View File
@@ -5,10 +5,11 @@ import (
"os"
"strconv"
"github.com/owncloud/ocis/accounts/pkg/flagset"
"github.com/asim/go-micro/plugins/client/grpc/v4"
tw "github.com/olekukonko/tablewriter"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/accounts/pkg/flagset"
accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0"
"github.com/urfave/cli/v2"
)
+2 -1
View File
@@ -5,10 +5,11 @@ import (
"os"
"strconv"
"github.com/owncloud/ocis/accounts/pkg/flagset"
"github.com/asim/go-micro/plugins/client/grpc/v4"
tw "github.com/olekukonko/tablewriter"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/accounts/pkg/flagset"
accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0"
"github.com/urfave/cli/v2"
)
+2 -1
View File
@@ -4,9 +4,10 @@ import (
"fmt"
"os"
"github.com/owncloud/ocis/accounts/pkg/flagset"
"github.com/asim/go-micro/plugins/client/grpc/v4"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/accounts/pkg/flagset"
accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0"
"github.com/urfave/cli/v2"
)
+21 -66
View File
@@ -3,24 +3,16 @@ package command
import (
"context"
"os"
"strings"
"github.com/owncloud/ocis/ocis-pkg/shared"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/accounts/pkg/flagset"
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
"github.com/owncloud/ocis/ocis-pkg/log"
"github.com/owncloud/ocis/ocis-pkg/sync"
"github.com/owncloud/ocis/ocis-pkg/version"
"github.com/spf13/viper"
"github.com/thejerf/suture/v4"
"github.com/urfave/cli/v2"
)
var (
defaultConfigPaths = []string{"/etc/ocis", "$HOME/.ocis", "./config"}
defaultFilename = "accounts"
)
// Execute is the entry point for the ocis-accounts command.
func Execute(cfg *config.Config) error {
app := &cli.App{
@@ -28,16 +20,12 @@ func Execute(cfg *config.Config) error {
Version: version.String,
Usage: "Provide accounts and groups for oCIS",
Compiled: version.Compiled(),
Authors: []*cli.Author{
{
Name: "ownCloud GmbH",
Email: "support@owncloud.com",
},
},
Flags: flagset.RootWithConfig(cfg),
Before: func(c *cli.Context) error {
cfg.Server.Version = version.String
return ParseConfig(c, cfg)
@@ -68,60 +56,30 @@ func Execute(cfg *config.Config) error {
return app.Run(os.Args)
}
// NewLogger initializes a service-specific logger instance.
func NewLogger(cfg *config.Config) log.Logger {
return log.NewLogger(
log.Name("accounts"),
log.Level(cfg.Log.Level),
log.Pretty(cfg.Log.Pretty),
log.Color(cfg.Log.Color),
log.File(cfg.Log.File),
)
}
// ParseConfig loads accounts configuration from Viper known paths.
// ParseConfig loads accounts configuration from known paths.
func ParseConfig(c *cli.Context, cfg *config.Config) error {
sync.ParsingViperConfig.Lock()
defer sync.ParsingViperConfig.Unlock()
logger := NewLogger(cfg)
conf, err := ociscfg.BindSourcesToStructs("accounts", cfg)
if err != nil {
return err
}
viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
viper.SetEnvPrefix("ACCOUNTS")
viper.AutomaticEnv()
if c.IsSet("config-file") {
viper.SetConfigFile(c.String("config-file"))
} else {
viper.SetConfigName(defaultFilename)
for _, v := range defaultConfigPaths {
viper.AddConfigPath(v)
// 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 = &shared.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.Commons == nil {
cfg.Log = &shared.Log{}
}
if err := viper.ReadInConfig(); err != nil {
switch err.(type) {
case viper.ConfigFileNotFoundError:
logger.Debug().
Msg("no config found on preconfigured location")
case viper.UnsupportedConfigError:
logger.Fatal().
Err(err).
Msg("Unsupported config type")
default:
logger.Fatal().
Err(err).
Msg("Failed to read config")
}
}
// load all env variables relevant to the config in the current context.
conf.LoadOSEnv(config.GetEnv(cfg), false)
if err := viper.Unmarshal(&cfg); err != nil {
logger.Fatal().
Err(err).
Msg("Failed to parse config")
}
return nil
bindings := config.StructMappings(cfg)
return ociscfg.BindEnv(conf, bindings)
}
// SutureService allows for the accounts command to be embedded and supervised by a suture supervisor tree.
@@ -131,10 +89,7 @@ type SutureService struct {
// NewSutureService creates a new accounts.SutureService
func NewSutureService(cfg *ociscfg.Config) suture.Service {
if cfg.Mode == 0 {
cfg.Accounts.Supervised = true
}
cfg.Accounts.Log.File = cfg.Log.File
cfg.Accounts.Commons = cfg.Commons
return SutureService{
cfg: cfg.Accounts,
}
+5 -23
View File
@@ -4,11 +4,10 @@ import (
"context"
"strings"
"github.com/owncloud/ocis/ocis-pkg/sync"
"github.com/owncloud/ocis/ocis-pkg/log"
"github.com/oklog/run"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/accounts/pkg/flagset"
"github.com/owncloud/ocis/accounts/pkg/metrics"
"github.com/owncloud/ocis/accounts/pkg/server/grpc"
"github.com/owncloud/ocis/accounts/pkg/server/http"
@@ -23,34 +22,21 @@ func Server(cfg *config.Config) *cli.Command {
Name: "server",
Usage: "Start ocis accounts service",
Description: "uses an LDAP server as the storage backend",
Flags: flagset.ServerWithConfig(cfg),
Before: func(ctx *cli.Context) error {
logger := NewLogger(cfg)
if cfg.HTTP.Root != "/" {
cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
}
cfg.Repo.Backend = strings.ToLower(cfg.Repo.Backend)
// When running on single binary mode the before hook from the root command won't get called. We manually
// call this before hook from ocis command, so the configuration can be loaded.
if !cfg.Supervised {
return ParseConfig(ctx, cfg)
if err := ParseConfig(ctx, cfg); err != nil {
return err
}
if origins := ctx.StringSlice("cors-allowed-origins"); len(origins) != 0 {
cfg.HTTP.CORS.AllowedOrigins = origins
}
if methods := ctx.StringSlice("cors-allowed-methods"); len(methods) != 0 {
cfg.HTTP.CORS.AllowedMethods = methods
}
if headers := ctx.StringSlice("cors-allowed-headers"); len(headers) != 0 {
cfg.HTTP.CORS.AllowedOrigins = headers
}
logger.Debug().Str("service", "accounts").Msg("ignoring config file parsing when running supervised")
return nil
},
Action: func(c *cli.Context) error {
logger := NewLogger(cfg)
logger := log.LoggerFromConfig("accounts", *cfg.Log)
err := tracing.Configure(cfg)
if err != nil {
return err
@@ -97,10 +83,6 @@ func Server(cfg *config.Config) *cli.Command {
cancel()
})
if !cfg.Supervised {
sync.Trap(&gr, cancel)
}
return gr.Run()
},
}
+2 -2
View File
@@ -4,9 +4,10 @@ import (
"errors"
"fmt"
"github.com/owncloud/ocis/accounts/pkg/flagset"
"github.com/asim/go-micro/plugins/client/grpc/v4"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/accounts/pkg/flagset"
accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0"
"github.com/urfave/cli/v2"
"google.golang.org/genproto/protobuf/field_mask"
@@ -24,7 +25,6 @@ func UpdateAccount(cfg *config.Config) *cli.Command {
Flags: flagset.UpdateAccountWithConfig(cfg, a),
Before: func(c *cli.Context) error {
if len(c.StringSlice("password_policies")) > 0 {
// StringSliceFlag doesn't support Destination
a.PasswordProfile.PasswordPolicies = c.StringSlice("password_policies")
}
-2
View File
@@ -8,7 +8,6 @@ import (
tw "github.com/olekukonko/tablewriter"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/accounts/pkg/flagset"
"github.com/urfave/cli/v2"
)
@@ -17,7 +16,6 @@ func PrintVersion(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "version",
Usage: "Print the versions of the running instances",
Flags: flagset.ListAccountsWithConfig(cfg),
Action: func(c *cli.Context) error {
reg := registry.GetRegistry()
services, err := reg.GetService(cfg.GRPC.Namespace + "." + cfg.Server.Name)
+147 -72
View File
@@ -1,140 +1,141 @@
// Package config should be moved to internal
package config
import "context"
import (
"context"
"path"
"github.com/owncloud/ocis/ocis-pkg/shared"
"github.com/owncloud/ocis/ocis-pkg/config/defaults"
)
// LDAP defines the available ldap configuration.
type LDAP struct {
Hostname string
Port int
BaseDN string
UserFilter string
GroupFilter string
BindDN string
BindPassword string
IDP string
Schema LDAPSchema
Hostname string `ocisConfig:"hostname"`
Port int `ocisConfig:"port"`
BaseDN string `ocisConfig:"base_dn"`
UserFilter string `ocisConfig:"user_filter"`
GroupFilter string `ocisConfig:"group_filter"`
BindDN string `ocisConfig:"bind_dn"`
BindPassword string `ocisConfig:"bind_password"`
IDP string `ocisConfig:"idp"`
Schema LDAPSchema `ocisConfig:"schema"`
}
// LDAPSchema defines the available ldap schema configuration.
type LDAPSchema struct {
AccountID string
Identities string
Username string
DisplayName string
Mail string
Groups string
AccountID string `ocisConfig:"account_id"`
Identities string `ocisConfig:"identities"`
Username string `ocisConfig:"username"`
DisplayName string `ocisConfig:"display_name"`
Mail string `ocisConfig:"mail"`
Groups string `ocisConfig:"groups"`
}
// CORS defines the available cors configuration.
type CORS struct {
AllowedOrigins []string
AllowedMethods []string
AllowedHeaders []string
AllowCredentials bool
AllowedOrigins []string `ocisConfig:"allowed_origins"`
AllowedMethods []string `ocisConfig:"allowed_methods"`
AllowedHeaders []string `ocisConfig:"allowed_headers"`
AllowCredentials bool `ocisConfig:"allowed_credentials"`
}
// HTTP defines the available http configuration.
type HTTP struct {
Addr string
Namespace string
Root string
CacheTTL int
CORS CORS
Addr string `ocisConfig:"addr"`
Namespace string `ocisConfig:"namespace"`
Root string `ocisConfig:"root"`
CacheTTL int `ocisConfig:"cache_ttl"`
CORS CORS `ocisConfig:"cors"`
}
// GRPC defines the available grpc configuration.
type GRPC struct {
Addr string
Namespace string
Addr string `ocisConfig:"addr"`
Namespace string `ocisConfig:"namespace"`
}
// Server configures a server.
type Server struct {
Version string
Name string
HashDifficulty int
DemoUsersAndGroups bool
Version string `ocisConfig:"version"`
Name string `ocisConfig:"name"`
HashDifficulty int `ocisConfig:"hash_difficulty"`
DemoUsersAndGroups bool `ocisConfig:"demo_users_and_groups"`
}
// Asset defines the available asset configuration.
type Asset struct {
Path string
Path string `ocisConfig:"path"`
}
// TokenManager is the config for using the reva token manager
type TokenManager struct {
JWTSecret string
}
// Log defines the available logging configuration.
type Log struct {
Level string
Pretty bool
Color bool
File string
JWTSecret string `ocisConfig:"jwt_secret"`
}
// Repo defines which storage implementation is to be used.
type Repo struct {
Backend string
Disk Disk
CS3 CS3
Backend string `ocisConfig:"backend"`
Disk Disk `ocisConfig:"disk"`
CS3 CS3 `ocisConfig:"cs3"`
}
// Disk is the local disk implementation of the storage.
type Disk struct {
Path string
Path string `ocisConfig:"path"`
}
// CS3 is the cs3 implementation of the storage.
type CS3 struct {
ProviderAddr string
DataURL string
DataPrefix string
JWTSecret string
ProviderAddr string `ocisConfig:"provider_addr"`
JWTSecret string `ocisConfig:"jwt_secret"`
}
// ServiceUser defines the user required for EOS.
type ServiceUser struct {
UUID string
Username string
UID int64
GID int64
UUID string `ocisConfig:"uuid"`
Username string `ocisConfig:"username"`
UID int64 `ocisConfig:"uid"`
GID int64 `ocisConfig:"gid"`
}
// Index defines config for indexes.
type Index struct {
UID, GID Bound
UID Bound `ocisConfig:"uid"`
GID Bound `ocisConfig:"gid"`
}
// Bound defines a lower and upper bound.
type Bound struct {
Lower, Upper int64
Lower int64 `ocisConfig:"lower"`
Upper int64 `ocisConfig:"upper"`
}
// Tracing defines the available tracing configuration.
type Tracing struct {
Enabled bool
Type string
Endpoint string
Collector string
Service string
Enabled bool `ocisConfig:"enabled"`
Type string `ocisConfig:"type"`
Endpoint string `ocisConfig:"endpoint"`
Collector string `ocisConfig:"collector"`
Service string `ocisConfig:"service"`
}
// Config merges all Account config parameters.
type Config struct {
LDAP LDAP
HTTP HTTP
GRPC GRPC
Server Server
Asset Asset
Log Log
TokenManager TokenManager
Repo Repo
Index Index
ServiceUser ServiceUser
Tracing Tracing
*shared.Commons
LDAP LDAP `ocisConfig:"ldap"`
HTTP HTTP `ocisConfig:"http"`
GRPC GRPC `ocisConfig:"grpc"`
Server Server `ocisConfig:"server"`
Asset Asset `ocisConfig:"asset"`
Log *shared.Log `ocisConfig:"log"`
TokenManager TokenManager `ocisConfig:"token_manager"`
Repo Repo `ocisConfig:"repo"`
Index Index `ocisConfig:"index"`
ServiceUser ServiceUser `ocisConfig:"service_user"`
Tracing Tracing `ocisConfig:"tracing"`
Context context.Context
Supervised bool
@@ -142,5 +143,79 @@ type Config struct {
// New returns a new config.
func New() *Config {
return &Config{}
return &Config{
Log: &shared.Log{},
}
}
func DefaultConfig() *Config {
return &Config{
LDAP: LDAP{},
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",
},
Server: Server{
Name: "accounts",
HashDifficulty: 11,
DemoUsersAndGroups: true,
},
Asset: Asset{},
TokenManager: TokenManager{
JWTSecret: "Pive-Fumkiu4",
},
Repo: Repo{
Backend: "CS3",
Disk: Disk{
Path: path.Join(defaults.BaseDataPath(), "accounts"),
},
CS3: CS3{
ProviderAddr: "localhost:9215",
JWTSecret: "Pive-Fumkiu4",
},
},
Index: Index{
UID: Bound{
Lower: 0,
Upper: 1000,
},
GID: Bound{
Lower: 0,
Upper: 1000,
},
},
ServiceUser: ServiceUser{
UUID: "95cb8724-03b2-11eb-a0a6-c33ef8ef53ad",
Username: "",
UID: 0,
GID: 0,
},
Tracing: Tracing{
Type: "jaeger",
Service: "accounts",
},
}
}
// GetEnv fetches a list of known env variables for this extension. It is to be used by gookit, as it provides a list
// with all the environment variables an extension supports.
func GetEnv(cfg *Config) []string {
var r = make([]string, len(structMappings(cfg)))
for i := range structMappings(cfg) {
r = append(r, structMappings(cfg)[i].EnvVars...)
}
return r
}
+140
View File
@@ -0,0 +1,140 @@
package config
import "github.com/owncloud/ocis/ocis-pkg/shared"
// StructMappings binds a set of environment variables to a destination on cfg. Iterating over this set and editing the
// Destination value of a binding will alter the original value, as it is a pointer to its memory address. This lets
// us propagate changes easier.
func StructMappings(cfg *Config) []shared.EnvBinding {
return structMappings(cfg)
}
// structMappings binds a set of environment variables to a destination on cfg.
func structMappings(cfg *Config) []shared.EnvBinding {
return []shared.EnvBinding{
{
EnvVars: []string{"OCIS_LOG_FILE", "ACCOUNTS_LOG_FILE"},
Destination: &cfg.Log.File,
},
{
EnvVars: []string{"OCIS_LOG_COLOR", "ACCOUNTS_LOG_COLOR"},
Destination: &cfg.Log.Color,
},
{
EnvVars: []string{"OCIS_LOG_PRETTY", "ACCOUNTS_LOG_PRETTY"},
Destination: &cfg.Log.Pretty,
},
{
EnvVars: []string{"OCIS_TRACING_ENABLED", "ACCOUNTS_TRACING_ENABLED"},
Destination: &cfg.Tracing.Enabled,
},
{
EnvVars: []string{"OCIS_TRACING_TYPE", "ACCOUNTS_TRACING_TYPE"},
Destination: &cfg.Tracing.Type,
},
{
EnvVars: []string{"OCIS_TRACING_ENDPOINT", "ACCOUNTS_TRACING_ENDPOINT"},
Destination: &cfg.Tracing.Endpoint,
},
{
EnvVars: []string{"OCIS_TRACING_COLLECTOR", "ACCOUNTS_TRACING_COLLECTOR"},
Destination: &cfg.Tracing.Collector,
},
{
EnvVars: []string{"ACCOUNTS_TRACING_SERVICE"},
Destination: &cfg.Tracing.Service,
},
{
EnvVars: []string{"ACCOUNTS_HTTP_NAMESPACE"},
Destination: &cfg.HTTP.Namespace,
},
{
EnvVars: []string{"ACCOUNTS_HTTP_ADDR"},
Destination: &cfg.HTTP.Addr,
},
{
EnvVars: []string{"ACCOUNTS_HTTP_ROOT"},
Destination: &cfg.HTTP.Root,
},
{
EnvVars: []string{"ACCOUNTS_CACHE_TTL"},
Destination: &cfg.HTTP.CacheTTL,
},
{
EnvVars: []string{"ACCOUNTS_GRPC_NAMESPACE"},
Destination: &cfg.GRPC.Namespace,
},
{
EnvVars: []string{"ACCOUNTS_GRPC_ADDR"},
Destination: &cfg.GRPC.Addr,
},
{
EnvVars: []string{"ACCOUNTS_NAME"},
Destination: &cfg.Server.Name,
},
{
EnvVars: []string{"ACCOUNTS_HASH_DIFFICULTY"},
Destination: &cfg.Server.HashDifficulty,
},
{
EnvVars: []string{"ACCOUNTS_DEMO_USERS_AND_GROUPS"},
Destination: &cfg.Server.DemoUsersAndGroups,
},
{
EnvVars: []string{"ACCOUNTS_ASSET_PATH"},
Destination: &cfg.Asset.Path,
},
{
EnvVars: []string{"OCIS_JWT_SECRET", "ACCOUNTS_JWT_SECRET"},
Destination: &cfg.TokenManager.JWTSecret,
},
{
EnvVars: []string{"ACCOUNTS_STORAGE_BACKEND"},
Destination: &cfg.Repo.Backend,
},
{
EnvVars: []string{"ACCOUNTS_STORAGE_DISK_PATH"},
Destination: &cfg.Repo.Disk.Path,
},
{
EnvVars: []string{"ACCOUNTS_STORAGE_CS3_PROVIDER_ADDR"},
Destination: &cfg.Repo.CS3.ProviderAddr,
},
{
EnvVars: []string{"OCIS_JWT_SECRET", "ACCOUNTS_STORAGE_CS3_JWT_SECRET"},
Destination: &cfg.Repo.CS3.JWTSecret,
},
{
EnvVars: []string{"ACCOUNTS_SERVICE_USER_UUID"},
Destination: &cfg.ServiceUser.UUID,
},
{
EnvVars: []string{"ACCOUNTS_SERVICE_USER_USERNAME"},
Destination: &cfg.ServiceUser.Username,
},
{
EnvVars: []string{"ACCOUNTS_SERVICE_USER_UID"},
Destination: &cfg.ServiceUser.UID,
},
{
EnvVars: []string{"ACCOUNTS_SERVICE_USER_GID"},
Destination: &cfg.ServiceUser.GID,
},
{
EnvVars: []string{"ACCOUNTS_UID_INDEX_LOWER_BOUND"},
Destination: &cfg.Index.UID.Lower,
},
{
EnvVars: []string{"ACCOUNTS_GID_INDEX_LOWER_BOUND"},
Destination: &cfg.Index.GID.Lower,
},
{
EnvVars: []string{"ACCOUNTS_UID_INDEX_UPPER_BOUND"},
Destination: &cfg.Index.UID.Upper,
},
{
EnvVars: []string{"ACCOUNTS_GID_INDEX_UPPER_BOUND"},
Destination: &cfg.Index.GID.Upper,
},
}
}
-280
View File
@@ -1,292 +1,12 @@
package flagset
import (
"path"
"github.com/owncloud/ocis/accounts/pkg/config"
accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0"
"github.com/owncloud/ocis/ocis-pkg/config/defaults"
"github.com/owncloud/ocis/ocis-pkg/flags"
"github.com/urfave/cli/v2"
)
// RootWithConfig applies cfg to the root flagset
func RootWithConfig(cfg *config.Config) []cli.Flag {
return []cli.Flag{
&cli.StringFlag{
Name: "log-level",
Usage: "Set logging level",
EnvVars: []string{"ACCOUNTS_LOG_LEVEL", "OCIS_LOG_LEVEL"},
Destination: &cfg.Log.Level,
},
&cli.BoolFlag{
Name: "log-pretty",
Usage: "Enable pretty logging",
EnvVars: []string{"ACCOUNTS_LOG_PRETTY", "OCIS_LOG_PRETTY"},
Destination: &cfg.Log.Pretty,
},
&cli.BoolFlag{
Name: "log-color",
Usage: "Enable colored logging",
EnvVars: []string{"ACCOUNTS_LOG_COLOR", "OCIS_LOG_COLOR"},
Destination: &cfg.Log.Color,
},
&cli.StringFlag{
Name: "extensions",
Usage: "Run specific extensions during supervised mode",
},
}
}
// ServerWithConfig applies cfg to the root flagset
func ServerWithConfig(cfg *config.Config) []cli.Flag {
return []cli.Flag{
&cli.StringFlag{
Name: "log-file",
Usage: "Enable log to file",
EnvVars: []string{"ACCOUNTS_LOG_FILE", "OCIS_LOG_FILE"},
Destination: &cfg.Log.File,
},
&cli.BoolFlag{
Name: "tracing-enabled",
Usage: "Enable sending traces",
EnvVars: []string{"ACCOUNTS_TRACING_ENABLED", "OCIS_TRACING_ENABLED"},
Destination: &cfg.Tracing.Enabled,
},
&cli.StringFlag{
Name: "tracing-type",
Value: flags.OverrideDefaultString(cfg.Tracing.Type, "jaeger"),
Usage: "Tracing backend type",
EnvVars: []string{"ACCOUNTS_TRACING_TYPE", "OCIS_TRACING_TYPE"},
Destination: &cfg.Tracing.Type,
},
&cli.StringFlag{
Name: "tracing-endpoint",
Value: flags.OverrideDefaultString(cfg.Tracing.Endpoint, ""),
Usage: "Endpoint for the agent",
EnvVars: []string{"ACCOUNTS_TRACING_ENDPOINT", "OCIS_TRACING_ENDPOINT"},
Destination: &cfg.Tracing.Endpoint,
},
&cli.StringFlag{
Name: "tracing-collector",
Value: flags.OverrideDefaultString(cfg.Tracing.Collector, ""),
Usage: "Endpoint for the collector",
EnvVars: []string{"ACCOUNTS_TRACING_COLLECTOR", "OCIS_TRACING_COLLECTOR"},
Destination: &cfg.Tracing.Collector,
},
&cli.StringFlag{
Name: "tracing-service",
Value: flags.OverrideDefaultString(cfg.Tracing.Service, "accounts"),
Usage: "Service name for tracing",
EnvVars: []string{"ACCOUNTS_TRACING_SERVICE"},
Destination: &cfg.Tracing.Service,
},
&cli.StringFlag{
Name: "http-namespace",
Value: flags.OverrideDefaultString(cfg.HTTP.Namespace, "com.owncloud.web"),
Usage: "Set the base namespace for the http namespace",
EnvVars: []string{"ACCOUNTS_HTTP_NAMESPACE"},
Destination: &cfg.HTTP.Namespace,
},
&cli.StringFlag{
Name: "http-addr",
Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "127.0.0.1:9181"),
Usage: "Address to bind http server",
EnvVars: []string{"ACCOUNTS_HTTP_ADDR"},
Destination: &cfg.HTTP.Addr,
},
&cli.StringFlag{
Name: "http-root",
Value: flags.OverrideDefaultString(cfg.HTTP.Root, "/"),
Usage: "Root path of http server",
EnvVars: []string{"ACCOUNTS_HTTP_ROOT"},
Destination: &cfg.HTTP.Root,
},
&cli.IntFlag{
Name: "http-cache-ttl",
Value: flags.OverrideDefaultInt(cfg.HTTP.CacheTTL, 604800),
Usage: "Set the static assets caching duration in seconds",
EnvVars: []string{"ACCOUNTS_CACHE_TTL"},
Destination: &cfg.HTTP.CacheTTL,
},
&cli.StringSliceFlag{
Name: "cors-allowed-origins",
Value: cli.NewStringSlice("*"),
Usage: "Set the allowed CORS origins",
EnvVars: []string{"ACCOUNTS_CORS_ALLOW_ORIGINS", "OCIS_CORS_ALLOW_ORIGINS"},
},
&cli.StringSliceFlag{
Name: "cors-allowed-methods",
Value: cli.NewStringSlice("GET", "POST", "PUT", "PATCH", "DELETE", "OPTIONS"),
Usage: "Set the allowed CORS origins",
EnvVars: []string{"ACCOUNTS_CORS_ALLOW_METHODS", "OCIS_CORS_ALLOW_METHODS"},
},
&cli.StringSliceFlag{
Name: "cors-allowed-headers",
Value: cli.NewStringSlice("Authorization", "Origin", "Content-Type", "Accept", "X-Requested-With"),
Usage: "Set the allowed CORS origins",
EnvVars: []string{"ACCOUNTS_CORS_ALLOW_HEADERS", "OCIS_CORS_ALLOW_HEADERS"},
},
&cli.BoolFlag{
Name: "cors-allow-credentials",
Value: flags.OverrideDefaultBool(cfg.HTTP.CORS.AllowCredentials, true),
Usage: "Allow credentials for CORS",
EnvVars: []string{"ACCOUNTS_CORS_ALLOW_CREDENTIALS", "OCIS_CORS_ALLOW_CREDENTIALS"},
},
&cli.StringFlag{
Name: "grpc-namespace",
Value: flags.OverrideDefaultString(cfg.GRPC.Namespace, "com.owncloud.api"),
Usage: "Set the base namespace for the grpc namespace",
EnvVars: []string{"ACCOUNTS_GRPC_NAMESPACE"},
Destination: &cfg.GRPC.Namespace,
},
&cli.StringFlag{
Name: "grpc-addr",
Value: flags.OverrideDefaultString(cfg.GRPC.Addr, "127.0.0.1:9180"),
Usage: "Address to bind grpc server",
EnvVars: []string{"ACCOUNTS_GRPC_ADDR"},
Destination: &cfg.GRPC.Addr,
},
&cli.StringFlag{
Name: "name",
Value: flags.OverrideDefaultString(cfg.Server.Name, "accounts"),
Usage: "service name",
EnvVars: []string{"ACCOUNTS_NAME"},
Destination: &cfg.Server.Name,
},
&cli.IntFlag{
Name: "accounts-hash-difficulty",
Value: flags.OverrideDefaultInt(cfg.Server.HashDifficulty, 11),
Usage: "accounts password hash difficulty",
EnvVars: []string{"ACCOUNTS_HASH_DIFFICULTY"},
Destination: &cfg.Server.HashDifficulty,
},
&cli.BoolFlag{
Name: "demo-users-and-groups",
Value: flags.OverrideDefaultBool(cfg.Server.DemoUsersAndGroups, true),
Usage: "Enable demo users and groups",
EnvVars: []string{"ACCOUNTS_DEMO_USERS_AND_GROUPS"},
Destination: &cfg.Server.DemoUsersAndGroups,
},
&cli.StringFlag{
Name: "asset-path",
Value: flags.OverrideDefaultString(cfg.Asset.Path, ""),
Usage: "Path to custom assets",
EnvVars: []string{"ACCOUNTS_ASSET_PATH"},
Destination: &cfg.Asset.Path,
},
&cli.StringFlag{
Name: "jwt-secret",
Value: flags.OverrideDefaultString(cfg.TokenManager.JWTSecret, "Pive-Fumkiu4"),
Usage: "Used to create JWT to talk to reva, should equal reva's jwt-secret",
EnvVars: []string{"ACCOUNTS_JWT_SECRET", "OCIS_JWT_SECRET"},
Destination: &cfg.TokenManager.JWTSecret,
},
&cli.StringFlag{
Name: "storage-backend",
Value: flags.OverrideDefaultString(cfg.Repo.Backend, "CS3"),
Usage: "Which backend to use to store accounts data (CS3 or disk)",
EnvVars: []string{"ACCOUNTS_STORAGE_BACKEND"},
Destination: &cfg.Repo.Backend,
},
&cli.StringFlag{
Name: "storage-disk-path",
Value: flags.OverrideDefaultString(cfg.Repo.Disk.Path, path.Join(defaults.BaseDataPath(), "accounts")),
Usage: "Path on the local disk to store accounts data when backend is set to disk",
EnvVars: []string{"ACCOUNTS_STORAGE_DISK_PATH"},
Destination: &cfg.Repo.Disk.Path,
},
&cli.StringFlag{
Name: "storage-cs3-provider-addr",
Value: flags.OverrideDefaultString(cfg.Repo.CS3.ProviderAddr, "localhost:9215"),
Usage: "bind address for the metadata storage provider",
EnvVars: []string{"ACCOUNTS_STORAGE_CS3_PROVIDER_ADDR"},
Destination: &cfg.Repo.CS3.ProviderAddr,
},
&cli.StringFlag{
Name: "storage-cs3-data-url",
Value: flags.OverrideDefaultString(cfg.Repo.CS3.DataURL, "http://localhost:9216"),
Usage: "http endpoint of the metadata storage",
EnvVars: []string{"ACCOUNTS_STORAGE_CS3_DATA_URL"},
Destination: &cfg.Repo.CS3.DataURL,
},
&cli.StringFlag{
Name: "storage-cs3-data-prefix",
Value: flags.OverrideDefaultString(cfg.Repo.CS3.DataPrefix, "data"),
Usage: "path prefix for the http endpoint of the metadata storage, without leading slash",
EnvVars: []string{"ACCOUNTS_STORAGE_CS3_DATA_PREFIX"},
Destination: &cfg.Repo.CS3.DataPrefix,
},
&cli.StringFlag{
Name: "storage-cs3-jwt-secret",
Value: flags.OverrideDefaultString(cfg.Repo.CS3.JWTSecret, "Pive-Fumkiu4"),
Usage: "Used to create JWT to talk to reva, should equal reva's jwt-secret",
EnvVars: []string{"ACCOUNTS_STORAGE_CS3_JWT_SECRET", "OCIS_JWT_SECRET"},
Destination: &cfg.Repo.CS3.JWTSecret,
},
&cli.StringFlag{
Name: "service-user-uuid",
Value: flags.OverrideDefaultString(cfg.ServiceUser.UUID, "95cb8724-03b2-11eb-a0a6-c33ef8ef53ad"),
Usage: "uuid of the internal service user (required on EOS)",
EnvVars: []string{"ACCOUNTS_SERVICE_USER_UUID"},
Destination: &cfg.ServiceUser.UUID,
},
&cli.StringFlag{
Name: "service-user-username",
Value: flags.OverrideDefaultString(cfg.ServiceUser.Username, ""),
Usage: "username of the internal service user (required on EOS)",
EnvVars: []string{"ACCOUNTS_SERVICE_USER_USERNAME"},
Destination: &cfg.ServiceUser.Username,
},
&cli.Int64Flag{
Name: "service-user-uid",
Value: flags.OverrideDefaultInt64(cfg.ServiceUser.UID, 0),
Usage: "uid of the internal service user (required on EOS)",
EnvVars: []string{"ACCOUNTS_SERVICE_USER_UID"},
Destination: &cfg.ServiceUser.UID,
},
&cli.Int64Flag{
Name: "service-user-gid",
Value: flags.OverrideDefaultInt64(cfg.ServiceUser.GID, 0),
Usage: "gid of the internal service user (required on EOS)",
EnvVars: []string{"ACCOUNTS_SERVICE_USER_GID"},
Destination: &cfg.ServiceUser.GID,
},
&cli.Int64Flag{
Name: "uid-index-lower-bound",
Value: flags.OverrideDefaultInt64(cfg.Index.UID.Lower, 0),
Usage: "define a starting point for the account UID",
EnvVars: []string{"ACCOUNTS_UID_INDEX_LOWER_BOUND"},
Destination: &cfg.Index.UID.Lower,
},
&cli.Int64Flag{
Name: "gid-index-lower-bound",
Value: flags.OverrideDefaultInt64(cfg.Index.GID.Lower, 1000),
Usage: "define a starting point for the account GID",
EnvVars: []string{"ACCOUNTS_GID_INDEX_LOWER_BOUND"},
Destination: &cfg.Index.GID.Lower,
},
&cli.Int64Flag{
Name: "uid-index-upper-bound",
Value: flags.OverrideDefaultInt64(cfg.Index.UID.Upper, 0),
Usage: "define an ending point for the account UID",
EnvVars: []string{"ACCOUNTS_UID_INDEX_UPPER_BOUND"},
Destination: &cfg.Index.UID.Upper,
},
&cli.Int64Flag{
Name: "gid-index-upper-bound",
Value: flags.OverrideDefaultInt64(cfg.Index.GID.Upper, 1000),
Usage: "define an ending point for the account GID",
EnvVars: []string{"ACCOUNTS_GID_INDEX_UPPER_BOUND"},
Destination: &cfg.Index.GID.Upper,
},
&cli.StringFlag{
Name: "extensions",
Usage: "Run specific extensions during supervised mode",
},
}
}
// UpdateAccountWithConfig applies update command flags to cfg
func UpdateAccountWithConfig(cfg *config.Config, a *accounts.Account) []cli.Flag {
if a.PasswordProfile == nil {
@@ -12,11 +12,10 @@ import (
mgrpcc "github.com/asim/go-micro/plugins/client/grpc/v4"
empty "github.com/golang/protobuf/ptypes/empty"
"github.com/owncloud/ocis/accounts/pkg/command"
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/accounts/pkg/proto/v0"
svc "github.com/owncloud/ocis/accounts/pkg/service/v0"
oclog "github.com/owncloud/ocis/ocis-pkg/log"
"github.com/owncloud/ocis/ocis-pkg/service/grpc"
settings "github.com/owncloud/ocis/settings/pkg/proto/v0"
"github.com/stretchr/testify/assert"
@@ -86,7 +85,7 @@ func init() {
var hdlr *svc.Service
var err error
if hdlr, err = svc.New(svc.Logger(command.NewLogger(cfg)), svc.Config(cfg), svc.RoleService(buildRoleServiceMock())); err != nil {
if hdlr, err = svc.New(svc.Logger(oclog.LoggerFromConfig("accounts", *cfg.Log)), svc.Config(cfg), svc.RoleService(buildRoleServiceMock())); err != nil {
log.Fatalf("Could not create new service")
}
+6 -2
View File
@@ -8,6 +8,8 @@ import (
"strings"
"time"
"github.com/owncloud/ocis/ocis-pkg/shared"
"github.com/pkg/errors"
"github.com/owncloud/ocis/ocis-pkg/service/grpc"
@@ -109,6 +111,10 @@ func (s Service) buildIndex() (*indexer.Indexer, error) {
func configFromSvc(cfg *config.Config) (*idxcfg.Config, error) {
c := idxcfg.New()
if cfg.Log == nil {
cfg.Log = &shared.Log{}
}
defer func(cfg *config.Config) {
l := log.NewLogger(log.Color(cfg.Log.Color), log.Pretty(cfg.Log.Pretty), log.Level(cfg.Log.Level))
if r := recover(); r != nil {
@@ -132,8 +138,6 @@ func configFromSvc(cfg *config.Config) (*idxcfg.Config, error) {
Backend: cfg.Repo.Backend,
CS3: idxcfg.CS3{
ProviderAddr: cfg.Repo.CS3.ProviderAddr,
DataURL: cfg.Repo.CS3.DataURL,
DataPrefix: cfg.Repo.CS3.DataPrefix,
JWTSecret: cfg.Repo.CS3.JWTSecret,
},
}
+56 -123
View File
@@ -1,15 +1,10 @@
package storage
import (
"bytes"
"context"
"encoding/json"
"io"
"io/ioutil"
"net/http"
"path"
"path/filepath"
"strings"
"github.com/cs3org/reva/pkg/auth/scope"
@@ -23,15 +18,20 @@ import (
"github.com/owncloud/ocis/accounts/pkg/config"
"github.com/owncloud/ocis/accounts/pkg/proto/v0"
olog "github.com/owncloud/ocis/ocis-pkg/log"
metadatastorage "github.com/owncloud/ocis/ocis-pkg/metadata_storage"
"google.golang.org/grpc/metadata"
)
const (
storageMountPath = "/meta"
)
// CS3Repo provides a cs3 implementation of the Repo interface
type CS3Repo struct {
cfg *config.Config
tm token.Manager
storageProvider provider.ProviderAPIClient
dataProvider dataProviderClient // Used to create and download data via http, bypassing reva upload protocol
metadataStorage metadatastorage.MetadataStorage
}
// NewCS3Repo creates a new cs3 repo
@@ -49,26 +49,26 @@ func NewCS3Repo(cfg *config.Config) (Repo, error) {
return nil, err
}
ms, err := metadatastorage.NewMetadataStorage(cfg.Repo.CS3.ProviderAddr)
if err != nil {
return nil, err
}
return CS3Repo{
cfg: cfg,
tm: tokenManager,
storageProvider: client,
dataProvider: dataProviderClient{
client: http.Client{
Transport: http.DefaultTransport,
},
},
metadataStorage: ms,
}, nil
}
// WriteAccount writes an account via cs3 and modifies the provided account (e.g. with a generated id).
func (r CS3Repo) WriteAccount(ctx context.Context, a *proto.Account) (err error) {
t, err := r.authenticate(ctx)
ctx, err = r.getAuthenticatedContext(ctx)
if err != nil {
return err
}
ctx = metadata.AppendToOutgoingContext(ctx, revactx.TokenHeader, t)
if err := r.makeRootDirIfNotExist(ctx, accountsFolder); err != nil {
return err
}
@@ -78,37 +78,31 @@ func (r CS3Repo) WriteAccount(ctx context.Context, a *proto.Account) (err error)
return err
}
resp, err := r.dataProvider.put(r.accountURL(a.Id), bytes.NewReader(by), t)
if err != nil {
return err
}
if err = resp.Body.Close(); err != nil {
return err
}
return nil
err = r.metadataStorage.SimpleUpload(ctx, r.accountURL(a.Id), by)
return err
}
// LoadAccount loads an account via cs3 by id and writes it to the provided account
func (r CS3Repo) LoadAccount(ctx context.Context, id string, a *proto.Account) (err error) {
t, err := r.authenticate(ctx)
ctx, err = r.getAuthenticatedContext(ctx)
if err != nil {
return err
}
return r.loadAccount(id, t, a)
return r.loadAccount(ctx, id, a)
}
// LoadAccounts loads all the accounts from the cs3 api
func (r CS3Repo) LoadAccounts(ctx context.Context, a *[]*proto.Account) (err error) {
t, err := r.authenticate(ctx)
ctx, err = r.getAuthenticatedContext(ctx)
if err != nil {
return err
}
ctx = metadata.AppendToOutgoingContext(ctx, revactx.TokenHeader, t)
res, err := r.storageProvider.ListContainer(ctx, &provider.ListContainerRequest{
Ref: &provider.Reference{
Path: path.Join("/meta", accountsFolder),
Path: path.Join(storageMountPath, accountsFolder),
},
})
if err != nil {
@@ -118,7 +112,7 @@ func (r CS3Repo) LoadAccounts(ctx context.Context, a *[]*proto.Account) (err err
log := olog.NewLogger(olog.Pretty(r.cfg.Log.Pretty), olog.Color(r.cfg.Log.Color), olog.Level(r.cfg.Log.Level))
for i := range res.Infos {
acc := &proto.Account{}
err := r.loadAccount(filepath.Base(res.Infos[i].Path), t, acc)
err := r.loadAccount(ctx, filepath.Base(res.Infos[i].Path), acc)
if err != nil {
log.Err(err).Msg("could not load account")
continue
@@ -128,38 +122,27 @@ func (r CS3Repo) LoadAccounts(ctx context.Context, a *[]*proto.Account) (err err
return nil
}
func (r CS3Repo) loadAccount(id string, t string, a *proto.Account) error {
resp, err := r.dataProvider.get(r.accountURL(id), t)
func (r CS3Repo) loadAccount(ctx context.Context, id string, a *proto.Account) error {
account, err := r.metadataStorage.SimpleDownload(ctx, r.accountURL(id))
if err != nil {
if metadatastorage.IsNotFoundErr(err) {
return &notFoundErr{"account", id}
}
return err
}
if resp.StatusCode != http.StatusOK {
return &notFoundErr{"account", id}
}
b, err := ioutil.ReadAll(resp.Body)
if err != nil {
return err
}
if err = resp.Body.Close(); err != nil {
return err
}
return json.Unmarshal(b, &a)
return json.Unmarshal(account, &a)
}
// DeleteAccount deletes an account via cs3 by id
func (r CS3Repo) DeleteAccount(ctx context.Context, id string) (err error) {
t, err := r.authenticate(ctx)
ctx, err = r.getAuthenticatedContext(ctx)
if err != nil {
return err
}
ctx = metadata.AppendToOutgoingContext(ctx, revactx.TokenHeader, t)
resp, err := r.storageProvider.Delete(ctx, &provider.DeleteRequest{
Ref: &provider.Reference{
Path: path.Join("/meta", accountsFolder, id),
Path: path.Join(storageMountPath, accountsFolder, id),
},
})
@@ -177,12 +160,11 @@ func (r CS3Repo) DeleteAccount(ctx context.Context, id string) (err error) {
// WriteGroup writes a group via cs3 and modifies the provided group (e.g. with a generated id).
func (r CS3Repo) WriteGroup(ctx context.Context, g *proto.Group) (err error) {
t, err := r.authenticate(ctx)
ctx, err = r.getAuthenticatedContext(ctx)
if err != nil {
return err
}
ctx = metadata.AppendToOutgoingContext(ctx, revactx.TokenHeader, t)
if err := r.makeRootDirIfNotExist(ctx, groupsFolder); err != nil {
return err
}
@@ -192,37 +174,30 @@ func (r CS3Repo) WriteGroup(ctx context.Context, g *proto.Group) (err error) {
return err
}
resp, err := r.dataProvider.put(r.groupURL(g.Id), bytes.NewReader(by), t)
if err != nil {
return err
}
if err = resp.Body.Close(); err != nil {
return err
}
return nil
err = r.metadataStorage.SimpleUpload(ctx, r.groupURL(g.Id), by)
return err
}
// LoadGroup loads a group via cs3 by id and writes it to the provided group
func (r CS3Repo) LoadGroup(ctx context.Context, id string, g *proto.Group) (err error) {
t, err := r.authenticate(ctx)
ctx, err = r.getAuthenticatedContext(ctx)
if err != nil {
return err
}
return r.loadGroup(id, t, g)
return r.loadGroup(ctx, id, g)
}
// LoadGroups loads all the groups from the cs3 api
func (r CS3Repo) LoadGroups(ctx context.Context, g *[]*proto.Group) (err error) {
t, err := r.authenticate(ctx)
ctx, err = r.getAuthenticatedContext(ctx)
if err != nil {
return err
}
ctx = metadata.AppendToOutgoingContext(ctx, revactx.TokenHeader, t)
res, err := r.storageProvider.ListContainer(ctx, &provider.ListContainerRequest{
Ref: &provider.Reference{
Path: path.Join("/meta", groupsFolder),
Path: path.Join(storageMountPath, groupsFolder),
},
})
if err != nil {
@@ -232,7 +207,7 @@ func (r CS3Repo) LoadGroups(ctx context.Context, g *[]*proto.Group) (err error)
log := olog.NewLogger(olog.Pretty(r.cfg.Log.Pretty), olog.Color(r.cfg.Log.Color), olog.Level(r.cfg.Log.Level))
for i := range res.Infos {
grp := &proto.Group{}
err := r.loadGroup(filepath.Base(res.Infos[i].Path), t, grp)
err := r.loadGroup(ctx, filepath.Base(res.Infos[i].Path), grp)
if err != nil {
log.Err(err).Msg("could not load account")
continue
@@ -242,38 +217,27 @@ func (r CS3Repo) LoadGroups(ctx context.Context, g *[]*proto.Group) (err error)
return nil
}
func (r CS3Repo) loadGroup(id string, t string, g *proto.Group) error {
resp, err := r.dataProvider.get(r.groupURL(id), t)
func (r CS3Repo) loadGroup(ctx context.Context, id string, g *proto.Group) error {
group, err := r.metadataStorage.SimpleDownload(ctx, r.groupURL(id))
if err != nil {
if metadatastorage.IsNotFoundErr(err) {
return &notFoundErr{"group", id}
}
return err
}
if resp.StatusCode == http.StatusNotFound {
return &notFoundErr{"group", id}
}
b, err := ioutil.ReadAll(resp.Body)
if err != nil {
return err
}
if err = resp.Body.Close(); err != nil {
return err
}
return json.Unmarshal(b, &g)
return json.Unmarshal(group, &g)
}
// DeleteGroup deletes a group via cs3 by id
func (r CS3Repo) DeleteGroup(ctx context.Context, id string) (err error) {
t, err := r.authenticate(ctx)
ctx, err = r.getAuthenticatedContext(ctx)
if err != nil {
return err
}
ctx = metadata.AppendToOutgoingContext(ctx, revactx.TokenHeader, t)
resp, err := r.storageProvider.Delete(ctx, &provider.DeleteRequest{
Ref: &provider.Reference{
Path: path.Join("/meta", groupsFolder, id),
Path: path.Join(storageMountPath, groupsFolder, id),
},
})
@@ -289,8 +253,13 @@ func (r CS3Repo) DeleteGroup(ctx context.Context, id string) (err error) {
return err
}
func (r CS3Repo) authenticate(ctx context.Context) (token string, err error) {
return AuthenticateCS3(ctx, r.cfg.ServiceUser, r.tm)
func (r CS3Repo) getAuthenticatedContext(ctx context.Context) (context.Context, error) {
t, err := AuthenticateCS3(ctx, r.cfg.ServiceUser, r.tm)
if err != nil {
return nil, err
}
ctx = metadata.AppendToOutgoingContext(ctx, revactx.TokenHeader, t)
return ctx, nil
}
// AuthenticateCS3 mints an auth token for communicating with cs3 storage based on a service user from config
@@ -298,6 +267,7 @@ func AuthenticateCS3(ctx context.Context, su config.ServiceUser, tm token.Manage
u := &user.User{
Id: &user.UserId{
OpaqueId: su.UUID,
Type: user.UserType_USER_TYPE_APPLICATION,
},
Groups: []string{},
UidNumber: su.UID,
@@ -311,11 +281,11 @@ func AuthenticateCS3(ctx context.Context, su config.ServiceUser, tm token.Manage
}
func (r CS3Repo) accountURL(id string) string {
return singleJoiningSlash(r.cfg.Repo.CS3.DataURL, path.Join(r.cfg.Repo.CS3.DataPrefix, accountsFolder, id))
return path.Join(accountsFolder, id)
}
func (r CS3Repo) groupURL(id string) string {
return singleJoiningSlash(r.cfg.Repo.CS3.DataURL, path.Join(r.cfg.Repo.CS3.DataPrefix, groupsFolder, id))
return path.Join(groupsFolder, id)
}
func (r CS3Repo) makeRootDirIfNotExist(ctx context.Context, folder string) error {
@@ -325,7 +295,7 @@ func (r CS3Repo) makeRootDirIfNotExist(ctx context.Context, folder string) error
// MakeDirIfNotExist will create a root node in the metadata storage. Requires an authenticated context.
func MakeDirIfNotExist(ctx context.Context, sp provider.ProviderAPIClient, folder string) error {
var rootPathRef = &provider.Reference{
Path: path.Join("/meta", folder),
Path: path.Join(storageMountPath, folder),
}
resp, err := sp.Stat(ctx, &provider.StatRequest{
@@ -348,40 +318,3 @@ func MakeDirIfNotExist(ctx context.Context, sp provider.ProviderAPIClient, folde
return nil
}
// TODO: this is copied from proxy. Find a better solution or move it to ocis-pkg
func singleJoiningSlash(a, b string) string {
aslash := strings.HasSuffix(a, "/")
bslash := strings.HasPrefix(b, "/")
switch {
case aslash && bslash:
return a + b[1:]
case !aslash && !bslash:
return a + "/" + b
}
return a + b
}
type dataProviderClient struct {
client http.Client
}
func (d dataProviderClient) put(url string, body io.Reader, token string) (*http.Response, error) {
req, err := http.NewRequest(http.MethodPut, url, body)
if err != nil {
return nil, err
}
req.Header.Add(revactx.TokenHeader, token)
return d.client.Do(req)
}
func (d dataProviderClient) get(url string, token string) (*http.Response, error) {
req, err := http.NewRequest(http.MethodGet, url, nil)
if err != nil {
return nil, err
}
req.Header.Add(revactx.TokenHeader, token)
return d.client.Do(req)
}
-2
View File
@@ -17,8 +17,6 @@ package storage
// Repo: config.Repo{
// CS3: config.CS3{
// ProviderAddr: "0.0.0.0:9215",
// DataURL: "http://localhost:9216",
// DataPrefix: "data",
// },
// },
//}
+1 -1
View File
@@ -8,7 +8,7 @@ type notFoundErr struct {
typ, id string
}
func (e *notFoundErr) Error() string {
func (e notFoundErr) Error() string {
return fmt.Sprintf("%s with id %s not found", e.typ, e.id)
}
@@ -0,0 +1,8 @@
Change: Rename `APP_PROVIDER_BASIC_*` environment variables
We've renamed the `APP_PROVIDER_BASIC_*` to `APP_PROVIDER_*` since
the `_BASIC_` part is a copy and paste error. Now all app provider
environment variables are consistently starting with `APP_PROVIDER_*`.
https://github.com/owncloud/ocis/pull/2812
https://github.com/owncloud/ocis/pull/2811
@@ -0,0 +1,8 @@
Bugfix: Fix claim selector based routing for basic auth
We've fixed the claim selector based routing for requests using basic auth.
Previously requests using basic auth have always been routed to the DefaultPolicy when using the claim selector despite the set cookie because the basic auth middleware fakes some OIDC claims.
Now the cookie is checked before routing to the DefaultPolicy and therefore set cookie will also be respected for requests using basic auth.
https://github.com/owncloud/ocis/pull/2779
@@ -0,0 +1,10 @@
Bugfix: Disallow creation of a group with empty name via the OCS api
We've fixed the behavior for group creation on the OCS api, where it was
possible to create a group with an empty name. This was is not possible
on oC10 and is therefore also forbidden on oCIS to keep compatibility.
This PR forbids the creation and also ensures the correct status code
for both OCS v1 and OCS v2 apis.
https://github.com/owncloud/ocis/pull/2825
https://github.com/owncloud/ocis/issues/2823
@@ -0,0 +1,6 @@
Bugfix: Fix using s3ng as the metadata storage backend
It is now possible to use s3ng as the metadata storage backend.
https://github.com/owncloud/ocis/pull/2807
https://github.com/owncloud/ocis/issues/2668
@@ -0,0 +1,9 @@
Bugfix: Use the CS3api up- and download workflow for the accounts service
We've fixed the interaction of the accounts service with the metadata storage
after bypassing the InitiateUpload and InitiateDownload have been removed
from various storage drivers. The accounts service now uses the proper
CS3apis workflow for up- and downloads.
https://github.com/owncloud/ocis/pull/2837
https://github.com/cs3org/reva/pull/2309
@@ -0,0 +1,5 @@
Enhancement: Cleanup ocis-pkg config
Certain values were of no use when configuring the ocis runtime.
https://github.com/owncloud/ocis/pull/2813
@@ -0,0 +1,7 @@
Change: Restructure Configuration Parsing
Tags: ocis
CLI flags are no longer needed for subcommands, as we rely solely on env variables and config files. This greatly simplifies configuration and deployment.
https://github.com/owncloud/ocis/pull/2708
@@ -0,0 +1,5 @@
Enhancement: Correct shutdown of services under runtime
Supervised goroutines now shut themselves down on context cancellation propagation.
https://github.com/owncloud/ocis/pull/2843
@@ -0,0 +1,24 @@
Enhancement: Update REVA to v1.17.0
Updated REVA to v1.17.0
This update includes:
* Fix [cs3org/reva#2305](https://github.com/cs3org/reva/pull/2305): Make sure /app/new takes `target` as absolute path
* Fix [cs3org/reva#2303](https://github.com/cs3org/reva/pull/2303): Fix content disposition header for public links files
* Fix [cs3org/reva#2316](https://github.com/cs3org/reva/pull/2316): Fix the share types in propfinds
* Fix [cs3org/reva#2803](https://github.com/cs3org/reva/pull/2803): Fix app provider for editor public links
* Fix [cs3org/reva#2298](https://github.com/cs3org/reva/pull/2298): Remove share refs from trashbin
* Fix [cs3org/reva#2309](https://github.com/cs3org/reva/pull/2309): Remove early finish for zero byte file uploads
* Fix [cs3org/reva#1941](https://github.com/cs3org/reva/pull/1941): Fix TUS uploads with transfer token only
* Chg [cs3org/reva#2210](https://github.com/cs3org/reva/pull/2210): Fix app provider new file creation and improved error codes
* Enh [cs3org/reva#2217](https://github.com/cs3org/reva/pull/2217): OIDC auth driver for ESCAPE IAM
* Enh [cs3org/reva#2256](https://github.com/cs3org/reva/pull/2256): Return user type in the response of the ocs GET user call
* Enh [cs3org/reva#2315](https://github.com/cs3org/reva/pull/2315): Add new attributes to public link propfinds
* Enh [cs3org/reva#2740](https://github.com/cs3org/reva/pull/2740): Implement space membership endpoints
* Enh [cs3org/reva#2252](https://github.com/cs3org/reva/pull/2252): Add the xattr sys.acl to SysACL (eosgrpc)
* Enh [cs3org/reva#2314](https://github.com/cs3org/reva/pull/2314): OIDC: fallback if IDP doesn't provide "preferred_username" claim
https://github.com/owncloud/ocis/pull/2849
https://github.com/owncloud/ocis/pull/2835
https://github.com/owncloud/ocis/pull/2837
@@ -0,0 +1,8 @@
Enhancement: Update ownCloud Web to v4.6.0
Tags: web
We updated ownCloud Web to v4.6.0. Please refer to the changelog (linked) for details on the web release.
https://github.com/owncloud/ocis/pull/2846
https://github.com/owncloud/web/releases/tag/v4.6.0
@@ -0,0 +1,6 @@
Change: OIDC: fallback if IDP doesn't provide "preferred_username" claim
Some IDPs don't add the "preferred_username" claim. Fallback to the "email"
claim in that case
https://github.com/owncloud/ocis/issues/2644
@@ -1,5 +1,5 @@
---
- name: continuous-deployment-ocis-cs3-users-latest
- name: continuous-deployment-ocis-ldap-latest
server:
server_type: cx21
image: ubuntu-20.04
@@ -14,7 +14,7 @@
- /var/lib/docker/volumes/ocis_certs
domains:
- "*.ocis-cs3-users.latest.owncloud.works"
- "*.ocis-ldap.latest.owncloud.works"
vars:
ssh_authorized_keys:
@@ -31,21 +31,21 @@
- name: ocis
git_url: https://github.com/owncloud/ocis.git
ref: master
docker_compose_path: deployments/examples/cs3_users_ocis
docker_compose_path: deployments/examples/ocis_ldap
env:
INSECURE: "false"
TRAEFIK_ACME_MAIL: wkloucek@owncloud.com
OCIS_DOCKER_TAG: latest
OCIS_DOMAIN: ocis.ocis-cs3-users.latest.owncloud.works
LDAP_MANAGER_DOMAIN: ldap.ocis-cs3-users.latest.owncloud.works
OCIS_DOMAIN: ocis.ocis-ldap.latest.owncloud.works
LDAP_MANAGER_DOMAIN: ldap.ocis-ldap.latest.owncloud.works
COMPOSE_FILE: docker-compose.yml:monitoring_tracing/docker-compose-additions.yml
- name: monitoring
git_url: https://github.com/owncloud-devops/monitoring-tracing-client.git
ref: master
env:
NETWORK_NAME: ocis-net
TELEMETRY_SERVE_DOMAIN: telemetry.ocis-cs3-users.latest.owncloud.works
TELEMETRY_SERVE_DOMAIN: telemetry.ocis-ldap.latest.owncloud.works
JAEGER_COLLECTOR: jaeger-collector.infra.owncloud.works:443
TELEGRAF_SPECIFIC_CONFIG: ocis_single_container
OCIS_URL: ocis.ocis-cs3-users.latest.owncloud.works
OCIS_DEPLOYMENT_ID: continuous-deployment-ocis-cs3-users-latest
OCIS_URL: ocis.ocis-ldap.latest.owncloud.works
OCIS_DEPLOYMENT_ID: continuous-deployment-ocis-ldap-latest
@@ -1,5 +1,5 @@
---
- name: continuous-deployment-ocis-cs3-users-released
- name: continuous-deployment-ocis-ldap-released
server:
server_type: cx21
image: ubuntu-20.04
@@ -14,7 +14,7 @@
- /var/lib/docker/volumes/ocis_certs
domains:
- "*.ocis-cs3-users.released.owncloud.works"
- "*.ocis-ldap.released.owncloud.works"
vars:
ssh_authorized_keys:
@@ -31,21 +31,21 @@
- name: ocis
git_url: https://github.com/owncloud/ocis.git
ref: master
docker_compose_path: deployments/examples/cs3_users_ocis
docker_compose_path: deployments/examples/ocis_ldap
env:
INSECURE: "false"
TRAEFIK_ACME_MAIL: wkloucek@owncloud.com
OCIS_DOCKER_TAG: 1
OCIS_DOMAIN: ocis.ocis-cs3-users.released.owncloud.works
LDAP_MANAGER_DOMAIN: ldap.ocis-cs3-users.released.owncloud.works
OCIS_DOMAIN: ocis.ocis-ldap.released.owncloud.works
LDAP_MANAGER_DOMAIN: ldap.ocis-ldap.released.owncloud.works
COMPOSE_FILE: docker-compose.yml:monitoring_tracing/docker-compose-additions.yml
- name: monitoring
git_url: https://github.com/owncloud-devops/monitoring-tracing-client.git
ref: master
env:
NETWORK_NAME: ocis-net
TELEMETRY_SERVE_DOMAIN: telemetry.ocis-cs3-users.released.owncloud.works
TELEMETRY_SERVE_DOMAIN: telemetry.ocis-ldap.released.owncloud.works
JAEGER_COLLECTOR: jaeger-collector.infra.owncloud.works:443
TELEGRAF_SPECIFIC_CONFIG: ocis_single_container
OCIS_URL: ocis.ocis-cs3-users.released.owncloud.works
OCIS_DEPLOYMENT_ID: continuous-deployment-ocis-cs3-users-released
OCIS_URL: ocis.ocis-ldap.released.owncloud.works
OCIS_DEPLOYMENT_ID: continuous-deployment-ocis-ldap-released
@@ -1,12 +0,0 @@
---
version: "3.7"
services:
ocis:
environment:
OCIS_TRACING_ENABLED: "true"
OCIS_TRACING_ENDPOINT: jaeger-agent:6831
networks:
ocis-net:
external: true
@@ -24,7 +24,6 @@ ownCloudUUID:: NGM1MTBhZGEtYzg2Yi00ODE1LTg4MjAtNDJjZGY4MmMzZDUx
userPassword:: e1NTSEF9TXJEcXpFNGdKbXZxbVRVTGhvWEZ1VzJBbkV3NWFLK3J3WTIvbHc9PQ==
ownCloudSelector: ocis
dn: uid=marie,ou=users,dc=owncloud,dc=com
objectClass: inetOrgPerson
objectClass: organizationalPerson
@@ -66,3 +65,45 @@ homeDirectory: /home/richard
ownCloudUUID:: OTMyYjQ1NDAtOGQxNi00ODFlLThlZjQtNTg4ZTRiNmIxNTFj
userPassword:: e1NTSEF9Z05LZTRreHdmOGRUREY5eHlhSmpySTZ3MGxSVUM1d1RGcWROTVE9PQ==
ownCloudSelector: ocis
dn: uid=moss,ou=users,dc=owncloud,dc=com
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: ownCloud
objectClass: person
objectClass: posixAccount
objectClass: top
uid: moss
givenName: Maurice
sn: Moss
cn: moss
displayName: Maurice Moss
description: A worker in the IT Department of Reynholm Industries. Of all the working staff in the IT Department, he is the most hard-working, the most experienced, and the most capable of doing his job well. He puts a lot of effort into his work, however he does not get the credit he deserves.
mail: moss@example.org
uidNumber: 20003
gidNumber: 30000
homeDirectory: /home/moss
ownCloudUUID:: MDU4YmZmOTUtNjcwOC00ZmU1LTkxZTQtOWVhM2QzNzc1ODhi
userPassword:: e1NTSEF9N0hEdTRoMkFDVExFWWt4U0RtSDZVQjhmUlpKRExDZDc=
ownCloudSelector: ocis
dn: uid=admin,ou=users,dc=owncloud,dc=com
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: ownCloud
objectClass: person
objectClass: posixAccount
objectClass: top
uid: admin
givenName: Admin
sn: Admin
cn: admin
displayName: Admin
description: An admin for this oCIS instance.
mail: admin@example.org
uidNumber: 20004
gidNumber: 30000
homeDirectory: /home/admin
ownCloudUUID:: ZGRjMjAwNGMtMDk3Ny0xMWViLTlkM2YtYTc5Mzg4OGNkMGY4
userPassword:: e1NTSEF9UWhmaFB3dERydTUydURoWFFObDRMbzVIckI3TkI5Nmo=
ownCloudSelector: oc10
@@ -14,6 +14,8 @@ ownCloudUUID:: NTA5YTlkY2QtYmIzNy00ZjRmLWEwMWEtMTlkY2EyN2Q5Y2Zh
uniqueMember: uid=einstein,ou=users,dc=owncloud,dc=com
uniqueMember: uid=marie,ou=users,dc=owncloud,dc=com
uniqueMember: uid=richard,ou=users,dc=owncloud,dc=com
uniqueMember: uid=moss,ou=users,dc=owncloud,dc=com
uniqueMember: uid=admin,ou=users,dc=owncloud,dc=com
dn: cn=sailing-lovers,ou=groups,dc=owncloud,dc=com
objectClass: groupOfUniqueNames
@@ -1,11 +1,5 @@
#!/bin/sh
set -e
mkdir -p /var/tmp/ocis/.config/
cp /config/proxy-config.dist.json /var/tmp/ocis/.config/proxy-config.json
# TODO: remove replace logic when log level configuration is fixed
sed -i 's/PROXY_LOG_LEVEL/${PROXY_LOG_LEVEL}/g' /var/tmp/ocis/.config/proxy-config.json
ocis server &
sleep 10
@@ -14,9 +8,4 @@ ocis kill idp
ocis kill glauth
ocis kill accounts
# workaround for loading proxy configuration
ocis kill proxy
sleep 10
ocis proxy server &
wait
@@ -108,7 +108,6 @@ services:
OCIS_STORAGE_READ_ONLY: "false" # TODO: conflict with OWNCLOUDSQL -> https://github.com/owncloud/ocis/issues/2303
# General oCIS config
OCIS_LOG_LEVEL: ${OCIS_LOG_LEVEL:-error} # make oCIS less verbose
PROXY_LOG_LEVEL: ${PROXY_LOG_LEVEL:-error}
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"
@@ -120,7 +119,7 @@ services:
OCIS_INSECURE: "${INSECURE:-false}"
volumes:
- ./config/ocis/entrypoint-override.sh:/entrypoint-override.sh
- ./config/ocis/proxy-config.dist.json:/config/proxy-config.dist.json
- ./config/ocis/proxy.json:/etc/ocis/proxy.json
- ocis-data:/var/lib/ocis
# shared volume with oC10
- oc10-data:/mnt/data
@@ -4,8 +4,34 @@ version: "3.7"
services:
ocis:
environment:
# tracing
OCIS_TRACING_ENABLED: "true"
OCIS_TRACING_ENDPOINT: jaeger-agent:6831
# metrics
APP_PROVIDER_DEBUG_ADDR: 0.0.0.0:9165
GLAUTH_DEBUG_ADDR: 0.0.0.0:9129
GRAPH_DEBUG_ADDR: 0.0.0.0:9124
GRAPH_EXPLORER_DEBUG_ADDR: 0.0.0.0:9136
IDP_DEBUG_ADDR: 0.0.0.0:9134
OCS_DEBUG_ADDR: 0.0.0.0:9114
PROXY_DEBUG_ADDR: 0.0.0.0:9205
SETTINGS_DEBUG_ADDR: 0.0.0.0:9194
STORAGE_AUTH_BASIC_DEBUG_ADDR: 0.0.0.0:9147
STORAGE_AUTH_BEARER_DEBUG_ADDR: 0.0.0.0:9149
STORAGE_AUTH_MACHINE_DEBUG_ADDR: 0.0.0.0:9167
STORAGE_FRONTEND_DEBUG_ADDR: 0.0.0.0:9141
STORAGE_GATEWAY_DEBUG_ADDR: 0.0.0.0:9143
STORAGE_GROUPPROVIDER_DEBUG_ADDR: 0.0.0.0:9161
STORAGE_HOME_DEBUG_ADDR: 0.0.0.0:9156
STORAGE_METADATA_DEBUG_ADDR: 0.0.0.0:9217
STORAGE_PUBLIC_LINK_DEBUG_ADDR: 0.0.0.0:9179
STORAGE_USERPROVIDER_DEBUG_ADDR: 0.0.0.0:9145
STORAGE_USERS_DEBUG_ADDR: 0.0.0.0:9159
STORAGE_SHARING_DEBUG_ADDR: 0.0.0.0:9151
STORE_DEBUG_ADDR: 0.0.0.0:9464
THUMBNAILS_DEBUG_ADDR: 0.0.0.0:9189
WEB_DEBUG_ADDR: 0.0.0.0:9104
WEBDAV_DEBUG_ADDR: 0.0.0.0:9119
networks:
ocis-net:
@@ -3,7 +3,6 @@
set -e
mkdir -p /var/tmp/ocis/.config/
cp /config/proxy-config.json /var/tmp/ocis/.config/proxy-config.json
cp /config/web-config.dist.json /var/tmp/ocis/.config/web-config.json
sed -i 's/ocis.owncloud.test/'${OCIS_DOMAIN:-ocis.owncloud.test}'/g' /var/tmp/ocis/.config/web-config.json
@@ -26,8 +25,4 @@ ocis accounts update --password $STORAGE_LDAP_BIND_PASSWORD $REVA_USER_UUID
echo "default secrets changed"
echo "##################################################"
ocis kill proxy
sleep 10
ocis proxy server # workaround for loading proxy configuration
wait # wait for oCIS to exit
@@ -62,8 +62,6 @@ services:
OCIS_MACHINE_AUTH_API_KEY: ${OCIS_MACHINE_AUTH_API_KEY:-change-me-please}
# web ui
WEB_UI_CONFIG: "/var/tmp/ocis/.config/web-config.json"
# proxy
PROXY_CONFIG_FILE: "/var/tmp/ocis/.config/proxy-config.json"
# make settings service available to oCIS Hello
SETTINGS_GRPC_ADDR: 0.0.0.0:9191
# INSECURE: needed if oCIS / Traefik is using self generated certificates
@@ -71,7 +69,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-config.json:/config/proxy-config.json
- ./config/ocis/proxy.json:/etc/ocis/proxy.json
- ocis-data:/var/lib/ocis
labels:
- "traefik.enable=true"
@@ -4,8 +4,34 @@ version: "3.7"
services:
ocis:
environment:
# tracing
OCIS_TRACING_ENABLED: "true"
OCIS_TRACING_ENDPOINT: jaeger-agent:6831
# metrics
APP_PROVIDER_DEBUG_ADDR: 0.0.0.0:9165
GLAUTH_DEBUG_ADDR: 0.0.0.0:9129
GRAPH_DEBUG_ADDR: 0.0.0.0:9124
GRAPH_EXPLORER_DEBUG_ADDR: 0.0.0.0:9136
IDP_DEBUG_ADDR: 0.0.0.0:9134
OCS_DEBUG_ADDR: 0.0.0.0:9114
PROXY_DEBUG_ADDR: 0.0.0.0:9205
SETTINGS_DEBUG_ADDR: 0.0.0.0:9194
STORAGE_AUTH_BASIC_DEBUG_ADDR: 0.0.0.0:9147
STORAGE_AUTH_BEARER_DEBUG_ADDR: 0.0.0.0:9149
STORAGE_AUTH_MACHINE_DEBUG_ADDR: 0.0.0.0:9167
STORAGE_FRONTEND_DEBUG_ADDR: 0.0.0.0:9141
STORAGE_GATEWAY_DEBUG_ADDR: 0.0.0.0:9143
STORAGE_GROUPPROVIDER_DEBUG_ADDR: 0.0.0.0:9161
STORAGE_HOME_DEBUG_ADDR: 0.0.0.0:9156
STORAGE_METADATA_DEBUG_ADDR: 0.0.0.0:9217
STORAGE_PUBLIC_LINK_DEBUG_ADDR: 0.0.0.0:9179
STORAGE_USERPROVIDER_DEBUG_ADDR: 0.0.0.0:9145
STORAGE_USERS_DEBUG_ADDR: 0.0.0.0:9159
STORAGE_SHARING_DEBUG_ADDR: 0.0.0.0:9151
STORE_DEBUG_ADDR: 0.0.0.0:9464
THUMBNAILS_DEBUG_ADDR: 0.0.0.0:9189
WEB_DEBUG_ADDR: 0.0.0.0:9104
WEBDAV_DEBUG_ADDR: 0.0.0.0:9119
networks:
ocis-net:
@@ -4,8 +4,34 @@ version: "3.7"
services:
ocis:
environment:
# tracing
OCIS_TRACING_ENABLED: "true"
OCIS_TRACING_ENDPOINT: jaeger-agent:6831
# metrics
APP_PROVIDER_DEBUG_ADDR: 0.0.0.0:9165
GLAUTH_DEBUG_ADDR: 0.0.0.0:9129
GRAPH_DEBUG_ADDR: 0.0.0.0:9124
GRAPH_EXPLORER_DEBUG_ADDR: 0.0.0.0:9136
IDP_DEBUG_ADDR: 0.0.0.0:9134
OCS_DEBUG_ADDR: 0.0.0.0:9114
PROXY_DEBUG_ADDR: 0.0.0.0:9205
SETTINGS_DEBUG_ADDR: 0.0.0.0:9194
STORAGE_AUTH_BASIC_DEBUG_ADDR: 0.0.0.0:9147
STORAGE_AUTH_BEARER_DEBUG_ADDR: 0.0.0.0:9149
STORAGE_AUTH_MACHINE_DEBUG_ADDR: 0.0.0.0:9167
STORAGE_FRONTEND_DEBUG_ADDR: 0.0.0.0:9141
STORAGE_GATEWAY_DEBUG_ADDR: 0.0.0.0:9143
STORAGE_GROUPPROVIDER_DEBUG_ADDR: 0.0.0.0:9161
STORAGE_HOME_DEBUG_ADDR: 0.0.0.0:9156
STORAGE_METADATA_DEBUG_ADDR: 0.0.0.0:9217
STORAGE_PUBLIC_LINK_DEBUG_ADDR: 0.0.0.0:9179
STORAGE_USERPROVIDER_DEBUG_ADDR: 0.0.0.0:9145
STORAGE_USERS_DEBUG_ADDR: 0.0.0.0:9159
STORAGE_SHARING_DEBUG_ADDR: 0.0.0.0:9151
STORE_DEBUG_ADDR: 0.0.0.0:9464
THUMBNAILS_DEBUG_ADDR: 0.0.0.0:9189
WEB_DEBUG_ADDR: 0.0.0.0:9104
WEBDAV_DEBUG_ADDR: 0.0.0.0:9119
networks:
ocis-net:
File renamed without changes.
@@ -1,6 +1,6 @@
---
document this deployment example in docs/ocis/deployment/cs3_users_ocis.md
document this deployment example in docs/ocis/deployment/ocis_ldap.md
---
Please refer to [our documentation](https://owncloud.dev/ocis/deployment/cs3_users_ocis/)
Please refer to [our documentation](https://owncloud.dev/ocis/deployment/ocis_ldap/)
for instructions on how to deploy this scenario.
@@ -62,3 +62,43 @@ gidNumber: 30000
homeDirectory: /home/richard
ownCloudUUID:: OTMyYjQ1NDAtOGQxNi00ODFlLThlZjQtNTg4ZTRiNmIxNTFj
userPassword:: e1NTSEF9Z05LZTRreHdmOGRUREY5eHlhSmpySTZ3MGxSVUM1d1RGcWROTVE9PQ==
dn: uid=moss,ou=users,dc=owncloud,dc=com
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: ownCloud
objectClass: person
objectClass: posixAccount
objectClass: top
uid: moss
givenName: Maurice
sn: Moss
cn: moss
displayName: Maurice Moss
description: A worker in the IT Department of Reynholm Industries. Of all the working staff in the IT Department, he is the most hard-working, the most experienced, and the most capable of doing his job well. He puts a lot of effort into his work, however he does not get the credit he deserves.
mail: moss@example.org
uidNumber: 20003
gidNumber: 30000
homeDirectory: /home/moss
ownCloudUUID:: MDU4YmZmOTUtNjcwOC00ZmU1LTkxZTQtOWVhM2QzNzc1ODhi
userPassword:: e1NTSEF9N0hEdTRoMkFDVExFWWt4U0RtSDZVQjhmUlpKRExDZDc=
dn: uid=admin,ou=users,dc=owncloud,dc=com
objectClass: inetOrgPerson
objectClass: organizationalPerson
objectClass: ownCloud
objectClass: person
objectClass: posixAccount
objectClass: top
uid: admin
givenName: Admin
sn: Admin
cn: admin
displayName: Admin
description: An admin for this oCIS instance.
mail: admin@example.org
uidNumber: 20004
gidNumber: 30000
homeDirectory: /home/admin
ownCloudUUID:: ZGRjMjAwNGMtMDk3Ny0xMWViLTlkM2YtYTc5Mzg4OGNkMGY4
userPassword:: e1NTSEF9UWhmaFB3dERydTUydURoWFFObDRMbzVIckI3TkI5Nmo=
@@ -14,6 +14,8 @@ ownCloudUUID:: NTA5YTlkY2QtYmIzNy00ZjRmLWEwMWEtMTlkY2EyN2Q5Y2Zh
uniqueMember: uid=einstein,ou=users,dc=owncloud,dc=com
uniqueMember: uid=marie,ou=users,dc=owncloud,dc=com
uniqueMember: uid=richard,ou=users,dc=owncloud,dc=com
uniqueMember: uid=moss,ou=users,dc=owncloud,dc=com
uniqueMember: uid=admin,ou=users,dc=owncloud,dc=com
dn: cn=sailing-lovers,ou=groups,dc=owncloud,dc=com
objectClass: groupOfUniqueNames
@@ -3,7 +3,6 @@
set -e
mkdir -p /var/tmp/ocis/.config/
cp /config/proxy-config.json /var/tmp/ocis/.config/proxy-config.json
cp /config/web-config.dist.json /var/tmp/ocis/.config/web-config.json
sed -i 's/ocis.owncloud.test/'${OCIS_DOMAIN:-ocis.owncloud.test}'/g' /var/tmp/ocis/.config/web-config.json
@@ -15,8 +14,4 @@ ocis kill accounts
# stop builtin LDAP server since we use external LDAP only
ocis kill glauth
ocis kill proxy
sleep 10
ocis proxy server # workaround for loading proxy configuration
wait # wait for oCIS to exit
@@ -75,8 +75,6 @@ services:
STORAGE_LDAP_GROUPFILTER: '(&(objectclass=groupOfUniqueNames)(objectclass=owncloud)(ownclouduuid={{.OpaqueId}}*))'
# web ui
WEB_UI_CONFIG: "/var/tmp/ocis/.config/web-config.json"
# proxy
PROXY_CONFIG_FILE: "/var/tmp/ocis/.config/proxy-config.json"
# General oCIS config
OCIS_URL: https://${OCIS_DOMAIN:-ocis.owncloud.test}
OCIS_DOMAIN: ${OCIS_DOMAIN:-ocis.owncloud.test}
@@ -91,7 +89,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-config.json:/config/proxy-config.json
- ./config/ocis/proxy.json:/etc/ocis/proxy.json
- ocis-data:/var/lib/ocis
labels:
- "traefik.enable=true"
@@ -0,0 +1,38 @@
---
version: "3.7"
services:
ocis:
environment:
# tracing
OCIS_TRACING_ENABLED: "true"
OCIS_TRACING_ENDPOINT: jaeger-agent:6831
# metrics
APP_PROVIDER_DEBUG_ADDR: 0.0.0.0:9165
GLAUTH_DEBUG_ADDR: 0.0.0.0:9129
GRAPH_DEBUG_ADDR: 0.0.0.0:9124
GRAPH_EXPLORER_DEBUG_ADDR: 0.0.0.0:9136
IDP_DEBUG_ADDR: 0.0.0.0:9134
OCS_DEBUG_ADDR: 0.0.0.0:9114
PROXY_DEBUG_ADDR: 0.0.0.0:9205
SETTINGS_DEBUG_ADDR: 0.0.0.0:9194
STORAGE_AUTH_BASIC_DEBUG_ADDR: 0.0.0.0:9147
STORAGE_AUTH_BEARER_DEBUG_ADDR: 0.0.0.0:9149
STORAGE_AUTH_MACHINE_DEBUG_ADDR: 0.0.0.0:9167
STORAGE_FRONTEND_DEBUG_ADDR: 0.0.0.0:9141
STORAGE_GATEWAY_DEBUG_ADDR: 0.0.0.0:9143
STORAGE_GROUPPROVIDER_DEBUG_ADDR: 0.0.0.0:9161
STORAGE_HOME_DEBUG_ADDR: 0.0.0.0:9156
STORAGE_METADATA_DEBUG_ADDR: 0.0.0.0:9217
STORAGE_PUBLIC_LINK_DEBUG_ADDR: 0.0.0.0:9179
STORAGE_USERPROVIDER_DEBUG_ADDR: 0.0.0.0:9145
STORAGE_USERS_DEBUG_ADDR: 0.0.0.0:9159
STORAGE_SHARING_DEBUG_ADDR: 0.0.0.0:9151
STORE_DEBUG_ADDR: 0.0.0.0:9464
THUMBNAILS_DEBUG_ADDR: 0.0.0.0:9189
WEB_DEBUG_ADDR: 0.0.0.0:9104
WEBDAV_DEBUG_ADDR: 0.0.0.0:9119
networks:
ocis-net:
external: true
@@ -4,8 +4,34 @@ version: "3.7"
services:
ocis:
environment:
# tracing
OCIS_TRACING_ENABLED: "true"
OCIS_TRACING_ENDPOINT: jaeger-agent:6831
# metrics
APP_PROVIDER_DEBUG_ADDR: 0.0.0.0:9165
GLAUTH_DEBUG_ADDR: 0.0.0.0:9129
GRAPH_DEBUG_ADDR: 0.0.0.0:9124
GRAPH_EXPLORER_DEBUG_ADDR: 0.0.0.0:9136
IDP_DEBUG_ADDR: 0.0.0.0:9134
OCS_DEBUG_ADDR: 0.0.0.0:9114
PROXY_DEBUG_ADDR: 0.0.0.0:9205
SETTINGS_DEBUG_ADDR: 0.0.0.0:9194
STORAGE_AUTH_BASIC_DEBUG_ADDR: 0.0.0.0:9147
STORAGE_AUTH_BEARER_DEBUG_ADDR: 0.0.0.0:9149
STORAGE_AUTH_MACHINE_DEBUG_ADDR: 0.0.0.0:9167
STORAGE_FRONTEND_DEBUG_ADDR: 0.0.0.0:9141
STORAGE_GATEWAY_DEBUG_ADDR: 0.0.0.0:9143
STORAGE_GROUPPROVIDER_DEBUG_ADDR: 0.0.0.0:9161
STORAGE_HOME_DEBUG_ADDR: 0.0.0.0:9156
STORAGE_METADATA_DEBUG_ADDR: 0.0.0.0:9217
STORAGE_PUBLIC_LINK_DEBUG_ADDR: 0.0.0.0:9179
STORAGE_USERPROVIDER_DEBUG_ADDR: 0.0.0.0:9145
STORAGE_USERS_DEBUG_ADDR: 0.0.0.0:9159
STORAGE_SHARING_DEBUG_ADDR: 0.0.0.0:9151
STORE_DEBUG_ADDR: 0.0.0.0:9464
THUMBNAILS_DEBUG_ADDR: 0.0.0.0:9189
WEB_DEBUG_ADDR: 0.0.0.0:9104
WEBDAV_DEBUG_ADDR: 0.0.0.0:9119
networks:
ocis-net:
@@ -4,8 +4,34 @@ version: "3.7"
services:
ocis:
environment:
# tracing
OCIS_TRACING_ENABLED: "true"
OCIS_TRACING_ENDPOINT: jaeger-agent:6831
# metrics
APP_PROVIDER_DEBUG_ADDR: 0.0.0.0:9165
GLAUTH_DEBUG_ADDR: 0.0.0.0:9129
GRAPH_DEBUG_ADDR: 0.0.0.0:9124
GRAPH_EXPLORER_DEBUG_ADDR: 0.0.0.0:9136
IDP_DEBUG_ADDR: 0.0.0.0:9134
OCS_DEBUG_ADDR: 0.0.0.0:9114
PROXY_DEBUG_ADDR: 0.0.0.0:9205
SETTINGS_DEBUG_ADDR: 0.0.0.0:9194
STORAGE_AUTH_BASIC_DEBUG_ADDR: 0.0.0.0:9147
STORAGE_AUTH_BEARER_DEBUG_ADDR: 0.0.0.0:9149
STORAGE_AUTH_MACHINE_DEBUG_ADDR: 0.0.0.0:9167
STORAGE_FRONTEND_DEBUG_ADDR: 0.0.0.0:9141
STORAGE_GATEWAY_DEBUG_ADDR: 0.0.0.0:9143
STORAGE_GROUPPROVIDER_DEBUG_ADDR: 0.0.0.0:9161
STORAGE_HOME_DEBUG_ADDR: 0.0.0.0:9156
STORAGE_METADATA_DEBUG_ADDR: 0.0.0.0:9217
STORAGE_PUBLIC_LINK_DEBUG_ADDR: 0.0.0.0:9179
STORAGE_USERPROVIDER_DEBUG_ADDR: 0.0.0.0:9145
STORAGE_USERS_DEBUG_ADDR: 0.0.0.0:9159
STORAGE_SHARING_DEBUG_ADDR: 0.0.0.0:9151
STORE_DEBUG_ADDR: 0.0.0.0:9464
THUMBNAILS_DEBUG_ADDR: 0.0.0.0:9189
WEB_DEBUG_ADDR: 0.0.0.0:9104
WEBDAV_DEBUG_ADDR: 0.0.0.0:9119
networks:
ocis-net:
@@ -92,8 +92,8 @@ services:
command: storage-app-provider server
environment:
REVA_GATEWAY: ${REVA_GATEWAY:-ocis:9142}
APP_PROVIDER_BASIC_GRPC_ADDR: 0.0.0.0:9164
APP_PROVIDER_BASIC_EXTERNAL_ADDR: ocis-appdriver-collabora:9164
APP_PROVIDER_GRPC_ADDR: 0.0.0.0:9164
APP_PROVIDER_EXTERNAL_ADDR: ocis-appdriver-collabora:9164
OCIS_JWT_SECRET: ${OCIS_JWT_SECRET:-Pive-Fumkiu4}
OCIS_MACHINE_AUTH_API_KEY: ${OCIS_MACHINE_AUTH_API_KEY:-change-me-please}
APP_PROVIDER_DRIVER: wopi
@@ -118,8 +118,8 @@ services:
#command: storage-app-provider server
environment:
REVA_GATEWAY: ${REVA_GATEWAY:-ocis:9142}
APP_PROVIDER_BASIC_GRPC_ADDR: 0.0.0.0:9164
APP_PROVIDER_BASIC_EXTERNAL_ADDR: ocis-appdriver-onlyoffice:9164
APP_PROVIDER_GRPC_ADDR: 0.0.0.0:9164
APP_PROVIDER_EXTERNAL_ADDR: ocis-appdriver-onlyoffice:9164
OCIS_JWT_SECRET: ${OCIS_JWT_SECRET:-Pive-Fumkiu4}
OCIS_MACHINE_AUTH_API_KEY: ${OCIS_MACHINE_AUTH_API_KEY:-change-me-please}
APP_PROVIDER_DRIVER: wopi
@@ -146,8 +146,8 @@ services:
#command: storage-app-provider server
environment:
REVA_GATEWAY: ${REVA_GATEWAY:-ocis:9142}
APP_PROVIDER_BASIC_GRPC_ADDR: 0.0.0.0:9164
APP_PROVIDER_BASIC_EXTERNAL_ADDR: ocis-appdriver-codimd:9164
APP_PROVIDER_GRPC_ADDR: 0.0.0.0:9164
APP_PROVIDER_EXTERNAL_ADDR: ocis-appdriver-codimd:9164
OCIS_JWT_SECRET: ${OCIS_JWT_SECRET:-Pive-Fumkiu4}
OCIS_MACHINE_AUTH_API_KEY: ${OCIS_MACHINE_AUTH_API_KEY:-change-me-please}
APP_PROVIDER_DRIVER: wopi
@@ -4,8 +4,34 @@ version: "3.7"
services:
ocis:
environment:
# tracing
OCIS_TRACING_ENABLED: "true"
OCIS_TRACING_ENDPOINT: jaeger-agent:6831
# metrics
APP_PROVIDER_DEBUG_ADDR: 0.0.0.0:9165
GLAUTH_DEBUG_ADDR: 0.0.0.0:9129
GRAPH_DEBUG_ADDR: 0.0.0.0:9124
GRAPH_EXPLORER_DEBUG_ADDR: 0.0.0.0:9136
IDP_DEBUG_ADDR: 0.0.0.0:9134
OCS_DEBUG_ADDR: 0.0.0.0:9114
PROXY_DEBUG_ADDR: 0.0.0.0:9205
SETTINGS_DEBUG_ADDR: 0.0.0.0:9194
STORAGE_AUTH_BASIC_DEBUG_ADDR: 0.0.0.0:9147
STORAGE_AUTH_BEARER_DEBUG_ADDR: 0.0.0.0:9149
STORAGE_AUTH_MACHINE_DEBUG_ADDR: 0.0.0.0:9167
STORAGE_FRONTEND_DEBUG_ADDR: 0.0.0.0:9141
STORAGE_GATEWAY_DEBUG_ADDR: 0.0.0.0:9143
STORAGE_GROUPPROVIDER_DEBUG_ADDR: 0.0.0.0:9161
STORAGE_HOME_DEBUG_ADDR: 0.0.0.0:9156
STORAGE_METADATA_DEBUG_ADDR: 0.0.0.0:9217
STORAGE_PUBLIC_LINK_DEBUG_ADDR: 0.0.0.0:9179
STORAGE_USERPROVIDER_DEBUG_ADDR: 0.0.0.0:9145
STORAGE_USERS_DEBUG_ADDR: 0.0.0.0:9159
STORAGE_SHARING_DEBUG_ADDR: 0.0.0.0:9151
STORE_DEBUG_ADDR: 0.0.0.0:9464
THUMBNAILS_DEBUG_ADDR: 0.0.0.0:9189
WEB_DEBUG_ADDR: 0.0.0.0:9104
WEBDAV_DEBUG_ADDR: 0.0.0.0:9119
networks:
ocis-net:
+167 -16
View File
@@ -101,6 +101,8 @@ curl 'https://ocis.test/app/list'
**Response example**:
HTTP status code: 200
```json
{
"mime-types": [
@@ -132,7 +134,8 @@ curl 'https://ocis.test/app/list'
"name": "OpenDocument",
"icon": "https://some-website.test/opendocument-text-icon.png",
"description": "OpenDocument text document",
"allow_creation": true
"allow_creation": true,
"default_application": "Collabora"
},
{
"mime_type": "text/markdown",
@@ -145,7 +148,8 @@ curl 'https://ocis.test/app/list'
],
"name": "Markdown file",
"description": "Markdown file",
"allow_creation": true
"allow_creation": true,
"default_application": "CodiMD"
},
{
"mime_type": "application/vnd.ms-word.document.macroenabled.12",
@@ -216,6 +220,8 @@ All apps are expected to be opened in an iframe and the response will give some
There are apps, which need to be opened in the iframe with a form post. The form post must include all form parameters included in the response. For these apps the response will look like this:
HTTP status code: 200
```json
{
"app_url": "https://.....",
@@ -230,6 +236,8 @@ There are apps, which need to be opened in the iframe with a form post. The form
There are apps, which need to be opened in the iframe with a GET request. The GET request must have set all headers included in the response. For these apps the response will look like this:
HTTP status code: 200
```json
{
"app_url": "https://...",
@@ -244,33 +252,175 @@ There are apps, which need to be opened in the iframe with a GET request. The GE
**Example responses (error case)**:
- wrong `view_mode`
- missing `file_id`
HTTP status code: 400
```json
{
"code": "SERVER_ERROR",
"message": "Missing or invalid viewmode argument"
"code": "INVALID_PARAMETER",
"message": "missing file ID"
}
```
- wrong `view_mode`
HTTP status code: 400
```json
{
"code": "INVALID_PARAMETER",
"message": "invalid view mode"
}
```
- unknown `app_name`
```json
{
"code": "SERVER_ERROR",
"message": "error searching for app provider"
}
```
- wrong / invalid file id / unauthorized to open the file
HTTP status code: 404
```json
{
"code": "SERVER_ERROR",
"message": "error statting file"
"code": "RESOURCE_NOT_FOUND",
"message": "error: not found: app 'Collabor' not found"
}
```
- wrong / invalid file id
HTTP status code: 400
```json
{
"code": "INVALID_PARAMETER",
"message": "invalid file ID"
}
```
- file id does not point to a file
HTTP status code: 400
```json
{
"code": "INVALID_PARAMETER",
"message": "the given file id does not point to a file"
}
```
- file does not exist / unauthorized to open the file
HTTP status code: 404
```json
{
"code": "RESOURCE_NOT_FOUND",
"message": "file does not exist"
}
```
### Creating a file with the app provider
**Endpoint**: specified in the capabilities in `new_file_url`, currently `/app/new`
**Method**: HTTP POST
**Authentication** (one of them):
- `Authorization` header with OIDC Bearer token for authenticated users or basic auth credentials (if enabled in oCIS)
- `Public-Token` header with public link token for public links
- `X-Access-Token` header with a REVA token for authenticated users
**Query parameters**:
- `parent_container_id` (mandatory): ID of the folder in which the file will be created
- `filename` (mandatory): name of the new file
- `template` (optional): not yet implemented
**Request examples**:
```bash
curl -X POST 'https://ocis.test/app/new?parent_container_id=c2lkOmNpZAo=&filename=test.odt'
```
**Response example**:
You will receive a file id of the freshly created file, which you can use to open the file in an editor.
```json
{
"file_id": "ZmlsZTppZAo="
}
```
**Example responses (error case)**:
- missing `parent_container_id`
HTTP status code: 400
```json
{
"code": "INVALID_PARAMETER",
"message": "missing parent container ID"
}
```
- missing `filename`
HTTP status code: 400
```json
{
"code": "INVALID_PARAMETER",
"message": "missing filename"
}
```
- parent container not found
HTTP status code: 404
```json
{
"code": "RESOURCE_NOT_FOUND",
"message": "the parent container is not accessible or does not exist"
}
```
- `parent_container_id` does not point to a container
HTTP status code: 400
```json
{
"code": "INVALID_PARAMETER",
"message": "the parent container id does not point to a container"
}
```
- `filename` is invalid (eg. includes a path segment)
HTTP status code: 400
```json
{
"code": "INVALID_PARAMETER",
"message": "the filename must not contain a path segment"
}
```
- file already exists
HTTP status code: 403
```json
{
"code": "RESOURCE_ALREADY_EXISTS",
"message": "the file already exists"
}
```
## App drivers
App drivers represent apps, if the app is not able to register itself. Currently there is only the CS3org WOPI server app driver.
@@ -295,7 +445,8 @@ services:
command: storage-app-provider server # start only the app driver
environment:
STORAGE_GATEWAY_ENDPOINT: ocis:9142 # oCIS gateway endpoint
APP_PROVIDER_BASIC_EXTERNAL_ADDR: ocis-appdriver-collabora:9164 # how oCIS can reach this app driver
APP_PROVIDER_GRPC_ADDR: 0.0.0.0:9164
APP_PROVIDER_EXTERNAL_ADDR: ocis-appdriver-collabora:9164 # how oCIS can reach this app driver
OCIS_JWT_SECRET: ocis-jwt-secret
APP_PROVIDER_DRIVER: wopi
APP_PROVIDER_WOPI_DRIVER_APP_NAME: Collabora # will be used as name for this app
+173
View File
@@ -0,0 +1,173 @@
---
title: "Configuration"
date: "2021-11-09T00:03:16+0100"
weight: 2
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/ocis/templates
geekdocFilePath: config.md
---
{{< toc >}}
## Configuration Framework
In order to simplify deployments and development the configuration model from oCIS aims to be simple yet flexible.
## Overview of the approach
{{< svg src="ocis/static/ocis-config-redesign.drawio.svg" >}}
## In-depth configuration
Since we include a set of predefined extensions within the single binary, configuring an extension can be done in a variety of ways. Since we work with complex types, having as many cli per config value scales poorly, so we limited the options to config files and environment variables, leaving cli flags for common values, such as logging (`--log-level`, `--log-pretty`, `--log-file` or `--log-color`).
The hierarchy is clear enough, leaving us with:
_(each element above overwrites its precedent)_
1. env variables
2. extension config
3. ocis config
This is manifested in the previous diagram. We can then speak about "configuration file arithmetics", where resulting config transformations happen through a series of steps. An administrator must be aware of these sources, since mis-managing them can be a source of confusion, having undesired transformations on config files believed not to be applied.
## Flows
Let's explore the various flows with examples and workflows.
### Examples
Let's explore with examples this approach.
#### Expected loading locations:
- `$HOME/.ocis/config/`
- `/etc/ocis/`
- `.config/`
followed by the extension name. When configuring the proxy, a valid full path that will get loaded is `$HOME/.ocis/config/proxy.yaml`.
#### Only config files
The following config files are present in the default loading locations:
_ocis.yaml_
```yaml
proxy:
http:
addr: localhost:1111
log:
pretty: false
color: false
level: info
accounts:
http:
addr: localhost:2222
log:
level: debug
color: false
pretty: false
log:
pretty: true
color: true
level: info
```
_proxy.yaml_
```yaml
http:
addr: localhost:3333
```
_accounts.yaml_
```yaml
http:
addr: localhost:4444
```
Note that the extension files will overwrite values from the main `ocis.yaml`, causing `ocis server` to run with the following configuration:
```yaml
proxy:
http:
addr: localhost:3333
accounts:
http:
addr: localhost:4444
log:
pretty: true
color: true
level: info
```
#### Using ENV variables
The logging configuration if defined in the main ocis.yaml is inherited by all extensions. It can be, however, overwritten by a single extension file if desired. The same example can be used to demonstrate environment values overwrites. With the same set of config files now we have the following command `PROXY_HTTP_ADDR=localhost:5555 ocis server`, now the resulting config looks like:
```yaml
proxy:
http:
addr: localhost:5555
accounts:
http:
addr: localhost:4444
log:
pretty: true
color: true
level: info
```
### Workflows
Since one can run an extension using the runtime (supervised) or not (unsupervised), we ensure correct behavior in both modes, expecting the same outputs.
#### Supervised
You are using the supervised mode whenever you issue the `ocis server` command. We start the runtime on port `9250` (by default) that listens for commands regarding the lifecycle of the supervised extensions. When an extension runs supervised and is killed, the only way to provide / overwrite configuration values will be through an extension config file. This is due to the parent process has already started, and it already has its own environment.
#### Unsupervised
All the points from the priority section hold true. An unsupervised extension can be started with the format: `ocis [extension]` i.e: `ocis proxy`. First, `ocis.yaml` is parsed, then `proxy.yaml` followed by environment variables.
## Shared Values
When running in supervised mode (`ocis server`) it is beneficial to have common values for logging, so that the log output is correctly formatted, or everything is piped to the same file without duplicating config keys and values all over the place. This is possible using the global `log` config key:
_ocis.yaml_
```yaml
log:
level: error
color: true
pretty: true
file: /var/tmp/ocis_output.log
```
There is, however, the option for extensions to overwrite this global values by declaring their own logging directives:
_ocis.yaml_
```yaml
log:
level: info
color: false
pretty: false
```
One can go as far as to make the case of an extension overwriting its shared logging config that received from the main `ocis.yaml` file. Because things can get out of hands pretty fast we recommend not mixing logging configuration values and either use the same global logging values for all extensions.
{{< hint warning >}}
When overwriting a globally shared logging values, one *MUST* specify all values.
{{< /hint >}}
### Log config keys
```yaml
log:
level: [ error | warning | info | debug ]
color: [ true | false ]
pretty: [ true | false ]
file: [ path/to/log/file ] # MUST not be used with pretty = true
```
## Default config values (in yaml)
TBD. Needs to be generated and merged with the env mappings.
+1 -1
View File
@@ -53,7 +53,7 @@ PROXY_TRANSPORT_TLS_CERT=./certs/your-host.crt \
If you generated these certificates on your own, you might need to set `OCIS_INSECURE` to `true`.
For more configuration options check the configuration section in [oCIS]({{< ref "../configuration" >}}) and the oCIS extensions.
For more configuration options check the configuration section in [oCIS]({{< ref "../config" >}}) and the oCIS extensions.
## Start the oCIS fullstack server with Docker Compose
@@ -115,7 +115,7 @@ Credentials:
- oCIS: [ocis.ocis-s3.latest.owncloud.works](https://ocis.ocis-s3.latest.owncloud.works)
- MinIO: [minio.ocis-s3.latest.owncloud.works](https://minio.ocis-s3.latest.owncloud.works)
# oCIS with CS3 users
# oCIS with LDAP for users and groups
Credentials:
@@ -126,10 +126,10 @@ Credentials:
## Latest
- oCIS: [ocis.ocis-cs3-users.latest.owncloud.works](https://ocis.ocis-cs3-users.latest.owncloud.works)
- LDAP admin: [ldap.ocis-cs3-users.latest.owncloud.works](https://ldap.ocis-cs3-users.latest.owncloud.works)
- oCIS: [ocis.ocis-ldap.latest.owncloud.works](https://ocis.ocis-ldap.latest.owncloud.works)
- LDAP admin: [ldap.ocis-ldap.latest.owncloud.works](https://ldap.ocis-ldap.latest.owncloud.works)
## Released
- oCIS: [ocis.ocis-cs3-users.released.owncloud.works](https://ocis.ocis-cs3-users.released.owncloud.works)
- LDAP admin: [ldap.ocis-cs3-users.released.owncloud.works](https://ldap.ocis-cs3-users.released.owncloud.works)
- oCIS: [ocis.ocis-ldap.released.owncloud.works](https://ocis.ocis-ldap.released.owncloud.works)
- LDAP admin: [ldap.ocis-ldap.released.owncloud.works](https://ldap.ocis-ldap.released.owncloud.works)
+129
View File
@@ -0,0 +1,129 @@
---
title: "oCIS with LDAP"
date: 2020-10-12T14:04:00+01:00
weight: 24
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/ocis/deployment
geekdocFilePath: ocis_ldap.md
---
{{< toc >}}
## Overview
- Traefik generating self signed certificates for local setup or obtaining valid SSL certificates for a server setup
- OpenLDAP server with demo users
- LDAP admin interface to edit users
- oCIS running behind Traefik as reverse proxy
- oCIS is using the LDAP server as user backend
[Find this example on GitHub](https://github.com/owncloud/ocis/tree/master/deployments/examples/ocis_ldap)
## Server Deployment
### Requirements
- Linux server with docker and docker-compose installed
- four domains set up and pointing to your server
- ocis.\* for serving oCIS
- ldap .\* for serving the LDAP managment UI
- traefik.\* for serving the Traefik dashboard
See also [example server setup]({{< ref "preparing_server" >}})
### Install this example
- Clone oCIS repository
`git clone https://github.com/owncloud/ocis.git`
- Go to the deployment example
`cd ocis/deployment/examples/ocis_ldap`
- Open the `.env` file in a text editor
The file by default looks like this:
```bash
# If you're on a internet facing server please comment out following line.
# It skips certificate validation for various parts of oCIS and is needed if you use self signed certificates.
INSECURE=true
### Traefik settings ###
# Serve Treafik dashboard. Defaults to "false".
TRAEFIK_DASHBOARD=
# Domain of Traefik, where you can find the dashboard. Defaults to "traefik.owncloud.test"
TRAEFIK_DOMAIN=
# Basic authentication for the dashboard. Defaults to user "admin" and password "admin"
TRAEFIK_BASIC_AUTH_USERS=
# Email address for obtaining LetsEncrypt certificates, needs only be changed if this is a public facing server
TRAEFIK_ACME_MAIL=
### oCIS settings ###
# oCIS version. Defaults to "latest"
OCIS_DOCKER_TAG=
# Domain of oCIS, where you can find the frontend. Defaults to "ocis.owncloud.test"
OCIS_DOMAIN=
# JWT secret which is used for the storage provider. Must be changed in order to have a secure oCIS. Defaults to "Pive-Fumkiu4"
OCIS_JWT_SECRET=
# JWT secret which is used for uploads to create transfer tokens. Must be changed in order to have a secure oCIS. Defaults to "replace-me-with-a-transfer-secret"
STORAGE_TRANSFER_SECRET=
# Machine auth api key secret. Must be changed in order to have a secure oCIS. Defaults to "change-me-please"
OCIS_MACHINE_AUTH_API_KEY=
### LDAP server settings ###
# Password of LDAP user "cn=admin,dc=owncloud,dc=com". Defaults to "admin"
LDAP_ADMIN_PASSWORD=
### LDAP manager settings ###
# Domain of LDAP manager. Defaults to "ldap.owncloud.test"
LDAP_MANAGER_DOMAIN=
```
You are installing oCIS on a server and Traefik will obtain valid certificates for you so please remove `INSECURE=true` or set it to `false`.
If you want to use the Traefik dashboard, set TRAEFIK_DASHBOARD to `true` (default is `false` and therefore not active). If you activate it, you must set a domain for the Traefik dashboard in `TRAEFIK_DOMAIN=` eg. `TRAEFIK_DOMAIN=traefik.owncloud.test`.
The Traefik dashboard is secured by basic auth. Default credentials are the user `admin` with the password `admin`. To set your own credentials, generate a htpasswd (eg. by using [an online tool](https://htpasswdgenerator.de/) or a cli tool).
Traefik will issue certificates with LetsEncrypt and therefore you must set an email address in `TRAEFIK_ACME_MAIL=`.
By default oCIS will be started in the `latest` version. If you want to start a specific version of oCIS set the version to `OCIS_DOCKER_TAG=`. Available versions can be found on [Docker Hub](https://hub.docker.com/r/owncloud/ocis/tags?page=1&ordering=last_updated).
Set your domain for the oCIS frontend in `OCIS_DOMAIN=`, eg. `OCIS_DOMAIN=cloud.owncloud.test`.
You also must override the default secrets in `STORAGE_TRANSFER_SECRET` and `OCIS_JWT_SECRET` in order to secure your oCIS instance. Choose some random strings eg. from the output of `openssl rand -base64 32`. For more information see [secure an oCIS instance]({{< ref "./#secure-an-ocis-instance" >}}).
The OpenLDAP server in this example deployment has an admin users, which is also used as bind user in order to keep theses examples simple. You can change the default password "admin" to a different one by setting it to `LDAP_ADMIN_PASSWORD=...`.
Set your domain for the LDAP manager UI in `LDAP_MANAGER_DOMAIN=`, eg. `ldap.owncloud.test`.
Now you have configured everything and can save the file.
- Start the docker stack
`docker-compose up -d`
- You now can visit oCIS and Traefik dashboard on your configured domains. You may need to wait some minutes until all services are fully ready, so make sure that you try to reload the pages from time to time.
## Local setup
For a more simple local ocis setup see [Getting started]({{< ref "../getting-started" >}})
This docker stack can also be run locally. One downside is that Traefik can not obtain valid SSL certificates and therefore will create self signed ones. This means that your browser will show scary warnings. Another downside is that you can not point DNS entries to your localhost. So you have to add static host entries to your computer.
On Linux and macOS you can add them to your `/etc/hosts` files like this:
```
127.0.0.1 cloud.owncloud.test
127.0.0.1 keycloak.owncloud.test
127.0.0.1 ldap.owncloud.test
127.0.0.1 traefik.owncloud.test
```
After that you're ready to start the application stack:
`docker-compose up -d`
Open https://ocis.owncloud.test in your browser and accept the invalid certificate warning. You now can login to oCIS with the default users, which also can be found here: [Getting started]({{< ref "../getting-started#login-to-ocis-web" >}}). You may need to wait some minutes until all services are fully ready, so make sure that you try to reload the pages from time to time.
+1 -1
View File
@@ -71,7 +71,7 @@ Open [https://localhost:9200](https://localhost:9200) and [login using one of th
### Basic Management Commands
The oCIS single binary contains multiple extensions and the `ocis` command helps you to manage them. You already used `ocis server` to run all available extensions in the [Run oCIS]({{< ref "#run-ocis" >}}) section. We now will show you some more management commands, which you may also explore by typing `ocis --help` or going to the [docs]({{< ref "../configuration" >}}).
The oCIS single binary contains multiple extensions and the `ocis` command helps you to manage them. You already used `ocis server` to run all available extensions in the [Run oCIS]({{< ref "#run-ocis" >}}) section. We now will show you some more management commands, which you may also explore by typing `ocis --help` or going to the [docs]({{< ref "../config" >}}).
To start oCIS server:
+26
View File
@@ -7,6 +7,32 @@ geekdocEditPath: edit/master/docs/ocis
geekdocFilePath: release_notes.md
---
## ownCloud Infinite Scale 1.15.0 Technology Preview
Version 1.15.0 brings improvements for the app provider (external application integrations) and more progress on the 'Spaces' feature. Public links now support multi-file and folder downloads as well as all other external application integrations. ownCloud Web 4.5.0 furthermore comes with improvements for use with the ownCloud Classic backend.
The most prominent changes in ownCloud Infinite Scale 1.15.0 and ownCloud Web 4.5.0 comprise:
- Multi-file and folder downloads as well as other external application (Collabora Online, ONLYOFFICE, CodiMD, etc.) integrations now work in public links. [web#5924](https://github.com/owncloud/web/pull/5924)
- New files (created/uploaded and file versions) will now be highlighted in ownCloud Web. [web#6020](https://github.com/owncloud/web/pull/6020)
- When using ownCloud Web with the ownCloud Classic backend, Web will now automatically display app entries in the app switcher based on the entries in the app switcher of the Classic UI (e.g., Activity, Market) so that users can easily find and use the apps. [web#5996](https://github.com/owncloud/web/pull/5996)
- The width of the right sidebar in the Files app of ownCloud Web has been reduced to make it better usable on medium-sized screens. [web#5983](https://github.com/owncloud/web/pull/5983)
- ownCloud Web has received performance and other improvements for external application integrations. [web#5952](https://github.com/owncloud/web/pull/5952)
- Spaces: A new API endpoint has been introduced that allows listing all Spaces in an installation. [ocis#2692](https://github.com/owncloud/ocis/pull/2692)
- Spaces: A permission has been added to control which users can list all Spaces. [cs3org/reva#2207](https://github.com/cs3org/reva/pull/2207)
- The app provider (for external application integrations) has received improvements for announcing and prioritizing applications as well as for error handling. [cs3org/reva#2230](https://github.com/cs3org/reva/pull/2230) [cs3org/reva#2263](https://github.com/cs3org/reva/pull/2263) [cs3org/reva#2258](https://github.com/cs3org/reva/pull/2258)
- The configuration defaults have been revisited and improved towards better security. [ocis#2700](https://github.com/owncloud/ocis/issues/2700)
- IPv6 support for Infinite Scale has been added. [ocis#2698](https://github.com/owncloud/ocis/pull/2698)
- A capability for the 'Resharing' feature will now be correctly announced. [ocis#2690](https://github.com/owncloud/ocis/pull/2690)
- Restoring a file version now works properly. [cs3org/reva#2270](https://github.com/cs3org/reva/pull/2270)
You can also read the full [ownCloud Infinite Scale changelog](https://github.com/owncloud/ocis/releases/tag/v1.15.0) and [ownCloud Web changelog](https://github.com/owncloud/web/releases/tag/v4.5.0) for further details on what has changed.
### Breaking changes
{{< hint warning >}}
We are currently in a Tech Preview state and breaking changes may occur at any time. For more information see our [release roadmap]({{< ref "./release_roadmap" >}})
{{< /hint >}}
## ownCloud Infinite Scale 1.14.0 Technology Preview
Version 1.14.0 brings more progress on the backend for the 'Spaces' and 'Quota' features. ownCloud Web 4.4.0 has received performance and usability improvements.
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Do not edit this file with editors other than diagrams.net -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="532px" height="1142px" viewBox="-0.5 -0.5 532 1142" content="&lt;mxfile host=&quot;app.diagrams.net&quot; modified=&quot;2021-11-08T23:06:05.492Z&quot; agent=&quot;5.0 (Macintosh)&quot; etag=&quot;ybBQ4usLvvc1Wv6kXIq4&quot; version=&quot;15.7.0&quot; type=&quot;google&quot;&gt;&lt;diagram id=&quot;ERaARL9lu1Ro2sCK4Dvv&quot; name=&quot;Page-1&quot;&gt;7Vtbk6o4EP41Pq4FoqM+jjNzzlbtbtWpnandPY8RIuRsSNgQvJxfvx0SboIKU+hYoy9KOkkn6a87/RFg4DyF268CRcEf3MN0MLK87cB5HoxG09kMfpVgpwXj2VwLfEE8LbILwSv5iY3QMtKEeDiuNJScU0miqtDljGFXVmRICL6pNltxWh01Qj6uCV5dROvSv4knAy2dTaxC/ismfpCNbFumJkRZYyOIA+TxTUnkvAycJ8G51Ffh9glTZbvMLrrflwO1+cQEZrJNhzja8dWb+/iayLdvs8Uopn/+9os90mrWiCZmxYPRAwqjgbPwQe0C6rhLYjV/LNZYmLXIXWYgibeqXSBDCgIbLgWOyU+0TBtYUEaJ5LEGVlUjSnwG1y7MG/Q5C9AqCVj80VSExPNU50XECZMpfpPFYPIMkhWh9IlTDt2eGWeqUSwF/xfvCQVPmIc9MwGzRBgGbw8az84hAVfGPMRS7KCJ6eDMDYrGjTNQNyWfMKKg5A5ZM2S80M8VF0DBhcGqC25OA257yPhghejg2k3AGJwKN+1gk/GkYpPc9UtGsedNVpmfyyzTS1jlCCB1Wx32l2bTTM/mMU2BTlXoemStBjTRB9L/ErUnLSheyaIEV2ZD0L2WYl8C00pVZdI9w28CIvFrhFxV3kCyqO4asD1Gqibc+iqRDJcoJu7Q424SKsu3CeHDLlHH5eOAeOgNCEflR8qXSI1Jue8T5msfXhG/PU7vGRxGGziPjWPo5MGWcaTTRySwlLu0tSUFrLlNJ1fv5536ULwG7pH2IWzF+1xuJPh213bBgZRRy7anyhbyPGMGyiFFBjwGRY/zkdpq25ikNUwnZ1KGcYVo3AqTk1pLOPen9IAjFDqR6wJBUNSiHaI9mrE0Nw8vk+Yw3e/Uk+Ga9LSD9X07/rupYRqE10IMu2SVTEuVLE7quX/clHIezpb768lfkfrhDgEyn5XQd6JpJWyml+Tx88/Pyo7fRIys6k3EpPVNxPmYstUfKJfnBjbcl925wfu5wY1nu47RajdEa1Nuy88G+o/WcS1aU7b+uZNbN5jGszpMF01z9uTW81wOwRXluf5OIj4gz00eprMuu/d9P2/jlW338/PdqtSPcLO79Vve0cfT6ckdvXH3OBtOsxpOYPeESn0GqQ/MirNI3S6+UfRGdjUfz5rC7LIJuX7jWYYvPyC7I5jFXwsELxqA2aOtj3wCuH/QlT8WP2UVe3Y2s9zqcy4Nf/cHXWeE4n6Ocj9H+VAmfmUpplPc5i9VtCPk9vkSTdOrJu8JY8YBA6zmzTfwCw7E1NirQfGKURJFlCiS0d+j2w0Bu9UfjycCScJhAmAUSwa4RHD6G3sleJirByfGLE7HtDh4ykZAnshrCQuwEnh9jq9XNIQeb0FqYBextHsMAWstccr0AgJIwLBWEhvyx/qcA2ZrIjjTyQ1sLIiK2+HNbwbdmJVtNdzwjZo2gvOl8/pB68UJ5/55xTUQzhs42jziD1dFOD/ngeaFCGfb96y68M3edN7pZl9080DUXg/dbHqHtxTEGrSURWnmxOFPqOkh5qWzFEq6UT8xLghWiX71R25KrM0MU/BM5aciNCzTqlBBjdKwz5m8pYpjFGqCTb04D79sbMR2mV0VJfzL0F1T3d9USq8WWSgFw0VCkNRIHt+kyHFtC6KAg+iKgBaQNe5zFjne8Z1rniBVk/33+Ju4ZtPnDWfL5I5TwwJ7Pn41RS5kwH3OEH0ppHuGKdr8znlk8Pmh0p35yEhBVwUXb4n8R3UfTkzpe6nmeWs0p4VdqfAN9gBYtwJcyxjYoKRIFb+X6wpVaWlXLu0r04ZQqz8OLxiLJ8LFR6yafT+FhI+P5Yh5s7sITFEapeVB+4d+fIf+46DXD6r6xx6KxZduaV3pc0Hn5X8=&lt;/diagram&gt;&lt;/mxfile&gt;"><defs/><g><rect x="185" y="0" width="80" height="20" fill="none" stroke="none" pointer-events="all"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 10px; margin-left: 225px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgba(0, 0, 0, 1); "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: nowrap;">&gt; ocis server</div></div></div></foreignObject><text x="225" y="14" fill="rgba(0, 0, 0, 1)" font-family="Helvetica" font-size="12px" text-anchor="middle">&gt; ocis server</text></switch></g><path d="M 328.08 138.57 L 328.08 370 L 140 370 L 140 100 L 301.21 100 Z" fill="rgba(255, 255, 255, 1)" stroke="rgba(0, 0, 0, 1)" stroke-miterlimit="10" pointer-events="none"/><path d="M 301.21 100 C 303.4 109.02 299.8 118.32 291.62 124.8 L 330 140.5 Z" fill="rgba(255, 255, 255, 1)" stroke="rgba(0, 0, 0, 1)" stroke-miterlimit="10" pointer-events="none"/><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 188px; height: 1px; padding-top: 235px; margin-left: 141px;"><div style="box-sizing: border-box; font-size: 0px; text-align: center;" data-drawio-colors="color: rgba(0, 0, 0, 1); "><div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: none; white-space: normal; overflow-wrap: normal;"><div align="left"><br /></div></div></div></div></foreignObject><text x="235" y="239" fill="rgba(0, 0, 0, 1)" font-family="Helvetica" font-size="12px" text-anchor="middle">&#xa;</text></switch></g><g transform="translate(-0.5 -0.5)"><switch><foreignObject style="overflow: visible; text-align: left;" pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe flex-start; width:Line truncated

After

Width:  |  Height:  |  Size: 22 KiB

-1
View File
@@ -25,7 +25,6 @@ include ../.make/generate.mk
.PHONY: ci-go-generate
ci-go-generate: # CI runs ci-node-generate automatically before this target
@go generate ./...
.PHONY: ci-node-generate
ci-node-generate:
+1 -1
View File
@@ -1,6 +1,6 @@
{
"debug": {
"addr": "0.0.0.0:9124",
"addr": "0.0.0.0:9129",
"token": "",
"pprof": false,
"zpages": false
+1 -1
View File
@@ -1,6 +1,6 @@
---
debug:
addr: 0.0.0.0:9124
addr: 0.0.0.0:9129
token:
pprof: false
zpages: false
+3 -2
View File
@@ -5,7 +5,6 @@ import (
"net/http"
"github.com/owncloud/ocis/glauth/pkg/config"
"github.com/owncloud/ocis/glauth/pkg/flagset"
"github.com/urfave/cli/v2"
)
@@ -14,7 +13,9 @@ func Health(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "health",
Usage: "Check health status",
Flags: flagset.HealthWithConfig(cfg),
Before: func(c *cli.Context) error {
return ParseConfig(c, cfg)
},
Action: func(c *cli.Context) error {
logger := NewLogger(cfg)
+21 -57
View File
@@ -3,15 +3,13 @@ package command
import (
"context"
"os"
"strings"
"github.com/owncloud/ocis/glauth/pkg/config"
"github.com/owncloud/ocis/glauth/pkg/flagset"
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
"github.com/owncloud/ocis/ocis-pkg/log"
"github.com/owncloud/ocis/ocis-pkg/sync"
oclog "github.com/owncloud/ocis/ocis-pkg/log"
"github.com/owncloud/ocis/ocis-pkg/shared"
"github.com/owncloud/ocis/ocis-pkg/version"
"github.com/spf13/viper"
"github.com/thejerf/suture/v4"
"github.com/urfave/cli/v2"
)
@@ -23,21 +21,16 @@ func Execute(cfg *config.Config) error {
Version: version.String,
Usage: "Serve GLAuth API for oCIS",
Compiled: version.Compiled(),
Authors: []*cli.Author{
{
Name: "ownCloud GmbH",
Email: "support@owncloud.com",
},
},
Flags: flagset.RootWithConfig(cfg),
Before: func(c *cli.Context) error {
cfg.Version = version.String
return nil
},
Commands: []*cli.Command{
Server(cfg),
Health(cfg),
@@ -59,58 +52,32 @@ func Execute(cfg *config.Config) error {
// NewLogger initializes a service-specific logger instance.
func NewLogger(cfg *config.Config) log.Logger {
return log.NewLogger(
log.Name("glauth"),
log.Level(cfg.Log.Level),
log.Pretty(cfg.Log.Pretty),
log.Color(cfg.Log.Color),
log.File(cfg.Log.File),
)
return oclog.LoggerFromConfig("glauth", *cfg.Log)
}
// ParseConfig loads glauth configuration from Viper known paths.
// ParseConfig loads glauth configuration from known paths.
func ParseConfig(c *cli.Context, cfg *config.Config) error {
sync.ParsingViperConfig.Lock()
defer sync.ParsingViperConfig.Unlock()
logger := NewLogger(cfg)
viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
viper.SetEnvPrefix("GLAUTH")
viper.AutomaticEnv()
if c.IsSet("config-file") {
viper.SetConfigFile(c.String("config-file"))
} else {
viper.SetConfigName("glauth")
viper.AddConfigPath("/etc/ocis")
viper.AddConfigPath("$HOME/.ocis")
viper.AddConfigPath("./config")
conf, err := ociscfg.BindSourcesToStructs("glauth", cfg)
if err != nil {
return err
}
if err := viper.ReadInConfig(); err != nil {
switch err.(type) {
case viper.ConfigFileNotFoundError:
logger.Debug().
Msg("no config found on preconfigured location")
case viper.UnsupportedConfigError:
logger.Fatal().
Err(err).
Msg("unsupported config type")
default:
logger.Fatal().
Err(err).
Msg("failed to read 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 = &shared.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.Commons == nil {
cfg.Log = &shared.Log{}
}
if err := viper.Unmarshal(&cfg); err != nil {
logger.Fatal().
Err(err).
Msg("failed to parse config")
}
return nil
// load all env variables relevant to the config in the current context.
conf.LoadOSEnv(config.GetEnv(cfg), false)
bindings := config.StructMappings(cfg)
return ociscfg.BindEnv(conf, bindings)
}
// SutureService allows for the glauth command to be embedded and supervised by a suture supervisor tree.
@@ -120,10 +87,7 @@ type SutureService struct {
// NewSutureService creates a new glauth.SutureService
func NewSutureService(cfg *ociscfg.Config) suture.Service {
if cfg.Mode == 0 {
cfg.GLAuth.Supervised = true
}
cfg.GLAuth.Log.File = cfg.Log.File
cfg.GLAuth.Commons = cfg.Commons
return SutureService{
cfg: cfg.GLAuth,
}
+4 -19
View File
@@ -8,14 +8,12 @@ import (
"github.com/oklog/run"
accounts "github.com/owncloud/ocis/accounts/pkg/proto/v0"
"github.com/owncloud/ocis/glauth/pkg/config"
"github.com/owncloud/ocis/glauth/pkg/flagset"
"github.com/owncloud/ocis/glauth/pkg/metrics"
"github.com/owncloud/ocis/glauth/pkg/server/debug"
"github.com/owncloud/ocis/glauth/pkg/server/glauth"
"github.com/owncloud/ocis/glauth/pkg/tracing"
pkgcrypto "github.com/owncloud/ocis/ocis-pkg/crypto"
"github.com/owncloud/ocis/ocis-pkg/service/grpc"
"github.com/owncloud/ocis/ocis-pkg/sync"
"github.com/urfave/cli/v2"
)
@@ -24,24 +22,15 @@ func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: "Start integrated server",
Flags: flagset.ServerWithConfig(cfg),
Before: func(ctx *cli.Context) error {
logger := NewLogger(cfg)
if cfg.HTTP.Root != "/" {
cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
}
// StringSliceFlag doesn't support Destination
// UPDATE Destination on string flags supported. Wait for https://github.com/urfave/cli/pull/1078 to get to micro/cli
if len(ctx.StringSlice("backend-server")) > 0 {
cfg.Backend.Servers = ctx.StringSlice("backend-server")
if err := ParseConfig(ctx, cfg); err != nil {
return err
}
if len(ctx.StringSlice("fallback-server")) > 0 {
cfg.Fallback.Servers = ctx.StringSlice("fallback-server")
}
if !cfg.Supervised {
return ParseConfig(ctx, cfg)
}
logger.Debug().Strs("backend-server", ctx.StringSlice("backend-server")).Str("service", "glauth").Msg("ignoring config file parsing when running supervised")
return nil
},
Action: func(c *cli.Context) error {
@@ -188,10 +177,6 @@ func Server(cfg *config.Config) *cli.Command {
})
}
if !cfg.Supervised {
sync.Trap(&gr, cancel)
}
return gr.Run()
},
}
+90 -45
View File
@@ -1,78 +1,79 @@
package config
import "context"
import (
"context"
"path"
// Log defines the available logging configuration.
type Log struct {
Level string
Pretty bool
Color bool
File string
}
"github.com/owncloud/ocis/ocis-pkg/shared"
"github.com/owncloud/ocis/ocis-pkg/config/defaults"
)
// Debug defines the available debug configuration.
type Debug struct {
Addr string
Token string
Pprof bool
Zpages bool
Addr string `ocisConfig:"addr"`
Token string `ocisConfig:"token"`
Pprof bool `ocisConfig:"pprof"`
Zpages bool `ocisConfig:"zpages"`
}
// HTTP defines the available http configuration.
type HTTP struct {
Addr string
Namespace string
Root string
Addr string `ocisConfig:"addr"`
Namespace string `ocisConfig:"namespace"`
Root string `ocisConfig:"root"`
}
// Tracing defines the available tracing configuration.
type Tracing struct {
Enabled bool
Type string
Endpoint string
Collector string
Service string
Enabled bool `ocisConfig:"enabled"`
Type string `ocisConfig:"type"`
Endpoint string `ocisConfig:"endpoint"`
Collector string `ocisConfig:"collector"`
Service string `ocisConfig:"service"`
}
// Ldap defined the available LDAP configuration.
type Ldap struct {
Addr string
Enabled bool
Enabled bool `ocisConfig:"enabled"`
Addr string `ocisConfig:"addr"`
}
// Ldaps defined the available LDAPS configuration.
type Ldaps struct {
Addr string
Enabled bool
Cert string
Key string
Addr string `ocisConfig:"addr"`
Enabled bool `ocisConfig:"enabled"`
Cert string `ocisConfig:"cert"`
Key string `ocisConfig:"key"`
}
// Backend defined the available backend configuration.
type Backend struct {
Datastore string
BaseDN string
Insecure bool
NameFormat string
GroupFormat string
Servers []string
SSHKeyAttr string
UseGraphAPI bool
Datastore string `ocisConfig:"datastore"`
BaseDN string `ocisConfig:"base_dn"`
Insecure bool `ocisConfig:"insecure"`
NameFormat string `ocisConfig:"name_format"`
GroupFormat string `ocisConfig:"group_format"`
Servers []string `ocisConfig:"servers"`
SSHKeyAttr string `ocisConfig:"ssh_key_attr"`
UseGraphAPI bool `ocisConfig:"use_graph_api"`
}
// Config combines all available configuration parts.
type Config struct {
File string
Log Log
Debug Debug
HTTP HTTP
Tracing Tracing
Ldap Ldap
Ldaps Ldaps
Backend Backend
Fallback Backend
Version string
RoleBundleUUID string
*shared.Commons
File string `ocisConfig:"file"`
Log *shared.Log `ocisConfig:"log"`
Debug Debug `ocisConfig:"debug"`
HTTP HTTP `ocisConfig:"http"`
Tracing Tracing `ocisConfig:"tracing"`
Ldap Ldap `ocisConfig:"ldap"`
Ldaps Ldaps `ocisConfig:"ldaps"`
Backend Backend `ocisConfig:"backend"`
Fallback Backend `ocisConfig:"fallback"`
Version string `ocisConfig:"version"`
RoleBundleUUID string `ocisConfig:"role_bundle_uuid"`
Context context.Context
Supervised bool
@@ -82,3 +83,47 @@ type Config struct {
func New() *Config {
return &Config{}
}
func DefaultConfig() *Config {
return &Config{
Debug: Debug{
Addr: "127.0.0.1:9129",
},
HTTP: HTTP{},
Tracing: Tracing{
Type: "jaeger",
Service: "glauth",
},
Ldap: Ldap{
Enabled: true,
Addr: "127.0.0.1:9125",
},
Ldaps: Ldaps{
Addr: "127.0.0.1:9126",
Enabled: true,
Cert: path.Join(defaults.BaseDataPath(), "ldap", "ldap.crt"),
Key: path.Join(defaults.BaseDataPath(), "ldap", "ldap.key"),
},
Backend: Backend{
Datastore: "accounts",
BaseDN: "dc=ocis,dc=test",
Insecure: false,
NameFormat: "cn",
GroupFormat: "ou",
Servers: nil,
SSHKeyAttr: "sshPublicKey",
UseGraphAPI: true,
},
Fallback: Backend{
Datastore: "",
BaseDN: "dc=ocis,dc=test",
Insecure: false,
NameFormat: "cn",
GroupFormat: "ou",
Servers: nil,
SSHKeyAttr: "sshPublicKey",
UseGraphAPI: true,
},
RoleBundleUUID: "71881883-1768-46bd-a24d-a356a2afdf7f", // BundleUUIDRoleAdmin
}
}
+167
View File
@@ -0,0 +1,167 @@
package config
import "github.com/owncloud/ocis/ocis-pkg/shared"
// GetEnv fetches a list of known env variables for this extension. It is to be used by gookit, as it provides a list
// with all the environment variables an extension supports.
func GetEnv(cfg *Config) []string {
var r = make([]string, len(structMappings(cfg)))
for i := range structMappings(cfg) {
r = append(r, structMappings(cfg)[i].EnvVars...)
}
return r
}
// StructMappings binds a set of environment variables to a destination on cfg. Iterating over this set and editing the
// Destination value of a binding will alter the original value, as it is a pointer to its memory address. This lets
// us propagate changes easier.
func StructMappings(cfg *Config) []shared.EnvBinding {
return structMappings(cfg)
}
// structMappings binds a set of environment variables to a destination on cfg.
func structMappings(cfg *Config) []shared.EnvBinding {
return []shared.EnvBinding{
{
EnvVars: []string{"OCIS_LOG_LEVEL", "GLAUTH_LOG_LEVEL"},
Destination: &cfg.Log.Level,
},
{
EnvVars: []string{"OCIS_LOG_PRETTY", "GLAUTH_LOG_PRETTY"},
Destination: &cfg.Log.Pretty,
},
{
EnvVars: []string{"OCIS_LOG_COLOR", "GLAUTH_LOG_COLOR"},
Destination: &cfg.Log.Color,
},
{
EnvVars: []string{"OCIS_LOG_FILE", "GLAUTH_LOG_FILE"},
Destination: &cfg.Log.File,
},
{
EnvVars: []string{"GLAUTH_CONFIG_FILE"},
Destination: &cfg.File,
},
{
EnvVars: []string{"OCIS_TRACING_ENABLED", "GLAUTH_TRACING_ENABLED"},
Destination: &cfg.Tracing.Enabled,
},
{
EnvVars: []string{"OCIS_TRACING_TYPE", "GLAUTH_TRACING_TYPE"},
Destination: &cfg.Tracing.Type,
},
{
EnvVars: []string{"OCIS_TRACING_ENDPOINT", "GLAUTH_TRACING_ENDPOINT"},
Destination: &cfg.Tracing.Endpoint,
},
{
EnvVars: []string{"OCIS_TRACING_COLLECTOR", "GLAUTH_TRACING_COLLECTOR"},
Destination: &cfg.Tracing.Collector,
},
{
EnvVars: []string{"GLAUTH_TRACING_SERVICE"},
Destination: &cfg.Tracing.Service,
},
{
EnvVars: []string{"GLAUTH_DEBUG_ADDR"},
Destination: &cfg.Debug.Addr,
},
{
EnvVars: []string{"GLAUTH_DEBUG_TOKEN"},
Destination: &cfg.Debug.Token,
},
{
EnvVars: []string{"GLAUTH_DEBUG_PPROF"},
Destination: &cfg.Debug.Pprof,
},
{
EnvVars: []string{"GLAUTH_DEBUG_ZPAGES"},
Destination: &cfg.Debug.Zpages,
},
{
EnvVars: []string{"GLAUTH_ROLE_BUNDLE_ID"},
Destination: &cfg.RoleBundleUUID,
},
{
EnvVars: []string{"GLAUTH_LDAP_ADDR"},
Destination: &cfg.Ldap.Addr,
},
{
EnvVars: []string{"GLAUTH_LDAP_ENABLED"},
Destination: &cfg.Ldap.Enabled,
},
{
EnvVars: []string{"GLAUTH_LDAPS_ADDR"},
Destination: &cfg.Ldaps.Addr,
},
{
EnvVars: []string{"GLAUTH_LDAPS_ENABLED"},
Destination: &cfg.Ldaps.Enabled,
},
{
EnvVars: []string{"GLAUTH_LDAPS_CERT"},
Destination: &cfg.Ldaps.Cert,
},
{
EnvVars: []string{"GLAUTH_LDAPS_KEY"},
Destination: &cfg.Ldaps.Key,
},
{
EnvVars: []string{"GLAUTH_BACKEND_BASEDN"},
Destination: &cfg.Backend.BaseDN,
},
{
EnvVars: []string{"GLAUTH_BACKEND_NAME_FORMAT"},
Destination: &cfg.Backend.NameFormat,
},
{
EnvVars: []string{"GLAUTH_BACKEND_GROUP_FORMAT"},
Destination: &cfg.Backend.GroupFormat,
},
{
EnvVars: []string{"GLAUTH_BACKEND_SSH_KEY_ATTR"},
Destination: &cfg.Backend.SSHKeyAttr,
},
{
EnvVars: []string{"GLAUTH_BACKEND_DATASTORE"},
Destination: &cfg.Backend.Datastore,
},
{
EnvVars: []string{"GLAUTH_BACKEND_INSECURE"},
Destination: &cfg.Backend.Insecure,
},
{
EnvVars: []string{"GLAUTH_BACKEND_USE_GRAPHAPI"},
Destination: &cfg.Backend.UseGraphAPI,
},
{
EnvVars: []string{"GLAUTH_FALLBACK_BASEDN"},
Destination: &cfg.Fallback.BaseDN,
},
{
EnvVars: []string{"GLAUTH_FALLBACK_NAME_FORMAT"},
Destination: &cfg.Fallback.NameFormat,
},
{
EnvVars: []string{"GLAUTH_FALLBACK_GROUP_FORMAT"},
Destination: &cfg.Fallback.GroupFormat,
},
{
EnvVars: []string{"GLAUTH_FALLBACK_SSH_KEY_ATTR"},
Destination: &cfg.Fallback.SSHKeyAttr,
},
{
EnvVars: []string{"GLAUTH_FALLBACK_DATASTORE"},
Destination: &cfg.Fallback.Datastore,
},
{
EnvVars: []string{"GLAUTH_FALLBACK_INSECURE"},
Destination: &cfg.Fallback.Insecure,
},
{
EnvVars: []string{"GLAUTH_FALLBACK_USE_GRAPHAPI"},
Destination: &cfg.Fallback.UseGraphAPI,
},
}
}
-299
View File
@@ -1,299 +0,0 @@
package flagset
import (
"path"
"github.com/owncloud/ocis/glauth/pkg/config"
"github.com/owncloud/ocis/ocis-pkg/config/defaults"
"github.com/owncloud/ocis/ocis-pkg/flags"
"github.com/urfave/cli/v2"
)
// RootWithConfig applies cfg to the root flagset
func RootWithConfig(cfg *config.Config) []cli.Flag {
return []cli.Flag{
&cli.StringFlag{
Name: "log-level",
Usage: "Set logging level",
EnvVars: []string{"GLAUTH_LOG_LEVEL", "OCIS_LOG_LEVEL"},
Destination: &cfg.Log.Level,
},
&cli.BoolFlag{
Name: "log-pretty",
Usage: "Enable pretty logging",
EnvVars: []string{"GLAUTH_LOG_PRETTY", "OCIS_LOG_PRETTY"},
Destination: &cfg.Log.Pretty,
},
&cli.BoolFlag{
Name: "log-color",
Usage: "Enable colored logging",
EnvVars: []string{"GLAUTH_LOG_COLOR", "OCIS_LOG_COLOR"},
Destination: &cfg.Log.Color,
},
}
}
// HealthWithConfig applies cfg to the root flagset
func HealthWithConfig(cfg *config.Config) []cli.Flag {
return []cli.Flag{
&cli.StringFlag{
Name: "debug-addr",
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9129"),
Usage: "Address to debug endpoint",
EnvVars: []string{"GLAUTH_DEBUG_ADDR"},
Destination: &cfg.Debug.Addr,
},
}
}
// ServerWithConfig applies cfg to the root flagset
func ServerWithConfig(cfg *config.Config) []cli.Flag {
return []cli.Flag{
&cli.StringFlag{
Name: "log-file",
Usage: "Enable log to file",
EnvVars: []string{"GLAUTH_LOG_FILE", "OCIS_LOG_FILE"},
Destination: &cfg.Log.File,
},
&cli.StringFlag{
Name: "config-file",
Value: flags.OverrideDefaultString(cfg.File, ""),
Usage: "Path to config file",
EnvVars: []string{"GLAUTH_CONFIG_FILE"},
Destination: &cfg.File,
},
&cli.BoolFlag{
Name: "tracing-enabled",
Usage: "Enable sending traces",
EnvVars: []string{"GLAUTH_TRACING_ENABLED", "OCIS_TRACING_ENABLED"},
Destination: &cfg.Tracing.Enabled,
},
&cli.StringFlag{
Name: "tracing-type",
Value: flags.OverrideDefaultString(cfg.Tracing.Type, "jaeger"),
Usage: "Tracing backend type",
EnvVars: []string{"GLAUTH_TRACING_TYPE", "OCIS_TRACING_TYPE"},
Destination: &cfg.Tracing.Type,
},
&cli.StringFlag{
Name: "tracing-endpoint",
Value: flags.OverrideDefaultString(cfg.Tracing.Endpoint, ""),
Usage: "Endpoint for the agent",
EnvVars: []string{"GLAUTH_TRACING_ENDPOINT", "OCIS_TRACING_ENDPOINT"},
Destination: &cfg.Tracing.Endpoint,
},
&cli.StringFlag{
Name: "tracing-collector",
Value: flags.OverrideDefaultString(cfg.Tracing.Collector, ""),
Usage: "Endpoint for the collector",
EnvVars: []string{"GLAUTH_TRACING_COLLECTOR", "OCIS_TRACING_COLLECTOR"},
Destination: &cfg.Tracing.Collector,
},
&cli.StringFlag{
Name: "tracing-service",
Value: flags.OverrideDefaultString(cfg.Tracing.Service, "glauth"),
Usage: "Service name for tracing",
EnvVars: []string{"GLAUTH_TRACING_SERVICE"},
Destination: &cfg.Tracing.Service,
},
&cli.StringFlag{
Name: "debug-addr",
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9129"),
Usage: "Address to bind debug server",
EnvVars: []string{"GLAUTH_DEBUG_ADDR"},
Destination: &cfg.Debug.Addr,
},
&cli.StringFlag{
Name: "debug-token",
Value: flags.OverrideDefaultString(cfg.Debug.Token, ""),
Usage: "Token to grant metrics access",
EnvVars: []string{"GLAUTH_DEBUG_TOKEN"},
Destination: &cfg.Debug.Token,
},
&cli.BoolFlag{
Name: "debug-pprof",
Usage: "Enable pprof debugging",
EnvVars: []string{"GLAUTH_DEBUG_PPROF"},
Destination: &cfg.Debug.Pprof,
},
&cli.BoolFlag{
Name: "debug-zpages",
Usage: "Enable zpages debugging",
EnvVars: []string{"GLAUTH_DEBUG_ZPAGES"},
Destination: &cfg.Debug.Zpages,
},
&cli.StringFlag{
Name: "role-bundle-id",
Value: flags.OverrideDefaultString(cfg.RoleBundleUUID, "71881883-1768-46bd-a24d-a356a2afdf7f"), // BundleUUIDRoleAdmin
Usage: "roleid used to make internal grpc requests",
EnvVars: []string{"GLAUTH_ROLE_BUNDLE_ID"},
Destination: &cfg.RoleBundleUUID,
},
&cli.StringFlag{
Name: "ldap-addr",
Value: flags.OverrideDefaultString(cfg.Ldap.Addr, "127.0.0.1:9125"),
Usage: "Address to bind ldap server",
EnvVars: []string{"GLAUTH_LDAP_ADDR"},
Destination: &cfg.Ldap.Addr,
},
&cli.BoolFlag{
Name: "ldap-enabled",
Value: flags.OverrideDefaultBool(cfg.Ldap.Enabled, true),
Usage: "Enable ldap server",
EnvVars: []string{"GLAUTH_LDAP_ENABLED"},
Destination: &cfg.Ldap.Enabled,
},
&cli.StringFlag{
Name: "ldaps-addr",
Value: flags.OverrideDefaultString(cfg.Ldaps.Addr, "127.0.0.1:9126"),
Usage: "Address to bind ldaps server",
EnvVars: []string{"GLAUTH_LDAPS_ADDR"},
Destination: &cfg.Ldaps.Addr,
},
&cli.BoolFlag{
Name: "ldaps-enabled",
Value: flags.OverrideDefaultBool(cfg.Ldaps.Enabled, true),
Usage: "Enable ldaps server",
EnvVars: []string{"GLAUTH_LDAPS_ENABLED"},
Destination: &cfg.Ldaps.Enabled,
},
&cli.StringFlag{
Name: "ldaps-cert",
Value: flags.OverrideDefaultString(cfg.Ldaps.Cert, path.Join(defaults.BaseDataPath(), "ldap", "ldap.crt")),
Usage: "path to ldaps certificate in PEM format",
EnvVars: []string{"GLAUTH_LDAPS_CERT"},
Destination: &cfg.Ldaps.Cert,
},
&cli.StringFlag{
Name: "ldaps-key",
Value: flags.OverrideDefaultString(cfg.Ldaps.Key, path.Join(defaults.BaseDataPath(), "ldap", "ldap.key")),
Usage: "path to ldaps key in PEM format",
EnvVars: []string{"GLAUTH_LDAPS_KEY"},
Destination: &cfg.Ldaps.Key,
},
// backend config
&cli.StringFlag{
Name: "backend-basedn",
Value: flags.OverrideDefaultString(cfg.Backend.BaseDN, "dc=ocis,dc=test"),
Usage: "base distinguished name to expose",
EnvVars: []string{"GLAUTH_BACKEND_BASEDN"},
Destination: &cfg.Backend.BaseDN,
},
&cli.StringFlag{
Name: "backend-name-format",
Value: flags.OverrideDefaultString(cfg.Backend.NameFormat, "cn"),
Usage: "name attribute for entries to expose. typically cn or uid",
EnvVars: []string{"GLAUTH_BACKEND_NAME_FORMAT"},
Destination: &cfg.Backend.NameFormat,
},
&cli.StringFlag{
Name: "backend-group-format",
Value: flags.OverrideDefaultString(cfg.Backend.GroupFormat, "ou"),
Usage: "name attribute for entries to expose. typically ou, cn or dc",
EnvVars: []string{"GLAUTH_BACKEND_GROUP_FORMAT"},
Destination: &cfg.Backend.GroupFormat,
},
&cli.StringFlag{
Name: "backend-ssh-key-attr",
Value: flags.OverrideDefaultString(cfg.Backend.SSHKeyAttr, "sshPublicKey"),
Usage: "ssh key attribute for entries to expose",
EnvVars: []string{"GLAUTH_BACKEND_SSH_KEY_ATTR"},
Destination: &cfg.Backend.SSHKeyAttr,
},
&cli.StringFlag{
Name: "backend-datastore",
Value: flags.OverrideDefaultString(cfg.Backend.Datastore, "accounts"),
// TODO bring back config / flat file support
Usage: "datastore to use as the backend. one of accounts, ldap or owncloud",
EnvVars: []string{"GLAUTH_BACKEND_DATASTORE"},
Destination: &cfg.Backend.Datastore,
},
&cli.BoolFlag{
Name: "backend-insecure",
Value: flags.OverrideDefaultBool(cfg.Backend.Insecure, false),
Usage: "Allow insecure requests to the datastore",
EnvVars: []string{"GLAUTH_BACKEND_INSECURE"},
Destination: &cfg.Backend.Insecure,
},
&cli.StringSliceFlag{
Name: "backend-server",
Value: cli.NewStringSlice(),
Usage: `--backend-server https://demo.owncloud.com/apps/graphapi/v1.0 [--backend-server "https://demo2.owncloud.com/apps/graphapi/v1.0"]`,
EnvVars: []string{"GLAUTH_BACKEND_SERVERS"},
},
&cli.BoolFlag{
Name: "backend-use-graphapi",
Value: flags.OverrideDefaultBool(cfg.Backend.UseGraphAPI, true),
Usage: "use Graph API, only for owncloud datastore",
EnvVars: []string{"GLAUTH_BACKEND_USE_GRAPHAPI"},
Destination: &cfg.Backend.UseGraphAPI,
},
// fallback config
&cli.StringFlag{
Name: "fallback-basedn",
Value: flags.OverrideDefaultString(cfg.Fallback.BaseDN, "dc=ocis,dc=test"),
Usage: "base distinguished name to expose",
EnvVars: []string{"GLAUTH_FALLBACK_BASEDN"},
Destination: &cfg.Fallback.BaseDN,
},
&cli.StringFlag{
Name: "fallback-name-format",
Value: flags.OverrideDefaultString(cfg.Fallback.NameFormat, "cn"),
Usage: "name attribute for entries to expose. typically cn or uid",
EnvVars: []string{"GLAUTH_FALLBACK_NAME_FORMAT"},
Destination: &cfg.Fallback.NameFormat,
},
&cli.StringFlag{
Name: "fallback-group-format",
Value: flags.OverrideDefaultString(cfg.Fallback.GroupFormat, "ou"),
Usage: "name attribute for entries to expose. typically ou, cn or dc",
EnvVars: []string{"GLAUTH_FALLBACK_GROUP_FORMAT"},
Destination: &cfg.Fallback.GroupFormat,
},
&cli.StringFlag{
Name: "fallback-ssh-key-attr",
Value: flags.OverrideDefaultString(cfg.Fallback.SSHKeyAttr, "sshPublicKey"),
Usage: "ssh key attribute for entries to expose",
EnvVars: []string{"GLAUTH_FALLBACK_SSH_KEY_ATTR"},
Destination: &cfg.Fallback.SSHKeyAttr,
},
&cli.StringFlag{
Name: "fallback-datastore",
Value: flags.OverrideDefaultString(cfg.Fallback.Datastore, ""),
// TODO bring back config / flat file support
Usage: "datastore to use as the fallback. one of accounts, ldap or owncloud",
EnvVars: []string{"GLAUTH_FALLBACK_DATASTORE"},
Destination: &cfg.Fallback.Datastore,
},
&cli.BoolFlag{
Name: "fallback-insecure",
Value: flags.OverrideDefaultBool(cfg.Fallback.Insecure, false),
Usage: "Allow insecure requests to the datastore",
EnvVars: []string{"GLAUTH_FALLBACK_INSECURE"},
Destination: &cfg.Fallback.Insecure,
},
&cli.StringSliceFlag{
Name: "fallback-server",
Value: cli.NewStringSlice("https://demo.owncloud.com/apps/graphapi/v1.0"),
Usage: `--fallback-server http://internal1.example.com [--fallback-server http://internal2.example.com]`,
EnvVars: []string{"GLAUTH_FALLBACK_SERVERS"},
},
&cli.BoolFlag{
Name: "fallback-use-graphapi",
Value: flags.OverrideDefaultBool(cfg.Fallback.UseGraphAPI, true),
Usage: "use Graph API, only for owncloud datastore",
EnvVars: []string{"GLAUTH_FALLBACK_USE_GRAPHAPI"},
Destination: &cfg.Fallback.UseGraphAPI,
},
&cli.StringFlag{
Name: "extensions",
Usage: "Run specific extensions during supervised mode. This flag is set by the runtime",
},
}
}
+17 -22
View File
@@ -19,25 +19,26 @@ require (
github.com/blevesearch/bleve/v2 v2.2.2
github.com/coreos/go-oidc/v3 v3.1.0
github.com/cs3org/go-cs3apis v0.0.0-20211104090126-8e972dca8304
github.com/cs3org/reva v1.16.0
github.com/cs3org/reva v1.17.0
github.com/disintegration/imaging v1.6.2
github.com/glauth/glauth/v2 v2.0.0-20211021011345-ef3151c28733
github.com/go-chi/chi/v5 v5.0.7
github.com/go-chi/cors v1.2.0
github.com/go-chi/render v1.0.1
github.com/go-ldap/ldap/v3 v3.4.1
github.com/go-logr/logr v0.4.0
github.com/go-ozzo/ozzo-validation/v4 v4.3.0
github.com/gofrs/uuid v4.1.0+incompatible
github.com/golang-jwt/jwt/v4 v4.1.0
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0
github.com/gofrs/uuid v4.2.0+incompatible
github.com/golang-jwt/jwt/v4 v4.2.0
github.com/golang/protobuf v1.5.2
github.com/gookit/config/v2 v2.0.27
github.com/gorilla/mux v1.8.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.6.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.1
github.com/iancoleman/strcase v0.2.0
github.com/justinas/alice v1.2.0
github.com/libregraph/lico v0.52.0
github.com/libregraph/lico v0.53.0
github.com/mennanov/fieldmask-utils v0.5.0
github.com/mitchellh/mapstructure v1.4.2
github.com/mitchellh/mapstructure v1.4.3
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826
github.com/nmcclain/asn1-ber v0.0.0-20170104154839-2661553a0484
github.com/nmcclain/ldap v0.0.0-20210720162743-7f8d1e44eeba
@@ -51,7 +52,6 @@ require (
github.com/rs/zerolog v1.26.0
github.com/sirupsen/logrus v1.8.1
github.com/spf13/cobra v1.2.1
github.com/spf13/viper v1.9.0
github.com/stretchr/testify v1.7.0
github.com/thejerf/suture/v4 v4.0.1
github.com/urfave/cli/v2 v2.3.0
@@ -65,15 +65,17 @@ require (
go.opentelemetry.io/otel/trace v1.2.0
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa
golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d
golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1
google.golang.org/genproto v0.0.0-20211020151524-b7c3a969101a
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8
google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12
google.golang.org/grpc v1.42.0
google.golang.org/protobuf v1.27.1
gopkg.in/yaml.v2 v2.4.0
gotest.tools/v3 v3.0.3
stash.kopano.io/kgol/rndm v1.1.1
)
require (
cloud.google.com/go v0.93.3 // indirect
contrib.go.opencensus.io/exporter/prometheus v0.4.0 // indirect
github.com/Azure/go-ntlmssp v0.0.0-20200615164410-66371956d46c // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
@@ -85,7 +87,7 @@ require (
github.com/RoaringBitmap/roaring v0.9.4 // indirect
github.com/acomagu/bufpipe v1.0.3 // indirect
github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d // indirect
github.com/aws/aws-sdk-go v1.42.5 // indirect
github.com/aws/aws-sdk-go v1.42.19 // indirect
github.com/beevik/etree v1.1.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bitly/go-simplejson v0.5.0 // indirect
@@ -130,23 +132,23 @@ require (
github.com/go-git/go-billy/v5 v5.3.1 // indirect
github.com/go-git/go-git/v5 v5.4.2 // indirect
github.com/go-kit/log v0.2.0 // indirect
github.com/go-ldap/ldap/v3 v3.4.1 // indirect
github.com/go-logfmt/logfmt v0.5.1 // indirect
github.com/go-sql-driver/mysql v1.6.0 // indirect
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt v3.2.2+incompatible // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/mock v1.6.0 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/gomodule/redigo v1.8.5 // indirect
github.com/gomodule/redigo v1.8.6 // indirect
github.com/google/go-cmp v0.5.6 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/uuid v1.3.0 // indirect
github.com/gookit/goutil v0.3.15 // indirect
github.com/gorilla/schema v1.2.0 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
github.com/hashicorp/go-hclog v1.0.0 // indirect
github.com/hashicorp/go-plugin v1.4.3 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/hashicorp/yamux v0.0.0-20210826001029-26ff87cf9493 // indirect
github.com/huandu/xstrings v1.3.2 // indirect
github.com/imdario/mergo v0.3.12 // indirect
@@ -160,7 +162,6 @@ require (
github.com/klauspost/compress v1.13.6 // indirect
github.com/klauspost/cpuid/v2 v2.0.9 // indirect
github.com/longsleep/go-metrics v1.0.0 // indirect
github.com/magiconair/properties v1.8.5 // indirect
github.com/mattermost/xml-roundtrip-validator v0.1.0 // indirect
github.com/mattn/go-colorable v0.1.11 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
@@ -171,7 +172,7 @@ require (
github.com/miekg/dns v1.1.43 // indirect
github.com/mileusna/useragent v1.0.2 // indirect
github.com/minio/md5-simd v1.1.2 // indirect
github.com/minio/minio-go/v7 v7.0.15 // indirect
github.com/minio/minio-go/v7 v7.0.16 // indirect
github.com/minio/sha256-simd v1.0.0 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
@@ -189,7 +190,6 @@ require (
github.com/orcaman/concurrent-map v0.0.0-20210501183033-44dafcb38ecc // indirect
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c // indirect
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
github.com/pelletier/go-toml v1.9.4 // indirect
github.com/pkg/xattr v0.4.4 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pquerna/cachecontrol v0.1.0 // indirect
@@ -213,13 +213,9 @@ require (
github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749 // indirect
github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546 // indirect
github.com/sony/gobreaker v0.4.1 // indirect
github.com/spf13/afero v1.6.0 // indirect
github.com/spf13/cast v1.4.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/steveyen/gtreap v0.1.0 // indirect
github.com/studio-b12/gowebdav v0.0.0-20210917133250-a3a86976a1df // indirect
github.com/subosito/gotenv v1.2.0 // indirect
github.com/tus/tusd v1.6.0 // indirect
github.com/wk8/go-ordered-map v0.2.0 // indirect
github.com/xanzy/ssh-agent v0.3.1 // indirect
@@ -241,7 +237,6 @@ require (
gopkg.in/square/go-jose.v2 v2.6.0 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
stash.kopano.io/kgol/kcc-go/v5 v5.0.1 // indirect
stash.kopano.io/kgol/oidc-go v0.3.2 // indirect
+56 -59
View File
@@ -37,7 +37,6 @@ cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM7
cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE=
cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk=
cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk=
cloud.google.com/go/firestore v1.6.0/go.mod h1:afJwI0vaXwAG54kI7A//lP/lSPDkQORQuMkv56TxEPU=
cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I=
cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw=
cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA=
@@ -106,6 +105,7 @@ github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWX
github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI=
github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk=
github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4=
github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558=
github.com/agnivade/levenshtein v1.0.1/go.mod h1:CURSv5d9Uaml+FovSIICkLbAUZ9S4RqaHDIsdSBg7lM=
github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
github.com/akamai/AkamaiOPEN-edgegrid-golang v1.1.0/go.mod h1:kX6YddBkXqqywAe8c9LyvgTCyFuZCTMF4cRPQhc3Fy8=
@@ -121,12 +121,14 @@ github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ=
github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM=
github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk=
github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo=
github.com/arl/statsviz v0.4.0/go.mod h1:+5inUy/dxy11x/KSmicG3ZrEEy0Yr81AFm3dn4QC04M=
github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o=
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY=
github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
github.com/asaskevich/govalidator v0.0.0-20180720115003-f9ffefc3facf/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
@@ -167,8 +169,8 @@ github.com/aws/aws-sdk-go v1.34.28/go.mod h1:H7NKnBqNVzoTJpGfLrQkkD+ytBA93eiDYi/
github.com/aws/aws-sdk-go v1.37.27/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro=
github.com/aws/aws-sdk-go v1.40.11/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q=
github.com/aws/aws-sdk-go v1.42.5 h1:0xNoQrGh9InmUsT+9qzZ8QLfBEUsnev5BMeED6t6cKI=
github.com/aws/aws-sdk-go v1.42.5/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q=
github.com/aws/aws-sdk-go v1.42.19 h1:L/aM1QwsqVia9qIqexTHwYN+lgLYuOtf11VDgz0YIyw=
github.com/aws/aws-sdk-go v1.42.19/go.mod h1:585smgzpB/KqRA+K3y/NL/oYRqQvpNJYvLm+LY1U59Q=
github.com/beevik/etree v1.1.0 h1:T0xke/WvNtMoCqgzPhkX2r4rjY3GDZFi+FjpRZY2Jbs=
github.com/beevik/etree v1.1.0/go.mod h1:r8Aw8JqVegEf0w2fDnATrX9VpkMcyFeM0FhwO62wh+A=
github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
@@ -235,6 +237,7 @@ github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghf
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cevaris/ordered_map v0.0.0-20190319150403-3adeae072e73/go.mod h1:507vXsotcZop7NZfBWdhPmVeOse4ko2R7AagJYrpoEg=
github.com/cheggaaa/pb v1.0.29/go.mod h1:W40334L7FMC5JKWldsTWbdGjLo0RxUKK73K+TuPxX30=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
@@ -296,8 +299,8 @@ github.com/crewjam/saml v0.4.5/go.mod h1:qCJQpUtZte9R1ZjUBcW8qtCNlinbO363ooNl02S
github.com/cs3org/cato v0.0.0-20200828125504-e418fc54dd5e/go.mod h1:XJEZ3/EQuI3BXTp/6DUzFr850vlxq11I6satRtz0YQ4=
github.com/cs3org/go-cs3apis v0.0.0-20211104090126-8e972dca8304 h1:e/nIPR518vyvrulo9goAZTtYD6gFfu/2/9MDe6mTGcw=
github.com/cs3org/go-cs3apis v0.0.0-20211104090126-8e972dca8304/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
github.com/cs3org/reva v1.16.0 h1:aDMlMiCF0klEENBNDkZm+GbmnGkw/CIZGZCmv1DOgQM=
github.com/cs3org/reva v1.16.0/go.mod h1:9jmSVOnYv69pYbXfjcboTQaZPwHZ6NSD+2jjE9xx12U=
github.com/cs3org/reva v1.17.0 h1:UVdiiK6gUF2pb7qN9TKhMuf55sUKVnCcVjiVSzodluw=
github.com/cs3org/reva v1.17.0/go.mod h1:gtsVzMfDrUiUjH6qlHx+QqiRKsSYjVO6wEcCzANiqUg=
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8 h1:Z9lwXumT5ACSmJ7WGnFl+OMLLjpz5uR2fyz7dC255FI=
github.com/cubewise-code/go-mime v0.0.0-20200519001935-8c5762b177d8/go.mod h1:4abs/jPXcmJzYoYGF91JF9Uq9s/KL5n1jvFDix8KcqY=
github.com/cyberdelia/templates v0.0.0-20141128023046-ca7fffd4298c/go.mod h1:GyV+0YP4qX0UQ7r2MoYZ+AvYDp12OF5yg4q8rGnyNh4=
@@ -378,7 +381,6 @@ github.com/go-asn1-ber/asn1-ber v1.5.3 h1:u7utq56RUFiynqUzgVMFDymapcOtQ/MZkh3H4Q
github.com/go-asn1-ber/asn1-ber v1.5.3/go.mod h1:hEBeB/ic+5LoWskz+yKT7vGhhPYkProFKoKdwZRWMe0=
github.com/go-chi/chi v4.0.2+incompatible h1:maB6vn6FqCxrpz4FqWdh4+lwpyZIQS7YEAUcHlgXVRs=
github.com/go-chi/chi v4.0.2+incompatible/go.mod h1:eB3wogJHnLi3x/kFX2A+IbTBlXxmMeXJVKy9tTv1XzQ=
github.com/go-chi/chi/v5 v5.0.5/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
github.com/go-chi/chi/v5 v5.0.7 h1:rDTPXLDHGATaeHvVlLcR4Qe0zftYethFucbjVQ1PxU8=
github.com/go-chi/chi/v5 v5.0.7/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
github.com/go-chi/cors v1.2.0 h1:tV1g1XENQ8ku4Bq3K9ub2AtgG+p16SmzeMSGTwrOKdE=
@@ -509,6 +511,7 @@ github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LB
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA=
github.com/gobs/pretty v0.0.0-20180724170744-09732c25a95b/go.mod h1:Xo4aNUOrJnVruqWQJBtW6+bTBDTniY8yZum5rF3b5jw=
github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0=
github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY=
@@ -541,8 +544,8 @@ github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5x
github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
github.com/gofrs/uuid v3.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/gofrs/uuid v4.1.0+incompatible h1:sIa2eCvUTwgjbqXrPLfNwUf9S3i3mpH1O1atV+iL/Wk=
github.com/gofrs/uuid v4.1.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/gofrs/uuid v4.2.0+incompatible h1:yyYWMnhkhrKwwr8gAOcOCYxOOscHgDS9yZgBrnJfGa0=
github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4=
@@ -552,9 +555,9 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69
github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A=
github.com/golang-jwt/jwt v3.2.2+incompatible h1:IfV12K8xAKAnZqdXVzCZ+TOjboZ2keLg81eXfW3O+oY=
github.com/golang-jwt/jwt v3.2.2+incompatible/go.mod h1:8pz2t5EyA70fFQQSrl6XZXzqecmYZeUEB8OUGHkxJ+I=
github.com/golang-jwt/jwt/v4 v4.1.0 h1:XUgk2Ex5veyVFVeLm0xhusUTQybEbexJXrvPNOKkSY0=
github.com/golang-jwt/jwt/v4 v4.1.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g=
github.com/golang-jwt/jwt/v4 v4.2.0 h1:besgBTC8w8HjP6NzQdxwKH9Z5oQMZ24ThTrHp3cZ8eU=
github.com/golang-jwt/jwt/v4 v4.2.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg=
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/glog v1.0.0/go.mod h1:EWib/APOK0SL3dFbYqvxE3UYd8E6s1ouQ7iEp/0LWV4=
@@ -575,6 +578,7 @@ github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3K
github.com/golang/mock v1.6.0 h1:ErTB+efbowRARo13NNdxyJji2egdxLGQhRaY+DUumQc=
github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
github.com/golang/protobuf v0.0.0-20170622202551-6a1fa9404c0a/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
@@ -599,8 +603,8 @@ github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW
github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/golangci/lint-1 v0.0.0-20181222135242-d2cdd8c08219/go.mod h1:/X8TswGSh1pIozq4ZwCfxS0WA5JGXguxk94ar/4c87Y=
github.com/gomodule/redigo v1.8.5 h1:nRAxCa+SVsyjSBrtZmG/cqb6VbTmuRzpg/PoTFlpumc=
github.com/gomodule/redigo v1.8.5/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0=
github.com/gomodule/redigo v1.8.6 h1:h7kHSqUl2kxeaQtVslsfUCPJ1oz2pxcyzLy4zezIzPw=
github.com/gomodule/redigo v1.8.6/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0=
github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
@@ -649,7 +653,15 @@ github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0=
github.com/gookit/color v1.4.2 h1:tXy44JFSFkKnELV6WaMo/lLfu/meqITX3iAV52do7lk=
github.com/gookit/color v1.4.2/go.mod h1:fqRyamkC1W8uxl+lxCQxOT09l/vYfZ+QeiX3rKQHCoQ=
github.com/gookit/config/v2 v2.0.27 h1:jCQSAe3qN8gFABz6h4qA9MNhTk0D4ipn6+1jeAD7g9E=
github.com/gookit/config/v2 v2.0.27/go.mod h1:q7I5c+hWOlzGh8jLff6CuNV6H2RDZ1QanaBEimGGtwE=
github.com/gookit/goutil v0.3.14/go.mod h1:YdGV0ObqRUlRq4/RzAQBHcd1Wzl/jKw7cppDBtD3q+U=
github.com/gookit/goutil v0.3.15 h1:nfMiE1nlBES16zOsLzNeR/vo6a7KlV58womgG6dB+JM=
github.com/gookit/goutil v0.3.15/go.mod h1:2w7h+/CB6n2m4qzECHj6+TOmMR8q7ierD9+LyybGy3I=
github.com/gookit/ini/v2 v2.0.11 h1:Wl651xN2AaJbFrb8daBwWo8kS+sQHL3TddFi0/PRNXs=
github.com/gookit/ini/v2 v2.0.11/go.mod h1:rIY8Uup5WDdPsrEE7VrF7fcMdGCCcPGA22Bk5R7roJQ=
github.com/gophercloud/gophercloud v0.15.1-0.20210202035223-633d73521055/go.mod h1:wRtmUelyIIv3CSSDI47aUwbs075O6i+LY+pXsKCBsb4=
github.com/gophercloud/gophercloud v0.16.0/go.mod h1:wRtmUelyIIv3CSSDI47aUwbs075O6i+LY+pXsKCBsb4=
github.com/gophercloud/utils v0.0.0-20210216074907-f6de111f2eae/go.mod h1:wx8HMD8oQD0Ryhz6+6ykq75PJ79iPyEqYHfwZ4l7OsA=
@@ -673,30 +685,24 @@ github.com/grpc-ecosystem/grpc-gateway v1.8.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t
github.com/grpc-ecosystem/grpc-gateway v1.9.0/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo=
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.6.0 h1:rgxjzoDmDXw5q8HONgyHhBas4to0/XWRo/gPpJhsUNQ=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.6.0/go.mod h1:qrJPVzv9YlhsrxJc3P/Q85nr0w1lIRikTl4JlhdDH5w=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.1 h1:p5m7GOEGXyoq6QWl4/RRMsQ6tWbTpbQmAnkxXgWSprY=
github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.1/go.mod h1:8ZeZajTed/blCOHBbj8Fss8bPHiFKcmJJzuIbUtFCAo=
github.com/h2non/parth v0.0.0-20190131123155-b4df798d6542/go.mod h1:Ow0tF8D4Kplbc8s8sSb3V2oUCygFHVp8gC3Dn6U4MNI=
github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q=
github.com/hashicorp/consul/api v1.10.1/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M=
github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ=
github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
github.com/hashicorp/go-hclog v1.0.0 h1:bkKf0BeBXcSYa7f5Fyi9gMuQ8gNsxeiNpZjR6VxNZeo=
github.com/hashicorp/go-hclog v1.0.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM=
github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk=
github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA=
github.com/hashicorp/go-plugin v1.4.3 h1:DXmvivbWD5qdiBts9TpBC7BYL1Aia5sxbRgQB+v6UZM=
github.com/hashicorp/go-plugin v1.4.3/go.mod h1:5fGEH17QVwTTcR0zV7yhDPLLmFX9YSZ38b18Udy6vYQ=
github.com/hashicorp/go-retryablehttp v0.6.6/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY=
github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU=
github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8=
github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU=
github.com/hashicorp/go-sockaddr v1.0.2/go.mod h1:rB4wwRAUzs07qva3c5SdrY/NEtAUjGlgmH/UkBUC97A=
github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4=
@@ -706,16 +712,13 @@ github.com/hashicorp/go-uuid v1.0.2/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/b
github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
github.com/hashicorp/hcl/v2 v2.10.1/go.mod h1:FwWsfWEjyV/CMj8s/gqAuiviY72rJ1/oayI9WftqcKg=
github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64=
github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ=
github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY=
github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I=
github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE=
github.com/hashicorp/memberlist v0.2.4/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE=
github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc=
github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk=
github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM=
github.com/hashicorp/yamux v0.0.0-20210826001029-26ff87cf9493 h1:brI5vBRUlAlM34VFmnLPwjnCL/FxAJp9XvOdX6Zt+XE=
github.com/hashicorp/yamux v0.0.0-20210826001029-26ff87cf9493/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ=
@@ -810,6 +813,7 @@ github.com/kr/pty v1.1.5/go.mod h1:9r2w37qlBe7rQ6e1fg1S/9xpWHSnaqNdHD3WcMdbPDA=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/labbsr0x/bindman-dns-webhook v1.0.2/go.mod h1:p6b+VCXIR8NYKpDr8/dg1HKfQoRHCdcsROXKvmoehKA=
github.com/labbsr0x/goh v1.0.1/go.mod h1:8K2UhVoaWXcCU7Lxoa2omWnC8gyW8px7/lmO61c027w=
@@ -817,8 +821,8 @@ github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvf
github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k=
github.com/leodido/go-urn v1.1.0/go.mod h1:+cyI34gQWZcE1eQU7NVgKkkzdXDQHr1dBMtdAPozLkw=
github.com/lib/pq v1.10.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/libregraph/lico v0.52.0 h1:247mrD9R4Brmd+nJlY4jwWPcUxXbpqiqrPQd6ja/sv4=
github.com/libregraph/lico v0.52.0/go.mod h1:DsTdIsBygkCkSmGSCN14qKdAM+KvizKaozFb+173Kgo=
github.com/libregraph/lico v0.53.0 h1:5xsbZle5jeh8F12Hi0OHZ8eV301wiToqeMS0TdH7dN0=
github.com/libregraph/lico v0.53.0/go.mod h1:EXf6Y9s9TygW6unSXosBpVXWUURoN2sPX0053o4zVfQ=
github.com/linode/linodego v0.25.3/go.mod h1:GSBKPpjoQfxEfryoCRcgkuUOCuVtGHWhzI8OMdycNTE=
github.com/liquidweb/go-lwApi v0.0.0-20190605172801-52a4864d2738/go.mod h1:0sYF9rMXb0vlG+4SzdiGMXHheCZxjguMq+Zb4S2BfBs=
github.com/liquidweb/go-lwApi v0.0.5/go.mod h1:0sYF9rMXb0vlG+4SzdiGMXHheCZxjguMq+Zb4S2BfBs=
@@ -831,7 +835,6 @@ github.com/m3o/m3o-go/client v0.0.0-20210421144725-8bfd7992ada3/go.mod h1:vmeaYr
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/magiconair/properties v1.8.4/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
github.com/magiconair/properties v1.8.5 h1:b6kJs+EmPFMYGkow9GiUyCyOvIwYetYJ3fSaWak/Gls=
github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60=
github.com/mailru/easyjson v0.0.0-20180823135443-60711f1a8329/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
@@ -850,7 +853,6 @@ github.com/mattermost/xml-roundtrip-validator v0.1.0/go.mod h1:qccnGMcpgwcNaBnxq
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-colorable v0.1.7/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
@@ -862,6 +864,7 @@ github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2y
github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84=
github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-isatty v0.0.13/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
@@ -891,13 +894,12 @@ github.com/mileusna/useragent v1.0.2/go.mod h1:3d8TOmwL/5I8pJjyVDteHtgDGcefrFUX4
github.com/minio/md5-simd v1.1.0/go.mod h1:XpBqgZULrMYD3R+M28PcmP0CkI7PEMzB3U77ZrKZ0Gw=
github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34=
github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM=
github.com/minio/minio-go/v7 v7.0.15 h1:r9/NhjJ+nXYrIYvbObhvc1wPj3YH1iDpJzz61uRKLyY=
github.com/minio/minio-go/v7 v7.0.15/go.mod h1:pUV0Pc+hPd1nccgmzQF/EXh48l/Z/yps6QPF1aaie4g=
github.com/minio/minio-go/v7 v7.0.16 h1:GspaSBS8lOuEUCAqMe0W3UxSoyOA4b4F8PTspRVI+k4=
github.com/minio/minio-go/v7 v7.0.16/go.mod h1:pUV0Pc+hPd1nccgmzQF/EXh48l/Z/yps6QPF1aaie4g=
github.com/minio/sha256-simd v0.1.1/go.mod h1:B5e1o+1/KgNmWrSQK08Y6Z1Vb5pwIktudl0J58iy0KM=
github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g=
github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM=
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI=
github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
@@ -908,6 +910,7 @@ github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eI
github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU=
github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8=
github.com/mitchellh/go-vnc v0.0.0-20150629162542-723ed9867aed/go.mod h1:3rdaFaCv4AyBgu5ALFM0+tSuHrBh6v692nyQe3ikrq0=
github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo=
github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
github.com/mitchellh/hashstructure v1.1.0 h1:P6P1hdjqAAknpY/M1CGipelZgp+4y9ja9kmUZPXP+H0=
@@ -920,8 +923,8 @@ github.com/mitchellh/mapstructure v1.3.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR
github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mitchellh/mapstructure v1.4.2 h1:6h7AQ0yhTcIsmFmnAwQls75jp2Gzs4iB8W7pjMO+rqo=
github.com/mitchellh/mapstructure v1.4.2/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mitchellh/mapstructure v1.4.3 h1:OVowDSCllw/YjdLkam3/sm7wEtOy59d8ndGgCcyj8cs=
github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
github.com/moby/sys/mount v0.2.0/go.mod h1:aAivFE2LB3W4bACsUXChRHQ0qKWsetY4Y9V7sxOougM=
@@ -1020,8 +1023,6 @@ github.com/pelletier/go-toml v1.4.0/go.mod h1:PN7xzY2wHTK0K9p34ErDQMlFxa51Fk0OUr
github.com/pelletier/go-toml v1.7.0/go.mod h1:vwGMzjaWMwyfHwgIBhI2YUM4fB6nL6lVAvS1LBMMhTE=
github.com/pelletier/go-toml v1.8.1/go.mod h1:T2/BmBdy8dvIRq1a/8aqjN41wvWlN4lrapLU/GW4pbc=
github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
github.com/pelletier/go-toml v1.9.4 h1:tjENF6MfZAg8e4ZmZTeWaWiT2vXtsoO6+iuOjFhECwM=
github.com/pelletier/go-toml v1.9.4/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
@@ -1035,7 +1036,6 @@ github.com/pkg/xattr v0.4.4/go.mod h1:sBD3RAqlr8Q+RC3FutZcikpT8nyDrIEEBw2J744gVW
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI=
github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s=
github.com/pquerna/cachecontrol v0.0.0-20180517163645-1555304b9b35/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA=
github.com/pquerna/cachecontrol v0.1.0 h1:yJMy84ti9h/+OEWa752kBTKv4XC30OtVVHYv/8cTqKc=
github.com/pquerna/cachecontrol v0.1.0/go.mod h1:NrUG3Z7Rdu85UNR3vm7SOsl1nFIeSiQnrHV5K9mBcUI=
@@ -1128,7 +1128,6 @@ github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/sacloud/libsacloud v1.36.2/go.mod h1:P7YAOVmnIn3DKHqCZcUKYUXmSwGBm3yS7IBEjKVSrjg=
github.com/sagikazarmark/crypt v0.1.0/go.mod h1:B/mN0msZuINBtQ1zZLEQcegFJJf9vnYIR88KRMEuODE=
github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww=
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.7.0.20210127161313-bd30bebeac4f/go.mod h1:CJJ5VAbozOl0yEw7nHB9+7BXTJbIn6h7W+f6Gau5IP8=
@@ -1169,12 +1168,9 @@ github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJ
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
github.com/spf13/afero v1.4.1/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY=
github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA=
github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
github.com/spf13/cobra v0.0.1/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
@@ -1183,10 +1179,10 @@ github.com/spf13/cobra v1.1.1/go.mod h1:WnodtKOvamDL/PwE2M4iKs8aMDBZ5Q5klgD3qfVJ
github.com/spf13/cobra v1.2.1 h1:+KmjbUw1hriSNMF55oPrkZcb27aECyrj8V2ytv7kWDw=
github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk=
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
github.com/spf13/pflag v1.0.0/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
@@ -1194,8 +1190,6 @@ github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DM
github.com/spf13/viper v1.7.0/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg=
github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns=
github.com/spf13/viper v1.9.0 h1:yR6EXjTp0y0cLN8OZg1CRZmOBdI88UcGkhgyJhu6nZk=
github.com/spf13/viper v1.9.0/go.mod h1:+i6ajR7OX2XaiBkrcZJFK21htRk7eDeLg7+O6bhUPP4=
github.com/steveyen/gtreap v0.1.0 h1:CjhzTa274PyJLJuMZwIzCO1PfC00oRa8d1Kc78bFXJM=
github.com/steveyen/gtreap v0.1.0/go.mod h1:kl/5J7XbrOmlIbYIXdRHDDE5QxHqpk0cmkT7Z4dM9/Y=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
@@ -1212,7 +1206,6 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/studio-b12/gowebdav v0.0.0-20210917133250-a3a86976a1df h1:C+J/LwTqP8gRPt1MdSzBNZP0OYuDm5wsmDKgwpLjYzo=
github.com/studio-b12/gowebdav v0.0.0-20210917133250-a3a86976a1df/go.mod h1:gCcfDlA1Y7GqOaeEKw5l9dOGx1VLdc/HuQSlQAaZ30s=
github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s=
github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw=
github.com/syndtr/goleveldb v1.0.0/go.mod h1:ZVVdQEZoIme9iO1Ch2Jdy24qqXrMMOU6lpPAyBWyWuQ=
github.com/thanhpk/randstr v1.0.4 h1:IN78qu/bR+My+gHCvMEXhR/i5oriVHcTB/BJJIRTsNo=
@@ -1243,6 +1236,9 @@ github.com/valyala/fasttemplate v1.1.0/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPU
github.com/vektah/gqlparser v1.1.2/go.mod h1:1ycwN7Ij5njmMkPPAOaRFY4rET2Enx7IkVv3vaXspKw=
github.com/vimeo/go-util v1.2.0/go.mod h1:s13SMDTSO7AjH1nbgp707mfN5JFIWUFDU5MDDuRRtKs=
github.com/vinyldns/go-vinyldns v0.0.0-20200917153823-148a5f6b8f14/go.mod h1:RWc47jtnVuQv6+lY3c768WtXCas/Xi+U5UFc5xULmYg=
github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk=
github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4=
github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI=
github.com/vultr/govultr/v2 v2.0.0/go.mod h1:2PsEeg+gs3p/Fo5Pw8F9mv+DUBEOlrNZ8GmCTGmhOhs=
github.com/wk8/go-ordered-map v0.2.0 h1:KlvGyHstD1kkGZkPtHCyCfRYS0cz84uk6rrW/Dnhdtk=
github.com/wk8/go-ordered-map v0.2.0/go.mod h1:9ZIbRunKbuvfPKyBP1SIKLcXNlv74YCOZ3t3VTS6gRk=
@@ -1259,11 +1255,14 @@ github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU=
github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0=
github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 h1:QldyIu/L63oPpyvQmHgvgickp1Yw510KJOqX7H24mg8=
github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs=
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
github.com/yaegashi/msgraph.go v0.1.1-0.20200221123608-2d438cf2a7cc/go.mod h1:tso14hwzqX4VbnWTNsxiL0DvMb2OwbGISFA7jDibdWc=
github.com/yaegashi/msgraph.go v0.1.4 h1:leDXSczAbwBpYFSmmZrdByTiPoUw8dbTfNMetAjJvbw=
github.com/yaegashi/msgraph.go v0.1.4/go.mod h1:vgeYhHa5skJt/3lTyjGXThTZhwbhRnGo6uUxzoJIGME=
github.com/yaegashi/wtz.go v0.0.2/go.mod h1:nOLA5QXsmdkRxBkP5tljhua13ADHCKirLBrzPf4PEJc=
github.com/yosuke-furukawa/json5 v0.1.1/go.mod h1:sw49aWDqNdRJ6DYUtIQiaA3xyj2IL9tjeNYmX2ixwcU=
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7JulP+udvsHwJoVG1YGAP6VLg4y9I5dyZdqmA=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
@@ -1271,6 +1270,9 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8=
github.com/zclconf/go-cty v1.8.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk=
github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8=
github.com/zenazn/goji v0.9.1-0.20160507202103-64eb34159fe5/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
go-micro.dev/v4 v4.1.0/go.mod h1:XTEJj5ILOBW+2ndGDG56r8fBXZ8hmsVaIaS1K5zwj+s=
go-micro.dev/v4 v4.2.1/go.mod h1:XTEJj5ILOBW+2ndGDG56r8fBXZ8hmsVaIaS1K5zwj+s=
@@ -1310,17 +1312,14 @@ go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M=
go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.26.1/go.mod h1:4wsfAAW5N9wUHM0QTmZS8z7fvYZ1rv3m+sVeSpf8NhU=
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.27.0 h1:TON1iU3Y5oIytGQHIejDYLam5uoSMsmA0UV9Yupb5gQ=
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.27.0/go.mod h1:T/zQwBldOpoAEpE3HMbLnI8ydESZVz4ggw6Is4FF9LI=
go.opentelemetry.io/otel v1.1.0/go.mod h1:7cww0OW51jQ8IaZChIEdqLwgh+44+7uiTdWsAL0wQpA=
go.opentelemetry.io/otel v1.2.0 h1:YOQDvxO1FayUcT9MIhJhgMyNO1WqoduiyvQHzGN0kUQ=
go.opentelemetry.io/otel v1.2.0/go.mod h1:aT17Fk0Z1Nor9e0uisf98LrntPGMnk4frBO9+dkf69I=
go.opentelemetry.io/otel/exporters/jaeger v1.2.0 h1:C/5Egj3MJBXRJi22cSl07suqPqtZLnLFmH//OxETUEc=
go.opentelemetry.io/otel/exporters/jaeger v1.2.0/go.mod h1:KJLFbEMKTNPIfOxcg/WikIozEoKcPgJRz3Ce1vLlM8E=
go.opentelemetry.io/otel/sdk v1.2.0 h1:wKN260u4DesJYhyjxDa7LRFkuhH7ncEVKU37LWcyNIo=
go.opentelemetry.io/otel/sdk v1.2.0/go.mod h1:jNN8QtpvbsKhgaC6V5lHiejMoKD+V8uadoSafgHPx1U=
go.opentelemetry.io/otel/trace v1.1.0/go.mod h1:i47XtdcBQiktu5IsrPqOHe8w+sBmnLwwHt8wiUsWGTI=
go.opentelemetry.io/otel/trace v1.2.0 h1:Ys3iqbqZhcf28hHzrm5WAquMkDHNZTUkw7KHbuNjej0=
go.opentelemetry.io/otel/trace v1.2.0/go.mod h1:N5FLswTubnxKxOJHM7XZC074qpeEdLy3CgAVsdMucK0=
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
@@ -1351,6 +1350,7 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
golang.org/x/crypto v0.0.0-20190320223903-b7391e95e576/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190418165655-df01cb2cc480/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
@@ -1375,7 +1375,6 @@ golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8=
golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa h1:idItI2DDfCokpg0N51B2VtiLdJ4vAuXC9fnCb2gACo4=
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
@@ -1423,6 +1422,7 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180530234432-1e491301e022/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20181005035420-146acd28ed58/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -1503,8 +1503,8 @@ golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ
golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1 h1:B333XXssMuKQeBwiNODx4TupZy7bf4sxFZnN2ZOcvUE=
golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8 h1:RerP+noqYHUQ8CMRcPlC2nvTa4dcBIjegkuWdcUDuqg=
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -1539,6 +1539,7 @@ golang.org/x/sys v0.0.0-20190415081028-16da32be82c5/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190531175056-4c3a928424d2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -1565,7 +1566,6 @@ golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200120151820-655fe14d7479/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -1615,7 +1615,6 @@ golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210921065528-437939a70204/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211110154304-99a53858aa08 h1:WecRHqgE09JBkh/584XIE6PMz5KKE/vER4izNUi30AQ=
@@ -1758,7 +1757,6 @@ google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtuk
google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw=
google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU=
google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k=
google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
@@ -1823,11 +1821,9 @@ google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm
google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48=
google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48=
google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w=
google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
google.golang.org/genproto v0.0.0-20211020151524-b7c3a969101a h1:8maMHMQp9NroHXhc3HelFX9Ay2lWlXLcdH5mw5Biz0s=
google.golang.org/genproto v0.0.0-20211020151524-b7c3a969101a/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12 h1:DN5b3HU13J4sMd/QjDx34U6afpaexKTDdop+26pdjdk=
google.golang.org/genproto v0.0.0-20211129164237-f09f9a12af12/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
@@ -1945,6 +1941,7 @@ rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
sigs.k8s.io/yaml v1.3.0/go.mod h1:GeOyir5tyXNByN85N/dRIT9es5UQNerPYEKK56eTBm8=
stash.kopano.io/kgol/kcc-go/v5 v5.0.1 h1:urR9hOR6TnTKjGkzZKac/a9cA8ws1WecWLTgiYubLQw=
stash.kopano.io/kgol/kcc-go/v5 v5.0.1/go.mod h1:0ZmjWapy3zp+TAjZI6iCrcfh+BthZbB2WM1VfhDgNB4=
stash.kopano.io/kgol/ksurveyclient-go v0.6.1/go.mod h1:LJMDQBROS2oXxBN04eSI6j1KhgWlqMFd8xKjXV4Irtw=
+1 -1
View File
@@ -8,7 +8,7 @@ import (
)
func main() {
if err := command.Execute(config.New()); err != nil {
if err := command.Execute(config.DefaultConfig()); err != nil {
os.Exit(1)
}
}
+1 -1
View File
@@ -1,6 +1,6 @@
{
"debug": {
"addr": "0.0.0.0:9104",
"addr": "0.0.0.0:9136",
"token": "",
"pprof": false,
"zpages": false
+1 -1
View File
@@ -1,6 +1,6 @@
---
debug:
addr: 0.0.0.0:9104
addr: 0.0.0.0:9136
token:
pprof: false
zpages: false
+1
View File
@@ -4,5 +4,6 @@ import (
"embed"
)
//go:generate make generate
//go:embed assets/*
var Assets embed.FS
+3 -2
View File
@@ -5,7 +5,6 @@ import (
"net/http"
"github.com/owncloud/ocis/graph-explorer/pkg/config"
"github.com/owncloud/ocis/graph-explorer/pkg/flagset"
"github.com/urfave/cli/v2"
)
@@ -14,7 +13,9 @@ func Health(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "health",
Usage: "Check health status",
Flags: flagset.HealthWithConfig(cfg),
Before: func(c *cli.Context) error {
return ParseConfig(c, cfg)
},
Action: func(c *cli.Context) error {
logger := NewLogger(cfg)
+8 -55
View File
@@ -3,15 +3,11 @@ package command
import (
"context"
"os"
"strings"
"github.com/owncloud/ocis/graph-explorer/pkg/config"
"github.com/owncloud/ocis/graph-explorer/pkg/flagset"
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
"github.com/owncloud/ocis/ocis-pkg/log"
"github.com/owncloud/ocis/ocis-pkg/sync"
"github.com/owncloud/ocis/ocis-pkg/version"
"github.com/spf13/viper"
"github.com/thejerf/suture/v4"
"github.com/urfave/cli/v2"
)
@@ -23,32 +19,25 @@ func Execute(cfg *config.Config) error {
Version: version.String,
Usage: "Serve Graph-Explorer for oCIS",
Compiled: version.Compiled(),
Authors: []*cli.Author{
{
Name: "ownCloud GmbH",
Email: "support@owncloud.com",
},
},
Flags: flagset.RootWithConfig(cfg),
Before: func(c *cli.Context) error {
cfg.Server.Version = version.String
return ParseConfig(c, cfg)
},
Commands: []*cli.Command{
Server(cfg),
Health(cfg),
},
}
cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}
cli.VersionFlag = &cli.BoolFlag{
Name: "version,v",
Usage: "Print the version",
@@ -68,49 +57,16 @@ func NewLogger(cfg *config.Config) log.Logger {
)
}
// ParseConfig loads accounts configuration from Viper known paths.
// ParseConfig loads graph configuration from known paths.
func ParseConfig(c *cli.Context, cfg *config.Config) error {
sync.ParsingViperConfig.Lock()
defer sync.ParsingViperConfig.Unlock()
logger := NewLogger(cfg)
viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
viper.SetEnvPrefix("GRAPH_EXPLORER")
viper.AutomaticEnv()
if c.IsSet("config-file") {
viper.SetConfigFile(c.String("config-file"))
} else {
viper.SetConfigName("graph-explorer")
viper.AddConfigPath("/etc/ocis")
viper.AddConfigPath("$HOME/.ocis")
viper.AddConfigPath("./config")
conf, err := ociscfg.BindSourcesToStructs("graph-explorer", cfg)
if err != nil {
return err
}
if err := viper.ReadInConfig(); err != nil {
switch err.(type) {
case viper.ConfigFileNotFoundError:
logger.Info().
Msg("Continue without config")
case viper.UnsupportedConfigError:
logger.Fatal().
Err(err).
Msg("Unsupported config type")
default:
logger.Fatal().
Err(err).
Msg("Failed to read config")
}
}
if err := viper.Unmarshal(&cfg); err != nil {
logger.Fatal().
Err(err).
Msg("Failed to parse config")
}
return nil
conf.LoadOSEnv(config.GetEnv(), false)
bindings := config.StructMappings(cfg)
return ociscfg.BindEnv(conf, bindings)
}
// SutureService allows for the graph-explorer command to be embedded and supervised by a suture supervisor tree.
@@ -120,10 +76,7 @@ type SutureService struct {
// NewSutureService creates a new graph-explorer.SutureService
func NewSutureService(cfg *ociscfg.Config) suture.Service {
if cfg.Mode == 0 {
cfg.GraphExplorer.Supervised = true
}
cfg.GraphExplorer.Log.File = cfg.Log.File
cfg.GraphExplorer.Log = cfg.Log
return SutureService{
cfg: cfg.GraphExplorer,
}
+1 -16
View File
@@ -6,12 +6,10 @@ import (
"github.com/oklog/run"
"github.com/owncloud/ocis/graph-explorer/pkg/config"
"github.com/owncloud/ocis/graph-explorer/pkg/flagset"
"github.com/owncloud/ocis/graph-explorer/pkg/metrics"
"github.com/owncloud/ocis/graph-explorer/pkg/server/debug"
"github.com/owncloud/ocis/graph-explorer/pkg/server/http"
"github.com/owncloud/ocis/graph-explorer/pkg/tracing"
"github.com/owncloud/ocis/ocis-pkg/sync"
"github.com/urfave/cli/v2"
)
@@ -20,24 +18,15 @@ func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: "Start integrated server",
Flags: flagset.ServerWithConfig(cfg),
Before: func(ctx *cli.Context) error {
logger := NewLogger(cfg)
if cfg.HTTP.Root != "/" {
cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
}
// When running on single binary mode the before hook from the root command won't get called. We manually
// call this before hook from ocis command, so the configuration can be loaded.
if !cfg.Supervised {
return ParseConfig(ctx, cfg)
}
logger.Debug().Str("service", "graph-explorer").Msg("ignoring config file parsing when running supervised")
return nil
return ParseConfig(ctx, cfg)
},
Action: func(c *cli.Context) error {
logger := NewLogger(cfg)
tracing.Configure(cfg)
var (
@@ -105,10 +94,6 @@ func Server(cfg *config.Config) *cli.Command {
})
}
if !cfg.Supervised {
sync.Trap(&gr, cancel)
}
return gr.Run()
},
}
+71 -33
View File
@@ -1,62 +1,58 @@
package config
import "context"
import (
"context"
// Log defines the available logging configuration.
type Log struct {
Level string
Pretty bool
Color bool
File string
}
"github.com/owncloud/ocis/ocis-pkg/shared"
)
// Debug defines the available debug configuration.
type Debug struct {
Addr string
Token string
Pprof bool
Zpages bool
Addr string `ocisConfig:"addr"`
Token string `ocisConfig:"token"`
Pprof bool `ocisConfig:"pprof"`
Zpages bool `ocisConfig:"zpages"`
}
// HTTP defines the available http configuration.
type HTTP struct {
Addr string
Root string
Namespace string
Addr string `ocisConfig:"addr"`
Root string `ocisConfig:"root"`
Namespace string `ocisConfig:"namespace"`
}
// Server configures a server.
type Server struct {
Version string
Name string
Version string `ocisConfig:"version"`
Name string `ocisConfig:"name"`
}
// Tracing defines the available tracing configuration.
type Tracing struct {
Enabled bool
Type string
Endpoint string
Collector string
Service string
Enabled bool `ocisConfig:"enabled"`
Type string `ocisConfig:"type"`
Endpoint string `ocisConfig:"endpoint"`
Collector string `ocisConfig:"collector"`
Service string `ocisConfig:"service"`
}
// GraphExplorer defines the available graph-explorer configuration.
type GraphExplorer struct {
ClientID string
Issuer string
GraphURLBase string
GraphURLPath string
ClientID string `ocisConfig:"client_id"`
Issuer string `ocisConfig:"issuer"`
GraphURLBase string `ocisConfig:"graph_url_base"`
GraphURLPath string `ocisConfig:"graph_url_path"`
}
// Config combines all available configuration parts.
type Config struct {
File string
Log Log
Debug Debug
HTTP HTTP
Server Server
Tracing Tracing
GraphExplorer GraphExplorer
File string `ocisConfig:"file"`
Log shared.Log `ocisConfig:"log"`
Debug Debug `ocisConfig:"debug"`
HTTP HTTP `ocisConfig:"http"`
Server Server `ocisConfig:"server"`
Tracing Tracing `ocisConfig:"tracing"`
GraphExplorer GraphExplorer `ocisConfig:"graph_explorer"`
Context context.Context
Supervised bool
@@ -66,3 +62,45 @@ type Config struct {
func New() *Config {
return &Config{}
}
// DefaultConfig provides with a working version of a config.
func DefaultConfig() *Config {
return &Config{
Log: shared.Log{},
Debug: Debug{
Addr: "127.0.0.1:9136",
Token: "",
Pprof: false,
Zpages: false,
},
HTTP: HTTP{
Addr: "127.0.0.1:9135",
Root: "/graph-explorer",
Namespace: "com.owncloud.web",
},
Server: Server{},
Tracing: Tracing{
Type: "jaeger",
Endpoint: "",
Collector: "",
Service: "graph-explorer",
},
GraphExplorer: GraphExplorer{
ClientID: "ocis-explorer.js",
Issuer: "https://localhost:9200",
GraphURLBase: "https://localhost:9200",
GraphURLPath: "/graph",
},
}
}
// GetEnv fetches a list of known env variables for this extension. It is to be used by gookit, as it provides a list
// with all the environment variables an extension supports.
func GetEnv() []string {
var r = make([]string, len(structMappings(&Config{})))
for i := range structMappings(&Config{}) {
r = append(r, structMappings(&Config{})[i].EnvVars...)
}
return r
}
+96
View File
@@ -0,0 +1,96 @@
package config
import "github.com/owncloud/ocis/ocis-pkg/shared"
// StructMappings binds a set of environment variables to a destination on cfg. Iterating over this set and editing the
// Destination value of a binding will alter the original value, as it is a pointer to its memory address. This lets
// us propagate changes easier.
func StructMappings(cfg *Config) []shared.EnvBinding {
return structMappings(cfg)
}
// structMappings binds a set of environment variables to a destination on cfg.
func structMappings(cfg *Config) []shared.EnvBinding {
return []shared.EnvBinding{
{
EnvVars: []string{"OCIS_LOG_LEVEL", "GRAPH_EXPLORER_LOG_LEVEL"},
Destination: &cfg.Log.Level,
},
{
EnvVars: []string{"OCIS_LOG_PRETTY", "GRAPH_EXPLORER_LOG_PRETTY"},
Destination: &cfg.Log.Pretty,
},
{
EnvVars: []string{"OCIS_LOG_COLOR", "GRAPH_EXPLORER_LOG_COLOR"},
Destination: &cfg.Log.Color,
},
{
EnvVars: []string{"OCIS_LOG_FILE", "GRAPH_EXPLORER_LOG_FILE"},
Destination: &cfg.Log.File,
},
{
EnvVars: []string{"OCIS_TRACING_ENABLED", "GRAPH_EXPLORER_TRACING_ENABLED"},
Destination: &cfg.Tracing.Enabled,
},
{
EnvVars: []string{"OCIS_TRACING_TYPE", "GRAPH_EXPLORER_TRACING_TYPE"},
Destination: &cfg.Tracing.Type,
},
{
EnvVars: []string{"OCIS_TRACING_ENDPOINT", "GRAPH_EXPLORER_TRACING_ENDPOINT"},
Destination: &cfg.Tracing.Endpoint,
},
{
EnvVars: []string{"OCIS_TRACING_COLLECTOR", "GRAPH_EXPLORER_TRACING_COLLECTOR"},
Destination: &cfg.Tracing.Collector,
},
{
EnvVars: []string{"GRAPH_EXPLORER_TRACING_SERVICE"},
Destination: &cfg.Tracing.Service,
},
{
EnvVars: []string{"GRAPH_EXPLORER_DEBUG_ADDR"},
Destination: &cfg.Debug.Addr,
},
{
EnvVars: []string{"GRAPH_EXPLORER_DEBUG_TOKEN"},
Destination: &cfg.Debug.Token,
},
{
EnvVars: []string{"GRAPH_EXPLORER_DEBUG_PPROF"},
Destination: &cfg.Debug.Pprof,
},
{
EnvVars: []string{"GRAPH_EXPLORER_DEBUG_ZPAGES"},
Destination: &cfg.Debug.Zpages,
},
{
EnvVars: []string{"GRAPH_EXPLORER_HTTP_ADDR"},
Destination: &cfg.HTTP.Addr,
},
{
EnvVars: []string{"GRAPH_EXPLORER_HTTP_ROOT"},
Destination: &cfg.HTTP.Root,
},
{
EnvVars: []string{"GRAPH_EXPLORER_NAMESPACE"},
Destination: &cfg.HTTP.Namespace,
},
{
EnvVars: []string{"OCIS_URL", "GRAPH_EXPLORER_ISSUER"},
Destination: &cfg.GraphExplorer.Issuer,
},
{
EnvVars: []string{"GRAPH_EXPLORER_CLIENT_ID"},
Destination: &cfg.GraphExplorer.ClientID,
},
{
EnvVars: []string{"OCIS_URL", "GRAPH_EXPLORER_GRAPH_URL_BASE"},
Destination: &cfg.GraphExplorer.GraphURLBase,
},
{
EnvVars: []string{"GRAPH_EXPLORER_GRAPH_URL_PATH"},
Destination: &cfg.GraphExplorer.GraphURLPath,
},
}
}
-169
View File
@@ -1,169 +0,0 @@
package flagset
import (
"github.com/owncloud/ocis/graph-explorer/pkg/config"
"github.com/owncloud/ocis/ocis-pkg/flags"
"github.com/urfave/cli/v2"
)
// RootWithConfig applies cfg to the root flagset
func RootWithConfig(cfg *config.Config) []cli.Flag {
return []cli.Flag{
&cli.StringFlag{
Name: "log-level",
Usage: "Set logging level",
EnvVars: []string{"GRAPH_EXPLORER_LOG_LEVEL", "OCIS_LOG_LEVEL"},
Destination: &cfg.Log.Level,
},
&cli.BoolFlag{
Name: "log-pretty",
Usage: "Enable pretty logging",
EnvVars: []string{"GRAPH_EXPLORER_LOG_PRETTY", "OCIS_LOG_PRETTY"},
Destination: &cfg.Log.Pretty,
},
&cli.BoolFlag{
Name: "log-color",
Usage: "Enable colored logging",
EnvVars: []string{"GRAPH_EXPLORER_LOG_COLOR", "OCIS_LOG_COLOR"},
Destination: &cfg.Log.Color,
},
}
}
// HealthWithConfig applies cfg to the root flagset
func HealthWithConfig(cfg *config.Config) []cli.Flag {
return []cli.Flag{
&cli.StringFlag{
Name: "debug-addr",
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9136"),
Usage: "Address to debug endpoint",
EnvVars: []string{"GRAPH_EXPLORER_DEBUG_ADDR"},
Destination: &cfg.Debug.Addr,
},
}
}
// ServerWithConfig applies cfg to the root flagset
func ServerWithConfig(cfg *config.Config) []cli.Flag {
return []cli.Flag{
&cli.StringFlag{
Name: "log-file",
Usage: "Enable log to file",
EnvVars: []string{"GRAPH_EXPLORER_LOG_FILE", "OCIS_LOG_FILE"},
Destination: &cfg.Log.File,
},
&cli.BoolFlag{
Name: "tracing-enabled",
Usage: "Enable sending traces",
EnvVars: []string{"GRAPH_EXPLORER_TRACING_ENABLED", "OCIS_TRACING_ENABLED"},
Destination: &cfg.Tracing.Enabled,
},
&cli.StringFlag{
Name: "tracing-type",
Value: flags.OverrideDefaultString(cfg.Tracing.Type, "jaeger"),
Usage: "Tracing backend type",
EnvVars: []string{"GRAPH_EXPLORER_TRACING_TYPE", "OCIS_TRACING_TYPE"},
Destination: &cfg.Tracing.Type,
},
&cli.StringFlag{
Name: "tracing-endpoint",
Value: flags.OverrideDefaultString(cfg.Tracing.Endpoint, ""),
Usage: "Endpoint for the agent",
EnvVars: []string{"GRAPH_EXPLORER_TRACING_ENDPOINT", "OCIS_TRACING_ENDPOINT"},
Destination: &cfg.Tracing.Endpoint,
},
&cli.StringFlag{
Name: "tracing-collector",
Value: flags.OverrideDefaultString(cfg.Tracing.Collector, ""),
Usage: "Endpoint for the collector",
EnvVars: []string{"GRAPH_EXPLORER_TRACING_COLLECTOR", "OCIS_TRACING_COLLECTOR"},
Destination: &cfg.Tracing.Collector,
},
&cli.StringFlag{
Name: "tracing-service",
Value: flags.OverrideDefaultString(cfg.Tracing.Service, "graph-explorer"),
Usage: "Service name for tracing",
EnvVars: []string{"GRAPH_EXPLORER_TRACING_SERVICE"},
Destination: &cfg.Tracing.Service,
},
&cli.StringFlag{
Name: "debug-addr",
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9136"),
Usage: "Address to bind debug server",
EnvVars: []string{"GRAPH_EXPLORER_DEBUG_ADDR"},
Destination: &cfg.Debug.Addr,
},
&cli.StringFlag{
Name: "debug-token",
Value: flags.OverrideDefaultString(cfg.Debug.Token, ""),
Usage: "Token to grant metrics access",
EnvVars: []string{"GRAPH_EXPLORER_DEBUG_TOKEN"},
Destination: &cfg.Debug.Token,
},
&cli.BoolFlag{
Name: "debug-pprof",
Usage: "Enable pprof debugging",
EnvVars: []string{"GRAPH_EXPLORER_DEBUG_PPROF"},
Destination: &cfg.Debug.Pprof,
},
&cli.BoolFlag{
Name: "debug-zpages",
Usage: "Enable zpages debugging",
EnvVars: []string{"GRAPH_EXPLORER_DEBUG_ZPAGES"},
Destination: &cfg.Debug.Zpages,
},
&cli.StringFlag{
Name: "http-addr",
Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "127.0.0.1:9135"),
Usage: "Address to bind http server",
EnvVars: []string{"GRAPH_EXPLORER_HTTP_ADDR"},
Destination: &cfg.HTTP.Addr,
},
&cli.StringFlag{
Name: "http-root",
Value: flags.OverrideDefaultString(cfg.HTTP.Root, "/graph-explorer"),
Usage: "Root path of http server",
EnvVars: []string{"GRAPH_EXPLORER_HTTP_ROOT"},
Destination: &cfg.HTTP.Root,
},
&cli.StringFlag{
Name: "http-namespace",
Value: flags.OverrideDefaultString(cfg.HTTP.Namespace, "com.owncloud.web"),
Usage: "Set the base namespace for the http namespace",
EnvVars: []string{"GRAPH_EXPLORER_NAMESPACE"},
Destination: &cfg.HTTP.Namespace,
},
&cli.StringFlag{
Name: "issuer",
Value: flags.OverrideDefaultString(cfg.GraphExplorer.Issuer, "https://localhost:9200"),
Usage: "Set the OpenID Connect Provider",
EnvVars: []string{"GRAPH_EXPLORER_ISSUER", "OCIS_URL"},
Destination: &cfg.GraphExplorer.Issuer,
},
&cli.StringFlag{
Name: "client-id",
Value: flags.OverrideDefaultString(cfg.GraphExplorer.ClientID, "ocis-explorer.js"),
Usage: "Set the OpenID Client ID to send to the issuer",
EnvVars: []string{"GRAPH_EXPLORER_CLIENT_ID"},
Destination: &cfg.GraphExplorer.ClientID,
},
&cli.StringFlag{
Name: "graph-url-base",
Value: flags.OverrideDefaultString(cfg.GraphExplorer.GraphURLBase, "https://localhost:9200"),
Usage: "Set the base url to the graph api service",
EnvVars: []string{"GRAPH_EXPLORER_GRAPH_URL_BASE", "OCIS_URL"},
Destination: &cfg.GraphExplorer.GraphURLBase,
},
&cli.StringFlag{
Name: "graph-url-path",
Value: flags.OverrideDefaultString(cfg.GraphExplorer.GraphURLPath, "/graph"),
Usage: "Set the url path to the graph api service",
EnvVars: []string{"GRAPH_EXPLORER_GRAPH_URL_PATH"},
Destination: &cfg.GraphExplorer.GraphURLPath,
},
&cli.StringFlag{
Name: "extensions",
Usage: "Run specific extensions during supervised mode. This flag is set by the runtime",
},
}
}
-1
View File
@@ -25,7 +25,6 @@ include ../.make/generate.mk
.PHONY: ci-go-generate
ci-go-generate: # CI runs ci-node-generate automatically before this target
@go generate ./...
.PHONY: ci-node-generate
ci-node-generate:
+3 -2
View File
@@ -5,7 +5,6 @@ import (
"net/http"
"github.com/owncloud/ocis/graph/pkg/config"
"github.com/owncloud/ocis/graph/pkg/flagset"
"github.com/urfave/cli/v2"
)
@@ -14,7 +13,9 @@ func Health(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "health",
Usage: "Check health status",
Flags: flagset.HealthWithConfig(cfg),
Before: func(c *cli.Context) error {
return ParseConfig(c, cfg)
},
Action: func(c *cli.Context) error {
logger := NewLogger(cfg)
+19 -52
View File
@@ -3,17 +3,15 @@ package command
import (
"context"
"os"
"strings"
"github.com/owncloud/ocis/ocis-pkg/sync"
"github.com/owncloud/ocis/ocis-pkg/shared"
"github.com/thejerf/suture/v4"
"github.com/owncloud/ocis/graph/pkg/config"
"github.com/owncloud/ocis/graph/pkg/flagset"
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
"github.com/owncloud/ocis/ocis-pkg/log"
"github.com/owncloud/ocis/ocis-pkg/version"
"github.com/spf13/viper"
"github.com/urfave/cli/v2"
)
@@ -24,32 +22,25 @@ func Execute(cfg *config.Config) error {
Version: version.String,
Usage: "Serve Graph API for oCIS",
Compiled: version.Compiled(),
Authors: []*cli.Author{
{
Name: "ownCloud GmbH",
Email: "support@owncloud.com",
},
},
Flags: flagset.RootWithConfig(cfg),
Before: func(c *cli.Context) error {
cfg.Server.Version = version.String
return ParseConfig(c, cfg)
},
Commands: []*cli.Command{
Server(cfg),
Health(cfg),
},
}
cli.HelpFlag = &cli.BoolFlag{
Name: "help,h",
Usage: "Show the help",
}
cli.VersionFlag = &cli.BoolFlag{
Name: "version,v",
Usage: "Print the version",
@@ -69,49 +60,28 @@ func NewLogger(cfg *config.Config) log.Logger {
)
}
// ParseConfig reads graph configuration from fs.
// ParseConfig loads graph configuration from known paths.
func ParseConfig(c *cli.Context, cfg *config.Config) error {
sync.ParsingViperConfig.Lock()
defer sync.ParsingViperConfig.Unlock()
logger := NewLogger(cfg)
viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
viper.SetEnvPrefix("GRAPH")
viper.AutomaticEnv()
if c.IsSet("config-file") {
viper.SetConfigFile(c.String("config-file"))
} else {
viper.SetConfigName("graph")
viper.AddConfigPath("/etc/ocis")
viper.AddConfigPath("$HOME/.ocis")
viper.AddConfigPath("./config")
conf, err := ociscfg.BindSourcesToStructs("graph", cfg)
if err != nil {
return err
}
if err := viper.ReadInConfig(); err != nil {
switch err.(type) {
case viper.ConfigFileNotFoundError:
logger.Info().
Msg("Continue without config")
case viper.UnsupportedConfigError:
logger.Fatal().
Err(err).
Msg("Unsupported config type")
default:
logger.Fatal().
Err(err).
Msg("Failed to read config")
// 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 = &shared.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.Commons == nil {
cfg.Log = &shared.Log{}
}
if err := viper.Unmarshal(&cfg); err != nil {
logger.Fatal().
Err(err).
Msg("Failed to parse config")
}
return nil
conf.LoadOSEnv(config.GetEnv(cfg), false)
bindings := config.StructMappings(cfg)
return ociscfg.BindEnv(conf, bindings)
}
// SutureService allows for the graph command to be embedded and supervised by a suture supervisor tree.
@@ -121,10 +91,7 @@ type SutureService struct {
// NewSutureService creates a new graph.SutureService
func NewSutureService(cfg *ociscfg.Config) suture.Service {
if cfg.Mode == 0 {
cfg.Graph.Supervised = true
}
cfg.Graph.Log.File = cfg.Log.File
cfg.Graph.Commons = cfg.Commons
return SutureService{
cfg: cfg.Graph,
}
+3 -13
View File
@@ -6,12 +6,10 @@ import (
"github.com/oklog/run"
"github.com/owncloud/ocis/graph/pkg/config"
"github.com/owncloud/ocis/graph/pkg/flagset"
"github.com/owncloud/ocis/graph/pkg/metrics"
"github.com/owncloud/ocis/graph/pkg/server/debug"
"github.com/owncloud/ocis/graph/pkg/server/http"
"github.com/owncloud/ocis/graph/pkg/tracing"
"github.com/owncloud/ocis/ocis-pkg/sync"
"github.com/urfave/cli/v2"
)
@@ -20,19 +18,15 @@ func Server(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "server",
Usage: "Start integrated server",
Flags: flagset.ServerWithConfig(cfg),
Before: func(ctx *cli.Context) error {
logger := NewLogger(cfg)
if cfg.HTTP.Root != "/" {
cfg.HTTP.Root = strings.TrimSuffix(cfg.HTTP.Root, "/")
}
// When running on single binary mode the before hook from the root command won't get called. We manually
// call this before hook from ocis command, so the configuration can be loaded.
if !cfg.Supervised {
return ParseConfig(ctx, cfg)
if err := ParseConfig(ctx, cfg); err != nil {
return err
}
logger.Debug().Str("service", "graph").Msg("ignoring config file parsing when running supervised")
return nil
},
Action: func(c *cli.Context) error {
@@ -97,10 +91,6 @@ func Server(cfg *config.Config) *cli.Command {
})
}
if !cfg.Supervised {
sync.Trap(&gr, cancel)
}
return gr.Run()
},
}
+113 -36
View File
@@ -1,72 +1,96 @@
package config
import "context"
import (
"context"
// Log defines the available logging configuration.
type Log struct {
Level string
Pretty bool
Color bool
File string
}
"github.com/owncloud/ocis/ocis-pkg/shared"
)
// Debug defines the available debug configuration.
type Debug struct {
Addr string
Token string
Pprof bool
Zpages bool
Addr string `ocisConfig:"addr"`
Token string `ocisConfig:"token"`
Pprof bool `ocisConfig:"pprof"`
Zpages bool `ocisConfig:"zpages"`
}
// HTTP defines the available http configuration.
type HTTP struct {
Addr string
Namespace string
Root string
Addr string `ocisConfig:"addr"`
Namespace string `ocisConfig:"namespace"`
Root string `ocisConfig:"root"`
}
// Server configures a server.
type Server struct {
Version string
Name string
Version string `ocisConfig:"version"`
Name string `ocisConfig:"name"`
}
// Tracing defines the available tracing configuration.
type Tracing struct {
Enabled bool
Type string
Endpoint string
Collector string
Service string
Enabled bool `ocisConfig:"enabled"`
Type string `ocisConfig:"type"`
Endpoint string `ocisConfig:"endpoint"`
Collector string `ocisConfig:"collector"`
Service string `ocisConfig:"service"`
}
// Reva defines all available REVA configuration.
type Reva struct {
Address string
Address string `ocisConfig:"address"`
}
// TokenManager is the config for using the reva token manager
type TokenManager struct {
JWTSecret string
JWTSecret string `ocisConfig:"jwt_secret"`
}
type Spaces struct {
WebDavBase string
WebDavPath string
DefaultQuota string
WebDavBase string `ocisConfig:"webdav_base"`
WebDavPath string `ocisConfig:"webdav_path"`
DefaultQuota string `ocisConfig:"default_quota"`
}
type LDAP struct {
URI string `ocisConfig:"uri"`
BindDN string `ocisConfig:"bind_dn"`
BindPassword string `ocisConfig:"bind_password"`
UserBaseDN string `ocisConfig:"user_base_dn"`
UserSearchScope string `ocisConfig:"user_search_scope"`
UserFilter string `ocisConfig:"user_filter"`
UserEmailAttribute string `ocisConfig:"user_mail_attribute"`
UserDisplayNameAttribute string `ocisConfig:"user_displayname_attribute"`
UserNameAttribute string `ocisConfig:"user_name_attribute"`
UserIDAttribute string `ocisConfig:"user_id_attribute"`
GroupBaseDN string `ocisConfig:"group_base_dn"`
GroupSearchScope string `ocisConfig:"group_search_scope"`
GroupFilter string `ocisConfig:"group_filter"`
GroupNameAttribute string `ocisConfig:"group_name_attribute"`
GroupIDAttribute string `ocisConfig:"group_id_attribute"`
}
type Identity struct {
Backend string `ocisConfig:"backend"`
LDAP LDAP `ocisConfig:"ldap"`
}
// Config combines all available configuration parts.
type Config struct {
File string
Log Log
Debug Debug
HTTP HTTP
Server Server
Tracing Tracing
Reva Reva
TokenManager TokenManager
Spaces Spaces
*shared.Commons
File string `ocisConfig:"file"`
Log *shared.Log `ocisConfig:"log"`
Debug Debug `ocisConfig:"debug"`
HTTP HTTP `ocisConfig:"http"`
Server Server `ocisConfig:"server"`
Tracing Tracing `ocisConfig:"tracing"`
Reva Reva `ocisConfig:"reva"`
TokenManager TokenManager `ocisConfig:"token_manager"`
Spaces Spaces `ocisConfig:"spaces"`
Identity Identity `ocisConfig:"identity"`
Context context.Context
Supervised bool
@@ -76,3 +100,56 @@ type Config struct {
func New() *Config {
return &Config{}
}
func DefaultConfig() *Config {
return &Config{
Debug: Debug{
Addr: "127.0.0.1:9124",
Token: "",
},
HTTP: HTTP{
Addr: "127.0.0.1:9120",
Namespace: "com.owncloud.web",
Root: "/graph",
},
Server: Server{},
Tracing: Tracing{
Enabled: false,
Type: "jaeger",
Service: "graph",
},
Reva: Reva{
Address: "127.0.0.1:9142",
},
TokenManager: TokenManager{
JWTSecret: "Pive-Fumkiu4",
},
Spaces: Spaces{
WebDavBase: "https://localhost:9200",
WebDavPath: "/dav/spaces/",
DefaultQuota: "1000000000",
},
Identity: Identity{
Backend: "cs3",
LDAP: LDAP{
URI: "ldap://localhost:9125",
BindDN: "",
BindPassword: "",
UserBaseDN: "ou=users,dc=ocis,dc=test",
UserSearchScope: "sub",
UserFilter: "(objectClass=posixaccount)",
UserEmailAttribute: "mail",
UserDisplayNameAttribute: "displayName",
UserNameAttribute: "uid",
// FIXME: switch this to some more widely available attribute by default
// ideally this needs to be constant for the lifetime of a users
UserIDAttribute: "ownclouduuid",
GroupBaseDN: "ou=groups,dc=ocis,dc=test",
GroupSearchScope: "sub",
GroupFilter: "(objectclass=groupOfNames)",
GroupNameAttribute: "cn",
GroupIDAttribute: "cn",
},
},
}
}
+179
View File
@@ -0,0 +1,179 @@
package config
import "github.com/owncloud/ocis/ocis-pkg/shared"
// GetEnv fetches a list of known env variables for this extension. It is to be used by gookit, as it provides a list
// with all the environment variables an extension supports.
func GetEnv(cfg *Config) []string {
var r = make([]string, len(structMappings(cfg)))
for i := range structMappings(cfg) {
r = append(r, structMappings(cfg)[i].EnvVars...)
}
return r
}
// StructMappings binds a set of environment variables to a destination on cfg. Iterating over this set and editing the
// Destination value of a binding will alter the original value, as it is a pointer to its memory address. This lets
// us propagate changes easier.
func StructMappings(cfg *Config) []shared.EnvBinding {
return structMappings(cfg)
}
// structMappings binds a set of environment variables to a destination on cfg.
func structMappings(cfg *Config) []shared.EnvBinding {
return []shared.EnvBinding{
{
EnvVars: []string{"GRAPH_CONFIG_FILE"},
Destination: &cfg.File,
},
{
EnvVars: []string{"OCIS_LOG_LEVEL", "GRAPH_LOG_LEVEL"},
Destination: &cfg.Log.Level,
},
{
EnvVars: []string{"OCIS_LOG_PRETTY", "GRAPH_LOG_PRETTY"},
Destination: &cfg.Log.Pretty,
},
{
EnvVars: []string{"OCIS_LOG_COLOR", "GRAPH_LOG_COLOR"},
Destination: &cfg.Log.Color,
},
{
EnvVars: []string{"OCIS_LOG_FILE", "GRAPH_LOG_FILE"},
Destination: &cfg.Log.File,
},
{
EnvVars: []string{"OCIS_TRACING_ENABLED", "GRAPH_TRACING_ENABLED"},
Destination: &cfg.Tracing.Enabled,
},
{
EnvVars: []string{"OCIS_TRACING_TYPE", "GRAPH_TRACING_TYPE"},
Destination: &cfg.Tracing.Type,
},
{
EnvVars: []string{"OCIS_TRACING_ENDPOINT", "GRAPH_TRACING_ENDPOINT"},
Destination: &cfg.Tracing.Endpoint,
},
{
EnvVars: []string{"OCIS_TRACING_COLLECTOR", "GRAPH_TRACING_COLLECTOR"},
Destination: &cfg.Tracing.Collector,
},
{
EnvVars: []string{"GRAPH_TRACING_SERVICE"},
Destination: &cfg.Tracing.Service,
},
{
EnvVars: []string{"GRAPH_DEBUG_ADDR"},
Destination: &cfg.Debug.Addr,
},
{
EnvVars: []string{"GRAPH_DEBUG_TOKEN"},
Destination: &cfg.Debug.Token,
},
{
EnvVars: []string{"GRAPH_DEBUG_PPROF"},
Destination: &cfg.Debug.Pprof,
},
{
EnvVars: []string{"GRAPH_DEBUG_ZPAGES"},
Destination: &cfg.Debug.Zpages,
},
{
EnvVars: []string{"GRAPH_HTTP_ADDR"},
Destination: &cfg.HTTP.Addr,
},
{
EnvVars: []string{"GRAPH_HTTP_ROOT"},
Destination: &cfg.HTTP.Root,
},
{
EnvVars: []string{"GRAPH_HTTP_NAMESPACE"},
Destination: &cfg.HTTP.Namespace,
},
{
EnvVars: []string{"OCIS_URL", "GRAPH_SPACES_WEBDAV_BASE"},
Destination: &cfg.Spaces.WebDavBase,
},
{
EnvVars: []string{"GRAPH_SPACES_WEBDAV_PATH"},
Destination: &cfg.Spaces.WebDavPath,
},
{
EnvVars: []string{"GRAPH_SPACES_DEFAULT_QUOTA"},
Destination: &cfg.Spaces.DefaultQuota,
},
{
EnvVars: []string{"OCIS_JWT_SECRET", "GRAPH_JWT_SECRET"},
Destination: &cfg.TokenManager.JWTSecret,
},
{
EnvVars: []string{"REVA_GATEWAY"},
Destination: &cfg.Reva.Address,
},
{
EnvVars: []string{"GRAPH_IDENTITY_BACKEND"},
Destination: &cfg.Identity.Backend,
},
{
EnvVars: []string{"GRAPH_LDAP_URI"},
Destination: &cfg.Identity.LDAP.URI,
},
{
EnvVars: []string{"GRAPH_LDAP_BIND_DN"},
Destination: &cfg.Identity.LDAP.BindDN,
},
{
EnvVars: []string{"GRAPH_LDAP_BIND_PASSWORD"},
Destination: &cfg.Identity.LDAP.BindPassword,
},
{
EnvVars: []string{"GRAPH_LDAP_USER_BASE_DN"},
Destination: &cfg.Identity.LDAP.UserBaseDN,
},
{
EnvVars: []string{"GRAPH_LDAP_USER_EMAIL_ATTRIBUTE"},
Destination: &cfg.Identity.LDAP.UserEmailAttribute,
},
{
EnvVars: []string{"GRAPH_LDAP_USER_DISPLAYNAME_ATTRIBUTE"},
Destination: &cfg.Identity.LDAP.UserDisplayNameAttribute,
},
{
EnvVars: []string{"GRAPH_LDAP_USER_NAME_ATTRIBUTE"},
Destination: &cfg.Identity.LDAP.UserNameAttribute,
},
{
EnvVars: []string{"GRAPH_LDAP_USER_UID_ATTRIBUTE"},
Destination: &cfg.Identity.LDAP.UserIDAttribute,
},
{
EnvVars: []string{"GRAPH_LDAP_USER_FILTER"},
Destination: &cfg.Identity.LDAP.UserFilter,
},
{
EnvVars: []string{"GRAPH_LDAP_USER_SCOPE"},
Destination: &cfg.Identity.LDAP.UserSearchScope,
},
{
EnvVars: []string{"GRAPH_LDAP_GROUP_BASE_DN"},
Destination: &cfg.Identity.LDAP.GroupBaseDN,
},
{
EnvVars: []string{"GRAPH_LDAP_GROUP_SEARCH_SCOPE"},
Destination: &cfg.Identity.LDAP.GroupSearchScope,
},
{
EnvVars: []string{"GRAPH_LDAP_GROUP_FILTER"},
Destination: &cfg.Identity.LDAP.GroupFilter,
},
{
EnvVars: []string{"GRAPH_LDAP_GROUP_NAME_ATTRIBUTE"},
Destination: &cfg.Identity.LDAP.GroupNameAttribute,
},
{
EnvVars: []string{"GRAPH_LDAP_GROUP_ID_ATTRIBUTE"},
Destination: &cfg.Identity.LDAP.GroupIDAttribute,
},
}
}
-186
View File
@@ -1,186 +0,0 @@
package flagset
import (
"github.com/owncloud/ocis/graph/pkg/config"
"github.com/owncloud/ocis/ocis-pkg/flags"
"github.com/urfave/cli/v2"
)
// RootWithConfig applies cfg to the root flagset
func RootWithConfig(cfg *config.Config) []cli.Flag {
return []cli.Flag{
&cli.StringFlag{
Name: "config-file",
Value: flags.OverrideDefaultString(cfg.File, ""),
Usage: "Path to config file",
EnvVars: []string{"GRAPH_CONFIG_FILE"},
Destination: &cfg.File,
},
&cli.StringFlag{
Name: "log-level",
Usage: "Set logging level",
EnvVars: []string{"GRAPH_LOG_LEVEL", "OCIS_LOG_LEVEL"},
Destination: &cfg.Log.Level,
},
&cli.BoolFlag{
Name: "log-pretty",
Usage: "Enable pretty logging",
EnvVars: []string{"GRAPH_LOG_PRETTY", "OCIS_LOG_PRETTY"},
Destination: &cfg.Log.Pretty,
},
&cli.BoolFlag{
Name: "log-color",
Usage: "Enable colored logging",
EnvVars: []string{"GRAPH_LOG_COLOR", "OCIS_LOG_COLOR"},
Destination: &cfg.Log.Color,
},
}
}
// HealthWithConfig applies cfg to the root flagset
func HealthWithConfig(cfg *config.Config) []cli.Flag {
return []cli.Flag{
&cli.StringFlag{
Name: "debug-addr",
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9124"),
Usage: "Address to debug endpoint",
EnvVars: []string{"GRAPH_DEBUG_ADDR"},
Destination: &cfg.Debug.Addr,
},
}
}
// ServerWithConfig applies cfg to the root flagset
func ServerWithConfig(cfg *config.Config) []cli.Flag {
return []cli.Flag{
&cli.StringFlag{
Name: "log-file",
Usage: "Enable log to file",
EnvVars: []string{"GRAPH_LOG_FILE", "OCIS_LOG_FILE"},
Destination: &cfg.Log.File,
},
&cli.BoolFlag{
Name: "tracing-enabled",
Usage: "Enable sending traces",
EnvVars: []string{"GRAPH_TRACING_ENABLED", "OCIS_TRACING_ENABLED"},
Destination: &cfg.Tracing.Enabled,
},
&cli.StringFlag{
Name: "tracing-type",
Value: flags.OverrideDefaultString(cfg.Tracing.Type, "jaeger"),
Usage: "Tracing backend type",
EnvVars: []string{"GRAPH_TRACING_TYPE", "OCIS_TRACING_TYPE"},
Destination: &cfg.Tracing.Type,
},
&cli.StringFlag{
Name: "tracing-endpoint",
Value: flags.OverrideDefaultString(cfg.Tracing.Endpoint, ""),
Usage: "Endpoint for the agent",
EnvVars: []string{"GRAPH_TRACING_ENDPOINT", "OCIS_TRACING_ENDPOINT"},
Destination: &cfg.Tracing.Endpoint,
},
&cli.StringFlag{
Name: "tracing-collector",
Value: flags.OverrideDefaultString(cfg.Tracing.Collector, ""),
Usage: "Endpoint for the collector",
EnvVars: []string{"GRAPH_TRACING_COLLECTOR", "OCIS_TRACING_COLLECTOR"},
Destination: &cfg.Tracing.Collector,
},
&cli.StringFlag{
Name: "tracing-service",
Value: flags.OverrideDefaultString(cfg.Tracing.Service, "graph"),
Usage: "Service name for tracing",
EnvVars: []string{"GRAPH_TRACING_SERVICE"},
Destination: &cfg.Tracing.Service,
},
&cli.StringFlag{
Name: "debug-addr",
Value: flags.OverrideDefaultString(cfg.Debug.Addr, "127.0.0.1:9124"),
Usage: "Address to bind debug server",
EnvVars: []string{"GRAPH_DEBUG_ADDR"},
Destination: &cfg.Debug.Addr,
},
&cli.StringFlag{
Name: "debug-token",
Value: flags.OverrideDefaultString(cfg.Debug.Token, ""),
Usage: "Token to grant metrics access",
EnvVars: []string{"GRAPH_DEBUG_TOKEN"},
Destination: &cfg.Debug.Token,
},
&cli.BoolFlag{
Name: "debug-pprof",
Usage: "Enable pprof debugging",
EnvVars: []string{"GRAPH_DEBUG_PPROF"},
Destination: &cfg.Debug.Pprof,
},
&cli.BoolFlag{
Name: "debug-zpages",
Usage: "Enable zpages debugging",
EnvVars: []string{"GRAPH_DEBUG_ZPAGES"},
Destination: &cfg.Debug.Zpages,
},
&cli.StringFlag{
Name: "http-addr",
Value: flags.OverrideDefaultString(cfg.HTTP.Addr, "127.0.0.1:9120"),
Usage: "Address to bind http server",
EnvVars: []string{"GRAPH_HTTP_ADDR"},
Destination: &cfg.HTTP.Addr,
},
&cli.StringFlag{
Name: "http-root",
Value: flags.OverrideDefaultString(cfg.HTTP.Root, "/graph"),
Usage: "Root path of http server",
EnvVars: []string{"GRAPH_HTTP_ROOT"},
Destination: &cfg.HTTP.Root,
},
&cli.StringFlag{
Name: "http-namespace",
Value: flags.OverrideDefaultString(cfg.HTTP.Namespace, "com.owncloud.web"),
Usage: "Set the base namespace for the http service for service discovery",
EnvVars: []string{"GRAPH_HTTP_NAMESPACE"},
Destination: &cfg.HTTP.Namespace,
},
&cli.StringFlag{
Name: "spaces-webdav-base",
Value: flags.OverrideDefaultString(cfg.Spaces.WebDavBase, "https://localhost:9200"),
Usage: "spaces webdav base URL to use when rendering drive WabDAV URLs",
EnvVars: []string{"GRAPH_SPACES_WEBDAV_BASE", "OCIS_URL"},
Destination: &cfg.Spaces.WebDavBase,
},
&cli.StringFlag{
Name: "spaces-webdav-path",
Value: flags.OverrideDefaultString(cfg.Spaces.WebDavPath, "/dav/spaces/"),
Usage: "spaces webdav path to use when rendering drive WabDAV URLs",
EnvVars: []string{"GRAPH_SPACES_WEBDAV_PATH"},
Destination: &cfg.Spaces.WebDavPath,
},
&cli.StringFlag{
Name: "default-space-quota",
Value: flags.OverrideDefaultString(cfg.Spaces.DefaultQuota, "1000000000"),
Usage: "default quota used for all spaces if no custom quota was given",
EnvVars: []string{"GRAPH_SPACES_DEFAULT_QUOTA"},
Destination: &cfg.Spaces.DefaultQuota,
},
&cli.StringFlag{
Name: "jwt-secret",
Value: flags.OverrideDefaultString(cfg.TokenManager.JWTSecret, "Pive-Fumkiu4"),
Usage: "Used to validate the reva access JWT, should equal reva's jwt-secret",
EnvVars: []string{"GRAPH_JWT_SECRET", "OCIS_JWT_SECRET"},
Destination: &cfg.TokenManager.JWTSecret,
},
&cli.StringFlag{
Name: "reva-gateway-addr",
Value: flags.OverrideDefaultString(cfg.Reva.Address, "127.0.0.1:9142"),
Usage: "Address of REVA gateway endpoint",
EnvVars: []string{"REVA_GATEWAY"},
Destination: &cfg.Reva.Address,
},
&cli.StringFlag{
Name: "extensions",
Usage: "Run specific extensions during supervised mode. This flag is set by the runtime",
},
}
}
+40
View File
@@ -0,0 +1,40 @@
package identity
import (
"context"
"net/url"
cs3 "github.com/cs3org/go-cs3apis/cs3/identity/user/v1beta1"
msgraph "github.com/yaegashi/msgraph.go/beta"
)
type Backend interface {
GetUser(ctx context.Context, nameOrId string) (*msgraph.User, error)
GetUsers(ctx context.Context, queryParam url.Values) ([]*msgraph.User, error)
GetGroup(ctx context.Context, nameOrId string) (*msgraph.Group, error)
GetGroups(ctx context.Context, queryParam url.Values) ([]*msgraph.Group, error)
}
func CreateUserModelFromCS3(u *cs3.User) *msgraph.User {
if u.Id == nil {
u.Id = &cs3.UserId{}
}
return &msgraph.User{
DisplayName: &u.DisplayName,
Mail: &u.Mail,
// TODO u.Groups are those ids or group names?
OnPremisesSamAccountName: &u.Username,
DirectoryObject: msgraph.DirectoryObject{
Entity: msgraph.Entity{
ID: &u.Id.OpaqueId,
Object: msgraph.Object{
AdditionalData: map[string]interface{}{
"uidnumber": u.UidNumber,
"gidnumber": u.GidNumber,
},
},
},
},
}
}
Loaded 100 of 333 files, more files were not shown because too many files have changed in this diff. Show more