-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proxy accesstoken cache store #5829
Conversation
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
0267690
to
d339cd9
Compare
E2E tests failed: https://drone.owncloud.com/owncloud/ocis/20678/66/1 💥 To see the trace, please open the link in the console ...
npx playwright show-trace https://cache.owncloud.com/public/owncloud/ocis/20678/tracing/multiple-spaces-can-be-managed-at-once-in-the-admin-settings-via-the-batch-actions-alice-2023-3-22-12-19-50.zipnpx playwright show-trace https://cache.owncloud.com/public/owncloud/ocis/20678/tracing/unstructured-collection-of-testable-space-interactions-alice-2023-3-22-12-30-12.zipnpx playwright show-trace https://cache.owncloud.com/public/owncloud/ocis/20678/tracing/users-can-navigate-web-via-tiles-alice-2023-3-22-12-31-59.zip |
ca9ac77
to
78e9892
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some questions
1d5c00e
to
d532a64
Compare
I need to dig into the failing e2e tests. At around 700s there seems to be a ~30sec timeout:
🤔 |
faling tests unrelated to this PR: owncloud/web#8633 fixes the flaky test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still some questions
d09c1dd
to
914464d
Compare
1aa0753
to
1069ba0
Compare
This is just my personal opinion and though this creates possible a bit more work for you, I fully agree to harmonize stuff now and get rid of legacies. |
urgh reva is importing ocis-pkg/store/etcd ... 😞 |
As written in issue: #5781, there are also some services who offer redis authentication. This either needs harmonisation over all services or to be removed. |
bff4906
to
ca1db03
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but e2e tests are red
Following topics:
|
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Co-authored-by: kobergj <jkoberg@owncloud.com>
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
2d2beaa
to
fb48abd
Compare
Q: this is docs relevant or? |
to unlock your PR I added waiting 50 millisecond. It's not good I know but main problem is that tests are very fast. It leads to aborting requests sometimes. We as QA team try to define each place where we add (wait for button appears, wait for response) |
Kudos, SonarCloud Quality Gate passed! |
* refactor middleware options Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * use ocmemstore micro store implementaiton for token cache Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * refactor ocis store options, support redis sentinel Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * align cache configuration Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * database and tabe are used to build prefixes for inmemory stores Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * add global persistent store options to userlog config Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * log cache errors but continue Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * drup unnecessary type conversion Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * Better description for the default userinfo ttl Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * use global cache options for even more caches Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * don't log userinfo cache misses Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * default to stock memory store Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * use correct mem store typo string Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * split cache options, doc cleanup Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * mint and write userinfo to cache async Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * use hashed token as key Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * go mod tidy Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * update docs Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * update cache store naming Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de> * bring back depreceted ocis-pkg/store package for backwards compatability Signed-off-by: Jörn Fri
This PR changes the cache implementations in ocis to the micro store interface.
redis-sentinel
typeOCIS_PERSISTENT_STORE_*
options that are used for the userlog and eventhistory servicepartly adresses #5781 by harmonizing the basic store options: type, adresses/nodes, database, table, size and ttl.
rename the userlog RecordExpiry option to ttl? before a release?
the graph service uses three in memory caches that still need to use a micro store, maybe in a subsequent PR?
make caches really optional. when setting
OCIS_CACHE_STORE_TYPE=redis
without having a local redis running the decomposedfs fails to create u user home becouse it cannot create a connection. We should log an error but continue, which is what I did in this PR for the proxy userinfo cacheThe userinfo cache cannot directly be invalidated with the sid from a backchannel logout. For that a separate session id -> tokenhash cache should be used.
A 10 second userinfo cache TTL is probably too low. espesially when we have a backchannel logout and we actually use the expiration claim of access of tokens to set a TTL for the cache store.