mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-08 05:09:46 -06:00
Merge pull request #4573 from aduffeck/jsoncs3-cache-ttl
[full-ci] Make the jsoncs3 cache ttl configurable, bump reva
This commit is contained in:
2
go.mod
2
go.mod
@@ -11,7 +11,7 @@ require (
|
||||
github.com/blevesearch/bleve_index_api v1.0.3
|
||||
github.com/coreos/go-oidc/v3 v3.3.0
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20220818202316-e92afdddac6d
|
||||
github.com/cs3org/reva/v2 v2.10.0
|
||||
github.com/cs3org/reva/v2 v2.10.1-0.20220912153139-05271421a667
|
||||
github.com/disintegration/imaging v1.6.2
|
||||
github.com/ggwhite/go-masker v1.0.9
|
||||
github.com/go-chi/chi/v5 v5.0.7
|
||||
|
||||
6
go.sum
6
go.sum
@@ -292,10 +292,8 @@ github.com/crewjam/saml v0.4.6 h1:XCUFPkQSJLvzyl4cW9OvpWUbRf0gE7VUpU8ZnilbeM4=
|
||||
github.com/crewjam/saml v0.4.6/go.mod h1:ZBOXnNPFzB3CgOkRm7Nd6IVdkG+l/wF+0ZXLqD96t1A=
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20220818202316-e92afdddac6d h1:toyZ7IsXlUdEPZ/IG8fg7hbM8HcLPY0bkX4FKBmgLVI=
|
||||
github.com/cs3org/go-cs3apis v0.0.0-20220818202316-e92afdddac6d/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
|
||||
github.com/cs3org/reva/v2 v2.9.1-0.20220909134913-22e6b3280127 h1:pUgPEA2a7bdFM3xREBadRaROSw71SxORtRLBZtqrEdQ=
|
||||
github.com/cs3org/reva/v2 v2.9.1-0.20220909134913-22e6b3280127/go.mod h1:+BYVpRV8g1hL8wF3+3BunL9BKPsXVyJYmH8COxq/V7Y=
|
||||
github.com/cs3org/reva/v2 v2.10.0 h1:PNGA856qrVYaPlW0KukiG+GctR0VVIhGxKAZjdvwH80=
|
||||
github.com/cs3org/reva/v2 v2.10.0/go.mod h1:+BYVpRV8g1hL8wF3+3BunL9BKPsXVyJYmH8COxq/V7Y=
|
||||
github.com/cs3org/reva/v2 v2.10.1-0.20220912153139-05271421a667 h1:Bb6P6zXtDtSkX5Whs2DWyS01Z+8nXWvqaxRgHV8JbiA=
|
||||
github.com/cs3org/reva/v2 v2.10.1-0.20220912153139-05271421a667/go.mod h1:+BYVpRV8g1hL8wF3+3BunL9BKPsXVyJYmH8COxq/V7Y=
|
||||
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=
|
||||
|
||||
@@ -103,10 +103,11 @@ type UserSharingCS3Driver struct {
|
||||
|
||||
// UserSharingJSONCS3Driver holds the jsoncs3 driver config
|
||||
type UserSharingJSONCS3Driver struct {
|
||||
ProviderAddr string `yaml:"provider_addr" env:"SHARING_USER_CS3_PROVIDER_ADDR" desc:"GRPC address of the STORAGE-SYSTEM service."`
|
||||
SystemUserID string `yaml:"system_user_id" env:"OCIS_SYSTEM_USER_ID;SHARING_USER_CS3_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."`
|
||||
SystemUserIDP string `yaml:"system_user_idp" env:"OCIS_SYSTEM_USER_IDP;SHARING_USER_CS3_SYSTEM_USER_IDP" desc:"IDP of the oCIS STORAGE-SYSTEM system user."`
|
||||
SystemUserAPIKey string `yaml:"system_user_api_key" env:"OCIS_SYSTEM_USER_API_KEY;SHARING_USER_CS3_SYSTEM_USER_API_KEY" desc:"API key for the STORAGE-SYSTEM system user."`
|
||||
ProviderAddr string `yaml:"provider_addr" env:"SHARING_USER_JSONCS3_PROVIDER_ADDR" desc:"GRPC address of the STORAGE-SYSTEM service."`
|
||||
SystemUserID string `yaml:"system_user_id" env:"OCIS_SYSTEM_USER_ID;SHARING_USER_JSONCS3_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."`
|
||||
SystemUserIDP string `yaml:"system_user_idp" env:"OCIS_SYSTEM_USER_IDP;SHARING_USER_JSONCS3_SYSTEM_USER_IDP" desc:"IDP of the oCIS STORAGE-SYSTEM system user."`
|
||||
SystemUserAPIKey string `yaml:"system_user_api_key" env:"OCIS_SYSTEM_USER_API_KEY;SHARING_USER_JSONCS3_SYSTEM_USER_API_KEY" desc:"API key for the STORAGE-SYSTEM system user."`
|
||||
CacheTTL int `yaml:"cache_ttl" env:"SHARING_USER_JSONCS3_CACHE_TTL" desc:"TTL for the internal caches in seconds."`
|
||||
}
|
||||
|
||||
type PublicSharingDrivers struct {
|
||||
|
||||
@@ -62,6 +62,7 @@ func SharingConfigFromStruct(cfg *config.Config) map[string]interface{} {
|
||||
"service_user_id": cfg.UserSharingDrivers.JSONCS3.SystemUserID,
|
||||
"service_user_idp": cfg.UserSharingDrivers.JSONCS3.SystemUserIDP,
|
||||
"machine_auth_apikey": cfg.UserSharingDrivers.JSONCS3.SystemUserAPIKey,
|
||||
"ttl": cfg.UserSharingDrivers.JSONCS3.CacheTTL,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -41,15 +41,15 @@ Feature: Share a file or folder that is inside a space via public link
|
||||
And the OCS status code should be "200"
|
||||
And the OCS status message should be "OK"
|
||||
And the fields of the last response to user "Alice" should include
|
||||
| path | /<entity> |
|
||||
| path | <path> |
|
||||
Examples:
|
||||
| entity | permissions | password | name | expireDate |
|
||||
| folder | 1 | 123 | link | 2042-03-25T23:59:59+0100 |
|
||||
| folder | 4 | | | |
|
||||
| folder | 5 | 200 | | 2042-03-25T23:59:59+0100 |
|
||||
| folder | 15 | | link | |
|
||||
| folder/file.txt | 1 | 123 | link | 2042-03-25T23:59:59+0100 |
|
||||
| folder/file.txt | 3 | 123 | link | 2042-03-25T23:59:59+0100 |
|
||||
| entity | path | permissions | password | name | expireDate |
|
||||
| folder | /folder |1 | 123 | link | 2042-03-25T23:59:59+0100 |
|
||||
| folder | /folder |4 | | | |
|
||||
| folder | /folder |5 | 200 | | 2042-03-25T23:59:59+0100 |
|
||||
| folder | /folder |15 | | link | |
|
||||
| folder/file.txt | /file.txt |1 | 123 | link | 2042-03-25T23:59:59+0100 |
|
||||
| folder/file.txt | /file.txt |3 | 123 | link | 2042-03-25T23:59:59+0100 |
|
||||
|
||||
|
||||
Scenario Outline: An user participant of the project space with space manager role can share an entity inside project space via public link
|
||||
@@ -65,11 +65,11 @@ Feature: Share a file or folder that is inside a space via public link
|
||||
And the OCS status code should be "200"
|
||||
And the OCS status message should be "OK"
|
||||
And the fields of the last response to user "Alice" should include
|
||||
| path | /<entity> |
|
||||
| path | <path> |
|
||||
Examples:
|
||||
| entity |
|
||||
| folder |
|
||||
| folder/file.txt |
|
||||
| entity | path |
|
||||
| folder | /folder |
|
||||
| folder/file.txt | /file.txt |
|
||||
|
||||
|
||||
Scenario Outline: An user participant of the project space without space manager role cannot share an entity inside project space via public link
|
||||
|
||||
Reference in New Issue
Block a user