mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-26 15:39:18 -06:00
make service user configurable
Signed-off-by: jkoberg <jkoberg@owncloud.com>
This commit is contained in:
2
go.mod
2
go.mod
@@ -277,4 +277,4 @@ require (
|
||||
// we need to use a fork to make the windows build pass
|
||||
replace github.com/pkg/xattr => github.com/micbar/xattr v0.4.6-0.20220215112335-88e74d648fb7
|
||||
|
||||
replace github.com/cs3org/reva => github.com/kobergj/reva v1.13.1-0.20220303154205-2c903784bfdf
|
||||
replace github.com/cs3org/reva => github.com/kobergj/reva v1.13.1-0.20220307095710-5e1b13a62aae
|
||||
|
||||
4
go.sum
4
go.sum
@@ -912,8 +912,8 @@ github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa02
|
||||
github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBFYa4=
|
||||
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
||||
github.com/kljensen/snowball v0.6.0/go.mod h1:27N7E8fVU5H68RlUmnWwZCfxgt4POBJfENGMvNRhldw=
|
||||
github.com/kobergj/reva v1.13.1-0.20220303154205-2c903784bfdf h1:SOzP8F2D1er8MWjafd4cIp2IHjkj28QwBZEIjukY/eg=
|
||||
github.com/kobergj/reva v1.13.1-0.20220303154205-2c903784bfdf/go.mod h1:fdlrnZ0f+UtAdpZfLG+4LM0ZrhT5V8tPEQt6ycYm82c=
|
||||
github.com/kobergj/reva v1.13.1-0.20220307095710-5e1b13a62aae h1:gbjYn6OqFtTIX9wkX5Hhh4GMSoLSByN1O48WvSJ9jy8=
|
||||
github.com/kobergj/reva v1.13.1-0.20220307095710-5e1b13a62aae/go.mod h1:fdlrnZ0f+UtAdpZfLG+4LM0ZrhT5V8tPEQt6ycYm82c=
|
||||
github.com/kolo/xmlrpc v0.0.0-20200310150728-e0350524596b/go.mod h1:o03bZfuBwAXHetKXuInt4S7omeXUu62/A845kiycsSQ=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
|
||||
@@ -40,5 +40,6 @@ type Metadata struct {
|
||||
StorageAddress string `ocisConfig:"storage_addr" env:"STORAGE_GRPC_ADDR"`
|
||||
|
||||
ServiceUserID string `ocisConfig:"service_user_id" env:"METADATA_SERVICE_USER_UUID"`
|
||||
ServiceUserIDP string `ocisConfig:"service_user_idp" env:"METADATA_SERVICE_USER_IDP"`
|
||||
MachineAuthAPIKey string `ocisConfig:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY"`
|
||||
}
|
||||
|
||||
@@ -46,6 +46,7 @@ func DefaultConfig() *Config {
|
||||
GatewayAddress: "127.0.0.1:9142",
|
||||
StorageAddress: "127.0.0.1:9215",
|
||||
ServiceUserID: "95cb8724-03b2-11eb-a0a6-c33ef8ef53ad",
|
||||
ServiceUserIDP: "localhost:9200",
|
||||
MachineAuthAPIKey: "change-me-please",
|
||||
},
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ func New(cfg *config.Config) settings.Manager {
|
||||
|
||||
// NewMetadataClient returns the MetadataClient
|
||||
func NewMetadataClient(cfg config.Metadata) MetadataClient {
|
||||
mdc, err := metadata.NewCS3Storage(cfg.GatewayAddress, cfg.StorageAddress, cfg.ServiceUserID, cfg.MachineAuthAPIKey)
|
||||
mdc, err := metadata.NewCS3Storage(cfg.GatewayAddress, cfg.StorageAddress, cfg.ServiceUserID, cfg.ServiceUserIDP, cfg.MachineAuthAPIKey)
|
||||
if err != nil {
|
||||
log.Fatal("error connecting to mdc:", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user