Skip to content

Commit

Permalink
set ocis storage owner on startup, account fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Jörn Friedrich Dreyer <[email protected]>
  • Loading branch information
butonic committed Oct 6, 2020
1 parent ac650b0 commit e3eb453
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
7 changes: 3 additions & 4 deletions accounts/pkg/storage/cs3.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
1 change: 1 addition & 0 deletions storage/pkg/command/drivers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
17 changes: 9 additions & 8 deletions storage/pkg/flagset/storagemetadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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

}

0 comments on commit e3eb453

Please sign in to comment.