Compare commits

...
Author SHA1 Message Date
Michael Barz 95460ab9a5 prepare changelog, bump version 2023-08-02 12:49:51 +02:00
Karun Atreya c5fbd6f539 move resharing.feature from apiSpaces to apiReshare (#6936) 2023-08-02 15:03:42 +05:45
Jannik Stehle 43ee37d02e Automated changelog update [skip ci] 2023-08-01 15:49:25 +00:00
Jannik Stehle d65476ff00 Merge pull request #6933 from owncloud/bump-web-v7.1.0-rc.4
[full-ci] chore: bump web to v7.1.0-rc.4
2023-08-01 17:48:44 +02:00
Jannik Stehle 0a820b22cc chore: bump web to v7.1.0-rc.4 2023-08-01 16:18:40 +02:00
Phil Davis 2989dc6890 Merge pull request #6665 from owncloud/frontend_resharing_disabled
[tests-only][full-ci] added scenarios for disabling frontend_enable_resharing
2023-08-01 18:29:01 +05:45
Sawjan Gurung d7dd979897 [tests-only][full-ci] Fix preview test scenario (#6931)
* fix preview test scenario

* setup ocis with custom fonts

* remove passing test from expected-failure
2023-08-01 17:33:43 +05:45
ownClouders efd2c42655 [tx] updated from transifex 2023-08-01 11:43:55 +00:00
KarunAtreya dcbd45948e added scenarios for share and reshare disabling frontend_enable_resharing env 2023-08-01 16:44:02 +05:45
Daniël Franke a406bb3507 Merge pull request #6923 from owncloud/excds/feature/Separate_out_grpc_client_to_package_local_for_remaining_services
Replacing implicit grpc client initialization with explicit package local variables
2023-08-01 10:54:42 +02:00
kobergj 30d6ecca19 Automated changelog update [skip ci] 2023-07-31 14:51:49 +00:00
kobergj d895437642 Merge pull request #6928 from kobergj/BumpReva
[full-ci] Bump Reva & SSE Capability
2023-07-31 16:51:06 +02:00
jkoberg 78db9dd8a0 add sse capability
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-07-31 15:55:48 +02:00
jkoberg 2afcb84186 bump reva
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-07-31 15:54:46 +02:00
Jannik Stehle c6abbf6f60 Automated changelog update [skip ci] 2023-07-31 13:39:20 +00:00
Jannik Stehle 81483964a1 Merge pull request #6925 from owncloud/bump-web-v7.1.0-rc.3
[full-ci] chore: bump web to v7.1.0-rc.3
2023-07-31 15:38:46 +02:00
Jannik Stehle 9d4a561aa9 chore: bump web to v7.1.0-rc.3 2023-07-31 14:27:33 +02:00
Roman Perekhod c4f32868ee Automated changelog update [skip ci] 2023-07-31 11:24:21 +00:00
Roman PerekhodandRoman Perekhod 526583e9bb Fix the routing capability (#6921)
Co-authored-by: Roman Perekhod <rperekhod@owncloud.com>
2023-07-31 13:23:41 +02:00
Daniël Franke c93b65680b Convert users service to service tracing provider. (#6922)
This convers the users service to use the service tracing provider.
2023-07-31 13:17:29 +02:00
Daniel Swärd 6a5e21eff4 Replacing implicit grpc client initialization with explicit package local variables. 2023-07-31 12:57:59 +02:00
Florian Schade d3aecda8c6 Automated changelog update [skip ci] 2023-07-31 10:13:28 +00:00
Florian Schade 90ba75e27e enhancement: Evaluate policy resource information on single file shares (#6888)
* enhancement: Evaluate policy resource information on single file shares

* enhancement: switch to resource name evaluation for example rego put rule
2023-07-31 12:12:56 +02:00
Andre Duffeck 5b26de71d4 Merge pull request #6824 from aduffeck/propagators
Make the storage-users propagator configurable
2023-07-31 11:04:01 +02:00
André Duffeck 96ab79b4f9 Bump reva 2023-07-31 10:27:03 +02:00
André Duffeck be21178c64 Improve docs 2023-07-31 10:26:19 +02:00
André Duffeck fade832a3e Make the async propagation delay configurable 2023-07-31 10:26:19 +02:00
André Duffeck e8a7872d29 Add default propagator config 2023-07-31 10:26:19 +02:00
Andre DuffeckandMartin 38c04b5517 Update services/storage-users/pkg/config/config.go
Co-authored-by: Martin <github@diemattels.at>
2023-07-31 10:26:19 +02:00
Andre DuffeckandMartin f17e56febc Update services/storage-users/pkg/config/config.go
Co-authored-by: Martin <github@diemattels.at>
2023-07-31 10:26:19 +02:00
André Duffeck 5aa9e618f1 Make the storage-users propagator configurable 2023-07-31 10:26:19 +02:00
Phil Davis 82045b8850 Automated changelog update [skip ci] 2023-07-31 08:01:09 +00:00
Phil Davis 80f4d6a22d Merge pull request #6919 from owncloud/bump-reva-fix-6670
[full-ci] bump reva (Fix #6670)
2023-07-31 13:45:32 +05:45
Daniel Swärd 3d046f6ba8 Merge pull request #6915 from owncloud/excds/feature/Separate_out_grpc_client_to_package_local_for_policies
Remove grpc.DefaultClient() reference from policies and use only one grpc client in proxy.
2023-07-31 09:15:30 +02:00
Saw-jan 5fb992d868 bump reva 2023-07-31 12:59:49 +05:45
Saw-jan 57c78b0a19 skip new behavior tests for reva-master 2023-07-31 12:57:00 +05:45
Saw-jan a2ee62bde1 adjust tests expectation 2023-07-31 12:57:00 +05:45
Saw-jan 8f7c6e165a bump reva 2023-07-31 12:56:58 +05:45
Andre Duffeck 3662ff2514 Merge pull request #6904 from aduffeck/rollback-migrations2
[full-ci] Add support for running/rolling back decomposedfs migrations
2023-07-31 09:03:46 +02:00
André Duffeck 73a79872ac Bump reva 2023-07-31 08:18:43 +02:00
André Duffeck 201caca5ec Incorporate review suggestions 2023-07-31 08:17:42 +02:00
André Duffeck c8ab49dc2d Add support for running/rolling back decomposedfs migrations 2023-07-31 08:17:42 +02:00
ownClouders 1ee35618fc [tx] updated from transifex 2023-07-31 00:50:16 +00:00
ownClouders bdddf85249 [tx] updated from transifex 2023-07-29 00:50:03 +00:00
Michael Barz 51c9edecb7 Automated changelog update [skip ci] 2023-07-28 13:23:11 +00:00
Michael Barz 1a8516c6cd Merge pull request #6914 from owncloud/fix-static-cache
Fix cache header for web and theme assets
2023-07-28 15:22:27 +02:00
Sawjan Gurung adcbdd9fd2 Automated changelog update [skip ci] 2023-07-28 11:16:25 +00:00
Sawjan Gurung ec4f56d0b9 fix: use error detail as message instead of whole error object (#6911)
* fix: instead of whole erro object, only send error detail as message

* remove passing test from expected failure
2023-07-28 13:15:55 +02:00
Roman Perekhod ebff0114d4 Automated changelog update [skip ci] 2023-07-28 10:54:08 +00:00
Roman Perekhod 8eabc15c98 Merge pull request #6912 from 2403905/issue-5108
Fix CORS issues
2023-07-28 12:53:34 +02:00
Daniel Swärd 62b7dcacc4 Merge pull request #6917 from owncloud/excds/feature/Separate_out_grpc_client_to_package_local_for_ocs_service
Separate out grpc client to package local for ocs service.
2023-07-28 12:47:37 +02:00
Daniel Swärd dad3472e8b Merge pull request #6913 from owncloud/ainmosni/tracing/storage-system
Convert storage system to use service tracing.
2023-07-28 12:47:11 +02:00
Daniel Swärd 056ad2c705 Merge pull request #6916 from owncloud/ainmosni/tracing/storage-users
Convert storage-users to use service tracing.
2023-07-28 12:46:57 +02:00
Daniel Swärd d3519b5e78 Merge pull request #6908 from owncloud/excds/feature/Separate_out_grpc_client_to_package_local_for_search_service
Separate out grpc client to package local for search service.
2023-07-28 12:45:22 +02:00
Daniel Swärd ce4ad80ce2 Remove grpc.DefaultClient() reference from policies and use only one gprc client. 2023-07-28 12:21:02 +02:00
Daniel Swärd aa44ec12ac Separate out grpc client to package local for ocs service. 2023-07-28 11:55:13 +02:00
Michael Barz f8e6b23d5f Fix cache header for web and theme assets 2023-07-28 11:33:06 +02:00
Daniël Franke 063b05140f Convert storage-users to use service tracing.
This converts the storage users service to use the service tracing provider.
2023-07-28 11:25:43 +02:00
Roman Perekhod fb199e6fbf Fix CORS issues 2023-07-28 11:12:42 +02:00
Daniël Franke 83c90b60ef Convert storage system to use service tracing.
This converts the storage system service to use a service trace provider.
2023-07-28 10:54:20 +02:00
Daniel Swärd 82034d34ce Separate out grpc client to package local for search service. 2023-07-28 09:42:37 +02:00
Daniel Swärd 44d9c50f1e Merge pull request #6907 from owncloud/excds/feature/Separate_out_grpc_client_to_package_local_for_thumbnails_service
Separate out grpc client to package local for thumbnails service.
2023-07-28 09:39:36 +02:00
Daniel Swärd 4c5d58f53b Merge pull request #6906 from owncloud/excds/feature/Separate_out_grpc_client_to_package_local_for_webdav_service
Separate out grpc client to package local for webdav service.
2023-07-27 12:30:14 +02:00
Daniel Swärd f27d2b18a7 Merge pull request #6905 from owncloud/excds/feature/Separate_out_grpc_client_to_package_local_for_userlog_service
Separate out grpc client to package local for userlog service.
2023-07-27 12:24:22 +02:00
Daniel Swärd d21b03b14c Separate out grpc client to package local for thumbnails service. 2023-07-27 12:22:28 +02:00
Daniel Swärd 4103f2990f Merge pull request #6896 from owncloud/ainmosni/tracing/eventhistory
Add tracing to eventhistory service.
2023-07-27 12:13:34 +02:00
Daniel Swärd fe84b83617 Separate out grpc client to package local for webdav service. 2023-07-27 11:52:11 +02:00
Daniël Franke 22f5a76829 Add default config to service.
Also modify `GetServiceTraceProvider` to keep working if nil or nil
interface is passed.
2023-07-27 11:25:32 +02:00
kobergj 94aab8b38d Automated changelog update [skip ci] 2023-07-27 09:04:13 +00:00
kobergj 3fa8374ea1 Merge pull request #6900 from kobergj/CheckPublicAuthFirst
Check public link auth first
2023-07-27 11:03:32 +02:00
Daniel Swärd 301936d2bd Separate out grpc client to package local for userlog service. 2023-07-27 10:28:14 +02:00
Daniël Franke 69c05d6199 Merge pull request #6883 from owncloud/excds/feature/Separate_out_grpc_client_to_package_local_for_notifications_service
Separate out grpc client to package local for notifications service.
2023-07-27 09:35:34 +02:00
kobergj 2305e08024 Automated changelog update [skip ci] 2023-07-26 16:16:35 +00:00
kobergj 9fcf9519c0 Merge pull request #6899 from kobergj/BumpReva
[full-ci] Bump Reva
2023-07-26 18:15:53 +02:00
jkoberg 482e0e7838 bump reva
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-07-26 15:58:35 +02:00
jkoberg af2a4c2c97 check public link authorization first
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-07-26 15:02:38 +02:00
Jannik Stehle 5a81fba929 Automated changelog update [skip ci] 2023-07-26 12:11:47 +00:00
Jannik Stehle 0a1491927d Merge pull request #6894 from owncloud/bump-web-v7.1.0-rc.2
[full-ci] chore: bump web to v7.1.0-rc.2
2023-07-26 14:11:06 +02:00
Daniël Franke c76b2e75ef Add another NewNoopTracerProvider 2023-07-26 12:17:30 +02:00
Daniël Franke 162b04f873 Add dummy provider if none is set 2023-07-26 12:17:26 +02:00
Daniël Franke d00f5a9da5 Add tracing to eventhistory service.
This adds tracing to the event history service.
2023-07-26 12:17:22 +02:00
kobergj 1658084812 Automated changelog update [skip ci] 2023-07-26 10:01:36 +00:00
kobergj d8bbe7eeaf Merge pull request #6881 from kobergj/UsePutForNats
Use PUT registry for nats
2023-07-26 12:00:37 +02:00
Daniel Swärd 8c5ce6279a Separate out grpc client to package local for notifications service. 2023-07-26 11:23:38 +02:00
Roman Perekhod 927a518ba4 Automated changelog update [skip ci] 2023-07-26 09:19:10 +00:00
Roman Perekhod 436eae2c79 Merge pull request #6878 from 2403905/issue-5807
[full-ci] Fix the default document language for OnlyOffice
2023-07-26 11:18:35 +02:00
Daniel Swärd 3c02f3b355 Merge pull request #6856 from owncloud/ainmosni/tracing/idp
Convert IDP service to service trace provider.
2023-07-26 11:18:18 +02:00
Daniel Swärd 7c24ea2a95 Merge pull request #6864 from owncloud/ainmosni/tracing/search
Convert search service to use service tracing.
2023-07-26 10:45:05 +02:00
Daniel Swärd 70848008f1 Merge pull request #6866 from owncloud/ainmosni/tracing/storage-shares
Convert storage-share to use service tracing.
2023-07-26 10:42:54 +02:00
Daniel Swärd 3170f4cc1f Merge pull request #6865 from owncloud/ainmosni/tracing/storage-publiclink
Convert storage-publiclink to service tracing
2023-07-26 10:41:53 +02:00
Daniel Swärd 965699e811 Merge pull request #6801 from owncloud/ainmosni/tracing/invitations
Change invitations to use service tracing provider
2023-07-26 10:39:38 +02:00
nirajacharya2 614fcca440 added extra 4 second to wait until getting tags request is send (#6848) 2023-07-26 14:12:58 +05:45
Jannik Stehle fec16dcc08 chore: bump web to v7.1.0-rc.2 2023-07-26 08:29:23 +02:00
Prajwol Amatya 21af4b3d6d refactor acceptance code to store response data of user or group shares on single store (#6775) 2023-07-26 12:01:09 +05:45
Karun Atreya 078c7e036c added step to check notification with subject and resource (#6675) 2023-07-26 10:07:45 +05:45
Roman Perekhod 6c95c626cd [full-ci] update reva to include #4078 2023-07-25 18:18:22 +02:00
Martin 2c36867629 Merge pull request #6885 from owncloud/fix_descriptions_using_single_quotes
[docs-only] Replace double quotes with single quotes in envvar descriptions
2023-07-25 15:09:13 +02:00
ownClouders f01b4aa68b [tx] updated from transifex 2023-07-25 11:18:54 +00:00
mmattel ce318ca160 [docs-only] Replace double quotes with single quotes in envvar descriptions 2023-07-25 13:05:30 +02:00
kobergj 1dbbb9b6a0 Automated changelog update [skip ci] 2023-07-25 10:49:49 +00:00
kobergj 19058fe90b Merge pull request #6849 from kobergj/MaxMessageSizeConfig
[docs-only] Configurable max message size
2023-07-25 12:49:03 +02:00
Daniël Franke b15e50d1fe Add missing package comment 2023-07-25 12:25:30 +02:00
Daniël Franke 053ffc869f Change invitations to use service tracing provider
This changes the invitations service to use the service tracing provider.
2023-07-25 12:06:42 +02:00
Daniël Franke 30d9a08d52 Convert storage-share to use service tracing.
This converts the storage-share to use the service trace provider.
2023-07-25 12:05:16 +02:00
Daniël Franke e2fa2be973 Convert search service to use service tracing.
This converts the search service to use the service tracer.
It also initialises the grpc service with a trace provider.
2023-07-25 11:22:51 +02:00
jkoberg c942c7a6dd use "put" registry for nats
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-07-25 11:21:32 +02:00
Nalem7 de550b73a1 add api test for search restored file through tag (#6709) 2023-07-25 14:54:27 +05:45
kobergjandMartin 31226e2134 improve documentation
Co-authored-by: Martin <github@diemattels.at>
2023-07-25 11:08:04 +02:00
jkoberg 89785d0976 configurable max message size
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-07-25 11:08:01 +02:00
Phil Davis dc18f58693 Merge pull request #6880 from owncloud/Forwardport-download-space
[full-ci][tests-only]Forward port download space
2023-07-25 14:06:53 +05:45
Roman Perekhod 20476aa159 Automated changelog update [skip ci] 2023-07-25 07:34:15 +00:00
Roman Perekhod d00ca45ec8 Merge pull request #6863 from 2403905/issue-6855
Improve the notification logs when the user has no email address
2023-07-25 09:33:35 +02:00
Amrita 6900a80511 Add more tests coverage (#6854) 2023-07-25 12:27:42 +05:45
amrita 1138412aff Add hidden file also 2023-07-25 12:24:36 +05:45
Salipa-Gurung 926e547f99 add test for downloading space 2023-07-25 12:24:26 +05:45
Christian Richter 309b59a665 Merge pull request #6842 from dragonchaser/issue-4188-depth
En-/Disable DEPTH:inifinity in PROPFIND
2023-07-24 17:56:10 +02:00
Christian RichterandMartin b6b7d67121 Apply suggestions from code review
Co-authored-by: Martin <github@diemattels.at>
2023-07-24 17:07:37 +02:00
Christian Richter 1351f4937d bump reva
Signed-off-by: Christian Richter <crichter@owncloud.com>
2023-07-24 16:37:30 +02:00
Christian Richter df10baf339 fix typo
Signed-off-by: Christian Richter <crichter@owncloud.com>
2023-07-24 15:46:27 +02:00
Christian Richter 66791d9388 add missing env var to drone.star
Signed-off-by: Christian Richter <crichter@owncloud.com>
2023-07-24 15:28:37 +02:00
Christian Richter 3eb6e74535 add missing options
Signed-off-by: Christian Richter <crichter@owncloud.com>
2023-07-24 15:15:01 +02:00
Christian Richter 6ff8a3cd27 test infinity changes
Signed-off-by: Christian Richter <crichter@owncloud.com>
2023-07-24 14:11:12 +02:00
Roman Perekhod f3484c3cdd Improve the notification logs when the user has no email address 2023-07-24 10:41:32 +02:00
Swikriti Tripathi 98d6796800 fix the syntax of the test step (#6871) 2023-07-24 14:10:22 +05:45
Swikriti Tripathi fb7ba62726 [tests-only][full-ci]Retry listing notifications (#6839)
* Retry listing notifications

* use loop instaed

* use loop instaed

* throw exception

* use do while loop
2023-07-24 11:31:38 +05:45
ownClouders 80e7f44604 [tx] updated from transifex 2023-07-22 00:54:53 +00:00
Daniël Franke 76088d2034 Convert storage-publiclink to service tracing
This converts the storage-publiclink service to the service tracing
methods.
2023-07-21 12:34:09 +02:00
Daniël Franke 48933fa2ee Package comment for middleware. 2023-07-21 09:16:58 +02:00
Daniël Franke d2d0461375 Convert IDP service to service trace provider.
This converts the IDP service to use the service trace provider.
2023-07-20 13:36:08 +02:00
Sabin Panta bed8c77892 [tests-only][full-ci] make user enable disable feature use graphapi (#6790)
* make user enable disable feature use graphapi

* change the step definition code for user disable action

* updated step definition code for user disable feature

* updated user disable implementation

* corrected the error of step implementation code
2023-07-20 14:27:40 +05:45
Nalem7 531efe0b10 add test for search deleted file using context (#6707) 2023-07-20 12:58:40 +05:45
Nalem7 e71b72c18a add test for search files by sharee using content (#6698) 2023-07-20 11:50:39 +05:45
Willy Kloucek f34d96ace8 Merge pull request #6852 from owncloud/fix-WEB_OPTION_ACCESS_DENIED_HELP_URL
fix WEB_OPTION_ACCESS_DENIED_HELP_URL
2023-07-19 17:16:07 +02:00
Willy KloucekandJannik Stehle 595a00998b Update services/web/pkg/config/options.go
Co-authored-by: Jannik Stehle <50302941+JammingBen@users.noreply.github.com>
2023-07-19 16:35:20 +02:00
Martin 7a0bdce8b4 Merge pull request #6840 from owncloud/graceful-timeout
storage-users: Add config option for graceful shutdown timeout
2023-07-19 16:19:25 +02:00
Willy Kloucek f9f84b9135 fix WEB_OPTION_ACCESS_DENIED_HELP_URL 2023-07-19 16:01:38 +02:00
MartinandEdith Parzefall 6be90847b7 Update services/storage-users/README.md
Co-authored-by: Edith Parzefall <edith_parzefall@gmx.de>
2023-07-19 14:35:52 +02:00
mmattel 6c33d945f3 update readme 2023-07-19 13:27:30 +02:00
MartinandEdith Parzefall 35dd1fa173 Update services/storage-users/README.md
Co-authored-by: Edith Parzefall <edith_parzefall@gmx.de>
2023-07-19 13:02:48 +02:00
MartinandEdith Parzefall 1ec451d3d5 Apply suggestions from code review
Co-authored-by: Edith Parzefall <edith_parzefall@gmx.de>
2023-07-19 13:02:25 +02:00
mmattel 5f72c61089 envvar text fix and readme addon 2023-07-19 11:06:29 +02:00
Phil Davis 02a3bfd176 Merge pull request #6835 from owncloud/retry-409-for-given-step-upload
[tests-only] [full-ci] Retry if 409 is received when uploading in a Given step
2023-07-19 09:34:09 +05:45
ownClouders b505e334ee [tx] updated from transifex 2023-07-19 00:20:06 +00:00
Viktor Scharf 1803c19b24 add test for uploading zero file with mtime (#6552) 2023-07-18 17:15:08 +02:00
Ralf Haferkamp e32aef17cd storage-users: Add config option for graceful shutdown timeout
Add STORAGE_USERS_GRACEFUL_SHUTDOWN_TIMEOUT setting to allow a graceful
shutdown of the storage-users service. This currently only applicable
when running storage-user as a sepearate service.

Setting STORAGE_USERS_GRACEFUL_SHUTDOWN_TIMEOUT to a non-zero value
gives the storage-users service a chance to cleanly shutdown and finish
any in progess tasks (e.g. metadata propagation) before exiting.

Partial-Fix: #6602
2023-07-18 16:47:26 +02:00
Ralf Haferkamp b480fc09b0 Bump reva, for 'graceful_shutdown_timeout' setting 2023-07-18 16:08:43 +02:00
dependabot[bot] 87a1bf7e26 Bump google.golang.org/grpc from 1.56.1 to 1.56.2
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.56.1 to 1.56.2.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.56.1...v1.56.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-18 14:09:37 +02:00
dependabot[bot] a1e69c6a5c Bump github.com/go-micro/plugins/v4/registry/consul from 1.2.0 to 1.2.1
Bumps [github.com/go-micro/plugins/v4/registry/consul](https://github.com/go-micro/plugins) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/go-micro/plugins/releases)
- [Commits](https://github.com/go-micro/plugins/compare/v4/auth/jwt/v1.2.0...v4/logger/zap/v1.2.1)

---
updated-dependencies:
- dependency-name: github.com/go-micro/plugins/v4/registry/consul
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-18 14:08:39 +02:00
Michael Barz 6ed9e2b6c8 Automated changelog update [skip ci] 2023-07-18 11:20:37 +00:00
Michael Barz 16f54d9bb9 Merge pull request #6837 from owncloud/release-3.1.0-beta.1
[full-ci] bump version, prepare changelog
2023-07-18 13:19:50 +02:00
Phil Davis bd634cbcf3 Retry if 409 is received when uploading in a Given step 2023-07-18 16:10:21 +05:45
284 changed files with 3834 additions and 1600 deletions

No files matched your search

+1 -1
View File
@@ -1,3 +1,3 @@
# The test runner source for UI tests
WEB_COMMITID=4925a1bd117f31530f6ebdf5af2a9215ad3c6796
WEB_COMMITID=45f6a7f53398bcd0cc77fea96e473092b485bd7a
WEB_BRANCH=stable-7.1
+5
View File
@@ -109,6 +109,8 @@ config = {
"apiSpacesShares",
"apiCors",
"apiAsyncUpload",
"apiDownloads",
"apiReshare",
],
"skip": False,
},
@@ -1951,6 +1953,9 @@ def ocisServer(storage, accounts_hash_difficulty = 4, volumes = [], depends_on =
"OCIS_EVENTS_ENABLE_TLS": False,
"OCIS_DECOMPOSEDFS_METADATA_BACKEND": "messagepack",
"FRONTEND_OCS_ENABLE_DENIALS": True,
"OCDAV_ALLOW_PROPFIND_DEPTH_INFINITY": True,
# fonts map for txt thumbnails (including unicode support)
"THUMBNAILS_TXT_FONTMAP_FILE": "%s/tests/config/drone/fontsMap.json" % (dirs["base"]),
}
if tika_enabled:
environment["FRONTEND_FULL_TEXT_SEARCH_ENABLED"] = True
+135 -26
View File
@@ -2,7 +2,104 @@
The following sections list the changes for unreleased.
[unreleased]: https://github.com/owncloud/ocis/compare/v3.0.0...master
[unreleased]: https://github.com/owncloud/ocis/compare/v3.1.0...master
## Summary
* Bugfix - Check public auth first: [#6900](https://github.com/owncloud/ocis/pull/6900)
* Bugfix - Let clients cache web and theme assets: [#6914](https://github.com/owncloud/ocis/pull/6914)
* Bugfix - Fix CORS issues: [#6912](https://github.com/owncloud/ocis/pull/6912)
* Bugfix - Fix error message on 400 response for thumbnail requests: [#2064](https://github.com/owncloud/ocis/issues/2064)
* Bugfix - Fix nats registry: [#6881](https://github.com/owncloud/ocis/pull/6881)
* Bugfix - Fix the default document language for OnlyOffice: [#6878](https://github.com/owncloud/ocis/pull/6878)
* Bugfix - Fix the routing capability: [#9367](https://github.com/owncloud/web/issues/9367)
* Enhancement - Bump reva: [#6899](https://github.com/owncloud/ocis/pull/6899)
* Enhancement - Configure max grpc message size: [#6849](https://github.com/owncloud/ocis/pull/6849)
* Enhancement - Evaluate policy resource information on single file shares: [#6888](https://github.com/owncloud/ocis/pull/6888)
* Enhancement - Improve the notification logs: [#6862](https://github.com/owncloud/ocis/pull/6862)
## Details
* Bugfix - Check public auth first: [#6900](https://github.com/owncloud/ocis/pull/6900)
When authenticating in proxy, first check for public link authorization.
https://github.com/owncloud/ocis/pull/6900
* Bugfix - Let clients cache web and theme assets: [#6914](https://github.com/owncloud/ocis/pull/6914)
We needed to remove "must-revalidate" from the cache-control header to allow clients to cache
the web and theme assets.
https://github.com/owncloud/ocis/pull/6914
* Bugfix - Fix CORS issues: [#6912](https://github.com/owncloud/ocis/pull/6912)
We fixed the CORS issues when client asking for the 'Cache-Control' header before load the file
https://github.com/owncloud/ocis/issues/5108
https://github.com/owncloud/ocis/pull/6912
* Bugfix - Fix error message on 400 response for thumbnail requests: [#2064](https://github.com/owncloud/ocis/issues/2064)
Fix the error message when the thumbnail request returns a '400 Bad Request' response.
https://github.com/owncloud/ocis/issues/2064
https://github.com/owncloud/ocis/pull/6911
* Bugfix - Fix nats registry: [#6881](https://github.com/owncloud/ocis/pull/6881)
Using `nats` as service registry did work, but when a service would restart and gets a new ip it
couldn't re-register. We fixed this by using `"put"` register action instead of the default
`"create"`
https://github.com/owncloud/ocis/pull/6881
* Bugfix - Fix the default document language for OnlyOffice: [#6878](https://github.com/owncloud/ocis/pull/6878)
Fix the default document language for OnlyOffice
https://github.com/owncloud/enterprise/issues/5807
https://github.com/owncloud/ocis/pull/6878
* Bugfix - Fix the routing capability: [#9367](https://github.com/owncloud/web/issues/9367)
Fix the routing capability
https://github.com/owncloud/web/issues/9367
* Enhancement - Bump reva: [#6899](https://github.com/owncloud/ocis/pull/6899)
Bumps reva version
https://github.com/owncloud/ocis/pull/6899
https://github.com/owncloud/ocis/pull/6919
https://github.com/owncloud/ocis/pull/6928
* Enhancement - Configure max grpc message size: [#6849](https://github.com/owncloud/ocis/pull/6849)
Add a configuration option for the grpc max message size
https://github.com/owncloud/ocis/pull/6849
* Enhancement - Evaluate policy resource information on single file shares: [#6888](https://github.com/owncloud/ocis/pull/6888)
The policy environment for single file shares now also includes information about the
resource. As a result, it is now possible to set up and check rules for them.
https://github.com/owncloud/ocis/pull/6888
* Enhancement - Improve the notification logs: [#6862](https://github.com/owncloud/ocis/pull/6862)
Improve the notification logs when the user has no email address
https://github.com/owncloud/ocis/issues/6855
https://github.com/owncloud/ocis/pull/6862
# Changelog for [3.1.0] (2023-07-18)
The following sections list the changes for 3.1.0.
[3.1.0]: https://github.com/owncloud/ocis/compare/v3.0.0...v3.1.0
## Summary
@@ -47,7 +144,7 @@ The following sections list the changes for unreleased.
* Enhancement - Add functionality to retry postprocessing: [#6500](https://github.com/owncloud/ocis/pull/6500)
* Enhancement - Update go-micro kubernetes registry: [#6457](https://github.com/owncloud/ocis/pull/6457)
* Enhancement - Update web to v7.0.1: [#6470](https://github.com/owncloud/ocis/pull/6470)
* Enhancement - Update web to v7.1.0-rc.1: [#6828](https://github.com/owncloud/ocis/pull/6828)
* Enhancement - Update web to v7.1.0-rc.4: [#6925](https://github.com/owncloud/ocis/pull/6925)
* Enhancement - Allow disabling wopi chat: [#6544](https://github.com/owncloud/ocis/pull/6544)
## Details
@@ -418,11 +515,11 @@ The following sections list the changes for unreleased.
https://github.com/owncloud/ocis/pull/6470
https://github.com/owncloud/web/releases/tag/v7.0.1
* Enhancement - Update web to v7.1.0-rc.1: [#6828](https://github.com/owncloud/ocis/pull/6828)
* Enhancement - Update web to v7.1.0-rc.4: [#6925](https://github.com/owncloud/ocis/pull/6925)
Tags: web
We updated ownCloud Web to v7.1.0-rc.1. Please refer to the changelog (linked) for details on
We updated ownCloud Web to v7.1.0-rc.4. Please refer to the changelog (linked) for details on
the web release.
## Summary * Bugfix [owncloud/web#9078](https://github.com/owncloud/web/pull/9078):
@@ -442,7 +539,19 @@ The following sections list the changes for unreleased.
[owncloud/web#9351](https://github.com/owncloud/web/pull/9351): Media controls
overflow on mobile screens * Bugfix
[owncloud/web#9389](https://github.com/owncloud/web/pull/9389): Space editors see
empty trashbin and delete actions in space trashbin * Enhancement
empty trashbin and delete actions in space trashbin * Bugfix
[owncloud/web#9461](https://github.com/owncloud/web/pull/9461): Merging folders *
Bugfix [owncloud/web/#9496](https://github.com/owncloud/web/pull/9496): Logo not
showing * Bugfix [owncloud/web/#9489](https://github.com/owncloud/web/pull/9489):
Public drop zone * Bugfix
[owncloud/web/#9487](https://github.com/owncloud/web/pull/9487): Respect
supportedClouds config * Bugfix
[owncloud/web/#9507](https://github.com/owncloud/web/pull/9507): Space description
edit modal is cut off vertically * Bugfix
[owncloud/web/#9501](https://github.com/owncloud/web/pull/9501): Add cloud importer
translations * Bugfix
[owncloud/web/#9510](https://github.com/owncloud/web/pull/9510): Double items after
moving a file with the same name * Enhancement
[owncloud/web#7967](https://github.com/owncloud/web/pull/7967): Add hasPriority
property for editors per extension * Enhancement
[owncloud/web#8422](https://github.com/owncloud/web/issues/8422): Improve
@@ -511,8 +620,8 @@ The following sections list the changes for unreleased.
for auth token * Enhancement
[owncloud/web#9394](https://github.com/owncloud/web/pull/9394): Button styling
https://github.com/owncloud/ocis/pull/6828
https://github.com/owncloud/web/releases/tag/v7.1.0-rc.1
https://github.com/owncloud/ocis/pull/6925
https://github.com/owncloud/web/releases/tag/v7.1.0-rc.4
* Enhancement - Allow disabling wopi chat: [#6544](https://github.com/owncloud/ocis/pull/6544)
@@ -4677,7 +4786,7 @@ The following sections list the changes for 2.0.0.
The following sections list the changes for 1.20.0.
[1.20.0]: https://github.com/owncloud/ocis/compare/v1.19.1...v1.20.0
[1.20.0]: https://github.com/owncloud/ocis/compare/v1.19.0...v1.20.0
## Summary
@@ -4845,28 +4954,11 @@ The following sections list the changes for 1.20.0.
Group member remove
https://github.com/owncloud/ocis/pull/3467
# Changelog for [1.19.1] (2022-03-29)
The following sections list the changes for 1.19.1.
[1.19.1]: https://github.com/owncloud/ocis/compare/v1.19.0...v1.19.1
## Summary
* Bugfix - Return correct special item urls: [#3419](https://github.com/owncloud/ocis/pull/3419)
## Details
* Bugfix - Return correct special item urls: [#3419](https://github.com/owncloud/ocis/pull/3419)
URLs for Special items (space image, readme) were broken.
https://github.com/owncloud/ocis/pull/3419
# Changelog for [1.19.0] (2022-03-29)
The following sections list the changes for 1.19.0.
[1.19.0]: https://github.com/owncloud/ocis/compare/v1.18.0...v1.19.0
[1.19.0]: https://github.com/owncloud/ocis/compare/v1.19.1...v1.19.0
## Summary
@@ -5035,6 +5127,23 @@ The following sections list the changes for 1.19.0.
https://github.com/owncloud/ocis/pull/3291
https://github.com/owncloud/ocis/pull/3375
https://github.com/owncloud/web/releases/tag/v5.3.0
# Changelog for [1.19.1] (2022-03-29)
The following sections list the changes for 1.19.1.
[1.19.1]: https://github.com/owncloud/ocis/compare/v1.18.0...v1.19.1
## Summary
* Bugfix - Return correct special item urls: [#3419](https://github.com/owncloud/ocis/pull/3419)
## Details
* Bugfix - Return correct special item urls: [#3419](https://github.com/owncloud/ocis/pull/3419)
URLs for Special items (space image, readme) were broken.
https://github.com/owncloud/ocis/pull/3419
# Changelog for [1.18.0] (2022-03-03)
The following sections list the changes for 1.18.0.
@@ -1,4 +1,26 @@
Enhancement: Update reva to v2.15.0
Enhancement: Bump reva to latest edge
* Bugfix [cs3org/reva#4086](https://github.com/cs3org/reva/pull/4086): Fix ocs status code for not enough permission response
* Bugfix [cs3org/reva#4078](https://github.com/cs3org/reva/pull/4078): fix the default document language for OnlyOffice
* Bugfix [cs3org/reva#4051](https://github.com/cs3org/reva/pull/4051): Set treesize when creating a storage space
* Bugfix [cs3org/reva#4089](https://github.com/cs3org/reva/pull/4089): Fix wrong import
* Bugfix [cs3org/reva#4082](https://github.com/cs3org/reva/pull/4082): Fix propfind permissions
* Bugfix [cs3org/reva#4076](https://github.com/cs3org/reva/pull/4076): Fix WebDAV permissions for space managers
* Bugfix [cs3org/reva#4078](https://github.com/cs3org/reva/pull/4078): fix the default document language for OnlyOffice
* Bugfix [cs3org/reva#4081](https://github.com/cs3org/reva/pull/4081): Propagate sizeDiff
* Enhancement [cs3org/reva#4070](https://github.com/cs3org/reva/pull/4070): Selectable Propagators
* Enhancement [cs3org/reva#4074](https://github.com/cs3org/reva/pull/4074): Allow configuring the max size of grpc messages
* Enhancement [cs3org/reva#4085](https://github.com/cs3org/reva/pull/4085): Add registry refresh
* Enhancement [cs3org/reva#4090](https://github.com/cs3org/reva/pull/4090): Add Capability for sse
* Enhancement [cs3org/reva#4072](https://github.com/cs3org/reva/pull/4072): Allow to specify a shutdown timeout
* Enhancement [cs3org/reva#4083](https://github.com/cs3org/reva/pull/4083): Allow for rolling back migrations
* Enhancement [cs3org/reva#4014](https://github.com/cs3org/reva/pull/4014): En-/Disable DEPTH:inifinity in PROPFIND
https://github.com/owncloud/ocis/pull/6899
https://github.com/owncloud/ocis/pull/6919
https://github.com/owncloud/ocis/pull/6928
Update reva to v2.15.0
* Bugfix [cs3org/reva#4004](https://github.com/cs3org/reva/pull/4004): Add path to public link POST
* Bugfix [cs3org/reva#3993](https://github.com/cs3org/reva/pull/3993): Add token to LinkAccessedEvent
@@ -0,0 +1,5 @@
Bugfix: Check public auth first
When authenticating in proxy, first check for public link authorization.
https://github.com/owncloud/ocis/pull/6900
@@ -0,0 +1,5 @@
Enhancement: configure max grpc message size
Add a configuration option for the grpc max message size
https://github.com/owncloud/ocis/pull/6849
@@ -0,0 +1,6 @@
Enhancement: Evaluate policy resource information on single file shares
The policy environment for single file shares now also includes information about the resource.
As a result, it is now possible to set up and check rules for them.
https://github.com/owncloud/ocis/pull/6888
@@ -0,0 +1,5 @@
Bugfix: Let clients cache web and theme assets
We needed to remove "must-revalidate" from the cache-control header to allow clients to cache the web and theme assets.
https://github.com/owncloud/ocis/pull/6914
+6
View File
@@ -0,0 +1,6 @@
Bugfix: Fix CORS issues
We fixed the CORS issues when client asking for the 'Cache-Control' header before load the file
https://github.com/owncloud/ocis/pull/6912
https://github.com/owncloud/ocis/issues/5108
@@ -0,0 +1,6 @@
Bugfix: Fix error message on 400 response for thumbnail requests
Fix the error message when the thumbnail request returns a '400 Bad Request' response.
https://github.com/owncloud/ocis/issues/2064
https://github.com/owncloud/ocis/pull/6911
@@ -0,0 +1,6 @@
Bugfix: Fix nats registry
Using `nats` as service registry did work, but when a service would restart and gets a new ip it couldn't re-register.
We fixed this by using `"put"` register action instead of the default `"create"`
https://github.com/owncloud/ocis/pull/6881
@@ -0,0 +1,6 @@
Bugfix: fix the default document language for OnlyOffice
Fix the default document language for OnlyOffice
https://github.com/owncloud/ocis/pull/6878
https://github.com/owncloud/enterprise/issues/5807
@@ -0,0 +1,5 @@
Bugfix: Fix the routing capability
Fix the routing capability
https://github.com/owncloud/web/issues/9367
@@ -0,0 +1,6 @@
Enhancement: Improve the notification logs
Improve the notification logs when the user has no email address
https://github.com/owncloud/ocis/pull/6862
https://github.com/owncloud/ocis/issues/6855
@@ -1,8 +1,8 @@
Enhancement: Update web to v7.1.0-rc.1
Enhancement: Update web to v7.1.0-rc.4
Tags: web
We updated ownCloud Web to v7.1.0-rc.1. Please refer to the changelog (linked) for details on the web release.
We updated ownCloud Web to v7.1.0-rc.4. Please refer to the changelog (linked) for details on the web release.
## Summary
* Bugfix [owncloud/web#9078](https://github.com/owncloud/web/pull/9078): Favorites list update on removal
@@ -14,6 +14,13 @@ We updated ownCloud Web to v7.1.0-rc.1. Please refer to the changelog (linked) f
* Bugfix [owncloud/web#9315](https://github.com/owncloud/web/issues/9315): Switch columns displayed on small screens in "Shared with me" view
* Bugfix [owncloud/web#9351](https://github.com/owncloud/web/pull/9351): Media controls overflow on mobile screens
* Bugfix [owncloud/web#9389](https://github.com/owncloud/web/pull/9389): Space editors see empty trashbin and delete actions in space trashbin
* Bugfix [owncloud/web#9461](https://github.com/owncloud/web/pull/9461): Merging folders
* Bugfix [owncloud/web/#9496](https://github.com/owncloud/web/pull/9496): Logo not showing
* Bugfix [owncloud/web/#9489](https://github.com/owncloud/web/pull/9489): Public drop zone
* Bugfix [owncloud/web/#9487](https://github.com/owncloud/web/pull/9487): Respect supportedClouds config
* Bugfix [owncloud/web/#9507](https://github.com/owncloud/web/pull/9507): Space description edit modal is cut off vertically
* Bugfix [owncloud/web/#9501](https://github.com/owncloud/web/pull/9501): Add cloud importer translations
* Bugfix [owncloud/web/#9510](https://github.com/owncloud/web/pull/9510): Double items after moving a file with the same name
* Enhancement [owncloud/web#7967](https://github.com/owncloud/web/pull/7967): Add hasPriority property for editors per extension
* Enhancement [owncloud/web#8422](https://github.com/owncloud/web/issues/8422): Improve extension app topbar
* Enhancement [owncloud/web#8445](https://github.com/owncloud/web/issues/8445): Open individually shared file in dedicated view
@@ -51,5 +58,5 @@ We updated ownCloud Web to v7.1.0-rc.1. Please refer to the changelog (linked) f
* Enhancement [owncloud/web#9386](https://github.com/owncloud/web/pull/9386): Allow local storage for auth token
* Enhancement [owncloud/web#9394](https://github.com/owncloud/web/pull/9394): Button styling
https://github.com/owncloud/ocis/pull/6828
https://github.com/owncloud/web/releases/tag/v7.1.0-rc.1
https://github.com/owncloud/ocis/pull/6925
https://github.com/owncloud/web/releases/tag/v7.1.0-rc.4
@@ -31,7 +31,7 @@
env:
INSECURE: "false"
TRAEFIK_ACME_MAIL: wkloucek@owncloud.com
OCIS_DOCKER_TAG: 3.1.0-beta.1
OCIS_DOCKER_TAG: 3.1.0-rc.1
OCIS_DOMAIN: ocis.ocis-keycloak.released.owncloud.works
KEYCLOAK_DOMAIN: keycloak.ocis-keycloak.released.owncloud.works
COMPOSE_FILE: docker-compose.yml:monitoring_tracing/docker-compose-additions.yml
@@ -31,7 +31,7 @@
env:
INSECURE: "false"
TRAEFIK_ACME_MAIL: wkloucek@owncloud.com
OCIS_DOCKER_TAG: 3.1.0-beta.1
OCIS_DOCKER_TAG: 3.1.0-rc.1
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
@@ -31,7 +31,7 @@
env:
INSECURE: "false"
TRAEFIK_ACME_MAIL: wkloucek@owncloud.com
OCIS_DOCKER_TAG: 3.1.0-beta.1
OCIS_DOCKER_TAG: 3.1.0-rc.1
OCIS_DOMAIN: ocis.ocis-traefik.released.owncloud.works
DEMO_USERS: "true"
INBUCKET_DOMAIN: mail.ocis-traefik.released.owncloud.works
@@ -31,7 +31,7 @@
env:
INSECURE: "false"
TRAEFIK_ACME_MAIL: wkloucek@owncloud.com
OCIS_DOCKER_TAG: 3.1.0-beta.1
OCIS_DOCKER_TAG: 3.1.0-rc.1
OCIS_DOMAIN: ocis.ocis-wopi.released.owncloud.works
WOPISERVER_DOMAIN: wopiserver.ocis-wopi.released.owncloud.works
COLLABORA_DOMAIN: collabora.ocis-wopi.released.owncloud.works
@@ -6,14 +6,28 @@ import data.utils
default granted := true
granted = false if {
print("PRINT MESSAGE EXAMPLE")
input.request.method == "PUT"
not startswith(input.request.path, "/ocs")
not utils.is_extension_allowed(input.request.path)
pathPrefixes := [
"/dav",
"/remote.php/webdav",
"/remote.php/dav",
"/webdav",
]
restricted := pathPrefixes[_]
startswith(input.request.path, restricted)
not utils.is_extension_allowed(input.resource.name)
}
granted = false if {
input.request.method == "POST"
startswith(input.request.path, "/remote.php")
pathPrefixes := [
"/data",
"/dav",
"/remote.php/webdav",
"/remote.php/dav",
"/webdav",
]
restricted := pathPrefixes[_]
startswith(input.request.path, restricted)
not utils.is_extension_allowed(input.resource.name)
}
@@ -0,0 +1,19 @@
---
title: Additinal Information
date: 2018-05-02T00:00:00+00:00
weight: 20
geekdocRepo: https://github.com/owncloud/ocis
geekdocEditPath: edit/master/docs/services/general-info
geekdocFilePath: additional-information.md
geekdocCollapseSection: true
---
This section contains information on general topics
## GRPC Maximum Message Size
ocis is using grpc for inter-service communication. When having a folder with a lot of files (25.000+, the size does not matter) and doing a `PROPFIND` on that folder, the server will run into errors. This is because the grpc message body becomes to big. With introduction of the envvar `OCIS_GRPC_MAX_RECEIVED_MESSAGE_SIZE`, the max size for the grpc body can be raised.
NOTE: With a certain amount of files even raising the grpc message size will not suffice as the requests will run into network timeouts. Also generally the more files are in a folder, the longer it will take time to load.
It is recommended to use `OCIS_GRPC_MAX_RECEIVED_MESSAGE_SIZE` only *temporary* to copy files out of the folder (like via the web ui) and use the default value in general.
+4 -4
View File
@@ -13,7 +13,7 @@ require (
github.com/coreos/go-oidc v2.2.1+incompatible
github.com/coreos/go-oidc/v3 v3.6.0
github.com/cs3org/go-cs3apis v0.0.0-20230516150832-730ac860c71d
github.com/cs3org/reva/v2 v2.15.0
github.com/cs3org/reva/v2 v2.15.1-0.20230731132956-0fb5212d0551
github.com/disintegration/imaging v1.6.2
github.com/dutchcoders/go-clamd v0.0.0-20170520113014-b970184f4d9e
github.com/egirna/icap-client v0.1.1
@@ -27,12 +27,12 @@ require (
github.com/go-micro/plugins/v4/client/grpc v1.2.0
github.com/go-micro/plugins/v4/events/natsjs v1.2.1
github.com/go-micro/plugins/v4/logger/zerolog v1.2.0
github.com/go-micro/plugins/v4/registry/consul v1.2.0
github.com/go-micro/plugins/v4/registry/consul v1.2.1
github.com/go-micro/plugins/v4/registry/etcd v1.2.0
github.com/go-micro/plugins/v4/registry/kubernetes v1.1.2-0.20230605104008-a179a6b8f8e6
github.com/go-micro/plugins/v4/registry/mdns v1.2.0
github.com/go-micro/plugins/v4/registry/memory v1.2.0
github.com/go-micro/plugins/v4/registry/nats v1.2.1
github.com/go-micro/plugins/v4/registry/nats v1.2.2-0.20230723205323-1ada01245674
github.com/go-micro/plugins/v4/server/grpc v1.2.0
github.com/go-micro/plugins/v4/server/http v1.2.1
github.com/go-micro/plugins/v4/wrapper/breaker/gobreaker v1.2.0
@@ -97,7 +97,7 @@ require (
golang.org/x/term v0.10.0
golang.org/x/text v0.11.0
google.golang.org/genproto/googleapis/api v0.0.0-20230530153820-e85fd2cbaebc
google.golang.org/grpc v1.56.1
google.golang.org/grpc v1.56.2
google.golang.org/protobuf v1.31.0
gopkg.in/square/go-jose.v2 v2.6.0
gopkg.in/yaml.v2 v2.4.0
+8 -8
View File
@@ -625,8 +625,8 @@ github.com/crewjam/httperr v0.2.0 h1:b2BfXR8U3AlIHwNeFFvZ+BV1LFvKLlzMjzaTnZMybNo
github.com/crewjam/httperr v0.2.0/go.mod h1:Jlz+Sg/XqBQhyMjdDiC+GNNRzZTD7x39Gu3pglZ5oH4=
github.com/crewjam/saml v0.4.13 h1:TYHggH/hwP7eArqiXSJUvtOPNzQDyQ7vwmwEqlFWhMc=
github.com/crewjam/saml v0.4.13/go.mod h1:igEejV+fihTIlHXYP8zOec3V5A8y3lws5bQBFsTm4gA=
github.com/cs3org/reva/v2 v2.15.0 h1:saU2Heig/HswkNdDHh2Jttmhsn0nfTkvaYbXUspcNOM=
github.com/cs3org/reva/v2 v2.15.0/go.mod h1:4z5EQghS2LhSWZWocH51Dw9VAs16No1zSFvFgQtgS7w=
github.com/cs3org/reva/v2 v2.15.1-0.20230731132956-0fb5212d0551 h1:8/cX/Fjo0SWzuHH+7SUK2w9t/9yR449woDR2wTzNW7k=
github.com/cs3org/reva/v2 v2.15.1-0.20230731132956-0fb5212d0551/go.mod h1:4UKDbqt/GHQDdNr2fv4XQVlnz6KC9DQdpV2P2fY2Mkg=
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=
@@ -780,8 +780,8 @@ github.com/go-micro/plugins/v4/events/natsjs v1.2.1 h1:wCq5pyUkHSJ31QAtTLiIRowNM
github.com/go-micro/plugins/v4/events/natsjs v1.2.1/go.mod h1:lYuiEYKQTpbE2LA8HEcC8D6kQ29M7ILfEak3dzeucEg=
github.com/go-micro/plugins/v4/logger/zerolog v1.2.0 h1:JZ516VQ9zekRoi868XG7x0EWxZ2AMq/euHIBChITsTI=
github.com/go-micro/plugins/v4/logger/zerolog v1.2.0/go.mod h1:AieYOIeOxobYa5B8WGEqxXM3Ndi26tDIu9fZ4RYkCvQ=
github.com/go-micro/plugins/v4/registry/consul v1.2.0 h1:nqrTzfWUTWKAy+M+i2FazbHnQn4m77EOtoch57kbCH4=
github.com/go-micro/plugins/v4/registry/consul v1.2.0/go.mod h1:wTat7/K9XQ+i64VbbcMYFcEwipYfSgJM51HcA/sgsM4=
github.com/go-micro/plugins/v4/registry/consul v1.2.1 h1:3wctYMtstwQLCjoJ1HA6mKGGFF1hcdKDv5MzHakB1jE=
github.com/go-micro/plugins/v4/registry/consul v1.2.1/go.mod h1:wTat7/K9XQ+i64VbbcMYFcEwipYfSgJM51HcA/sgsM4=
github.com/go-micro/plugins/v4/registry/etcd v1.2.0 h1:tcHlU1GzvX3oZa8WQH8ylMCGie5qD5g98YWTESJjeqQ=
github.com/go-micro/plugins/v4/registry/etcd v1.2.0/go.mod h1:CQeTHkjN3xMtIQsynaTTquMz2sHEdsTfRIfFzrX7aug=
github.com/go-micro/plugins/v4/registry/kubernetes v1.1.2-0.20230605104008-a179a6b8f8e6 h1:ekJ70Hq3N+Enz71GCubzhzcVuA9jfd1zWuqTXZF+UlU=
@@ -790,8 +790,8 @@ github.com/go-micro/plugins/v4/registry/mdns v1.2.0 h1:BsGnco+PgycvSX+HS0XbeUQEP
github.com/go-micro/plugins/v4/registry/mdns v1.2.0/go.mod h1:re0JvO5F56n59WEDaAKj2jtboKa2dklAd6iWyz5xa54=
github.com/go-micro/plugins/v4/registry/memory v1.2.0 h1:R0G2tltffuG+fQnk+/JuAdgEJX4J+LuOafZDoNd8ow0=
github.com/go-micro/plugins/v4/registry/memory v1.2.0/go.mod h1:4t5YiXJT5BVtMWImxy807lY3ywjv/PHpdHnN+LXSsI4=
github.com/go-micro/plugins/v4/registry/nats v1.2.1 h1:YsGmSYxhdu9NK7d8NYMY/xhaYMB4AhcCWoSrk7YGdEY=
github.com/go-micro/plugins/v4/registry/nats v1.2.1/go.mod h1:RDsrDhcjJggCzAvvUzo/Bzy68d9s9+tu0KOfofXVCog=
github.com/go-micro/plugins/v4/registry/nats v1.2.2-0.20230723205323-1ada01245674 h1:NBjrNT5TKhKB0ENBGpse+FRCY6GQAeS8LxKrspMKZs0=
github.com/go-micro/plugins/v4/registry/nats v1.2.2-0.20230723205323-1ada01245674/go.mod h1:RDsrDhcjJggCzAvvUzo/Bzy68d9s9+tu0KOfofXVCog=
github.com/go-micro/plugins/v4/server/grpc v1.2.0 h1:lXfM+/0oE/u1g0hVBYsvbP4lYOYXYOmwf5qH7ghi7Cc=
github.com/go-micro/plugins/v4/server/grpc v1.2.0/go.mod h1:+Ah9Pf/vMSXxBM3fup/hc3N+zN2as3nIpcRaR4sBjnY=
github.com/go-micro/plugins/v4/server/http v1.2.1 h1:Cia924J90rgFT/4qWWvyLvN+XqEm5T9tiQyQ+GU4bOQ=
@@ -2372,8 +2372,8 @@ google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCD
google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI=
google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww=
google.golang.org/grpc v1.52.0/go.mod h1:pu6fVzoFb+NBYNAvQL08ic+lvB2IojljRYuun5vorUY=
google.golang.org/grpc v1.56.1 h1:z0dNfjIl0VpaZ9iSVjA6daGatAYwPGstTjt5vkRMFkQ=
google.golang.org/grpc v1.56.1/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s=
google.golang.org/grpc v1.56.2 h1:fVRFRnXvU+x6C4IlHZewvJOVHoOv1TUuQyoRsYnB4bI=
google.golang.org/grpc v1.56.2/go.mod h1:I9bI3vqKfayGqPUAwGdOSu7kt6oIJLixfffKrpXqQ9s=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
google.golang.org/grpc/examples v0.0.0-20211102180624-670c133e568e h1:m7aQHHqd0q89mRwhwS9Bx2rjyl/hsFAeta+uGrHsQaU=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
+1
View File
@@ -50,6 +50,7 @@ func GetRegistry() mRegistry.Registry {
case "nats":
reg = natsr.NewRegistry(
mRegistry.Addrs(addresses...),
natsr.RegisterAction("put"),
)
case "kubernetes":
reg = kubernetesr.NewRegistry(
+7 -63
View File
@@ -5,7 +5,6 @@ import (
"crypto/x509"
"errors"
"os"
"sync"
mgrpcc "github.com/go-micro/plugins/v4/client/grpc"
mbreaker "github.com/go-micro/plugins/v4/wrapper/breaker/gobreaker"
@@ -16,11 +15,6 @@ import (
"go.opentelemetry.io/otel/trace"
)
var (
defaultClient client.Client
once sync.Once
)
// ClientOptions represent options (e.g. tls settings) for the grpc clients
type ClientOptions struct {
tlsMode string
@@ -48,62 +42,12 @@ func WithTLSCACert(v string) ClientOption {
// WithTraceProvider allows to set the trace Provider for grpc clients
func WithTraceProvider(tp trace.TracerProvider) ClientOption {
return func(o *ClientOptions) {
o.tp = tp
}
}
// Configure configures the default oOCIS grpc client (e.g. TLS settings)
func Configure(opts ...ClientOption) error {
var options ClientOptions
for _, opt := range opts {
opt(&options)
}
var outerr error
once.Do(func() {
reg := registry.GetRegistry()
var tlsConfig *tls.Config
cOpts := []client.Option{
client.Registry(reg),
client.Wrap(mbreaker.NewClientWrapper()),
client.Wrap(mtracer.NewClientWrapper(
mtracer.WithTraceProvider(options.tp),
)),
if tp != nil {
o.tp = tp
} else {
o.tp = trace.NewNoopTracerProvider()
}
switch options.tlsMode {
case "insecure":
tlsConfig = &tls.Config{
InsecureSkipVerify: true,
}
cOpts = append(cOpts, mgrpcc.AuthTLS(tlsConfig))
case "on":
tlsConfig = &tls.Config{}
// Note: If caCert is empty we use the system's default set of trusted CAs
if options.caCert != "" {
certs := x509.NewCertPool()
pemData, err := os.ReadFile(options.caCert)
if err != nil {
outerr = err
return
}
if !certs.AppendCertsFromPEM(pemData) {
outerr = errors.New("could not initialize default client, adding CA cert failed")
return
}
tlsConfig.RootCAs = certs
}
cOpts = append(cOpts, mgrpcc.AuthTLS(tlsConfig))
//case "off":
//default:
}
defaultClient = mgrpcc.NewClient(cOpts...)
})
return outerr
}
// DefaultClient returns a custom oCIS grpc configured client.
func DefaultClient() client.Client {
return defaultClient
}
}
func GetClientOptions(t *shared.GRPCClientTLS) []ClientOption {
@@ -150,8 +94,8 @@ func NewClient(opts ...ClientOption) (client.Client, error) {
tlsConfig.RootCAs = certs
}
cOpts = append(cOpts, mgrpcc.AuthTLS(tlsConfig))
//case "off":
//default:
// case "off":
// default:
}
return mgrpcc.NewClient(cOpts...), nil
+4 -3
View File
@@ -12,6 +12,7 @@ import (
ociscrypto "github.com/owncloud/ocis/v2/ocis-pkg/crypto"
"github.com/owncloud/ocis/v2/ocis-pkg/registry"
"go-micro.dev/v4"
"go-micro.dev/v4/client"
"go-micro.dev/v4/server"
)
@@ -20,8 +21,8 @@ type Service struct {
micro.Service
}
// NewService initializes a new grpc service.
func NewService(opts ...Option) (Service, error) {
// NewServiceWithClient initializes a new grpc service with explicit client.
func NewServiceWithClient(client client.Client, opts ...Option) (Service, error) {
var mServer server.Server
sopts := newOptions(opts...)
tlsConfig := &tls.Config{}
@@ -52,7 +53,7 @@ func NewService(opts ...Option) (Service, error) {
// first add a server because it will reset any options
micro.Server(mServer),
// also add a client that can be used after initializing the service
micro.Client(DefaultClient()),
micro.Client(client),
micro.Address(sopts.Address),
micro.Name(strings.Join([]string{sopts.Namespace, sopts.Name}, ".")),
micro.Version(sopts.Version),
+18 -9
View File
@@ -7,6 +7,7 @@ import (
"github.com/owncloud/ocis/v2/ocis-pkg/log"
"github.com/owncloud/ocis/v2/ocis-pkg/shared"
"github.com/urfave/cli/v2"
"go.opentelemetry.io/otel/trace"
)
// Option defines a single option function.
@@ -14,15 +15,16 @@ type Option func(o *Options)
// Options defines the available options for this package.
type Options struct {
Logger log.Logger
TLSConfig shared.HTTPServiceTLS
Namespace string
Name string
Version string
Address string
Handler http.Handler
Context context.Context
Flags []cli.Flag
Logger log.Logger
TLSConfig shared.HTTPServiceTLS
Namespace string
Name string
Version string
Address string
Handler http.Handler
Context context.Context
Flags []cli.Flag
TraceProvider trace.TracerProvider
}
// newOptions initializes the available default options.
@@ -93,3 +95,10 @@ func TLSConfig(config shared.HTTPServiceTLS) Option {
o.TLSConfig = config
}
}
// TraceProvider provides a function to set the TraceProvider option.
func TraceProvider(tp trace.TracerProvider) Option {
return func(o *Options) {
o.TraceProvider = tp
}
}
+10
View File
@@ -10,6 +10,7 @@ import (
"github.com/owncloud/ocis/v2/ocis-pkg/registry"
mhttps "github.com/go-micro/plugins/v4/server/http"
mtracer "github.com/go-micro/plugins/v4/wrapper/trace/opentelemetry"
ociscrypto "github.com/owncloud/ocis/v2/ocis-pkg/crypto"
"go-micro.dev/v4"
"go-micro.dev/v4/server"
@@ -66,6 +67,15 @@ func NewService(opts ...Option) (Service, error) {
micro.Registry(registry.GetRegistry()),
micro.RegisterTTL(time.Second * 30),
micro.RegisterInterval(time.Second * 10),
micro.WrapClient(mtracer.NewClientWrapper(
mtracer.WithTraceProvider(sopts.TraceProvider),
)),
micro.WrapHandler(mtracer.NewHandlerWrapper(
mtracer.WithTraceProvider(sopts.TraceProvider),
)),
micro.WrapSubscriber(mtracer.NewSubscriberWrapper(
mtracer.WithTraceProvider(sopts.TraceProvider),
)),
}
if sopts.TLSConfig.Enabled {
wopts = append(wopts, micro.Metadata(map[string]string{"use_tls": "true"}))
+4
View File
@@ -81,4 +81,8 @@ type Commons struct {
SystemUserID string `yaml:"system_user_id" env:"OCIS_SYSTEM_USER_ID" desc:"ID of the oCIS storage-system system user. Admins need to set the ID for the storage-system system user in this config option which is then used to reference the user. Any reasonable long string is possible, preferably this would be an UUIDv4 format."`
SystemUserAPIKey string `mask:"password" yaml:"system_user_api_key" env:"SYSTEM_USER_API_KEY"`
AdminUserID string `yaml:"admin_user_id" env:"OCIS_ADMIN_USER_ID" desc:"ID of a user, that should receive admin privileges. Consider that the UUID can be encoded in some LDAP deployment configurations like in .ldif files. These need to be decoded beforehand."`
// NOTE: you will not fing GRPCMaxReceivedMessageSize size being used in the code. The envvar is actually extracted in revas `pool` package: https://github.com/cs3org/reva/blob/edge/pkg/rgrpc/todo/pool/connection.go
// It is mentioned here again so it is documented
GRPCMaxReceivedMessageSize int `env:"OCIS_GRPC_MAX_RECEIVED_MESSAGE_SIZE" desc:"The maximum body size for grpc requests. Defaults to '10240000' bytes (10MB). Note that large values can potentially hide errors but may lead to network timeouts. Should only be changed temporarily to regain access for large folders with 25.000+ files to copy out data."`
}
+8 -1
View File
@@ -4,6 +4,7 @@ import (
"context"
"fmt"
"net/url"
"reflect"
"strings"
"time"
@@ -29,7 +30,13 @@ var Propagator = propagation.NewCompositeTextMapPropagator(
// GetServiceTraceProvider returns a configured open-telemetry trace provider.
func GetServiceTraceProvider(c ConfigConverter, serviceName string) (trace.TracerProvider, error) {
cfg := c.Convert()
var cfg Config
if c == nil || reflect.ValueOf(c).IsNil() {
cfg = Config{Enabled: false}
} else {
cfg = c.Convert()
}
if cfg.Enabled {
return GetTraceProvider(cfg.Endpoint, cfg.Collector, serviceName, cfg.Type)
}
+1 -1
View File
@@ -16,7 +16,7 @@ var (
// LatestTag is the latest released version plus the dev meta version.
// Will be overwritten by the release pipeline
// Needs a manual change for every tagged release
LatestTag = "3.1.0-beta.1+dev"
LatestTag = "3.1.0-rc.1+dev"
// Date indicates the build date.
// This has been removed, it looks like you can only replace static strings with recent go versions
+115 -2
View File
@@ -3,6 +3,7 @@ package command
import (
"context"
"os"
"sort"
"sync"
collaboration "github.com/cs3org/go-cs3apis/cs3/sharing/collaboration/v1beta1"
@@ -10,6 +11,11 @@ import (
publicregistry "github.com/cs3org/reva/v2/pkg/publicshare/manager/registry"
"github.com/cs3org/reva/v2/pkg/share"
"github.com/cs3org/reva/v2/pkg/share/manager/registry"
"github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/lookup"
"github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/migrator"
"github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/options"
tw "github.com/olekukonko/tablewriter"
"github.com/rs/zerolog"
"github.com/owncloud/ocis/v2/ocis-pkg/config"
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
@@ -28,6 +34,7 @@ func Migrate(cfg *config.Config) *cli.Command {
Usage: "migrate data from an existing to another instance",
Category: "migration",
Subcommands: []*cli.Command{
MigrateDecomposedfs(cfg),
MigrateShares(cfg),
MigratePublicShares(cfg),
},
@@ -38,6 +45,103 @@ func init() {
register.AddCommand(Migrate)
}
// MigrateDecomposedfs is the entrypoint for the decomposedfs migrate command
func MigrateDecomposedfs(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "decomposedfs",
Usage: "run a decomposedfs migration",
Subcommands: []*cli.Command{
ListDecomposedfsMigrations(cfg),
},
Flags: []cli.Flag{
&cli.StringFlag{
Name: "direction",
Aliases: []string{"d"},
Value: "migrate",
Usage: "direction of the migration to run ('migrate' or 'rollback')",
},
&cli.StringFlag{
Name: "migration",
Aliases: []string{"m"},
Value: "",
Usage: "ID of the migration to run",
},
&cli.StringFlag{
Name: "root",
Aliases: []string{"r"},
Required: true,
Usage: "Path to the root directory of the decomposedfs",
},
},
Before: func(c *cli.Context) error {
// Parse base config
if err := parser.ParseConfig(cfg, true); err != nil {
return configlog.ReturnError(err)
}
return nil
},
Action: func(c *cli.Context) error {
log := logger()
rootFlag := c.String("root")
bod := lookup.DetectBackendOnDisk(rootFlag)
backend := backend(rootFlag, bod)
lu := lookup.New(backend, &options.Options{
Root: rootFlag,
MetadataBackend: bod,
})
m := migrator.New(lu, log)
err := m.RunMigration(c.String("migration"), c.String("direction") == "down")
if err != nil {
log.Error().Err(err).Msg("failed")
return err
}
return nil
},
}
}
// ListDecomposedfsMigrations is the entrypoint for the decomposedfs list migrations command
func ListDecomposedfsMigrations(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "list",
Usage: "list decomposedfs migrations",
Action: func(c *cli.Context) error {
rootFlag := c.String("root")
bod := lookup.DetectBackendOnDisk(rootFlag)
backend := backend(rootFlag, bod)
lu := lookup.New(backend, &options.Options{
Root: rootFlag,
MetadataBackend: bod,
})
m := migrator.New(lu, logger())
migrationStates, err := m.Migrations()
if err != nil {
return err
}
migrations := []string{}
for m := range migrationStates {
migrations = append(migrations, m)
}
sort.Strings(migrations)
table := tw.NewWriter(os.Stdout)
table.SetHeader([]string{"Migration", "State", "Message"})
table.SetAutoFormatHeaders(false)
for _, migration := range migrations {
table.Append([]string{migration, migrationStates[migration].State, migrationStates[migration].Message})
}
table.Render()
return nil
},
}
}
func MigrateShares(cfg *config.Config) *cli.Command {
return &cli.Command{
Name: "shares",
@@ -65,7 +169,7 @@ func MigrateShares(cfg *config.Config) *cli.Command {
return configlog.ReturnError(sharingparser.ParseConfig(cfg.Sharing))
},
Action: func(c *cli.Context) error {
log := oclog.LoggerFromConfig("migrate", cfg.Log)
log := logger()
ctx := log.WithContext(context.Background())
rcfg := revaShareConfig(cfg.Sharing)
oldDriver := c.String("from")
@@ -160,7 +264,7 @@ func MigratePublicShares(cfg *config.Config) *cli.Command {
return configlog.ReturnError(sharingparser.ParseConfig(cfg.Sharing))
},
Action: func(c *cli.Context) error {
log := oclog.LoggerFromConfig("migrate", cfg.Log)
log := logger()
ctx := log.WithContext(context.Background())
rcfg := revaPublicShareConfig(cfg.Sharing)
@@ -301,3 +405,12 @@ func revaPublicShareConfig(cfg *sharing.Config) map[string]interface{} {
},
}
}
func logger() *zerolog.Logger {
log := oclog.NewLogger(
oclog.Name("migrate"),
oclog.Level("info"),
oclog.Pretty(true),
oclog.Color(true)).Logger
return &log
}
-5
View File
@@ -5,7 +5,6 @@ import (
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
"github.com/owncloud/ocis/v2/ocis-pkg/config/parser"
"github.com/owncloud/ocis/v2/ocis-pkg/registry"
"github.com/owncloud/ocis/v2/ocis-pkg/service/grpc"
"github.com/owncloud/ocis/v2/ocis/pkg/register"
"github.com/owncloud/ocis/v2/ocis/pkg/runtime"
"github.com/urfave/cli/v2"
@@ -23,10 +22,6 @@ func Server(cfg *config.Config) *cli.Command {
Action: func(c *cli.Context) error {
// Prefer the in-memory registry as the default when running in single-binary mode
registry.Configure("memory")
err := grpc.Configure(grpc.GetClientOptions(cfg.GRPCClientTLS)...)
if err != nil {
return err
}
r := runtime.New(cfg)
return r.Start()
},
+1 -1
View File
@@ -20,7 +20,7 @@ type Config struct {
Context context.Context `yaml:"-" json:"-"`
DebugScanOutcome string `yaml:"-" env:"ANTIVIRUS_DEBUG_SCAN_OUTCOME" desc:"A predefined outcome for virus scanning, FOR DEBUG PURPOSES ONLY! (example values: \"found,infected\")"`
DebugScanOutcome string `yaml:"-" env:"ANTIVIRUS_DEBUG_SCAN_OUTCOME" desc:"A predefined outcome for virus scanning, FOR DEBUG PURPOSES ONLY! (example values: 'found,infected')"`
}
// Service defines the available service configuration.
+1 -1
View File
@@ -19,7 +19,7 @@ type Config struct {
Reva *shared.Reva `yaml:"reva"`
ExternalAddr string `yaml:"external_addr" env:"APP_PROVIDER_EXTERNAL_ADDR" desc:"Address of the app provider, where the GATEWAY service can reach it."`
Driver string `yaml:"driver" env:"APP_PROVIDER_DRIVER" desc:"Driver, the APP PROVIDER services uses. Only \"wopi\" is supported as of now."`
Driver string `yaml:"driver" env:"APP_PROVIDER_DRIVER" desc:"Driver, the APP PROVIDER services uses. Only 'wopi' is supported as of now."`
Drivers Drivers `yaml:"drivers"`
Supervised bool `yaml:"-"`
+1 -1
View File
@@ -5,7 +5,7 @@ import "github.com/owncloud/ocis/v2/ocis-pkg/tracing"
// Tracing defines the tracing configuration.
type Tracing struct {
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;AUTH_BASIC_TRACING_ENABLED" desc:"Activates tracing."`
Type string `yaml:"type" env:"OCIS_TRACING_TYPE;AUTH_BASIC_TRACING_TYPE" desc:"The type of tracing. Defaults to \"\", which is the same as \"jaeger\". Allowed tracing types are \"jaeger\" and \"\" as of now."`
Type string `yaml:"type" env:"OCIS_TRACING_TYPE;AUTH_BASIC_TRACING_TYPE" desc:"The type of tracing. Defaults to '', which is the same as 'jaeger'. Allowed tracing types are 'jaeger' and '' as of now."`
Endpoint string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;AUTH_BASIC_TRACING_ENDPOINT" desc:"The endpoint of the tracing agent."`
Collector string `yaml:"collector" env:"OCIS_TRACING_COLLECTOR;AUTH_BASIC_TRACING_COLLECTOR" desc:"The HTTP endpoint for sending spans directly to a collector, i.e. http://jaeger-collector:14268/api/traces. Only used if the tracing endpoint is unset."`
}
+10 -2
View File
@@ -11,6 +11,7 @@ import (
"github.com/owncloud/ocis/v2/ocis-pkg/handlers"
"github.com/owncloud/ocis/v2/ocis-pkg/service/debug"
ogrpc "github.com/owncloud/ocis/v2/ocis-pkg/service/grpc"
"github.com/owncloud/ocis/v2/ocis-pkg/tracing"
"github.com/owncloud/ocis/v2/ocis-pkg/version"
"github.com/owncloud/ocis/v2/services/eventhistory/pkg/config"
"github.com/owncloud/ocis/v2/services/eventhistory/pkg/config/parser"
@@ -32,7 +33,14 @@ func Server(cfg *config.Config) *cli.Command {
},
Action: func(c *cli.Context) error {
logger := logging.Configure(cfg.Service.Name, cfg.Log)
err := ogrpc.Configure(ogrpc.GetClientOptions(cfg.GRPCClientTLS)...)
traceProvider, err := tracing.GetServiceTraceProvider(cfg.Tracing, cfg.Service.Name)
if err != nil {
return err
}
cfg.GrpcClient, err = ogrpc.NewClient(
append(ogrpc.GetClientOptions(cfg.GRPCClientTLS), ogrpc.WithTraceProvider(traceProvider))...,
)
if err != nil {
return err
}
@@ -76,6 +84,7 @@ func Server(cfg *config.Config) *cli.Command {
grpc.Metrics(metrics),
grpc.Consumer(consumer),
grpc.Persistence(st),
grpc.TraceProvider(traceProvider),
)
gr.Add(service.Run, func(err error) {
@@ -107,7 +116,6 @@ func Server(cfg *config.Config) *cli.Command {
}
return gr.Run()
},
}
}
+2 -8
View File
@@ -5,6 +5,7 @@ import (
"time"
"github.com/owncloud/ocis/v2/ocis-pkg/shared"
"go-micro.dev/v4/client"
)
// Config combines all available configuration parts.
@@ -19,6 +20,7 @@ type Config struct {
GRPC GRPCConfig `yaml:"grpc"`
GRPCClientTLS *shared.GRPCClientTLS `yaml:"grpc_client_tls"`
GrpcClient client.Client `yaml:"-"`
Events Events `yaml:"events"`
Store Store `yaml:"store"`
@@ -51,11 +53,3 @@ type Events struct {
TLSRootCACertificate string `yaml:"tls_root_ca_certificate" env:"OCIS_EVENTS_TLS_ROOT_CA_CERTIFICATE;EVENTHISTORY_EVENTS_TLS_ROOT_CA_CERTIFICATE" desc:"The root CA certificate used to validate the server's TLS certificate. If provided NOTIFICATIONS_EVENTS_TLS_INSECURE will be seen as false."`
EnableTLS bool `yaml:"enable_tls" env:"OCIS_EVENTS_ENABLE_TLS;EVENTHISTORY_EVENTS_ENABLE_TLS" desc:"Enable TLS for the connection to the events broker. The events broker is the ocis service which receives and delivers events between the services.."`
}
// Tracing defines the available tracing configuration.
type Tracing struct {
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;EVENTHISTORY_TRACING_ENABLED" desc:"Activates tracing."`
Type string `yaml:"type" env:"OCIS_TRACING_TYPE;EVENTHISTORY_TRACING_TYPE" desc:"The type of tracing. Defaults to '', which is the same as 'jaeger'. Allowed tracing types are 'jaeger' and '' as of now."`
Endpoint string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;EVENTHISTORY_TRACING_ENDPOINT" desc:"The endpoint of the tracing agent."`
Collector string `yaml:"collector" env:"OCIS_TRACING_COLLECTOR;EVENTHISTORY_TRACING_COLLECTOR" desc:"The HTTP endpoint for sending spans directly to a collector, i.e. http://jaeger-collector:14268/api/traces. Only used if the tracing endpoint is unset."`
}
@@ -59,6 +59,17 @@ func EnsureDefaults(cfg *config.Config) {
cfg.Log = &config.Log{}
}
if cfg.Tracing == nil && cfg.Commons != nil && cfg.Commons.Tracing != nil {
cfg.Tracing = &config.Tracing{
Enabled: cfg.Commons.Tracing.Enabled,
Type: cfg.Commons.Tracing.Type,
Endpoint: cfg.Commons.Tracing.Endpoint,
Collector: cfg.Commons.Tracing.Collector,
}
} else if cfg.Tracing == nil {
cfg.Tracing = &config.Tracing{}
}
if cfg.GRPCClientTLS == nil && cfg.Commons != nil {
cfg.GRPCClientTLS = structs.CopyOrZeroValue(cfg.Commons.GRPCClientTLS)
}
@@ -0,0 +1,21 @@
package config
import "github.com/owncloud/ocis/v2/ocis-pkg/tracing"
// Tracing defines the available tracing configuration.
type Tracing struct {
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;EVENTHISTORY_TRACING_ENABLED" desc:"Activates tracing."`
Type string `yaml:"type" env:"OCIS_TRACING_TYPE;EVENTHISTORY_TRACING_TYPE" desc:"The type of tracing. Defaults to '', which is the same as 'jaeger'. Allowed tracing types are 'jaeger' and '' as of now."`
Endpoint string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;EVENTHISTORY_TRACING_ENDPOINT" desc:"The endpoint of the tracing agent."`
Collector string `yaml:"collector" env:"OCIS_TRACING_COLLECTOR;EVENTHISTORY_TRACING_COLLECTOR" desc:"The HTTP endpoint for sending spans directly to a collector, i.e. http://jaeger-collector:14268/api/traces. Only used if the tracing endpoint is unset."`
}
// Convert Tracing to the tracing package's Config struct.
func (t Tracing) Convert() tracing.Config {
return tracing.Config{
Enabled: t.Enabled,
Type: t.Type,
Endpoint: t.Endpoint,
Collector: t.Collector,
}
}
+23 -10
View File
@@ -9,6 +9,7 @@ import (
"github.com/owncloud/ocis/v2/services/eventhistory/pkg/metrics"
"github.com/urfave/cli/v2"
"go-micro.dev/v4/store"
"go.opentelemetry.io/otel/trace"
)
// Option defines a single option function.
@@ -16,16 +17,17 @@ type Option func(o *Options)
// Options defines the available options for this package.
type Options struct {
Name string
Address string
Logger log.Logger
Context context.Context
Config *config.Config
Metrics *metrics.Metrics
Namespace string
Flags []cli.Flag
Persistence store.Store
Consumer events.Consumer
Name string
Address string
Logger log.Logger
Context context.Context
Config *config.Config
Metrics *metrics.Metrics
Namespace string
Flags []cli.Flag
Persistence store.Store
Consumer events.Consumer
TraceProvider trace.TracerProvider
}
// newOptions initializes the available default options.
@@ -108,3 +110,14 @@ func Consumer(consumer events.Consumer) Option {
o.Consumer = consumer
}
}
// TraceProvider provides a function to configure the trace provider
func TraceProvider(traceProvider trace.TracerProvider) Option {
return func(o *Options) {
if traceProvider != nil {
o.TraceProvider = traceProvider
} else {
o.TraceProvider = trace.NewNoopTracerProvider()
}
}
}
@@ -11,7 +11,8 @@ import (
func NewService(opts ...Option) grpc.Service {
options := newOptions(opts...)
service, err := grpc.NewService(
service, err := grpc.NewServiceWithClient(
options.Config.GrpcClient,
grpc.TLSEnabled(options.Config.GRPC.TLS.Enabled),
grpc.TLSCert(
options.Config.GRPC.TLS.Cert,
@@ -70,6 +70,7 @@ func DefaultConfig() *config.Config {
"Upload-Checksum",
"Upload-Offset",
"X-HTTP-Method-Override",
"Cache-Control",
},
AllowCredentials: true,
},
@@ -192,6 +192,7 @@ func FrontendConfigFromStruct(cfg *config.Config) (map[string]interface{}, error
"hostname": "",
},
"support_url_signing": true,
"support_sse": true,
},
"graph": map[string]interface{}{
"personal_data_export": true,
+51 -2
View File
@@ -45,8 +45,17 @@ func (_m *Client) Bind(username string, password string) error {
}
// Close provides a mock function with given fields:
func (_m *Client) Close() {
_m.Called()
func (_m *Client) Close() error {
ret := _m.Called()
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
} else {
r0 = ret.Error(0)
}
return r0
}
// Compare provides a mock function with given fields: dn, attribute, value
@@ -87,6 +96,32 @@ func (_m *Client) Del(_a0 *ldap.DelRequest) error {
return r0
}
// DirSync provides a mock function with given fields: searchRequest, flags, maxAttrCount, cookie
func (_m *Client) DirSync(searchRequest *ldap.SearchRequest, flags int64, maxAttrCount int64, cookie []byte) (*ldap.SearchResult, error) {
ret := _m.Called(searchRequest, flags, maxAttrCount, cookie)
var r0 *ldap.SearchResult
var r1 error
if rf, ok := ret.Get(0).(func(*ldap.SearchRequest, int64, int64, []byte) (*ldap.SearchResult, error)); ok {
return rf(searchRequest, flags, maxAttrCount, cookie)
}
if rf, ok := ret.Get(0).(func(*ldap.SearchRequest, int64, int64, []byte) *ldap.SearchResult); ok {
r0 = rf(searchRequest, flags, maxAttrCount, cookie)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*ldap.SearchResult)
}
}
if rf, ok := ret.Get(1).(func(*ldap.SearchRequest, int64, int64, []byte) error); ok {
r1 = rf(searchRequest, flags, maxAttrCount, cookie)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// ExternalBind provides a mock function with given fields:
func (_m *Client) ExternalBind() error {
ret := _m.Called()
@@ -101,6 +136,20 @@ func (_m *Client) ExternalBind() error {
return r0
}
// GetLastError provides a mock function with given fields:
func (_m *Client) GetLastError() error {
ret := _m.Called()
var r0 error
if rf, ok := ret.Get(0).(func() error); ok {
r0 = rf()
} else {
r0 = ret.Error(0)
}
return r0
}
// IsClosing provides a mock function with given fields:
func (_m *Client) IsClosing() bool {
ret := _m.Called()
-14
View File
@@ -6,8 +6,6 @@ import (
"github.com/oklog/run"
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
ogrpc "github.com/owncloud/ocis/v2/ocis-pkg/service/grpc"
"github.com/owncloud/ocis/v2/ocis-pkg/tracing"
"github.com/owncloud/ocis/v2/ocis-pkg/version"
"github.com/owncloud/ocis/v2/services/graph/pkg/config"
"github.com/owncloud/ocis/v2/services/graph/pkg/config/parser"
@@ -29,18 +27,6 @@ func Server(cfg *config.Config) *cli.Command {
},
Action: func(c *cli.Context) error {
logger := logging.Configure(cfg.Service.Name, cfg.Log)
traceProvider, err := tracing.GetServiceTraceProvider(cfg.Tracing, cfg.Service.Name)
if err != nil {
return err
}
err = ogrpc.Configure(
append(
ogrpc.GetClientOptions(cfg.GRPCClientTLS),
ogrpc.WithTraceProvider(traceProvider),
)...)
if err != nil {
return err
}
gr := run.Group{}
ctx, cancel := func() (context.Context, context.CancelFunc) {
@@ -14,7 +14,6 @@ import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
libregraph "github.com/owncloud/libre-graph-api-go"
ogrpc "github.com/owncloud/ocis/v2/ocis-pkg/service/grpc"
"github.com/owncloud/ocis/v2/ocis-pkg/shared"
settingsmsg "github.com/owncloud/ocis/v2/protogen/gen/ocis/messages/settings/v0"
settings "github.com/owncloud/ocis/v2/protogen/gen/ocis/services/settings/v0"
@@ -71,7 +70,6 @@ var _ = Describe("Applications", func() {
cfg.GRPCClientTLS = &shared.GRPCClientTLS{}
cfg.Application.ID = "some-application-ID"
_ = ogrpc.Configure(ogrpc.GetClientOptions(cfg.GRPCClientTLS)...)
svc, _ = service.NewService(
service.Config(cfg),
service.WithGatewaySelector(gatewaySelector),
@@ -18,7 +18,6 @@ import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
libregraph "github.com/owncloud/libre-graph-api-go"
ogrpc "github.com/owncloud/ocis/v2/ocis-pkg/service/grpc"
"github.com/owncloud/ocis/v2/ocis-pkg/shared"
settingsmsg "github.com/owncloud/ocis/v2/protogen/gen/ocis/messages/settings/v0"
settings "github.com/owncloud/ocis/v2/protogen/gen/ocis/services/settings/v0"
@@ -81,7 +80,6 @@ var _ = Describe("AppRoleAssignments", func() {
cfg.GRPCClientTLS = &shared.GRPCClientTLS{}
cfg.Application.ID = "some-application-ID"
_ = ogrpc.Configure(ogrpc.GetClientOptions(cfg.GRPCClientTLS)...)
svc, _ = service.NewService(
service.Config(cfg),
service.WithGatewaySelector(gatewaySelector),
@@ -17,7 +17,6 @@ import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
libregraph "github.com/owncloud/libre-graph-api-go"
ogrpc "github.com/owncloud/ocis/v2/ocis-pkg/service/grpc"
"github.com/owncloud/ocis/v2/ocis-pkg/shared"
"github.com/owncloud/ocis/v2/services/graph/mocks"
"github.com/owncloud/ocis/v2/services/graph/pkg/config"
@@ -76,7 +75,6 @@ var _ = Describe("Driveitems", func() {
cfg.Commons = &shared.Commons{}
cfg.GRPCClientTLS = &shared.GRPCClientTLS{}
_ = ogrpc.Configure(ogrpc.GetClientOptions(cfg.GRPCClientTLS)...)
svc, _ = service.NewService(
service.Config(cfg),
service.WithGatewaySelector(gatewaySelector),
@@ -19,7 +19,6 @@ import (
. "github.com/onsi/gomega"
libregraph "github.com/owncloud/libre-graph-api-go"
"github.com/owncloud/ocis/v2/ocis-pkg/log"
ogrpc "github.com/owncloud/ocis/v2/ocis-pkg/service/grpc"
"github.com/owncloud/ocis/v2/ocis-pkg/shared"
"github.com/owncloud/ocis/v2/services/graph/mocks"
"github.com/owncloud/ocis/v2/services/graph/pkg/config"
@@ -80,7 +79,6 @@ var _ = Describe("EducationClass", func() {
cfg.Commons = &shared.Commons{}
cfg.GRPCClientTLS = &shared.GRPCClientTLS{}
_ = ogrpc.Configure(ogrpc.GetClientOptions(cfg.GRPCClientTLS)...)
svc, _ = service.NewService(
service.Config(cfg),
service.WithGatewaySelector(gatewaySelector),
@@ -22,7 +22,6 @@ import (
"google.golang.org/grpc"
libregraph "github.com/owncloud/libre-graph-api-go"
ogrpc "github.com/owncloud/ocis/v2/ocis-pkg/service/grpc"
"github.com/owncloud/ocis/v2/ocis-pkg/shared"
"github.com/owncloud/ocis/v2/services/graph/pkg/config"
"github.com/owncloud/ocis/v2/services/graph/pkg/config/defaults"
@@ -79,7 +78,6 @@ var _ = Describe("Schools", func() {
cfg.Commons = &shared.Commons{}
cfg.GRPCClientTLS = &shared.GRPCClientTLS{}
_ = ogrpc.Configure(ogrpc.GetClientOptions(cfg.GRPCClientTLS)...)
svc, _ = service.NewService(
service.Config(cfg),
service.WithGatewaySelector(gatewaySelector),
@@ -20,7 +20,6 @@ import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
libregraph "github.com/owncloud/libre-graph-api-go"
ogrpc "github.com/owncloud/ocis/v2/ocis-pkg/service/grpc"
"github.com/owncloud/ocis/v2/ocis-pkg/shared"
settingssvc "github.com/owncloud/ocis/v2/protogen/gen/ocis/services/settings/v0"
"github.com/owncloud/ocis/v2/services/graph/mocks"
@@ -81,7 +80,6 @@ var _ = Describe("EducationUsers", func() {
cfg.Commons = &shared.Commons{}
cfg.GRPCClientTLS = &shared.GRPCClientTLS{}
_ = ogrpc.Configure(ogrpc.GetClientOptions(cfg.GRPCClientTLS)...)
svc, _ = service.NewService(
service.Config(cfg),
service.WithGatewaySelector(gatewaySelector),
@@ -18,7 +18,6 @@ import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
libregraph "github.com/owncloud/libre-graph-api-go"
ogrpc "github.com/owncloud/ocis/v2/ocis-pkg/service/grpc"
"github.com/owncloud/ocis/v2/ocis-pkg/shared"
"github.com/owncloud/ocis/v2/services/graph/mocks"
"github.com/owncloud/ocis/v2/services/graph/pkg/config"
@@ -81,7 +80,6 @@ var _ = Describe("Groups", func() {
cfg.Commons = &shared.Commons{}
cfg.GRPCClientTLS = &shared.GRPCClientTLS{}
_ = ogrpc.Configure(ogrpc.GetClientOptions(cfg.GRPCClientTLS)...)
svc, _ = service.NewService(
service.Config(cfg),
service.WithGatewaySelector(gatewaySelector),
@@ -21,7 +21,6 @@ import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
libregraph "github.com/owncloud/libre-graph-api-go"
ogrpc "github.com/owncloud/ocis/v2/ocis-pkg/service/grpc"
"github.com/owncloud/ocis/v2/ocis-pkg/shared"
settingsmsg "github.com/owncloud/ocis/v2/protogen/gen/ocis/messages/settings/v0"
settings "github.com/owncloud/ocis/v2/protogen/gen/ocis/services/settings/v0"
@@ -85,7 +84,6 @@ var _ = Describe("Users", func() {
cfg.GRPCClientTLS = &shared.GRPCClientTLS{}
cfg.Application.ID = "some-application-ID"
_ = ogrpc.Configure(ogrpc.GetClientOptions(cfg.GRPCClientTLS)...)
svc, _ = service.NewService(
service.Config(cfg),
service.WithGatewaySelector(gatewaySelector),
@@ -690,7 +688,6 @@ var _ = Describe("Users", func() {
localCfg.API.UsernameMatch = usernameMatch
_ = ogrpc.Configure(ogrpc.GetClientOptions(cfg.GRPCClientTLS)...)
localSvc, _ := service.NewService(
service.Config(localCfg),
service.WithGatewaySelector(gatewaySelector),
+4 -4
View File
@@ -33,8 +33,8 @@ type Settings struct {
}
type ServiceUserPasswords struct {
OcisAdmin string `yaml:"admin_password" env:"IDM_ADMIN_PASSWORD" desc:"Password to set for the oCIS \"admin\" user. Either cleartext or an argon2id hash."`
Idm string `yaml:"idm_password" env:"IDM_SVC_PASSWORD" desc:"Password to set for the \"idm\" service user. Either cleartext or an argon2id hash."`
Reva string `yaml:"reva_password" env:"IDM_REVASVC_PASSWORD" desc:"Password to set for the \"reva\" service user. Either cleartext or an argon2id hash."`
Idp string `yaml:"idp_password" env:"IDM_IDPSVC_PASSWORD" desc:"Password to set for the \"idp\" service user. Either cleartext or an argon2id hash."`
OcisAdmin string `yaml:"admin_password" env:"IDM_ADMIN_PASSWORD" desc:"Password to set for the oCIS 'admin' user. Either cleartext or an argon2id hash."`
Idm string `yaml:"idm_password" env:"IDM_SVC_PASSWORD" desc:"Password to set for the 'idm' service user. Either cleartext or an argon2id hash."`
Reva string `yaml:"reva_password" env:"IDM_REVASVC_PASSWORD" desc:"Password to set for the 'reva' service user. Either cleartext or an argon2id hash."`
Idp string `yaml:"idp_password" env:"IDM_IDPSVC_PASSWORD" desc:"Password to set for the 'idp' service user. Either cleartext or an argon2id hash."`
}
+7 -8
View File
@@ -16,6 +16,7 @@ import (
"github.com/oklog/run"
"github.com/owncloud/ocis/v2/ocis-pkg/config/configlog"
"github.com/owncloud/ocis/v2/ocis-pkg/tracing"
"github.com/owncloud/ocis/v2/ocis-pkg/version"
"github.com/owncloud/ocis/v2/services/idp/pkg/config"
"github.com/owncloud/ocis/v2/services/idp/pkg/config/parser"
@@ -23,7 +24,6 @@ import (
"github.com/owncloud/ocis/v2/services/idp/pkg/metrics"
"github.com/owncloud/ocis/v2/services/idp/pkg/server/debug"
"github.com/owncloud/ocis/v2/services/idp/pkg/server/http"
"github.com/owncloud/ocis/v2/services/idp/pkg/tracing"
"github.com/urfave/cli/v2"
)
@@ -50,7 +50,7 @@ func Server(cfg *config.Config) *cli.Command {
},
Action: func(c *cli.Context) error {
logger := logging.Configure(cfg.Service.Name, cfg.Log)
err := tracing.Configure(cfg)
traceProvider, err := tracing.GetServiceTraceProvider(cfg.Tracing, cfg.Service.Name)
if err != nil {
return err
}
@@ -75,8 +75,8 @@ func Server(cfg *config.Config) *cli.Command {
http.Context(ctx),
http.Config(cfg),
http.Metrics(metrics),
http.TraceProvider(traceProvider),
)
if err != nil {
logger.Info().
Err(err).
@@ -104,7 +104,6 @@ func Server(cfg *config.Config) *cli.Command {
debug.Context(ctx),
debug.Config(cfg),
)
if err != nil {
logger.Info().Err(err).Str("transport", "debug").Msg("Failed to initialize server")
return err
@@ -132,12 +131,12 @@ func ensureEncryptionSecretExists(path string) error {
}
dir := filepath.Dir(path)
err = os.MkdirAll(dir, 0700)
err = os.MkdirAll(dir, 0o700)
if err != nil {
return err
}
f, err := os.OpenFile(path, os.O_CREATE|os.O_WRONLY, 0600)
f, err := os.OpenFile(path, os.O_CREATE|os.O_WRONLY, 0o600)
if err != nil {
return err
}
@@ -168,12 +167,12 @@ func ensureSigningPrivateKeyExists(paths []string) error {
}
dir := filepath.Dir(path)
err = os.MkdirAll(dir, 0700)
err = os.MkdirAll(dir, 0o700)
if err != nil {
return err
}
f, err := os.OpenFile(path, os.O_CREATE|os.O_WRONLY, 0600)
f, err := os.OpenFile(path, os.O_CREATE|os.O_WRONLY, 0o600)
if err != nil {
return err
}
+1 -1
View File
@@ -75,7 +75,7 @@ type Settings struct {
IdentityManager string `yaml:"identity_manager" env:"IDP_IDENTITY_MANAGER" desc:"The identity manager implementation to use. Supported identity managers are 'ldap', 'cs3', 'libregraph' and 'guest'."`
URIBasePath string `yaml:"uri_base_path" env:"IDP_URI_BASE_PATH" desc:"IDP uri base path (defaults to \"\")."`
URIBasePath string `yaml:"uri_base_path" env:"IDP_URI_BASE_PATH" desc:"IDP uri base path (defaults to '')."`
SignInURI string `yaml:"sign_in_uri" env:"IDP_SIGN_IN_URI" desc:"IDP sign-in url."`
SignedOutURI string `yaml:"signed_out_uri" env:"IDP_SIGN_OUT_URI" desc:"IDP sign-out url."`
+12
View File
@@ -1,5 +1,7 @@
package config
import "github.com/owncloud/ocis/v2/ocis-pkg/tracing"
// Tracing defines the available tracing configuration.
type Tracing struct {
Enabled bool `yaml:"enabled" env:"OCIS_TRACING_ENABLED;IDP_TRACING_ENABLED" desc:"Activates tracing."`
@@ -7,3 +9,13 @@ type Tracing struct {
Endpoint string `yaml:"endpoint" env:"OCIS_TRACING_ENDPOINT;IDP_TRACING_ENDPOINT" desc:"The endpoint of the tracing agent."`
Collector string `yaml:"collector" env:"OCIS_TRACING_COLLECTOR;IDP_TRACING_COLLECTOR" desc:"The HTTP endpoint for sending spans directly to a collector, i.e. http://jaeger-collector:14268/api/traces. Only used if the tracing endpoint is unset."`
}
// Convert Tracing to the tracing package's Config struct.
func (t Tracing) Convert() tracing.Config {
return tracing.Config{
Enabled: t.Enabled,
Type: t.Type,
Endpoint: t.Endpoint,
Collector: t.Collector,
}
}
+3 -3
View File
@@ -1,17 +1,17 @@
// Package middleware provides middleware for the idp service.
package middleware
import (
"net/http"
"strings"
idpTracing "github.com/owncloud/ocis/v2/services/idp/pkg/tracing"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/codes"
"go.opentelemetry.io/otel/trace"
)
// Static is a middleware that serves static assets.
func Static(root string, fs http.FileSystem) func(http.Handler) http.Handler {
func Static(root string, fs http.FileSystem, tp trace.TracerProvider) func(http.Handler) http.Handler {
if !strings.HasSuffix(root, "/") {
root = root + "/"
}
@@ -28,7 +28,7 @@ func Static(root string, fs http.FileSystem) func(http.Handler) http.Handler {
spanOpts := []trace.SpanStartOption{
trace.WithSpanKind(trace.SpanKindServer),
}
ctx, span := idpTracing.TraceProvider.Tracer("idp").Start(r.Context(), "serve static asset", spanOpts...)
ctx, span := tp.Tracer("idp").Start(r.Context(), "serve static asset", spanOpts...)
defer span.End()
r = r.WithContext(ctx)
Loaded 100 of 284 files, more files were not shown because too many files have changed in this diff. Show more