Compare commits
151
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
95460ab9a5 | ||
|
|
c5fbd6f539 | ||
|
|
43ee37d02e | ||
|
|
d65476ff00 | ||
|
|
0a820b22cc | ||
|
|
2989dc6890 | ||
|
|
d7dd979897 | ||
|
|
efd2c42655 | ||
|
|
dcbd45948e | ||
|
|
a406bb3507 | ||
|
|
30d6ecca19 | ||
|
|
d895437642 | ||
|
|
78db9dd8a0 | ||
|
|
2afcb84186 | ||
|
|
c6abbf6f60 | ||
|
|
81483964a1 | ||
|
|
9d4a561aa9 | ||
|
|
c4f32868ee | ||
|
|
526583e9bb | ||
|
|
c93b65680b | ||
|
|
6a5e21eff4 | ||
|
|
d3aecda8c6 | ||
|
|
90ba75e27e | ||
|
|
5b26de71d4 | ||
|
|
96ab79b4f9 | ||
|
|
be21178c64 | ||
|
|
fade832a3e | ||
|
|
e8a7872d29 | ||
|
|
38c04b5517 | ||
|
|
f17e56febc | ||
|
|
5aa9e618f1 | ||
|
|
82045b8850 | ||
|
|
80f4d6a22d | ||
|
|
3d046f6ba8 | ||
|
|
5fb992d868 | ||
|
|
57c78b0a19 | ||
|
|
a2ee62bde1 | ||
|
|
8f7c6e165a | ||
|
|
3662ff2514 | ||
|
|
73a79872ac | ||
|
|
201caca5ec | ||
|
|
c8ab49dc2d | ||
|
|
1ee35618fc | ||
|
|
bdddf85249 | ||
|
|
51c9edecb7 | ||
|
|
1a8516c6cd | ||
|
|
adcbdd9fd2 | ||
|
|
ec4f56d0b9 | ||
|
|
ebff0114d4 | ||
|
|
8eabc15c98 | ||
|
|
62b7dcacc4 | ||
|
|
dad3472e8b | ||
|
|
056ad2c705 | ||
|
|
d3519b5e78 | ||
|
|
ce4ad80ce2 | ||
|
|
aa44ec12ac | ||
|
|
f8e6b23d5f | ||
|
|
063b05140f | ||
|
|
fb199e6fbf | ||
|
|
83c90b60ef | ||
|
|
82034d34ce | ||
|
|
44d9c50f1e | ||
|
|
4c5d58f53b | ||
|
|
f27d2b18a7 | ||
|
|
d21b03b14c | ||
|
|
4103f2990f | ||
|
|
fe84b83617 | ||
|
|
22f5a76829 | ||
|
|
94aab8b38d | ||
|
|
3fa8374ea1 | ||
|
|
301936d2bd | ||
|
|
69c05d6199 | ||
|
|
2305e08024 | ||
|
|
9fcf9519c0 | ||
|
|
482e0e7838 | ||
|
|
af2a4c2c97 | ||
|
|
5a81fba929 | ||
|
|
0a1491927d | ||
|
|
c76b2e75ef | ||
|
|
162b04f873 | ||
|
|
d00f5a9da5 | ||
|
|
1658084812 | ||
|
|
d8bbe7eeaf | ||
|
|
8c5ce6279a | ||
|
|
927a518ba4 | ||
|
|
436eae2c79 | ||
|
|
3c02f3b355 | ||
|
|
7c24ea2a95 | ||
|
|
70848008f1 | ||
|
|
3170f4cc1f | ||
|
|
965699e811 | ||
|
|
614fcca440 | ||
|
|
fec16dcc08 | ||
|
|
21af4b3d6d | ||
|
|
078c7e036c | ||
|
|
6c95c626cd | ||
|
|
2c36867629 | ||
|
|
f01b4aa68b | ||
|
|
ce318ca160 | ||
|
|
1dbbb9b6a0 | ||
|
|
19058fe90b | ||
|
|
b15e50d1fe | ||
|
|
053ffc869f | ||
|
|
30d9a08d52 | ||
|
|
e2fa2be973 | ||
|
|
c942c7a6dd | ||
|
|
de550b73a1 | ||
|
|
31226e2134 | ||
|
|
89785d0976 | ||
|
|
dc18f58693 | ||
|
|
20476aa159 | ||
|
|
d00ca45ec8 | ||
|
|
6900a80511 | ||
|
|
1138412aff | ||
|
|
926e547f99 | ||
|
|
309b59a665 | ||
|
|
b6b7d67121 | ||
|
|
1351f4937d | ||
|
|
df10baf339 | ||
|
|
66791d9388 | ||
|
|
3eb6e74535 | ||
|
|
6ff8a3cd27 | ||
|
|
f3484c3cdd | ||
|
|
98d6796800 | ||
|
|
fb7ba62726 | ||
|
|
80e7f44604 | ||
|
|
76088d2034 | ||
|
|
48933fa2ee | ||
|
|
d2d0461375 | ||
|
|
bed8c77892 | ||
|
|
531efe0b10 | ||
|
|
e71b72c18a | ||
|
|
f34d96ace8 | ||
|
|
595a00998b | ||
|
|
7a0bdce8b4 | ||
|
|
f9f84b9135 | ||
|
|
6be90847b7 | ||
|
|
6c33d945f3 | ||
|
|
35dd1fa173 | ||
|
|
1ec451d3d5 | ||
|
|
5f72c61089 | ||
|
|
02a3bfd176 | ||
|
|
b505e334ee | ||
|
|
1803c19b24 | ||
|
|
e32aef17cd | ||
|
|
b480fc09b0 | ||
|
|
87a1bf7e26 | ||
|
|
a1e69c6a5c | ||
|
|
6ed9e2b6c8 | ||
|
|
16f54d9bb9 | ||
|
|
bd634cbcf3 |
No files matched your search
+1
-1
@@ -1,3 +1,3 @@
|
||||
# The test runner source for UI tests
|
||||
WEB_COMMITID=4925a1bd117f31530f6ebdf5af2a9215ad3c6796
|
||||
WEB_COMMITID=45f6a7f53398bcd0cc77fea96e473092b485bd7a
|
||||
WEB_BRANCH=stable-7.1
|
||||
@@ -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
@@ -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.
|
||||
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -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
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -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
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -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
|
||||
@@ -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
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -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
|
||||
File renamed without changes.
@@ -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
|
||||
File renamed without changes.
@@ -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
|
||||
File renamed without changes.
File renamed without changes.
@@ -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
|
||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
+11
-4
@@ -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
|
||||
File renamed without changes.
@@ -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.
|
||||
@@ -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
|
||||
|
||||
@@ -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=
|
||||
|
||||
@@ -50,6 +50,7 @@ func GetRegistry() mRegistry.Registry {
|
||||
case "nats":
|
||||
reg = natsr.NewRegistry(
|
||||
mRegistry.Addrs(addresses...),
|
||||
natsr.RegisterAction("put"),
|
||||
)
|
||||
case "kubernetes":
|
||||
reg = kubernetesr.NewRegistry(
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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,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"}))
|
||||
|
||||
@@ -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."`
|
||||
}
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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
@@ -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,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()
|
||||
},
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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:"-"`
|
||||
|
||||
@@ -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."`
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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."`
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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."`
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
@@ -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
Reference in new issue
Block a user