Commit Graph

230 Commits

Author SHA1 Message Date
Thomas Müller
07f0cd5574 fix: typos, naming clashes, error messages and deprecations 2024-04-03 15:34:36 +02:00
Christian Richter
5cc286b8ef incorporate requested changes
Signed-off-by: Christian Richter <crichter@owncloud.com>
2024-03-19 08:38:54 +01:00
Christian Richter
d31f5b9e15 remove obsolete comment
Signed-off-by: Christian Richter <crichter@owncloud.com>
2024-03-18 16:56:10 +01:00
Christian Richter
29549fade7 kill oidc well known middleware and move it to static route
Signed-off-by: Christian Richter <crichter@owncloud.com>
2024-03-18 16:56:10 +01:00
Christian Richter
1323a554bc move static routes to seperate package
Signed-off-by: Christian Richter <crichter@owncloud.com>
2024-03-18 16:56:10 +01:00
Phil Davis
49a2202bdf chore: set introductionVersion 5.0 in services/proxy 2024-03-06 17:50:21 +05:45
Phil Davis
9d2be66a85 chore: add introductionVersion pre5.0 to environment variable docs 2024-03-06 17:50:20 +05:45
Jörn Friedrich Dreyer
2dce3e997d Merge pull request #8546 from owncloud/verify-service-accounts-are-set
verify all system accounts are set
2024-02-29 17:29:08 +01:00
Jörn Friedrich Dreyer
972adafd29 verify all system accounts are set
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-02-29 15:51:37 +01:00
Michael Barz
643d4ccbfb fix: change default config for the role mapping 2024-02-28 12:04:57 +01:00
Jörn Friedrich Dreyer
26136f8f81 drop store service in favor of a micro store implementation (#8419)
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-02-26 16:08:03 +01:00
Ralf Haferkamp
3d3f8949f5 Bump mockery to 2.40.2
to address issues when building with go1.22:
https://github.com/vektra/mockery/pull/753
2024-02-09 11:48:45 +01:00
Thomas Müller
b12cff1016 fix: properly check expiry and verify signature of signed urls (#8385)
fix: signed url expiry validation only checks for expiry and not for used before
2024-02-07 15:44:33 +01:00
Ralf Haferkamp
07860ef8e7 Fix some fallout of recent mockery changes (#8341)
* Fix mockery setup for graph service

Add missing interfaces to .mockery.yaml. Use existing mocks from protogen
where possible. Remove remaining //go:generate call.

* Add mockery config for settings service

* Add mockery config for proxy service
2024-02-01 21:09:01 +01:00
Jörn Friedrich Dreyer
fad94d2038 bump mockery, add test stub for oidc_auth.go, align mock generation (#8321)
* bump mockery, add test stub for oidc_auth.go

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* use .mockery.yaml for all mocks

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* drop legacy go:generate mockery

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* align mock placement

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

---------

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-02-01 10:07:44 +01:00
Jörn Friedrich Dreyer
45d1936384 verify expiry of cached claims (#8310)
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2024-01-31 14:58:18 +01:00
Michael Barz
14553dd6b1 feat: RED metrics 2023-12-20 14:53:16 +01:00
Andre Duffeck
2284fe388d Also log the traceid alongside the request id (#8023)
* Also log the traceid alongside the request id

* Add changelog
2023-12-20 09:32:57 +01:00
jkoberg
de4f9d78f4 allow authentication for stores
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-12-19 10:44:05 +01:00
kobergj
423c28b298 improve store readmes
Co-authored-by: Martin <github@diemattels.at>
2023-12-15 13:25:10 +01:00
Andre Duffeck
fd09d29b5c Merge pull request #7973 from aduffeck/ocm-access
[full-ci] Ocm access
2023-12-14 14:36:31 +01:00
André Duffeck
b17fa1d72b Make /remote.php/dav/ocm/ work as well 2023-12-14 09:30:41 +01:00
jkoberg
d62cb9d34b use inmemory cache by default
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-12-13 12:49:54 +01:00
jkoberg
ad87ac955a configure services individually
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-12-13 12:49:54 +01:00
jkoberg
bbc4f83f7d bump dependencies
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-12-13 12:49:53 +01:00
Jörn Friedrich Dreyer
23e59b5ded Parse role claims (#7713)
* extract and test role claim parsing

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* add failing test

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* read segmented roles claim as array and string

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* reuse more code by extracting WalkSegments

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* add TestSplitWithEscaping

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* docs and error for unhandled case

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* add claims test

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* add missing ReadStringClaim docs

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

---------

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2023-12-04 12:18:52 +01:00
Florian Schade
ad06a192d8 enhancement: add graph beta listPermissions endpoint (#7753)
* enhancement: add graph beta listPermissions endpoint

besides the new api endpoint it includes several utilities to simplify the graph api development.

* resolve drive and item id from the request path
* generic pointer and value utilities
* space root detection

* update GetDriveAndItemIDParam signature to return a error

* move errorcode package

* enhancement: add generic error code handling

* fix: rebase
2023-11-28 17:06:04 +01:00
jkoberg
69a2da889a allow configuring addtional proxy routes
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-11-17 09:20:10 +01:00
mmattel
5e74b50efb [docs-only] Fix envvars with a array slice ([]string) 2023-11-09 12:22:59 +01:00
Martin
89fb341738 Merge pull request #7690 from owncloud/fix_envvar_duration_descriptions
[docs-only] Fix envvars with a duration.
2023-11-09 09:28:36 +01:00
Florian Schade
643158b67b enhancement: add sharedWithMe graph beta endpoint (#7633) 2023-11-08 20:02:58 +01:00
mmattel
b13b880921 [docs-only] Fix envvars with a duration. 2023-11-08 18:32:39 +01:00
André Duffeck
668f917dba Add an ocm service exposing the ocm related http and grpc APIs 2023-10-24 10:29:29 +02:00
Ralf Haferkamp
dfeff633fa proxy: also set the "Www-Authenticate" header for graph request
There doesn't seem to be a good reason to treat the graph service differently here.
2023-10-16 10:31:39 +02:00
Ralf Haferkamp
951e1e5a09 proxy: Avoid duplicated Www-Authenticate headers
For endpoints in the "ProxyWwwAuthenticate" list we accidently set the Www-Authenticate
header twice.
2023-10-16 10:31:39 +02:00
Ralf Haferkamp
07a718dc8e proxy: User ReverseProxy.Rewrite instead of Director
With Go 1.20 the "Rewrite" hook for ReverseProxy was introduced to
supersede of the "Director" hook (see:
a55793835f)

The Rewrite hooks allows for better separation between the incoming and
outgoing request. In particular it makes it pretty easy to set the
correct X-Forwarded-* Headers on the outgoing request.
The need for using "Rewrite" came up when trying to embed
authelia. It uses the X-Forwarded-Host and X-Forwared-Proto headers to
e.g. compute the correct return values for the various endpoints in
.well-known/openid-configuration.
2023-10-16 10:31:39 +02:00
case0sh
ace3664f6a fix formatting 2023-10-06 10:29:08 +02:00
jkoberg
1f1aa50c54 hard exit when services fail
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-09-21 13:53:18 +02:00
Ralf Haferkamp
684f5c07e5 Use service user for role assignment and autoprovisioning
This gets us a rid of the need to configure the reva jwt secret in the
proxy. Also we no longer need to fake an internal admin user for
autoprovsioning user and/or assigning the roles to users from oidc
claims.
2023-09-07 20:54:14 +02:00
Jörn Friedrich Dreyer
3bf5e5efa4 actually use skip user info config option (#7216)
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2023-09-05 12:57:01 +02:00
jkoberg
1bfdc43054 reroute sse path to sse service
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-08-29 13:59:39 +02:00
Daniel Swärd
49fc22d532 Add missing tracing references to multiple services. (#7110) 2023-08-23 15:17:17 +02:00
Jörn Friedrich Dreyer
eb6c0a840a fix docs
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2023-08-23 14:37:16 +02:00
Jörn Friedrich Dreyer
91a77d1671 Update services/proxy/pkg/config/config.go
Co-authored-by: Martin <github@diemattels.at>
2023-08-23 13:56:48 +02:00
Jörn Friedrich Dreyer
5422586bfa allow skipping userinfo call
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2023-08-23 13:56:48 +02:00
Jörn Friedrich Dreyer
21f52a8523 properly register webdav methods with chi
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2023-07-31 17:38:15 +02: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
Daniel Swärd
ce4ad80ce2 Remove grpc.DefaultClient() reference from policies and use only one gprc client. 2023-07-28 12:21:02 +02:00
jkoberg
af2a4c2c97 check public link authorization first
Signed-off-by: jkoberg <jkoberg@owncloud.com>
2023-07-26 15:02:38 +02:00
Michael Barz
dce3a62f13 add request id to all responses
Signed-off-by: Michael Barz <mbarz@owncloud.com>
2023-07-10 10:56:46 +02:00