Commit Graph

74 Commits

Author SHA1 Message Date
Jörn Friedrich Dreyer
c3951d67c8 forward basic auth to OpenID connect token authentication endpoint
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2021-07-26 11:12:33 +00:00
Jörn Friedrich Dreyer
bea986fe26 pass only request instead of context
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2021-07-23 09:03:14 +00:00
Willy Kloucek
a0dce56480 use cookie to enforce routing for regex and claim selector 2021-07-23 08:38:55 +00:00
Jörn Friedrich Dreyer
cb70f4882f add todo for x-access-header handling
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2021-07-23 08:33:18 +00:00
Jörn Friedrich Dreyer
4385d3dacb add RegexSelector
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2021-07-23 08:22:40 +00:00
Jörn Friedrich Dreyer
40c8031441 add claims policy selector
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2021-07-23 08:07:17 +00:00
Jörn Friedrich Dreyer
2293403d45 use errors.Is()
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2021-07-22 16:35:31 +00:00
Jörn Friedrich Dreyer
1f3e963c29 use claims map instead of struct
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2021-07-22 09:20:36 +00:00
Jörn Friedrich Dreyer
b148faada6 Merge pull request #2294 from owncloud/fix-trashbin-expected-failures
Fix Trashbin Expected Failures
2021-07-21 20:59:43 +02:00
A.Unger
74696dbd36 remove redundant line 2021-07-19 13:29:12 +02:00
Jörn Friedrich Dreyer
8c7f1f01ff do not try to add the selected policy to the context
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2021-07-14 20:45:38 +00:00
Jörn Friedrich Dreyer
1dc7aac6fd proxy access log
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2021-07-14 13:14:27 +00:00
A.Unger
7ab586b2ab proxy is now aware of webdav responses 2021-07-13 15:38:44 +02:00
A.Unger
bfdcc0180c fix 230, 231 - first draft 2021-07-13 14:33:24 +02:00
A.Unger
ac49348b41 fix 215, 216 - first draft 2021-07-13 14:29:26 +02:00
Ishank Arora
29c5cb627a Update scope usage and add Changes for lightweight accounts 2021-07-13 13:03:06 +02:00
Michael Barz
34e0877df7 Merge pull request #1951 from ishank011/uid-gid-user-object
Use CS3 user object fields to store UID and GID
2021-06-25 10:06:14 +02:00
Ishank Arora
6168ee7095 Use CS3 user object fields to store UID and GID 2021-06-16 18:05:40 +02:00
Willy Kloucek
ed94da5104 ignore authentication header on status.php 2021-06-16 16:59:11 +02:00
David Christofas
f6ac50244b update invocations of MintToken and DismantleToken 2021-05-11 14:18:43 +02:00
David Christofas
c532073dd1 remove JWT from logs
secrets should not be exposed in the logs
2021-03-03 15:30:11 +01:00
David Christofas
cfcd4b5992 resolve linter issues 2021-02-26 14:24:25 +01:00
David Christofas
7ad38d7757 fix token cache TTL
The TTL was supplied to the middleware as a duration and then in that middleware multiplied by `time.Second` again. Durations should not be multiplied because they result in unintended values.
```go
	time.Second * 1 = 1s
	time.Second * time.Second = 277777h46m40s
```
2021-02-22 18:40:15 +01:00
Pascal Wengerter
d7b1ecb3dc Change (ocis,OCIS) to oCIS, unify GitHub branding 2021-01-28 00:32:47 +00:00
Florian Schade
af870e005e add more tests and benchmark for cache
refactor cache to use atomic uint
2021-01-19 23:23:41 +01:00
Florian Schade
f13530425a move cache to sync package
rollback indexer map
use sync.pool for cache entries
add tests for cache
remove main locks from nrwmutex and use sync.map and sync.pool instead
bump dockerfile go version
2021-01-19 23:23:41 +01:00
Florian Schade
a02fb890f7 remove locking from accounts service
add a cached named rwlock pkg
use sync.map in the cache pkg
use named rwlock in indexer pkg
use sync.map in indexer pkg
remove husky
2021-01-19 23:23:41 +01:00
Ilja Neumann
cd2eb0e39b Accounts UserBackend tests 2020-12-22 17:27:55 +01:00
Ilja Neumann
1b29e56d12 account_resolver_test.go 2020-12-22 16:16:57 +01:00
Ilja Neumann
92a1bc8fb6 Make it possible to use CS3 as accounts backend instead of account-service
Configureable via:
PROXY_ACCOUNT_BACKEND_TYPE=cs3
PROXY_ACCOUNT_BACKEND_TYPE=accounts (default)

By using a backend which implements the CS3 user-api (currently provided by reva/storage) it is possible to bypass
the ocis-accounts service and for example use ldap directly.

Hides user and auth related communication behind a facade (user/backend) to minimize logic-duplication across middlewares.
Allows to switich the account backend from accounts to cs3.

Co-authored-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2020-12-11 18:34:43 +01:00
Alex Unger
beb83f3f40 Merge pull request #1025 from owncloud/remove-unused-errors
Remove unused errors
2020-12-04 18:46:51 +01:00
Ilja Neumann
61a8f00837 Remove unused errors 2020-12-04 15:50:22 +01:00
A.Unger
2cddc0a23c fix leftover typo 2020-12-04 13:53:34 +01:00
A.Unger
f1521e4df7 refactor authentication.go 2020-12-04 13:51:48 +01:00
A.Unger
7d8336ce4b use regexp to assert routes, remove StatusRecorder 2020-12-04 13:17:25 +01:00
A.Unger
9a253370e8 export StatusRecorder 2020-12-03 12:22:35 +01:00
A.Unger
c89ead3fc5 fix linter 2020-12-03 12:19:49 +01:00
A.Unger
e4974e020d minimal refactor 2020-12-02 15:51:39 +01:00
A.Unger
2910e88ba5 ugly working draft 2020-12-02 15:31:17 +01:00
A.Unger
752cd4f626 first draft for configuring user agent multiplex on ocis 2020-12-02 12:04:09 +01:00
A.Unger
28e8f75ebd whitelist depending on the URI 2020-12-01 17:10:04 +01:00
A.Unger
348c54f2e7 write www-authenticate and delegate to reva 2020-12-01 16:57:36 +01:00
A.Unger
5cb359d877 WIP 2020-11-30 17:19:03 +01:00
Jörn Friedrich Dreyer
dbb52f29ad Merge pull request #958 from owncloud/basic-auth-cache
implement basic auth cache
2020-11-26 17:33:47 +01:00
Florian Schade
cb2e2a3896 add changelog
remove unused mux
cleanup k6 test
2020-11-26 14:46:44 +01:00
Florian Schade
11ba46eb88 remove accounts cache from basic auth middleware
move cache to ocis-pkg
add password validation cache to accounts service
2020-11-26 13:52:24 +01:00
Florian Schade
e334759874 implement basic auth cache 2020-11-26 10:33:46 +01:00
Florian Schade
ab85245093 fix oidc middleware provider lazy initialization 2020-11-25 22:50:11 +01:00
Benedikt Kulmann
bc6227e8fd Fix test 2020-11-21 07:58:19 +01:00
Benedikt Kulmann
edc252e1a0 Add option to disable signing keys in the proxy 2020-11-20 16:04:22 +01:00