set ocis storage owner on startup, account fixes

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2020-10-06 21:22:44 +02:00
committed by David Christofas
parent b64b3242e2
commit 5a9a9ce86a
3 changed files with 13 additions and 12 deletions
+3 -4
View File
@@ -206,12 +206,11 @@ func (r CS3Repo) DeleteGroup(ctx context.Context, id string) (err error) {
func (r CS3Repo) authenticate(ctx context.Context) (token string, err error) {
u := &user.User{
Id: &user.UserId{},
Id: &user.UserId{
OpaqueId: r.cfg.ServiceUser.UUID,
},
Groups: []string{},
}
if r.cfg.ServiceUser.Username != "" {
u.Id.OpaqueId = r.cfg.ServiceUser.UUID
}
return r.tm.MintToken(ctx, u)
}
+1
View File
@@ -91,6 +91,7 @@ func drivers(cfg *config.Config) map[string]interface{} {
"user_layout": cfg.Reva.Storages.Common.UserLayout,
"treetime_accounting": true,
"treesize_accounting": true,
"owner": "95cb8724-03b2-11eb-a0a6-c33ef8ef53ad", // the accounts service system account uuid
},
"s3": map[string]interface{}{
"region": cfg.Reva.Storages.S3.Region,
+9 -8
View File
@@ -57,13 +57,6 @@ func StorageMetadata(cfg *config.Config) []cli.Flag {
EnvVars: []string{"STORAGE_METADATA_DRIVER"},
Destination: &cfg.Reva.StorageMetadata.Driver,
},
&cli.StringFlag{
Name: "storage-root",
Value: "/var/tmp/ocis/metadata",
Usage: "the path to the metadata storage root",
EnvVars: []string{"STORAGE_METADATA_ROOT"},
Destination: &cfg.Reva.Storages.Common.Root,
},
// some drivers need to look up users at the gateway
@@ -95,7 +88,15 @@ func StorageMetadata(cfg *config.Config) []cli.Flag {
flags = append(flags, DriverLocalWithConfig(cfg)...)
flags = append(flags, DriverOwnCloudWithConfig(cfg)...)
flags = append(flags, DriverOCISWithConfig(cfg)...)
flags = append(flags,
&cli.StringFlag{
Name: "storage-root",
Value: "/var/tmp/ocis/metadata",
Usage: "the path to the metadata storage root",
EnvVars: []string{"STORAGE_METADATA_ROOT"},
Destination: &cfg.Reva.Storages.Common.Root,
},
)
return flags
}