Michael Barz and GitHub
d965f23fd9
Merge pull request #4815 from owncloud/requestID
...
harden drives api and improve logging
2022-10-17 20:23:50 +02:00
Michael Barz
f84fbdd6ff
corrections from code review
2022-10-17 17:22:33 +02:00
5082e6c027
Add UserID to context during initial login ( #4829 )
...
* Add UserID to context during initial login
UserID is also suffixed with "_init" so that own role assignment safety check is passed
Fixes: https://github.com/owncloud/ocis/issues/4787
* Fix missing gofmt -s bug
Co-authored-by: root <root@localhost.localdomain >
2022-10-17 17:03:39 +02:00
Ralf Haferkamp and Ralf Haferkamp
083b9897a0
proxy: Use reva provided method for getting Gateway Client
...
This removes some duplicated code. And reuses the reva client code
we're also using everywhere else.
2022-10-05 08:45:05 +02:00
David Christofas and GitHub
3babaf1a4d
remove the graph-explorer servier from ocis ( #4733 )
2022-10-04 15:55:30 +02:00
Jannik Stehle and Ralf Haferkamp
e053f70950
Fix unit tests
2022-10-04 09:18:36 +02:00
Jannik Stehle and Ralf Haferkamp
dd2abc94ee
Make the tokeninfo endpoint unprotected as it is supposed to be available to the public
2022-10-04 09:18:36 +02:00
Ralf Haferkamp and GitHub
e4c28def8a
Request revatoken via machine auth after autoprovsioning user ( #4690 )
...
To successfully authenticate a user after it was autoprovisioned, we
need to get a valid reva token.
Fixes : #4616
2022-09-27 21:51:18 +02:00
Andre Duffeck and GitHub
68b17eb68d
Search dav spaces ( #4661 )
...
* Add a Ref option to SearchRequest, e.g. for limiting the search to a space
* Enable REPORT requests for /dav/spaces URLs
* Limit the search to the according space in case of /dav/spaces searches
* Add changelog
* Adapt expected failures
* Comment exported functions
2022-09-27 10:38:15 +02:00
Ralf Haferkamp and Ralf Haferkamp
01650a5023
Use lazy initialization for the default grpc client
...
This avoids using a public global variable. It allows us to initialize
the default client a bit later (outside of init()). That way we can e.g.
properly initialize the in-memory registry.
2022-09-26 16:25:56 +02:00
Willy Kloucek
569ffd41f8
Merge branch 'master' into remove-default-insecure
2022-09-26 08:59:18 +02:00
David Christofas
20026faac2
fix wopi access to publicly shared files
2022-09-22 08:27:41 +02:00
Willy Kloucek
71790089fd
change insecure option defaulting to false
2022-09-16 12:40:24 +02:00
Willy Kloucek
2d16779652
fix the oidc provider cache
2022-09-16 12:34:12 +02:00
Ralf Haferkamp and Ralf Haferkamp
8ee8842e88
proxy: Avoid sorting endpoints for every single request
...
The endpoints are no longer hashed by path name in the directors map since
that made iterating over the endpoints unstable. They are now stored in a
slice in the order in which the are defined in the configuration.
Closes : #4497
2022-09-07 14:30:19 +02:00
Ralf Haferkamp and Ralf Haferkamp
2c6eb888a8
proxy: Clarify comment
2022-09-07 14:30:19 +02:00
Ralf Haferkamp and Ralf Haferkamp
ab0c82311a
proxy: Fix archiver for public links
...
Allows /archiver to be used the "public-token" auth middleware. The
archiver is a bit of a special case, because it can be uses in several
ways: using 'normal' authentication (basic, oidc), using signed-urls or
using sharetokens. As only the "sharetoken" part is handled by the
"PublicShareAuth" middleware, we needed to special-case it a bit.
2022-09-07 14:30:19 +02:00
Ralf Haferkamp and Ralf Haferkamp
30f4d788f3
proxy: Initialize logger for router
2022-09-07 14:30:19 +02:00
Ralf Haferkamp and Ralf Haferkamp
fed62d4a1e
Evaluate routing rules ordered by path-length
...
This is a quickfix for #4497 . Before evaluating, we now sort the rules
of a specific type by the length of the endpoints and start evaluation
with the most specific endpoint first. There's obviously quite a bit
room for optimization here and this will only fix the issue for routes
of type `PrefixRoute`. But it should solve the immediate issue.
2022-09-01 17:07:17 +02:00
David Christofas and Ralf Haferkamp
bfb26cc660
update tests
2022-09-01 12:43:32 +02:00
David Christofas and Ralf Haferkamp
e20b2b1536
fix default policy and add changelog
2022-09-01 12:43:32 +02:00
David Christofas and Ralf Haferkamp
69de4616b5
fix linting issues
2022-09-01 12:43:32 +02:00
David Christofas and Ralf Haferkamp
90574268d9
add missing unprotected flag and fix proxy test
2022-09-01 12:43:32 +02:00
David Christofas and Ralf Haferkamp
69ba80562e
add unprotected flag to the proxy routes
...
I added an unprotected flag to the proxy routes which is evaluated by
the authentication middleware. This way we won't have to maintain a
hardcoded list of unprotected paths and path prefixes and we will
hopefully reduce the times we encounter the basic auth prompt by web
browsers.
2022-09-01 12:43:32 +02:00
David Christofas and Ralf Haferkamp
4d4f3a16e1
refactor proxy code
...
I refactored the proxy so that we execute the routing before the
authentication middleware. This is necessary so that we can determine
which routes are considered unprotected i.e. which routes don't need
authentication.
2022-09-01 12:43:32 +02:00
Benedikt Kulmann
6fc87613d5
fix: add index.html to unprotected paths
2022-08-26 10:37:46 +02:00
Benedikt Kulmann
9d67ab3292
fix: set /external path prefix to unprotected
2022-08-25 10:47:46 +02:00
Benedikt Kulmann
9c9a81026c
fix: add index.html to unprotected paths in auth middleware
2022-08-25 10:39:55 +02:00
David Christofas
0d2b7e350b
add missing unprotected paths
2022-08-24 16:32:25 +02:00
David Christofas
e65eb15f2c
add the settings path to the unprotected paths
2022-08-24 11:04:18 +02:00
David Christofas and Swikriti Tripathi
28a9bf357e
end unprotected path prefixes with a slash
2022-08-24 10:12:34 +05:45
David Christofas and Swikriti Tripathi
6043e019f4
add the fonts path to the unprotected path prefixes
2022-08-24 10:12:34 +05:45
David Christofas and GitHub
c4881f5736
Merge pull request #4374 from owncloud/rewrite-auth-middleware
...
[full-ci] Rewrite of the authentication middleware
2022-08-22 16:39:03 +02:00
David Christofas
dfe703291f
replace strings.Title with cases.Title
2022-08-22 15:26:00 +02:00
David Christofas
12d42e0074
add missing comments
2022-08-22 14:24:12 +02:00
Willy Kloucek
9f2be9f4f9
remove Log prefix from configlog functions
2022-08-22 08:08:18 +02:00
Willy Kloucek and Willy Kloucek
e58eaabdeb
move config parse error logging into function to ensure new lines and don't parse config for help
2022-08-18 15:27:28 +02:00
Willy Kloucek
60689c9c1a
improve unsupervised description
2022-08-18 10:59:35 +02:00
Willy Kloucek
6154466bbc
rename extensions to services (leftover occurences)
2022-08-17 15:36:52 +02:00
David Christofas
b5ef10dc2b
add missing comments and changelog
2022-08-16 16:53:27 +02:00
David Christofas
3f25ca2059
add unprotected path prefix for parallel deployment
2022-08-16 15:45:22 +02:00
David Christofas
905ead629c
add unprotected path prefix for external apps
2022-08-16 15:16:48 +02:00
David Christofas
78d85b683d
add missing comments
2022-08-16 12:47:44 +02:00
David Christofas
864438b2de
add missing unprotected path
2022-08-15 16:04:14 +02:00
David Christofas
3ebfcbff1e
add missing unprotected path
2022-08-15 11:38:04 +02:00
David Christofas
5d45f0e856
fix logic of when to add the www-authenticate headers
2022-08-12 10:48:37 +02:00
David Christofas
036c466425
add missing unprotected paths
2022-08-12 10:48:33 +02:00
David Christofas
32f68f91ff
add missing www-authentication header on failed authentication
2022-08-12 10:48:29 +02:00
David Christofas
d271ae2451
fix some authentication cases
2022-08-12 10:48:25 +02:00
David Christofas
06ffd9cf8a
some more cleaning up
2022-08-12 10:48:21 +02:00