From 8adea0f38ed294ab75f95f428329297533068ae7 Mon Sep 17 00:00:00 2001 From: case0sh Date: Wed, 4 Oct 2023 10:25:54 +0200 Subject: [PATCH 1/7] edit wrong named enves --- .../unreleased/change-wrong-envvar-names.md | 5 + .../ocis/messages/settings/v0/settings.pb.go | 98 +++++++++--------- services/auth-machine/pkg/config/config.go | 1 - .../pkg/config/defaults/defaultconfig.go | 4 - .../auth-machine/pkg/config/parser/parse.go | 4 - .../auth-machine/pkg/revaconfig/config.go | 1 - .../clientlog/mocks/event_history_service.go | 99 +++++++++++++++++++ services/clientlog/pkg/config/debug.go | 8 +- services/clientlog/pkg/config/log.go | 8 +- services/frontend/pkg/config/config.go | 1 - .../pkg/config/defaults/defaultconfig.go | 4 - services/frontend/pkg/config/parser/parse.go | 4 - services/frontend/pkg/revaconfig/config.go | 1 - .../idp/pkg/backends/cs3/bootstrap/cs3.go | 1 - .../idp/pkg/backends/cs3/identifier/cs3.go | 4 - services/idp/pkg/config/config.go | 1 - .../idp/pkg/config/defaults/defaultconfig.go | 4 +- services/idp/pkg/config/parser/parse.go | 4 - services/idp/pkg/service/v0/service.go | 5 +- services/ocdav/pkg/command/server.go | 1 - services/ocdav/pkg/config/config.go | 1 - .../pkg/config/defaults/defaultconfig.go | 5 - services/ocdav/pkg/config/parser/parse.go | 4 - services/policies/pkg/config/config.go | 1 - .../pkg/config/defaults/defaultconfig.go | 4 +- 25 files changed, 165 insertions(+), 108 deletions(-) create mode 100644 changelog/unreleased/change-wrong-envvar-names.md create mode 100644 services/clientlog/mocks/event_history_service.go diff --git a/changelog/unreleased/change-wrong-envvar-names.md b/changelog/unreleased/change-wrong-envvar-names.md new file mode 100644 index 0000000000..77598db3aa --- /dev/null +++ b/changelog/unreleased/change-wrong-envvar-names.md @@ -0,0 +1,5 @@ +Enhancement: Edit wrong named enves + +Checked and changed the envvars specified in the task and also removed those that are no longer used. + +https://github.com/owncloud/ocis/pull/7406 diff --git a/protogen/gen/ocis/messages/settings/v0/settings.pb.go b/protogen/gen/ocis/messages/settings/v0/settings.pb.go index bae3a9c871..9f0f3d92c6 100644 --- a/protogen/gen/ocis/messages/settings/v0/settings.pb.go +++ b/protogen/gen/ocis/messages/settings/v0/settings.pb.go @@ -489,13 +489,13 @@ type Bundle struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` // @gotags: yaml:"id" - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" yaml:"name"` // @gotags: yaml:"name" - Type Bundle_Type `protobuf:"varint,3,opt,name=type,proto3,enum=ocis.messages.settings.v0.Bundle_Type" json:"type,omitempty" yaml:"type"` // @gotags: yaml:"type" - Extension string `protobuf:"bytes,4,opt,name=extension,proto3" json:"extension,omitempty" yaml:"extension"` // @gotags: yaml:"extension" - DisplayName string `protobuf:"bytes,5,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty" yaml:"display_name"` // @gotags: yaml:"display_name" - Settings []*Setting `protobuf:"bytes,6,rep,name=settings,proto3" json:"settings,omitempty" yaml:"settings"` // @gotags: yaml:"settings" - Resource *Resource `protobuf:"bytes,7,opt,name=resource,proto3" json:"resource,omitempty" yaml:"resource"` // @gotags: yaml:"resource" + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // @gotags: yaml:"id" + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // @gotags: yaml:"name" + Type Bundle_Type `protobuf:"varint,3,opt,name=type,proto3,enum=ocis.messages.settings.v0.Bundle_Type" json:"type,omitempty"` // @gotags: yaml:"type" + Extension string `protobuf:"bytes,4,opt,name=extension,proto3" json:"extension,omitempty"` // @gotags: yaml:"extension" + DisplayName string `protobuf:"bytes,5,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` // @gotags: yaml:"display_name" + Settings []*Setting `protobuf:"bytes,6,rep,name=settings,proto3" json:"settings,omitempty"` // @gotags: yaml:"settings" + Resource *Resource `protobuf:"bytes,7,opt,name=resource,proto3" json:"resource,omitempty"` // @gotags: yaml:"resource" } func (x *Bundle) Reset() { @@ -584,10 +584,10 @@ type Setting struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` // @gotags: yaml:"id" - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" yaml:"name"` // @gotags: yaml:"name" - DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty" yaml:"display_name"` // @gotags: yaml:"display_name" - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty" yaml:"description"` // @gotags: yaml:"description" + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // @gotags: yaml:"id" + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // @gotags: yaml:"name" + DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` // @gotags: yaml:"display_name" + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` // @gotags: yaml:"description" // Types that are assignable to Value: // // *Setting_IntValue @@ -597,7 +597,7 @@ type Setting struct { // *Setting_MultiChoiceValue // *Setting_PermissionValue Value isSetting_Value `protobuf_oneof:"value"` - Resource *Resource `protobuf:"bytes,11,opt,name=resource,proto3" json:"resource,omitempty" yaml:"resource"` // @gotags: yaml:"resource" + Resource *Resource `protobuf:"bytes,11,opt,name=resource,proto3" json:"resource,omitempty"` // @gotags: yaml:"resource" } func (x *Setting) Reset() { @@ -721,27 +721,27 @@ type isSetting_Value interface { } type Setting_IntValue struct { - IntValue *Int `protobuf:"bytes,5,opt,name=int_value,json=intValue,proto3,oneof" yaml:"int_value"` // @gotags: yaml:"int_value" + IntValue *Int `protobuf:"bytes,5,opt,name=int_value,json=intValue,proto3,oneof"` // @gotags: yaml:"int_value" } type Setting_StringValue struct { - StringValue *String `protobuf:"bytes,6,opt,name=string_value,json=stringValue,proto3,oneof" yaml:"string_value"` // @gotags: yaml:"string_value" + StringValue *String `protobuf:"bytes,6,opt,name=string_value,json=stringValue,proto3,oneof"` // @gotags: yaml:"string_value" } type Setting_BoolValue struct { - BoolValue *Bool `protobuf:"bytes,7,opt,name=bool_value,json=boolValue,proto3,oneof" yaml:"bool_value"` // @gotags: yaml:"bool_value" + BoolValue *Bool `protobuf:"bytes,7,opt,name=bool_value,json=boolValue,proto3,oneof"` // @gotags: yaml:"bool_value" } type Setting_SingleChoiceValue struct { - SingleChoiceValue *SingleChoiceList `protobuf:"bytes,8,opt,name=single_choice_value,json=singleChoiceValue,proto3,oneof" yaml:"single_choice_value"` // @gotags: yaml:"single_choice_value" + SingleChoiceValue *SingleChoiceList `protobuf:"bytes,8,opt,name=single_choice_value,json=singleChoiceValue,proto3,oneof"` // @gotags: yaml:"single_choice_value" } type Setting_MultiChoiceValue struct { - MultiChoiceValue *MultiChoiceList `protobuf:"bytes,9,opt,name=multi_choice_value,json=multiChoiceValue,proto3,oneof" yaml:"multi_choice_value"` // @gotags: yaml:"multi_choice_value" + MultiChoiceValue *MultiChoiceList `protobuf:"bytes,9,opt,name=multi_choice_value,json=multiChoiceValue,proto3,oneof"` // @gotags: yaml:"multi_choice_value" } type Setting_PermissionValue struct { - PermissionValue *Permission `protobuf:"bytes,10,opt,name=permission_value,json=permissionValue,proto3,oneof" yaml:"permission_value"` // @gotags: yaml:"permission_value" + PermissionValue *Permission `protobuf:"bytes,10,opt,name=permission_value,json=permissionValue,proto3,oneof"` // @gotags: yaml:"permission_value" } func (*Setting_IntValue) isSetting_Value() {} @@ -761,11 +761,11 @@ type Int struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Default int64 `protobuf:"varint,1,opt,name=default,proto3" json:"default,omitempty" yaml:"default"` // @gotags: yaml:"default" - Min int64 `protobuf:"varint,2,opt,name=min,proto3" json:"min,omitempty" yaml:"min"` // @gotags: yaml:"min" - Max int64 `protobuf:"varint,3,opt,name=max,proto3" json:"max,omitempty" yaml:"max"` // @gotags: yaml:"max" - Step int64 `protobuf:"varint,4,opt,name=step,proto3" json:"step,omitempty" yaml:"step"` // @gotags: yaml:"step" - Placeholder string `protobuf:"bytes,5,opt,name=placeholder,proto3" json:"placeholder,omitempty" yaml:"placeholder"` // @gotags: yaml:"placeholder" + Default int64 `protobuf:"varint,1,opt,name=default,proto3" json:"default,omitempty"` // @gotags: yaml:"default" + Min int64 `protobuf:"varint,2,opt,name=min,proto3" json:"min,omitempty"` // @gotags: yaml:"min" + Max int64 `protobuf:"varint,3,opt,name=max,proto3" json:"max,omitempty"` // @gotags: yaml:"max" + Step int64 `protobuf:"varint,4,opt,name=step,proto3" json:"step,omitempty"` // @gotags: yaml:"step" + Placeholder string `protobuf:"bytes,5,opt,name=placeholder,proto3" json:"placeholder,omitempty"` // @gotags: yaml:"placeholder" } func (x *Int) Reset() { @@ -840,11 +840,11 @@ type String struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Default string `protobuf:"bytes,1,opt,name=default,proto3" json:"default,omitempty" yaml:"default"` // @gotags: yaml:"default" - Required bool `protobuf:"varint,2,opt,name=required,proto3" json:"required,omitempty" yaml:"required"` // @gotags: yaml:"required" - MinLength int32 `protobuf:"varint,3,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty" yaml:"min_length"` // @gotags: yaml:"min_length" - MaxLength int32 `protobuf:"varint,4,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty" yaml:"max_length"` // @gotags: yaml:"max_length" - Placeholder string `protobuf:"bytes,5,opt,name=placeholder,proto3" json:"placeholder,omitempty" yaml:"placeholder"` // @gotags: yaml:"placeholder" + Default string `protobuf:"bytes,1,opt,name=default,proto3" json:"default,omitempty"` // @gotags: yaml:"default" + Required bool `protobuf:"varint,2,opt,name=required,proto3" json:"required,omitempty"` // @gotags: yaml:"required" + MinLength int32 `protobuf:"varint,3,opt,name=min_length,json=minLength,proto3" json:"min_length,omitempty"` // @gotags: yaml:"min_length" + MaxLength int32 `protobuf:"varint,4,opt,name=max_length,json=maxLength,proto3" json:"max_length,omitempty"` // @gotags: yaml:"max_length" + Placeholder string `protobuf:"bytes,5,opt,name=placeholder,proto3" json:"placeholder,omitempty"` // @gotags: yaml:"placeholder" } func (x *String) Reset() { @@ -919,8 +919,8 @@ type Bool struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Default bool `protobuf:"varint,1,opt,name=default,proto3" json:"default,omitempty" yaml:"default"` // @gotags: yaml:"default" - Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty" yaml:"label"` // @gotags: yaml:"label" + Default bool `protobuf:"varint,1,opt,name=default,proto3" json:"default,omitempty"` // @gotags: yaml:"default" + Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"` // @gotags: yaml:"label" } func (x *Bool) Reset() { @@ -974,7 +974,7 @@ type SingleChoiceList struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Options []*ListOption `protobuf:"bytes,1,rep,name=options,proto3" json:"options,omitempty" yaml:"options"` // @gotags: yaml:"options" + Options []*ListOption `protobuf:"bytes,1,rep,name=options,proto3" json:"options,omitempty"` // @gotags: yaml:"options" } func (x *SingleChoiceList) Reset() { @@ -1021,7 +1021,7 @@ type MultiChoiceList struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Options []*ListOption `protobuf:"bytes,1,rep,name=options,proto3" json:"options,omitempty" yaml:"options"` // @gotags: yaml:"options" + Options []*ListOption `protobuf:"bytes,1,rep,name=options,proto3" json:"options,omitempty"` // @gotags: yaml:"options" } func (x *MultiChoiceList) Reset() { @@ -1068,9 +1068,9 @@ type ListOption struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Value *ListOptionValue `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty" yaml:"value"` // @gotags: yaml:"value" - Default bool `protobuf:"varint,2,opt,name=default,proto3" json:"default,omitempty" yaml:"default"` // @gotags: yaml:"default" - DisplayValue string `protobuf:"bytes,3,opt,name=display_value,json=displayValue,proto3" json:"display_value,omitempty" yaml:"display_value"` // @gotags: yaml:"display_value" + Value *ListOptionValue `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"` // @gotags: yaml:"value" + Default bool `protobuf:"varint,2,opt,name=default,proto3" json:"default,omitempty"` // @gotags: yaml:"default" + DisplayValue string `protobuf:"bytes,3,opt,name=display_value,json=displayValue,proto3" json:"display_value,omitempty"` // @gotags: yaml:"display_value" } func (x *ListOption) Reset() { @@ -1131,8 +1131,8 @@ type Permission struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Operation Permission_Operation `protobuf:"varint,1,opt,name=operation,proto3,enum=ocis.messages.settings.v0.Permission_Operation" json:"operation,omitempty" yaml:"operation"` // @gotags: yaml:"operation" - Constraint Permission_Constraint `protobuf:"varint,2,opt,name=constraint,proto3,enum=ocis.messages.settings.v0.Permission_Constraint" json:"constraint,omitempty" yaml:"constraint"` // @gotags: yaml:"constraint" + Operation Permission_Operation `protobuf:"varint,1,opt,name=operation,proto3,enum=ocis.messages.settings.v0.Permission_Operation" json:"operation,omitempty"` // @gotags: yaml:"operation" + Constraint Permission_Constraint `protobuf:"varint,2,opt,name=constraint,proto3,enum=ocis.messages.settings.v0.Permission_Constraint" json:"constraint,omitempty"` // @gotags: yaml:"constraint" } func (x *Permission) Reset() { @@ -1187,12 +1187,12 @@ type Value struct { unknownFields protoimpl.UnknownFields // id is the id of the Value. It is generated on saving it. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" yaml:"id"` // @gotags: yaml:"id" - BundleId string `protobuf:"bytes,2,opt,name=bundle_id,json=bundleId,proto3" json:"bundle_id,omitempty" yaml:"bundle_id"` // @gotags: yaml:"bundle_id" + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // @gotags: yaml:"id" + BundleId string `protobuf:"bytes,2,opt,name=bundle_id,json=bundleId,proto3" json:"bundle_id,omitempty"` // @gotags: yaml:"bundle_id" // setting_id is the id of the setting from within its bundle. - SettingId string `protobuf:"bytes,3,opt,name=setting_id,json=settingId,proto3" json:"setting_id,omitempty" yaml:"setting_id"` // @gotags: yaml:"setting_id" - AccountUuid string `protobuf:"bytes,4,opt,name=account_uuid,json=accountUuid,proto3" json:"account_uuid,omitempty" yaml:"account_uuid"` // @gotags: yaml:"account_uuid" - Resource *Resource `protobuf:"bytes,5,opt,name=resource,proto3" json:"resource,omitempty" yaml:"resource"` // @gotags: yaml:"resource" + SettingId string `protobuf:"bytes,3,opt,name=setting_id,json=settingId,proto3" json:"setting_id,omitempty"` // @gotags: yaml:"setting_id" + AccountUuid string `protobuf:"bytes,4,opt,name=account_uuid,json=accountUuid,proto3" json:"account_uuid,omitempty"` // @gotags: yaml:"account_uuid" + Resource *Resource `protobuf:"bytes,5,opt,name=resource,proto3" json:"resource,omitempty"` // @gotags: yaml:"resource" // Types that are assignable to Value: // // *Value_BoolValue @@ -1309,19 +1309,19 @@ type isValue_Value interface { } type Value_BoolValue struct { - BoolValue bool `protobuf:"varint,6,opt,name=bool_value,json=boolValue,proto3,oneof" yaml:"bool_value"` // @gotags: yaml:"bool_value" + BoolValue bool `protobuf:"varint,6,opt,name=bool_value,json=boolValue,proto3,oneof"` // @gotags: yaml:"bool_value" } type Value_IntValue struct { - IntValue int64 `protobuf:"varint,7,opt,name=int_value,json=intValue,proto3,oneof" yaml:"int_value"` // @gotags: yaml:"int_value" + IntValue int64 `protobuf:"varint,7,opt,name=int_value,json=intValue,proto3,oneof"` // @gotags: yaml:"int_value" } type Value_StringValue struct { - StringValue string `protobuf:"bytes,8,opt,name=string_value,json=stringValue,proto3,oneof" yaml:"string_value"` // @gotags: yaml:"string_value" + StringValue string `protobuf:"bytes,8,opt,name=string_value,json=stringValue,proto3,oneof"` // @gotags: yaml:"string_value" } type Value_ListValue struct { - ListValue *ListValue `protobuf:"bytes,9,opt,name=list_value,json=listValue,proto3,oneof" yaml:"list_value"` // @gotags: yaml:"list_value" + ListValue *ListValue `protobuf:"bytes,9,opt,name=list_value,json=listValue,proto3,oneof"` // @gotags: yaml:"list_value" } func (*Value_BoolValue) isValue_Value() {} @@ -1337,7 +1337,7 @@ type ListValue struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Values []*ListOptionValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty" yaml:"values"` // @gotags: yaml:"values" + Values []*ListOptionValue `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` // @gotags: yaml:"values" } func (x *ListValue) Reset() { @@ -1449,11 +1449,11 @@ type isListOptionValue_Option interface { } type ListOptionValue_StringValue struct { - StringValue string `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3,oneof" yaml:"string_value"` // @gotags: yaml:"string_value" + StringValue string `protobuf:"bytes,1,opt,name=string_value,json=stringValue,proto3,oneof"` // @gotags: yaml:"string_value" } type ListOptionValue_IntValue struct { - IntValue int64 `protobuf:"varint,2,opt,name=int_value,json=intValue,proto3,oneof" yaml:"int_value"` // @gotags: yaml:"int_value" + IntValue int64 `protobuf:"varint,2,opt,name=int_value,json=intValue,proto3,oneof"` // @gotags: yaml:"int_value" } func (*ListOptionValue_StringValue) isListOptionValue_Option() {} diff --git a/services/auth-machine/pkg/config/config.go b/services/auth-machine/pkg/config/config.go index edf49e31e1..bc73b65db0 100644 --- a/services/auth-machine/pkg/config/config.go +++ b/services/auth-machine/pkg/config/config.go @@ -20,7 +20,6 @@ type Config struct { SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"AUTH_MACHINE_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the encoding of the user's group memberships in the reva access token. This reduces the token size, especially when users are members of a large number of groups."` - MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY;AUTH_MACHINE_API_KEY" desc:"Machine auth API key used to validate internal requests necessary for the access to resources from other services."` Supervised bool `yaml:"-"` Context context.Context `yaml:"-"` diff --git a/services/auth-machine/pkg/config/defaults/defaultconfig.go b/services/auth-machine/pkg/config/defaults/defaultconfig.go index 3123334d56..a809656dc9 100644 --- a/services/auth-machine/pkg/config/defaults/defaultconfig.go +++ b/services/auth-machine/pkg/config/defaults/defaultconfig.go @@ -72,10 +72,6 @@ func EnsureDefaults(cfg *config.Config) { cfg.TokenManager = &config.TokenManager{} } - if cfg.MachineAuthAPIKey == "" && cfg.Commons != nil && cfg.Commons.MachineAuthAPIKey != "" { - cfg.MachineAuthAPIKey = cfg.Commons.MachineAuthAPIKey - } - if cfg.GRPC.TLS == nil && cfg.Commons != nil { cfg.GRPC.TLS = structs.CopyOrZeroValue(cfg.Commons.GRPCServiceTLS) } diff --git a/services/auth-machine/pkg/config/parser/parse.go b/services/auth-machine/pkg/config/parser/parse.go index 1b9c1606a9..a7e48155f3 100644 --- a/services/auth-machine/pkg/config/parser/parse.go +++ b/services/auth-machine/pkg/config/parser/parse.go @@ -37,9 +37,5 @@ func Validate(cfg *config.Config) error { if cfg.TokenManager.JWTSecret == "" { return shared.MissingJWTTokenError(cfg.Service.Name) } - - if cfg.MachineAuthAPIKey == "" { - return shared.MissingMachineAuthApiKeyError(cfg.Service.Name) - } return nil } diff --git a/services/auth-machine/pkg/revaconfig/config.go b/services/auth-machine/pkg/revaconfig/config.go index 0dc3238296..b084b4c328 100644 --- a/services/auth-machine/pkg/revaconfig/config.go +++ b/services/auth-machine/pkg/revaconfig/config.go @@ -26,7 +26,6 @@ func AuthMachineConfigFromStruct(cfg *config.Config) map[string]interface{} { "auth_manager": "machine", "auth_managers": map[string]interface{}{ "machine": map[string]interface{}{ - "api_key": cfg.MachineAuthAPIKey, "gateway_addr": cfg.Reva.Address, }, }, diff --git a/services/clientlog/mocks/event_history_service.go b/services/clientlog/mocks/event_history_service.go new file mode 100644 index 0000000000..42580a19a3 --- /dev/null +++ b/services/clientlog/mocks/event_history_service.go @@ -0,0 +1,99 @@ +// Code generated by mockery v2.22.1. DO NOT EDIT. + +package mocks + +import ( + context "context" + + client "go-micro.dev/v4/client" + + mock "github.com/stretchr/testify/mock" + + v0 "github.com/owncloud/ocis/v2/protogen/gen/ocis/services/eventhistory/v0" +) + +// EventHistoryService is an autogenerated mock type for the EventHistoryService type +type EventHistoryService struct { + mock.Mock +} + +// GetEvents provides a mock function with given fields: ctx, in, opts +func (_m *EventHistoryService) GetEvents(ctx context.Context, in *v0.GetEventsRequest, opts ...client.CallOption) (*v0.GetEventsResponse, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, in) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *v0.GetEventsResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *v0.GetEventsRequest, ...client.CallOption) (*v0.GetEventsResponse, error)); ok { + return rf(ctx, in, opts...) + } + if rf, ok := ret.Get(0).(func(context.Context, *v0.GetEventsRequest, ...client.CallOption) *v0.GetEventsResponse); ok { + r0 = rf(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*v0.GetEventsResponse) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *v0.GetEventsRequest, ...client.CallOption) error); ok { + r1 = rf(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +// GetEventsForUser provides a mock function with given fields: ctx, in, opts +func (_m *EventHistoryService) GetEventsForUser(ctx context.Context, in *v0.GetEventsForUserRequest, opts ...client.CallOption) (*v0.GetEventsResponse, error) { + _va := make([]interface{}, len(opts)) + for _i := range opts { + _va[_i] = opts[_i] + } + var _ca []interface{} + _ca = append(_ca, ctx, in) + _ca = append(_ca, _va...) + ret := _m.Called(_ca...) + + var r0 *v0.GetEventsResponse + var r1 error + if rf, ok := ret.Get(0).(func(context.Context, *v0.GetEventsForUserRequest, ...client.CallOption) (*v0.GetEventsResponse, error)); ok { + return rf(ctx, in, opts...) + } + if rf, ok := ret.Get(0).(func(context.Context, *v0.GetEventsForUserRequest, ...client.CallOption) *v0.GetEventsResponse); ok { + r0 = rf(ctx, in, opts...) + } else { + if ret.Get(0) != nil { + r0 = ret.Get(0).(*v0.GetEventsResponse) + } + } + + if rf, ok := ret.Get(1).(func(context.Context, *v0.GetEventsForUserRequest, ...client.CallOption) error); ok { + r1 = rf(ctx, in, opts...) + } else { + r1 = ret.Error(1) + } + + return r0, r1 +} + +type mockConstructorTestingTNewEventHistoryService interface { + mock.TestingT + Cleanup(func()) +} + +// NewEventHistoryService creates a new instance of EventHistoryService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. +func NewEventHistoryService(t mockConstructorTestingTNewEventHistoryService) *EventHistoryService { + mock := &EventHistoryService{} + mock.Mock.Test(t) + + t.Cleanup(func() { mock.AssertExpectations(t) }) + + return mock +} diff --git a/services/clientlog/pkg/config/debug.go b/services/clientlog/pkg/config/debug.go index d29ac49163..c8f63859e6 100644 --- a/services/clientlog/pkg/config/debug.go +++ b/services/clientlog/pkg/config/debug.go @@ -2,8 +2,8 @@ package config // Debug defines the available debug configuration. type Debug struct { - Addr string `yaml:"addr" env:"USERLOG_DEBUG_ADDR" desc:"Bind address of the debug server, where metrics, health, config and debug endpoints will be exposed."` - Token string `yaml:"token" env:"USERLOG_DEBUG_TOKEN" desc:"Token to secure the metrics endpoint."` - Pprof bool `yaml:"pprof" env:"USERLOG_DEBUG_PPROF" desc:"Enables pprof, which can be used for profiling."` - Zpages bool `yaml:"zpages" env:"USERLOG_DEBUG_ZPAGES" desc:"Enables zpages, which can be used for collecting and viewing in-memory traces."` + Addr string `yaml:"addr" env:"CLIENTLOG_DEBUG_ADDR" desc:"Bind address of the debug server, where metrics, health, config and debug endpoints will be exposed."` + Token string `yaml:"token" env:"CLIENTLOG_DEBUG_TOKEN" desc:"Token to secure the metrics endpoint."` + Pprof bool `yaml:"pprof" env:"CLIENTLOG_DEBUG_PPROF" desc:"Enables pprof, which can be used for profiling."` + Zpages bool `yaml:"zpages" env:"CLIENTLOG_DEBUG_ZPAGES" desc:"Enables zpages, which can be used for collecting and viewing in-memory traces."` } diff --git a/services/clientlog/pkg/config/log.go b/services/clientlog/pkg/config/log.go index c3cc38911f..8e82f8edab 100644 --- a/services/clientlog/pkg/config/log.go +++ b/services/clientlog/pkg/config/log.go @@ -2,8 +2,8 @@ package config // Log defines the available log configuration. type Log struct { - Level string `mapstructure:"level" env:"OCIS_LOG_LEVEL;USERLOG_LOG_LEVEL" desc:"The log level. Valid values are: 'panic', 'fatal', 'error', 'warn', 'info', 'debug', 'trace'."` - Pretty bool `mapstructure:"pretty" env:"OCIS_LOG_PRETTY;USERLOG_LOG_PRETTY" desc:"Activates pretty log output."` - Color bool `mapstructure:"color" env:"OCIS_LOG_COLOR;USERLOG_LOG_COLOR" desc:"Activates colorized log output."` - File string `mapstructure:"file" env:"OCIS_LOG_FILE;USERLOG_LOG_FILE" desc:"The path to the log file. Activates logging to this file if set."` + Level string `mapstructure:"level" env:"OCIS_LOG_LEVEL;CLIENTLOG_USERLOG_LOG_LEVEL" desc:"The log level. Valid values are: 'panic', 'fatal', 'error', 'warn', 'info', 'debug', 'trace'."` + Pretty bool `mapstructure:"pretty" env:"OCIS_LOG_PRETTY;CLIENTLOG_USERLOG_LOG_PRETTY" desc:"Activates pretty log output."` + Color bool `mapstructure:"color" env:"OCIS_LOG_COLOR;CLIENTLOG_USERLOG_LOG_COLOR" desc:"Activates colorized log output."` + File string `mapstructure:"file" env:"OCIS_LOG_FILE;CLIENTLOG_USERLOG_LOG_FILE" desc:"The path to the log file. Activates logging to this file if set."` } diff --git a/services/frontend/pkg/config/config.go b/services/frontend/pkg/config/config.go index 86728f7440..c8796e5f5e 100644 --- a/services/frontend/pkg/config/config.go +++ b/services/frontend/pkg/config/config.go @@ -22,7 +22,6 @@ type Config struct { TokenManager *TokenManager `yaml:"token_manager"` Reva *shared.Reva `yaml:"reva"` - MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY;FRONTEND_MACHINE_AUTH_API_KEY" desc:"The machine auth API key used to validate internal requests necessary to access resources from other services."` SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"FRONTEND_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the loading of user's group memberships from the reva access token."` diff --git a/services/frontend/pkg/config/defaults/defaultconfig.go b/services/frontend/pkg/config/defaults/defaultconfig.go index f3726a2010..3bd7b93cfb 100644 --- a/services/frontend/pkg/config/defaults/defaultconfig.go +++ b/services/frontend/pkg/config/defaults/defaultconfig.go @@ -169,10 +169,6 @@ func EnsureDefaults(cfg *config.Config) { cfg.TransferSecret = cfg.Commons.TransferSecret } - if cfg.MachineAuthAPIKey == "" && cfg.Commons != nil && cfg.Commons.MachineAuthAPIKey != "" { - cfg.MachineAuthAPIKey = cfg.Commons.MachineAuthAPIKey - } - } // Sanitize sanitized the configuration diff --git a/services/frontend/pkg/config/parser/parse.go b/services/frontend/pkg/config/parser/parse.go index 3045136e3b..3645d30183 100644 --- a/services/frontend/pkg/config/parser/parse.go +++ b/services/frontend/pkg/config/parser/parse.go @@ -43,10 +43,6 @@ func Validate(cfg *config.Config) error { return shared.MissingRevaTransferSecretError(cfg.Service.Name) } - if cfg.MachineAuthAPIKey == "" { - return shared.MissingMachineAuthApiKeyError(cfg.Service.Name) - } - if cfg.GRPCClientTLS == nil && cfg.Commons != nil { cfg.GRPCClientTLS = structs.CopyOrZeroValue(cfg.Commons.GRPCClientTLS) } diff --git a/services/frontend/pkg/revaconfig/config.go b/services/frontend/pkg/revaconfig/config.go index c490a16b04..a98913dafb 100644 --- a/services/frontend/pkg/revaconfig/config.go +++ b/services/frontend/pkg/revaconfig/config.go @@ -168,7 +168,6 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string "stat_cache_table": cfg.OCS.StatCacheTable, "prefix": cfg.OCS.Prefix, "additional_info_attribute": cfg.OCS.AdditionalInfoAttribute, - "machine_auth_apikey": cfg.MachineAuthAPIKey, "enable_denials": cfg.OCS.EnableDenials, "cache_warmup_driver": cfg.OCS.CacheWarmupDriver, "cache_warmup_drivers": map[string]interface{}{ diff --git a/services/idp/pkg/backends/cs3/bootstrap/cs3.go b/services/idp/pkg/backends/cs3/bootstrap/cs3.go index 24bc638d11..3773ebd80e 100644 --- a/services/idp/pkg/backends/cs3/bootstrap/cs3.go +++ b/services/idp/pkg/backends/cs3/bootstrap/cs3.go @@ -74,7 +74,6 @@ func NewIdentityManager(bs bootstrap.Bootstrap) (identity.Manager, error) { config.TLSClientConfig, // FIXME add a map[string]interface{} property to the lico config.Config so backends can pass custom config parameters through the bootstrap process os.Getenv("CS3_GATEWAY"), - os.Getenv("CS3_MACHINE_AUTH_API_KEY"), config.Settings.Insecure, ) if identifierErr != nil { diff --git a/services/idp/pkg/backends/cs3/identifier/cs3.go b/services/idp/pkg/backends/cs3/identifier/cs3.go index 2370a0734c..baea030aff 100644 --- a/services/idp/pkg/backends/cs3/identifier/cs3.go +++ b/services/idp/pkg/backends/cs3/identifier/cs3.go @@ -36,7 +36,6 @@ type CS3Backend struct { logger logrus.FieldLogger tlsConfig *tls.Config gatewayURI string - machineAuthAPIKey string insecure bool sessions cmap.ConcurrentMap @@ -49,7 +48,6 @@ func NewCS3Backend( c *config.Config, tlsConfig *tls.Config, gatewayURI string, - machineAuthAPIKey string, insecure bool, ) (*CS3Backend, error) { @@ -63,7 +61,6 @@ func NewCS3Backend( logger: c.Logger, tlsConfig: tlsConfig, gatewayURI: gatewayURI, - machineAuthAPIKey: machineAuthAPIKey, insecure: insecure, sessions: cmap.New(), @@ -159,7 +156,6 @@ func (b *CS3Backend) ResolveUserByUsername(ctx context.Context, username string) res, err := client.Authenticate(ctx, &cs3gateway.AuthenticateRequest{ Type: "machine", ClientId: "username:" + username, - ClientSecret: b.machineAuthAPIKey, }) if err != nil { return nil, fmt.Errorf("cs3 backend machine authenticate rpc error: %v", err) diff --git a/services/idp/pkg/config/config.go b/services/idp/pkg/config/config.go index 2ffc1eb0a9..764783af84 100644 --- a/services/idp/pkg/config/config.go +++ b/services/idp/pkg/config/config.go @@ -20,7 +20,6 @@ type Config struct { Reva *shared.Reva `yaml:"reva"` - MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY;IDP_MACHINE_AUTH_API_KEY" desc:"Machine auth API key used to validate internal requests necessary for the access to resources from other services."` Asset Asset `yaml:"asset"` IDP Settings `yaml:"idp"` diff --git a/services/idp/pkg/config/defaults/defaultconfig.go b/services/idp/pkg/config/defaults/defaultconfig.go index ac0d15bf5d..b355667332 100644 --- a/services/idp/pkg/config/defaults/defaultconfig.go +++ b/services/idp/pkg/config/defaults/defaultconfig.go @@ -159,9 +159,7 @@ func EnsureDefaults(cfg *config.Config) { cfg.Reva = structs.CopyOrZeroValue(cfg.Commons.Reva) } - if cfg.MachineAuthAPIKey == "" && cfg.Commons != nil && cfg.Commons.MachineAuthAPIKey != "" { - cfg.MachineAuthAPIKey = cfg.Commons.MachineAuthAPIKey - } + } // Sanitize sanitizes the configuration diff --git a/services/idp/pkg/config/parser/parse.go b/services/idp/pkg/config/parser/parse.go index 3939baccdb..b13a2c9679 100644 --- a/services/idp/pkg/config/parser/parse.go +++ b/services/idp/pkg/config/parser/parse.go @@ -35,10 +35,6 @@ func ParseConfig(cfg *config.Config) error { func Validate(cfg *config.Config) error { switch cfg.IDP.IdentityManager { - case "cs3": - if cfg.MachineAuthAPIKey == "" { - return shared.MissingMachineAuthApiKeyError(cfg.Service.Name) - } case "ldap": if cfg.Ldap.BindPassword == "" { return shared.MissingLDAPBindPassword(cfg.Service.Name) diff --git a/services/idp/pkg/service/v0/service.go b/services/idp/pkg/service/v0/service.go index 7aabdad7f8..01f442c929 100644 --- a/services/idp/pkg/service/v0/service.go +++ b/services/idp/pkg/service/v0/service.go @@ -57,7 +57,7 @@ func NewService(opts ...Option) Service { switch options.Config.IDP.IdentityManager { case "cs3": cs3BackendSupport.MustRegister() - if err := initCS3EnvVars(options.Config.Reva.Address, options.Config.MachineAuthAPIKey); err != nil { + if err := initCS3EnvVars(options.Config.Reva.Address); err != nil { logger.Fatal().Err(err).Msg("could not initialize cs3 backend env vars") } case "ldap": @@ -152,10 +152,9 @@ func createTemporaryClientsConfig(filePath, ocisURL string, clients []config.Cli } // Init cs3 backend vars which are currently not accessible via idp api -func initCS3EnvVars(cs3Addr, machineAuthAPIKey string) error { +func initCS3EnvVars(cs3Addr string) error { defaults := map[string]string{ "CS3_GATEWAY": cs3Addr, - "CS3_MACHINE_AUTH_API_KEY": machineAuthAPIKey, } for k, v := range defaults { diff --git a/services/ocdav/pkg/command/server.go b/services/ocdav/pkg/command/server.go index 881aabf03a..1a5a254ec9 100644 --- a/services/ocdav/pkg/command/server.go +++ b/services/ocdav/pkg/command/server.go @@ -77,7 +77,6 @@ func Server(cfg *config.Config) *cli.Command { ocdav.Version(cfg.Status.Version), ocdav.VersionString(cfg.Status.VersionString), ocdav.Edition(cfg.Status.Edition), - ocdav.MachineAuthAPIKey(cfg.MachineAuthAPIKey), ocdav.Broker(broker.NoOp{}), // ocdav.FavoriteManager() // FIXME needs a proper persistence implementation https://github.com/owncloud/ocis/issues/1228 // ocdav.LockSystem(), // will default to the CS3 lock system diff --git a/services/ocdav/pkg/config/config.go b/services/ocdav/pkg/config/config.go index a89acd3880..cc724fb326 100644 --- a/services/ocdav/pkg/config/config.go +++ b/services/ocdav/pkg/config/config.go @@ -31,7 +31,6 @@ type Config struct { // Timeout in seconds when making requests to the gateway Timeout int64 `yaml:"gateway_request_timeout" env:"OCDAV_GATEWAY_REQUEST_TIMEOUT" desc:"Request timeout in seconds for requests from the oCDAV service to the GATEWAY service."` - MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY;OCDAV_MACHINE_AUTH_API_KEY" desc:"Machine auth API key used to validate internal requests necessary for the access to resources from other services."` Context context.Context `yaml:"-"` Status Status `yaml:"-"` diff --git a/services/ocdav/pkg/config/defaults/defaultconfig.go b/services/ocdav/pkg/config/defaults/defaultconfig.go index 07d11f6bd8..0c79dfb1b3 100644 --- a/services/ocdav/pkg/config/defaults/defaultconfig.go +++ b/services/ocdav/pkg/config/defaults/defaultconfig.go @@ -84,7 +84,6 @@ func DefaultConfig() *config.Config { PublicURL: "https://localhost:9200", Insecure: false, Timeout: 84300, - MachineAuthAPIKey: "", Status: config.Status{ Version: version.Legacy, VersionString: version.LegacyString, @@ -132,10 +131,6 @@ func EnsureDefaults(cfg *config.Config) { } else if cfg.TokenManager == nil { cfg.TokenManager = &config.TokenManager{} } - - if cfg.MachineAuthAPIKey == "" && cfg.Commons != nil && cfg.Commons.MachineAuthAPIKey != "" { - cfg.MachineAuthAPIKey = cfg.Commons.MachineAuthAPIKey - } } // Sanitize sanitizes the configuration diff --git a/services/ocdav/pkg/config/parser/parse.go b/services/ocdav/pkg/config/parser/parse.go index 545dfe45af..5e948297c1 100644 --- a/services/ocdav/pkg/config/parser/parse.go +++ b/services/ocdav/pkg/config/parser/parse.go @@ -37,9 +37,5 @@ func Validate(cfg *config.Config) error { if cfg.TokenManager.JWTSecret == "" { return shared.MissingJWTTokenError(cfg.Service.Name) } - if cfg.MachineAuthAPIKey == "" { - return shared.MissingMachineAuthApiKeyError(cfg.Service.Name) - } - return nil } diff --git a/services/policies/pkg/config/config.go b/services/policies/pkg/config/config.go index ae3dcdd2cf..11f0fd25f9 100644 --- a/services/policies/pkg/config/config.go +++ b/services/policies/pkg/config/config.go @@ -17,7 +17,6 @@ type Config struct { Events Events `yaml:"events"` Reva *shared.Reva `yaml:"reva"` GRPCClientTLS *shared.GRPCClientTLS `yaml:"grpc_client_tls"` - MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY;POLICIES_MACHINE_AUTH_API_KEY" desc:"Machine auth API key used to validate internal requests necessary for the access to resources from other services."` Context context.Context `yaml:"-"` Log *Log `yaml:"log"` Engine Engine `yaml:"engine"` diff --git a/services/policies/pkg/config/defaults/defaultconfig.go b/services/policies/pkg/config/defaults/defaultconfig.go index cfeed8eced..da2efedc12 100644 --- a/services/policies/pkg/config/defaults/defaultconfig.go +++ b/services/policies/pkg/config/defaults/defaultconfig.go @@ -52,9 +52,7 @@ func EnsureDefaults(cfg *config.Config) { } else if cfg.TokenManager == nil { cfg.TokenManager = &config.TokenManager{} } - if cfg.MachineAuthAPIKey == "" && cfg.Commons != nil && cfg.Commons.MachineAuthAPIKey != "" { - cfg.MachineAuthAPIKey = cfg.Commons.MachineAuthAPIKey - } + if cfg.Reva == nil && cfg.Commons != nil && cfg.Commons.Reva != nil { cfg.Reva = &shared.Reva{ From 24e784ac48b0c21c6a873ad235f2523b8b20b12b Mon Sep 17 00:00:00 2001 From: case0sh Date: Thu, 5 Oct 2023 15:16:23 +0200 Subject: [PATCH 2/7] delete web_ui_config_file option --- services/web/pkg/config/config.go | 1 - services/web/pkg/config/defaults/defaultconfig.go | 1 - 2 files changed, 2 deletions(-) diff --git a/services/web/pkg/config/config.go b/services/web/pkg/config/config.go index 1675882b18..a244fb5531 100644 --- a/services/web/pkg/config/config.go +++ b/services/web/pkg/config/config.go @@ -105,7 +105,6 @@ type ExternalAppConfig struct { // Web defines the available web configuration. type Web struct { - Path string `yaml:"path" env:"WEB_UI_CONFIG_FILE" desc:"Read the ownCloud Web configuration from this file path."` ThemeServer string `yaml:"theme_server" env:"OCIS_URL;WEB_UI_THEME_SERVER" desc:"Base URL to load themes from. Will be prepended to the theme path."` // used to build Theme in WebConfig ThemePath string `yaml:"theme_path" env:"WEB_UI_THEME_PATH" desc:"Subpath/file to load the theme. Will be appended to the URL of the theme server."` // used to build Theme in WebConfig Config WebConfig `yaml:"config"` diff --git a/services/web/pkg/config/defaults/defaultconfig.go b/services/web/pkg/config/defaults/defaultconfig.go index 75bca7de68..ad50ca93ac 100644 --- a/services/web/pkg/config/defaults/defaultconfig.go +++ b/services/web/pkg/config/defaults/defaultconfig.go @@ -84,7 +84,6 @@ func DefaultConfig() *config.Config { }, GatewayAddress: "com.owncloud.api.gateway", Web: config.Web{ - Path: "", ThemeServer: "https://localhost:9200", ThemePath: "/themes/owncloud/theme.json", Config: config.WebConfig{ From fac4524dd2f8f328043c44d99ad336de097bf1d9 Mon Sep 17 00:00:00 2001 From: case0sh Date: Thu, 5 Oct 2023 17:57:51 +0200 Subject: [PATCH 3/7] revert all changes to auth-machine --- services/auth-machine/pkg/config/config.go | 1 + services/auth-machine/pkg/config/defaults/defaultconfig.go | 4 ++++ services/auth-machine/pkg/config/parser/parse.go | 4 ++++ services/auth-machine/pkg/revaconfig/config.go | 1 + 4 files changed, 10 insertions(+) diff --git a/services/auth-machine/pkg/config/config.go b/services/auth-machine/pkg/config/config.go index bc73b65db0..edf49e31e1 100644 --- a/services/auth-machine/pkg/config/config.go +++ b/services/auth-machine/pkg/config/config.go @@ -20,6 +20,7 @@ type Config struct { SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"AUTH_MACHINE_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the encoding of the user's group memberships in the reva access token. This reduces the token size, especially when users are members of a large number of groups."` + MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY;AUTH_MACHINE_API_KEY" desc:"Machine auth API key used to validate internal requests necessary for the access to resources from other services."` Supervised bool `yaml:"-"` Context context.Context `yaml:"-"` diff --git a/services/auth-machine/pkg/config/defaults/defaultconfig.go b/services/auth-machine/pkg/config/defaults/defaultconfig.go index a809656dc9..3123334d56 100644 --- a/services/auth-machine/pkg/config/defaults/defaultconfig.go +++ b/services/auth-machine/pkg/config/defaults/defaultconfig.go @@ -72,6 +72,10 @@ func EnsureDefaults(cfg *config.Config) { cfg.TokenManager = &config.TokenManager{} } + if cfg.MachineAuthAPIKey == "" && cfg.Commons != nil && cfg.Commons.MachineAuthAPIKey != "" { + cfg.MachineAuthAPIKey = cfg.Commons.MachineAuthAPIKey + } + if cfg.GRPC.TLS == nil && cfg.Commons != nil { cfg.GRPC.TLS = structs.CopyOrZeroValue(cfg.Commons.GRPCServiceTLS) } diff --git a/services/auth-machine/pkg/config/parser/parse.go b/services/auth-machine/pkg/config/parser/parse.go index a7e48155f3..1b9c1606a9 100644 --- a/services/auth-machine/pkg/config/parser/parse.go +++ b/services/auth-machine/pkg/config/parser/parse.go @@ -37,5 +37,9 @@ func Validate(cfg *config.Config) error { if cfg.TokenManager.JWTSecret == "" { return shared.MissingJWTTokenError(cfg.Service.Name) } + + if cfg.MachineAuthAPIKey == "" { + return shared.MissingMachineAuthApiKeyError(cfg.Service.Name) + } return nil } diff --git a/services/auth-machine/pkg/revaconfig/config.go b/services/auth-machine/pkg/revaconfig/config.go index b084b4c328..0dc3238296 100644 --- a/services/auth-machine/pkg/revaconfig/config.go +++ b/services/auth-machine/pkg/revaconfig/config.go @@ -26,6 +26,7 @@ func AuthMachineConfigFromStruct(cfg *config.Config) map[string]interface{} { "auth_manager": "machine", "auth_managers": map[string]interface{}{ "machine": map[string]interface{}{ + "api_key": cfg.MachineAuthAPIKey, "gateway_addr": cfg.Reva.Address, }, }, From ace3664f6ab006ee36ffcdbfb383a630fb41e2c9 Mon Sep 17 00:00:00 2001 From: case0sh Date: Fri, 6 Oct 2023 10:06:25 +0200 Subject: [PATCH 4/7] fix formatting --- services/frontend/pkg/config/config.go | 4 +- .../idp/pkg/backends/cs3/bootstrap/cs3.go | 3 +- .../idp/pkg/backends/cs3/identifier/cs3.go | 20 +- services/idp/pkg/config/config.go | 1 - .../idp/pkg/config/defaults/defaultconfig.go | 1 - services/idp/pkg/service/v0/service.go | 2 +- services/ocdav/pkg/config/config.go | 1 - .../pkg/config/defaults/defaultconfig.go | 14 +- services/policies/pkg/config/config.go | 26 +-- .../pkg/config/defaults/defaultconfig.go | 1 - services/proxy/pkg/proxy/policy/selector.go | 91 ++++---- .../thumbnails/pkg/preprocessor/fontloader.go | 1 + .../pkg/preprocessor/textanalyzer_test.go | 194 +++++++++--------- .../pkg/service/grpc/v0/decorators/base.go | 42 ++-- services/webdav/pkg/prop/prop.go | 7 +- 15 files changed, 207 insertions(+), 201 deletions(-) diff --git a/services/frontend/pkg/config/config.go b/services/frontend/pkg/config/config.go index c8796e5f5e..c8dbb8d81a 100644 --- a/services/frontend/pkg/config/config.go +++ b/services/frontend/pkg/config/config.go @@ -20,8 +20,8 @@ type Config struct { TransferSecret string `yaml:"transfer_secret" env:"OCIS_TRANSFER_SECRET" desc:"Transfer secret for signing file up- and download requests."` - TokenManager *TokenManager `yaml:"token_manager"` - Reva *shared.Reva `yaml:"reva"` + TokenManager *TokenManager `yaml:"token_manager"` + Reva *shared.Reva `yaml:"reva"` SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"FRONTEND_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the loading of user's group memberships from the reva access token."` diff --git a/services/idp/pkg/backends/cs3/bootstrap/cs3.go b/services/idp/pkg/backends/cs3/bootstrap/cs3.go index 3773ebd80e..6eb1af132c 100644 --- a/services/idp/pkg/backends/cs3/bootstrap/cs3.go +++ b/services/idp/pkg/backends/cs3/bootstrap/cs3.go @@ -19,13 +19,12 @@ package bootstrap import ( "fmt" - "os" - "github.com/libregraph/lico/bootstrap" "github.com/libregraph/lico/identifier" "github.com/libregraph/lico/identity" "github.com/libregraph/lico/identity/managers" cs3 "github.com/owncloud/ocis/v2/services/idp/pkg/backends/cs3/identifier" + "os" ) // Identity managers. diff --git a/services/idp/pkg/backends/cs3/identifier/cs3.go b/services/idp/pkg/backends/cs3/identifier/cs3.go index baea030aff..3bb26a73e5 100644 --- a/services/idp/pkg/backends/cs3/identifier/cs3.go +++ b/services/idp/pkg/backends/cs3/identifier/cs3.go @@ -33,10 +33,10 @@ var cs3SpportedScopes = []string{ type CS3Backend struct { supportedScopes []string - logger logrus.FieldLogger - tlsConfig *tls.Config - gatewayURI string - insecure bool + logger logrus.FieldLogger + tlsConfig *tls.Config + gatewayURI string + insecure bool sessions cmap.ConcurrentMap @@ -58,10 +58,10 @@ func NewCS3Backend( b := &CS3Backend{ supportedScopes: supportedScopes, - logger: c.Logger, - tlsConfig: tlsConfig, - gatewayURI: gatewayURI, - insecure: insecure, + logger: c.Logger, + tlsConfig: tlsConfig, + gatewayURI: gatewayURI, + insecure: insecure, sessions: cmap.New(), } @@ -154,8 +154,8 @@ func (b *CS3Backend) ResolveUserByUsername(ctx context.Context, username string) client := cs3gateway.NewGatewayAPIClient(l) res, err := client.Authenticate(ctx, &cs3gateway.AuthenticateRequest{ - Type: "machine", - ClientId: "username:" + username, + Type: "machine", + ClientId: "username:" + username, }) if err != nil { return nil, fmt.Errorf("cs3 backend machine authenticate rpc error: %v", err) diff --git a/services/idp/pkg/config/config.go b/services/idp/pkg/config/config.go index 764783af84..c75f24e33d 100644 --- a/services/idp/pkg/config/config.go +++ b/services/idp/pkg/config/config.go @@ -20,7 +20,6 @@ type Config struct { Reva *shared.Reva `yaml:"reva"` - Asset Asset `yaml:"asset"` IDP Settings `yaml:"idp"` Clients []Client `yaml:"clients"` diff --git a/services/idp/pkg/config/defaults/defaultconfig.go b/services/idp/pkg/config/defaults/defaultconfig.go index b355667332..264b8c29ce 100644 --- a/services/idp/pkg/config/defaults/defaultconfig.go +++ b/services/idp/pkg/config/defaults/defaultconfig.go @@ -159,7 +159,6 @@ func EnsureDefaults(cfg *config.Config) { cfg.Reva = structs.CopyOrZeroValue(cfg.Commons.Reva) } - } // Sanitize sanitizes the configuration diff --git a/services/idp/pkg/service/v0/service.go b/services/idp/pkg/service/v0/service.go index 01f442c929..a8e7b14e9f 100644 --- a/services/idp/pkg/service/v0/service.go +++ b/services/idp/pkg/service/v0/service.go @@ -154,7 +154,7 @@ func createTemporaryClientsConfig(filePath, ocisURL string, clients []config.Cli // Init cs3 backend vars which are currently not accessible via idp api func initCS3EnvVars(cs3Addr string) error { defaults := map[string]string{ - "CS3_GATEWAY": cs3Addr, + "CS3_GATEWAY": cs3Addr, } for k, v := range defaults { diff --git a/services/ocdav/pkg/config/config.go b/services/ocdav/pkg/config/config.go index cc724fb326..61b6118e2c 100644 --- a/services/ocdav/pkg/config/config.go +++ b/services/ocdav/pkg/config/config.go @@ -31,7 +31,6 @@ type Config struct { // Timeout in seconds when making requests to the gateway Timeout int64 `yaml:"gateway_request_timeout" env:"OCDAV_GATEWAY_REQUEST_TIMEOUT" desc:"Request timeout in seconds for requests from the oCDAV service to the GATEWAY service."` - Context context.Context `yaml:"-"` Status Status `yaml:"-"` diff --git a/services/ocdav/pkg/config/defaults/defaultconfig.go b/services/ocdav/pkg/config/defaults/defaultconfig.go index 0c79dfb1b3..f8def03d8d 100644 --- a/services/ocdav/pkg/config/defaults/defaultconfig.go +++ b/services/ocdav/pkg/config/defaults/defaultconfig.go @@ -77,13 +77,13 @@ func DefaultConfig() *config.Config { Service: config.Service{ Name: "ocdav", }, - Reva: shared.DefaultRevaConfig(), - WebdavNamespace: "/users/{{.Id.OpaqueId}}", - FilesNamespace: "/users/{{.Id.OpaqueId}}", - SharesNamespace: "/Shares", - PublicURL: "https://localhost:9200", - Insecure: false, - Timeout: 84300, + Reva: shared.DefaultRevaConfig(), + WebdavNamespace: "/users/{{.Id.OpaqueId}}", + FilesNamespace: "/users/{{.Id.OpaqueId}}", + SharesNamespace: "/Shares", + PublicURL: "https://localhost:9200", + Insecure: false, + Timeout: 84300, Status: config.Status{ Version: version.Legacy, VersionString: version.LegacyString, diff --git a/services/policies/pkg/config/config.go b/services/policies/pkg/config/config.go index 11f0fd25f9..d8a1c4ac33 100644 --- a/services/policies/pkg/config/config.go +++ b/services/policies/pkg/config/config.go @@ -9,19 +9,19 @@ import ( // Config combines all available configuration parts. type Config struct { - Commons *shared.Commons `yaml:"-"` // don't use this directly as configuration for a service - GRPC GRPC `yaml:"grpc"` - Service Service `yaml:"-"` - Debug Debug `yaml:"debug"` - TokenManager *TokenManager `yaml:"token_manager"` - Events Events `yaml:"events"` - Reva *shared.Reva `yaml:"reva"` - GRPCClientTLS *shared.GRPCClientTLS `yaml:"grpc_client_tls"` - Context context.Context `yaml:"-"` - Log *Log `yaml:"log"` - Engine Engine `yaml:"engine"` - Postprocessing Postprocessing `yaml:"postprocessing"` - Tracing *Tracing `yaml:"tracing"` + Commons *shared.Commons `yaml:"-"` // don't use this directly as configuration for a service + GRPC GRPC `yaml:"grpc"` + Service Service `yaml:"-"` + Debug Debug `yaml:"debug"` + TokenManager *TokenManager `yaml:"token_manager"` + Events Events `yaml:"events"` + Reva *shared.Reva `yaml:"reva"` + GRPCClientTLS *shared.GRPCClientTLS `yaml:"grpc_client_tls"` + Context context.Context `yaml:"-"` + Log *Log `yaml:"log"` + Engine Engine `yaml:"engine"` + Postprocessing Postprocessing `yaml:"postprocessing"` + Tracing *Tracing `yaml:"tracing"` } // Service defines the available service configuration. diff --git a/services/policies/pkg/config/defaults/defaultconfig.go b/services/policies/pkg/config/defaults/defaultconfig.go index da2efedc12..91ba7eeefc 100644 --- a/services/policies/pkg/config/defaults/defaultconfig.go +++ b/services/policies/pkg/config/defaults/defaultconfig.go @@ -53,7 +53,6 @@ func EnsureDefaults(cfg *config.Config) { cfg.TokenManager = &config.TokenManager{} } - if cfg.Reva == nil && cfg.Commons != nil && cfg.Commons.Reva != nil { cfg.Reva = &shared.Reva{ Address: cfg.Commons.Reva.Address, diff --git a/services/proxy/pkg/proxy/policy/selector.go b/services/proxy/pkg/proxy/policy/selector.go index 05cf5d3a4c..bd69aa237b 100644 --- a/services/proxy/pkg/proxy/policy/selector.go +++ b/services/proxy/pkg/proxy/policy/selector.go @@ -27,28 +27,29 @@ const ( // Selector is a function which selects a proxy-policy based on the request. // // A policy is a random name which identifies a set of proxy-routes: -//{ -// "policies": [ -// { -// "name": "us-east-1", -// "routes": [ -// { -// "endpoint": "/", -// "backend": "https://backend.us.example.com:8080/app" -// } -// ] -// }, -// { -// "name": "eu-ams-1", -// "routes": [ -// { -// "endpoint": "/", -// "backend": "https://backend.eu.example.com:8080/app" -// } -// ] -// } -// ] -//} +// +// { +// "policies": [ +// { +// "name": "us-east-1", +// "routes": [ +// { +// "endpoint": "/", +// "backend": "https://backend.us.example.com:8080/app" +// } +// ] +// }, +// { +// "name": "eu-ams-1", +// "routes": [ +// { +// "endpoint": "/", +// "backend": "https://backend.eu.example.com:8080/app" +// } +// ] +// } +// ] +// } type Selector func(r *http.Request) (string, error) // LoadSelector constructs a specific policy-selector from a given configuration @@ -97,9 +98,9 @@ func LoadSelector(cfg *config.PolicySelector) (Selector, error) { // // Configuration: // -// "policy_selector": { -// "static": {"policy" : "ocis"} -// }, +// "policy_selector": { +// "static": {"policy" : "ocis"} +// }, func NewStaticSelector(cfg *config.StaticSelectorConf) Selector { return func(r *http.Request) (s string, err error) { return cfg.Policy, nil @@ -108,12 +109,13 @@ func NewStaticSelector(cfg *config.StaticSelectorConf) Selector { // NewClaimsSelector selects the policy based on the "ocis.routing.policy" claim // The policy for corner cases is configurable: -// "policy_selector": { -// "migration": { -// "default_policy" : "ocis", -// "unauthenticated_policy": "oc10" -// } -// }, +// +// "policy_selector": { +// "migration": { +// "default_policy" : "ocis", +// "unauthenticated_policy": "oc10" +// } +// }, // // This selector can be used in migration-scenarios where some users have already migrated from ownCloud10 to OCIS and func NewClaimsSelector(cfg *config.ClaimsSelectorConf) Selector { @@ -154,19 +156,20 @@ func NewClaimsSelector(cfg *config.ClaimsSelectorConf) Selector { // NewRegexSelector selects the policy based on a user property // The policy for each case is configurable: -// "policy_selector": { -// "regex": { -// "matches_policies": [ -// {"priority": 10, "property": "mail", "match": "marie@example.org", "policy": "ocis"}, -// {"priority": 20, "property": "mail", "match": "[^@]+@example.org", "policy": "oc10"}, -// {"priority": 30, "property": "username", "match": "(einstein|feynman)", "policy": "ocis"}, -// {"priority": 40, "property": "username", "match": ".+", "policy": "oc10"}, -// {"priority": 50, "property": "id", "match": "4c510ada-c86b-4815-8820-42cdf82c3d51", "policy": "ocis"}, -// {"priority": 60, "property": "id", "match": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c", "policy": "oc10"} -// ], -// "unauthenticated_policy": "oc10" -// } -// }, +// +// "policy_selector": { +// "regex": { +// "matches_policies": [ +// {"priority": 10, "property": "mail", "match": "marie@example.org", "policy": "ocis"}, +// {"priority": 20, "property": "mail", "match": "[^@]+@example.org", "policy": "oc10"}, +// {"priority": 30, "property": "username", "match": "(einstein|feynman)", "policy": "ocis"}, +// {"priority": 40, "property": "username", "match": ".+", "policy": "oc10"}, +// {"priority": 50, "property": "id", "match": "4c510ada-c86b-4815-8820-42cdf82c3d51", "policy": "ocis"}, +// {"priority": 60, "property": "id", "match": "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c", "policy": "oc10"} +// ], +// "unauthenticated_policy": "oc10" +// } +// }, // // This selector can be used in migration-scenarios where some users have already migrated from ownCloud10 to OCIS and func NewRegexSelector(cfg *config.RegexSelectorConf) Selector { diff --git a/services/thumbnails/pkg/preprocessor/fontloader.go b/services/thumbnails/pkg/preprocessor/fontloader.go index eb5a60789d..672e62593c 100644 --- a/services/thumbnails/pkg/preprocessor/fontloader.go +++ b/services/thumbnails/pkg/preprocessor/fontloader.go @@ -51,6 +51,7 @@ type FontLoader struct { // Note that only the fonts described in the fontMapFile will be used. // // The fontMapFile has the following structure +// // { // "fontMap": { // "Han": "packaged/myFont-CJK.otf", diff --git a/services/thumbnails/pkg/preprocessor/textanalyzer_test.go b/services/thumbnails/pkg/preprocessor/textanalyzer_test.go index 91f9802477..3efeea930c 100644 --- a/services/thumbnails/pkg/preprocessor/textanalyzer_test.go +++ b/services/thumbnails/pkg/preprocessor/textanalyzer_test.go @@ -47,7 +47,7 @@ func TestAnalyzeString(t *testing.T) { opts: defaultOpts, eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 10, Spaces: []int{5}, TargetScript: "Latin", RuneCount: 11}, + {Low: 0, High: 10, Spaces: []int{5}, TargetScript: "Latin", RuneCount: 11}, }, RuneCount: map[string]int{ "Latin": 11, @@ -60,7 +60,7 @@ func TestAnalyzeString(t *testing.T) { opts: defaultOpts, eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 12, Spaces: []int{8, 12}, TargetScript: "Latin", RuneCount: 13}, + {Low: 0, High: 12, Spaces: []int{8, 12}, TargetScript: "Latin", RuneCount: 13}, }, RuneCount: map[string]int{ "Latin": 13, @@ -73,7 +73,7 @@ func TestAnalyzeString(t *testing.T) { opts: defaultOpts, eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 45, Spaces: []int{5, 11, 16, 21, 25, 30, 34}, TargetScript: "Latin", RuneCount: 44}, + {Low: 0, High: 45, Spaces: []int{5, 11, 16, 21, 25, 30, 34}, TargetScript: "Latin", RuneCount: 44}, }, RuneCount: map[string]int{ "Latin": 44, @@ -86,7 +86,7 @@ func TestAnalyzeString(t *testing.T) { opts: defaultOpts, eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 14, Spaces: []int{5, 10}, TargetScript: "Latin", RuneCount: 12}, + {Low: 0, High: 14, Spaces: []int{5, 10}, TargetScript: "Latin", RuneCount: 12}, }, RuneCount: map[string]int{ "Latin": 12, @@ -99,7 +99,7 @@ func TestAnalyzeString(t *testing.T) { opts: defaultOpts, eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 15, Spaces: []int{6}, TargetScript: "Hangul", RuneCount: 6}, + {Low: 0, High: 15, Spaces: []int{6}, TargetScript: "Hangul", RuneCount: 6}, }, RuneCount: map[string]int{ "Hangul": 6, @@ -112,7 +112,7 @@ func TestAnalyzeString(t *testing.T) { opts: defaultOpts, eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 20, Spaces: []int{}, TargetScript: "Hiragana", RuneCount: 7}, + {Low: 0, High: 20, Spaces: []int{}, TargetScript: "Hiragana", RuneCount: 7}, }, RuneCount: map[string]int{ "Hiragana": 7, @@ -125,7 +125,7 @@ func TestAnalyzeString(t *testing.T) { opts: defaultOpts, eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 14, Spaces: []int{}, TargetScript: "Katakana", RuneCount: 5}, + {Low: 0, High: 14, Spaces: []int{}, TargetScript: "Katakana", RuneCount: 5}, }, RuneCount: map[string]int{ "Katakana": 5, @@ -138,7 +138,7 @@ func TestAnalyzeString(t *testing.T) { opts: defaultOpts, eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 26, Spaces: []int{}, TargetScript: "Hiragana", RuneCount: 9}, + {Low: 0, High: 26, Spaces: []int{}, TargetScript: "Hiragana", RuneCount: 9}, }, RuneCount: map[string]int{ "Hiragana": 9, @@ -151,7 +151,7 @@ func TestAnalyzeString(t *testing.T) { opts: defaultOpts, eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 35, Spaces: []int{}, TargetScript: "Hiragana", RuneCount: 12}, + {Low: 0, High: 35, Spaces: []int{}, TargetScript: "Hiragana", RuneCount: 12}, }, RuneCount: map[string]int{ "Hiragana": 12, @@ -164,7 +164,7 @@ func TestAnalyzeString(t *testing.T) { opts: defaultOpts, eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 36, Spaces: []int{27}, TargetScript: "Hiragana", RuneCount: 13}, + {Low: 0, High: 36, Spaces: []int{27}, TargetScript: "Hiragana", RuneCount: 13}, }, RuneCount: map[string]int{ "Hiragana": 13, @@ -177,7 +177,7 @@ func TestAnalyzeString(t *testing.T) { opts: defaultOpts, eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 45, Spaces: []int{21}, TargetScript: "Devanagari", RuneCount: 16}, + {Low: 0, High: 45, Spaces: []int{21}, TargetScript: "Devanagari", RuneCount: 16}, }, RuneCount: map[string]int{ "Devanagari": 16, @@ -190,9 +190,9 @@ func TestAnalyzeString(t *testing.T) { opts: defaultOpts, eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 5, Spaces: []int{5}, TargetScript: "Latin", RuneCount: 6}, - ScriptRange{Low: 6, High: 12, Spaces: []int{12}, TargetScript: "Hangul", RuneCount: 3}, - ScriptRange{Low: 13, High: 24, Spaces: []int{19}, TargetScript: "Han", RuneCount: 5}, // 🚀 and ! are "Common" script and will be merged with "Han" + {Low: 0, High: 5, Spaces: []int{5}, TargetScript: "Latin", RuneCount: 6}, + {Low: 6, High: 12, Spaces: []int{12}, TargetScript: "Hangul", RuneCount: 3}, + {Low: 13, High: 24, Spaces: []int{19}, TargetScript: "Han", RuneCount: 5}, // 🚀 and ! are "Common" script and will be merged with "Han" }, RuneCount: map[string]int{ "Latin": 6, @@ -207,7 +207,7 @@ func TestAnalyzeString(t *testing.T) { opts: defaultOpts, eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 5, Spaces: []int{}, TargetScript: "Latin", RuneCount: 5}, + {Low: 0, High: 5, Spaces: []int{}, TargetScript: "Latin", RuneCount: 5}, }, RuneCount: map[string]int{ "Latin": 5, @@ -220,7 +220,7 @@ func TestAnalyzeString(t *testing.T) { opts: defaultOpts, eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 5, Spaces: []int{2}, TargetScript: "Latin", RuneCount: 4}, + {Low: 0, High: 5, Spaces: []int{2}, TargetScript: "Latin", RuneCount: 4}, }, RuneCount: map[string]int{ "Latin": 4, @@ -233,7 +233,7 @@ func TestAnalyzeString(t *testing.T) { opts: defaultOpts, eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 28, Spaces: []int{14}, TargetScript: "_unknown", RuneCount: 15}, + {Low: 0, High: 28, Spaces: []int{14}, TargetScript: "_unknown", RuneCount: 15}, }, RuneCount: map[string]int{ "_unknown": 15, @@ -246,8 +246,8 @@ func TestAnalyzeString(t *testing.T) { opts: defaultOpts, eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 5, Spaces: []int{5}, TargetScript: "Latin", RuneCount: 6}, - ScriptRange{Low: 6, High: 19, Spaces: []int{}, TargetScript: "_unknown", RuneCount: 7}, + {Low: 0, High: 5, Spaces: []int{5}, TargetScript: "Latin", RuneCount: 6}, + {Low: 6, High: 19, Spaces: []int{}, TargetScript: "_unknown", RuneCount: 7}, }, RuneCount: map[string]int{ "Latin": 6, @@ -261,7 +261,7 @@ func TestAnalyzeString(t *testing.T) { opts: defaultOpts, eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 16, Spaces: []int{0, 6, 16}, TargetScript: "Latin", RuneCount: 17}, + {Low: 0, High: 16, Spaces: []int{0, 6, 16}, TargetScript: "Latin", RuneCount: 17}, }, RuneCount: map[string]int{ "Latin": 17, @@ -304,9 +304,9 @@ func TestAnalyzeStringRaw(t *testing.T) { input: inputs[0], eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 4, Spaces: []int{}, TargetScript: "Latin", RuneCount: 5}, - ScriptRange{Low: 5, High: 5, Spaces: []int{5}, TargetScript: "Common", RuneCount: 1}, - ScriptRange{Low: 6, High: 10, Spaces: []int{}, TargetScript: "Latin", RuneCount: 5}, + {Low: 0, High: 4, Spaces: []int{}, TargetScript: "Latin", RuneCount: 5}, + {Low: 5, High: 5, Spaces: []int{5}, TargetScript: "Common", RuneCount: 1}, + {Low: 6, High: 10, Spaces: []int{}, TargetScript: "Latin", RuneCount: 5}, }, RuneCount: map[string]int{ "Latin": 10, @@ -319,10 +319,10 @@ func TestAnalyzeStringRaw(t *testing.T) { input: inputs[1], eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 7, Spaces: []int{}, TargetScript: "Latin", RuneCount: 8}, - ScriptRange{Low: 8, High: 8, Spaces: []int{8}, TargetScript: "Common", RuneCount: 1}, - ScriptRange{Low: 9, High: 11, Spaces: []int{}, TargetScript: "Latin", RuneCount: 3}, - ScriptRange{Low: 12, High: 12, Spaces: []int{12}, TargetScript: "Common", RuneCount: 1}, + {Low: 0, High: 7, Spaces: []int{}, TargetScript: "Latin", RuneCount: 8}, + {Low: 8, High: 8, Spaces: []int{8}, TargetScript: "Common", RuneCount: 1}, + {Low: 9, High: 11, Spaces: []int{}, TargetScript: "Latin", RuneCount: 3}, + {Low: 12, High: 12, Spaces: []int{12}, TargetScript: "Common", RuneCount: 1}, }, RuneCount: map[string]int{ "Latin": 11, @@ -335,16 +335,16 @@ func TestAnalyzeStringRaw(t *testing.T) { input: inputs[2], eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 4, Spaces: []int{}, TargetScript: "Latin", RuneCount: 5}, - ScriptRange{Low: 5, High: 5, Spaces: []int{5}, TargetScript: "Common", RuneCount: 1}, - ScriptRange{Low: 6, High: 9, Spaces: []int{}, TargetScript: "Latin", RuneCount: 4}, - ScriptRange{Low: 10, High: 21, Spaces: []int{11, 16, 21}, TargetScript: "Common", RuneCount: 11}, // £ takes 2 bytes - ScriptRange{Low: 22, High: 24, Spaces: []int{}, TargetScript: "Latin", RuneCount: 3}, - ScriptRange{Low: 25, High: 30, Spaces: []int{25, 30}, TargetScript: "Common", RuneCount: 5}, // ¥ takes 2 bytes - ScriptRange{Low: 31, High: 33, Spaces: []int{}, TargetScript: "Latin", RuneCount: 3}, - ScriptRange{Low: 34, High: 34, Spaces: []int{34}, TargetScript: "Common", RuneCount: 1}, - ScriptRange{Low: 35, High: 44, Spaces: []int{}, TargetScript: "Latin", RuneCount: 10}, - ScriptRange{Low: 45, High: 45, Spaces: []int{}, TargetScript: "Common", RuneCount: 1}, + {Low: 0, High: 4, Spaces: []int{}, TargetScript: "Latin", RuneCount: 5}, + {Low: 5, High: 5, Spaces: []int{5}, TargetScript: "Common", RuneCount: 1}, + {Low: 6, High: 9, Spaces: []int{}, TargetScript: "Latin", RuneCount: 4}, + {Low: 10, High: 21, Spaces: []int{11, 16, 21}, TargetScript: "Common", RuneCount: 11}, // £ takes 2 bytes + {Low: 22, High: 24, Spaces: []int{}, TargetScript: "Latin", RuneCount: 3}, + {Low: 25, High: 30, Spaces: []int{25, 30}, TargetScript: "Common", RuneCount: 5}, // ¥ takes 2 bytes + {Low: 31, High: 33, Spaces: []int{}, TargetScript: "Latin", RuneCount: 3}, + {Low: 34, High: 34, Spaces: []int{34}, TargetScript: "Common", RuneCount: 1}, + {Low: 35, High: 44, Spaces: []int{}, TargetScript: "Latin", RuneCount: 10}, + {Low: 45, High: 45, Spaces: []int{}, TargetScript: "Common", RuneCount: 1}, }, RuneCount: map[string]int{ "Latin": 25, @@ -357,10 +357,10 @@ func TestAnalyzeStringRaw(t *testing.T) { input: inputs[3], eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 4, Spaces: []int{}, TargetScript: "Latin", RuneCount: 5}, - ScriptRange{Low: 5, High: 5, Spaces: []int{5}, TargetScript: "Common", RuneCount: 1}, - ScriptRange{Low: 6, High: 9, Spaces: []int{}, TargetScript: "Latin", RuneCount: 4}, - ScriptRange{Low: 10, High: 14, Spaces: []int{10}, TargetScript: "Common", RuneCount: 2}, + {Low: 0, High: 4, Spaces: []int{}, TargetScript: "Latin", RuneCount: 5}, + {Low: 5, High: 5, Spaces: []int{5}, TargetScript: "Common", RuneCount: 1}, + {Low: 6, High: 9, Spaces: []int{}, TargetScript: "Latin", RuneCount: 4}, + {Low: 10, High: 14, Spaces: []int{10}, TargetScript: "Common", RuneCount: 2}, }, RuneCount: map[string]int{ "Latin": 9, @@ -373,9 +373,9 @@ func TestAnalyzeStringRaw(t *testing.T) { input: inputs[4], eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 5, Spaces: []int{}, TargetScript: "Hangul", RuneCount: 2}, - ScriptRange{Low: 6, High: 6, Spaces: []int{6}, TargetScript: "Common", RuneCount: 1}, - ScriptRange{Low: 7, High: 15, Spaces: []int{}, TargetScript: "Hangul", RuneCount: 3}, + {Low: 0, High: 5, Spaces: []int{}, TargetScript: "Hangul", RuneCount: 2}, + {Low: 6, High: 6, Spaces: []int{6}, TargetScript: "Common", RuneCount: 1}, + {Low: 7, High: 15, Spaces: []int{}, TargetScript: "Hangul", RuneCount: 3}, }, RuneCount: map[string]int{ "Hangul": 5, @@ -388,9 +388,9 @@ func TestAnalyzeStringRaw(t *testing.T) { input: inputs[5], eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 8, Spaces: []int{}, TargetScript: "Han", RuneCount: 3}, - ScriptRange{Low: 9, High: 11, Spaces: []int{}, TargetScript: "Hiragana", RuneCount: 1}, - ScriptRange{Low: 12, High: 20, Spaces: []int{}, TargetScript: "Han", RuneCount: 3}, + {Low: 0, High: 8, Spaces: []int{}, TargetScript: "Han", RuneCount: 3}, + {Low: 9, High: 11, Spaces: []int{}, TargetScript: "Hiragana", RuneCount: 1}, + {Low: 12, High: 20, Spaces: []int{}, TargetScript: "Han", RuneCount: 3}, }, RuneCount: map[string]int{ "Hiragana": 1, @@ -403,10 +403,10 @@ func TestAnalyzeStringRaw(t *testing.T) { input: inputs[6], eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 2, Spaces: []int{}, TargetScript: "Katakana", RuneCount: 1}, - ScriptRange{Low: 3, High: 5, Spaces: []int{}, TargetScript: "Common", RuneCount: 1}, // ー U+30FC (KATAKANA-HIRAGANA PROLONGED SOUND MARK) seems to be counted as Common - ScriptRange{Low: 6, High: 11, Spaces: []int{}, TargetScript: "Katakana", RuneCount: 2}, - ScriptRange{Low: 12, High: 14, Spaces: []int{}, TargetScript: "Han", RuneCount: 1}, + {Low: 0, High: 2, Spaces: []int{}, TargetScript: "Katakana", RuneCount: 1}, + {Low: 3, High: 5, Spaces: []int{}, TargetScript: "Common", RuneCount: 1}, // ー U+30FC (KATAKANA-HIRAGANA PROLONGED SOUND MARK) seems to be counted as Common + {Low: 6, High: 11, Spaces: []int{}, TargetScript: "Katakana", RuneCount: 2}, + {Low: 12, High: 14, Spaces: []int{}, TargetScript: "Han", RuneCount: 1}, }, RuneCount: map[string]int{ "Katakana": 3, @@ -420,10 +420,10 @@ func TestAnalyzeStringRaw(t *testing.T) { input: inputs[7], eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 2, Spaces: []int{}, TargetScript: "Han", RuneCount: 1}, - ScriptRange{Low: 3, High: 5, Spaces: []int{}, TargetScript: "Hiragana", RuneCount: 1}, - ScriptRange{Low: 6, High: 20, Spaces: []int{}, TargetScript: "Katakana", RuneCount: 5}, - ScriptRange{Low: 21, High: 26, Spaces: []int{}, TargetScript: "Hiragana", RuneCount: 2}, + {Low: 0, High: 2, Spaces: []int{}, TargetScript: "Han", RuneCount: 1}, + {Low: 3, High: 5, Spaces: []int{}, TargetScript: "Hiragana", RuneCount: 1}, + {Low: 6, High: 20, Spaces: []int{}, TargetScript: "Katakana", RuneCount: 5}, + {Low: 21, High: 26, Spaces: []int{}, TargetScript: "Hiragana", RuneCount: 2}, }, RuneCount: map[string]int{ "Han": 1, @@ -437,12 +437,12 @@ func TestAnalyzeStringRaw(t *testing.T) { input: inputs[8], eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 5, Spaces: []int{}, TargetScript: "Katakana", RuneCount: 2}, - ScriptRange{Low: 6, High: 8, Spaces: []int{}, TargetScript: "Common", RuneCount: 1}, - ScriptRange{Low: 9, High: 11, Spaces: []int{}, TargetScript: "Han", RuneCount: 1}, - ScriptRange{Low: 12, High: 14, Spaces: []int{}, TargetScript: "Hiragana", RuneCount: 1}, - ScriptRange{Low: 15, High: 29, Spaces: []int{}, TargetScript: "Katakana", RuneCount: 5}, - ScriptRange{Low: 30, High: 35, Spaces: []int{}, TargetScript: "Hiragana", RuneCount: 2}, + {Low: 0, High: 5, Spaces: []int{}, TargetScript: "Katakana", RuneCount: 2}, + {Low: 6, High: 8, Spaces: []int{}, TargetScript: "Common", RuneCount: 1}, + {Low: 9, High: 11, Spaces: []int{}, TargetScript: "Han", RuneCount: 1}, + {Low: 12, High: 14, Spaces: []int{}, TargetScript: "Hiragana", RuneCount: 1}, + {Low: 15, High: 29, Spaces: []int{}, TargetScript: "Katakana", RuneCount: 5}, + {Low: 30, High: 35, Spaces: []int{}, TargetScript: "Hiragana", RuneCount: 2}, }, RuneCount: map[string]int{ "Han": 1, @@ -457,13 +457,13 @@ func TestAnalyzeStringRaw(t *testing.T) { input: inputs[9], eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 2, Spaces: []int{}, TargetScript: "Han", RuneCount: 1}, - ScriptRange{Low: 3, High: 5, Spaces: []int{}, TargetScript: "Hiragana", RuneCount: 1}, - ScriptRange{Low: 6, High: 20, Spaces: []int{}, TargetScript: "Katakana", RuneCount: 5}, - ScriptRange{Low: 21, High: 26, Spaces: []int{}, TargetScript: "Hiragana", RuneCount: 2}, - ScriptRange{Low: 27, High: 27, Spaces: []int{27}, TargetScript: "Common", RuneCount: 1}, - ScriptRange{Low: 28, High: 33, Spaces: []int{}, TargetScript: "Katakana", RuneCount: 2}, - ScriptRange{Low: 34, High: 36, Spaces: []int{}, TargetScript: "Common", RuneCount: 1}, + {Low: 0, High: 2, Spaces: []int{}, TargetScript: "Han", RuneCount: 1}, + {Low: 3, High: 5, Spaces: []int{}, TargetScript: "Hiragana", RuneCount: 1}, + {Low: 6, High: 20, Spaces: []int{}, TargetScript: "Katakana", RuneCount: 5}, + {Low: 21, High: 26, Spaces: []int{}, TargetScript: "Hiragana", RuneCount: 2}, + {Low: 27, High: 27, Spaces: []int{27}, TargetScript: "Common", RuneCount: 1}, + {Low: 28, High: 33, Spaces: []int{}, TargetScript: "Katakana", RuneCount: 2}, + {Low: 34, High: 36, Spaces: []int{}, TargetScript: "Common", RuneCount: 1}, }, RuneCount: map[string]int{ "Han": 1, @@ -478,9 +478,9 @@ func TestAnalyzeStringRaw(t *testing.T) { input: inputs[10], eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 20, Spaces: []int{}, TargetScript: "Devanagari", RuneCount: 7}, - ScriptRange{Low: 21, High: 21, Spaces: []int{21}, TargetScript: "Common", RuneCount: 1}, - ScriptRange{Low: 22, High: 45, Spaces: []int{}, TargetScript: "Devanagari", RuneCount: 8}, + {Low: 0, High: 20, Spaces: []int{}, TargetScript: "Devanagari", RuneCount: 7}, + {Low: 21, High: 21, Spaces: []int{21}, TargetScript: "Common", RuneCount: 1}, + {Low: 22, High: 45, Spaces: []int{}, TargetScript: "Devanagari", RuneCount: 8}, }, RuneCount: map[string]int{ "Devanagari": 15, @@ -493,12 +493,12 @@ func TestAnalyzeStringRaw(t *testing.T) { input: inputs[11], eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 4, Spaces: []int{}, TargetScript: "Latin", RuneCount: 5}, - ScriptRange{Low: 5, High: 5, Spaces: []int{5}, TargetScript: "Common", RuneCount: 1}, - ScriptRange{Low: 6, High: 11, Spaces: []int{}, TargetScript: "Hangul", RuneCount: 2}, - ScriptRange{Low: 12, High: 12, Spaces: []int{12}, TargetScript: "Common", RuneCount: 1}, - ScriptRange{Low: 13, High: 18, Spaces: []int{}, TargetScript: "Han", RuneCount: 2}, - ScriptRange{Low: 19, High: 24, Spaces: []int{19}, TargetScript: "Common", RuneCount: 3}, + {Low: 0, High: 4, Spaces: []int{}, TargetScript: "Latin", RuneCount: 5}, + {Low: 5, High: 5, Spaces: []int{5}, TargetScript: "Common", RuneCount: 1}, + {Low: 6, High: 11, Spaces: []int{}, TargetScript: "Hangul", RuneCount: 2}, + {Low: 12, High: 12, Spaces: []int{12}, TargetScript: "Common", RuneCount: 1}, + {Low: 13, High: 18, Spaces: []int{}, TargetScript: "Han", RuneCount: 2}, + {Low: 19, High: 24, Spaces: []int{19}, TargetScript: "Common", RuneCount: 3}, }, RuneCount: map[string]int{ "Latin": 5, @@ -513,11 +513,11 @@ func TestAnalyzeStringRaw(t *testing.T) { input: inputs[12], eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 0, Spaces: []int{}, TargetScript: "Common", RuneCount: 1}, - ScriptRange{Low: 1, High: 1, Spaces: []int{}, TargetScript: "Latin", RuneCount: 1}, - ScriptRange{Low: 2, High: 3, Spaces: []int{}, TargetScript: "Inherited", RuneCount: 1}, - ScriptRange{Low: 4, High: 4, Spaces: []int{}, TargetScript: "Latin", RuneCount: 1}, - ScriptRange{Low: 5, High: 5, Spaces: []int{}, TargetScript: "Common", RuneCount: 1}, + {Low: 0, High: 0, Spaces: []int{}, TargetScript: "Common", RuneCount: 1}, + {Low: 1, High: 1, Spaces: []int{}, TargetScript: "Latin", RuneCount: 1}, + {Low: 2, High: 3, Spaces: []int{}, TargetScript: "Inherited", RuneCount: 1}, + {Low: 4, High: 4, Spaces: []int{}, TargetScript: "Latin", RuneCount: 1}, + {Low: 5, High: 5, Spaces: []int{}, TargetScript: "Common", RuneCount: 1}, }, RuneCount: map[string]int{ "Latin": 2, @@ -531,10 +531,10 @@ func TestAnalyzeStringRaw(t *testing.T) { input: inputs[13], // ä and a + ¨ eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 1, Spaces: []int{}, TargetScript: "Latin", RuneCount: 1}, - ScriptRange{Low: 2, High: 2, Spaces: []int{2}, TargetScript: "Common", RuneCount: 1}, - ScriptRange{Low: 3, High: 3, Spaces: []int{}, TargetScript: "Latin", RuneCount: 1}, - ScriptRange{Low: 4, High: 5, Spaces: []int{}, TargetScript: "Inherited", RuneCount: 1}, + {Low: 0, High: 1, Spaces: []int{}, TargetScript: "Latin", RuneCount: 1}, + {Low: 2, High: 2, Spaces: []int{2}, TargetScript: "Common", RuneCount: 1}, + {Low: 3, High: 3, Spaces: []int{}, TargetScript: "Latin", RuneCount: 1}, + {Low: 4, High: 5, Spaces: []int{}, TargetScript: "Inherited", RuneCount: 1}, }, RuneCount: map[string]int{ "Latin": 2, @@ -548,9 +548,9 @@ func TestAnalyzeStringRaw(t *testing.T) { input: inputs[14], // cyrillic script isn't part of our default eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 13, Spaces: []int{}, TargetScript: "_unknown", RuneCount: 7}, - ScriptRange{Low: 14, High: 14, Spaces: []int{14}, TargetScript: "Common", RuneCount: 1}, - ScriptRange{Low: 15, High: 28, Spaces: []int{}, TargetScript: "_unknown", RuneCount: 7}, + {Low: 0, High: 13, Spaces: []int{}, TargetScript: "_unknown", RuneCount: 7}, + {Low: 14, High: 14, Spaces: []int{14}, TargetScript: "Common", RuneCount: 1}, + {Low: 15, High: 28, Spaces: []int{}, TargetScript: "_unknown", RuneCount: 7}, }, RuneCount: map[string]int{ "_unknown": 14, @@ -563,9 +563,9 @@ func TestAnalyzeStringRaw(t *testing.T) { input: inputs[15], // latin + cyrillic (cyrillic script isn't part of our default) eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 4, Spaces: []int{}, TargetScript: "Latin", RuneCount: 5}, - ScriptRange{Low: 5, High: 5, Spaces: []int{5}, TargetScript: "Common", RuneCount: 1}, - ScriptRange{Low: 6, High: 19, Spaces: []int{}, TargetScript: "_unknown", RuneCount: 7}, + {Low: 0, High: 4, Spaces: []int{}, TargetScript: "Latin", RuneCount: 5}, + {Low: 5, High: 5, Spaces: []int{5}, TargetScript: "Common", RuneCount: 1}, + {Low: 6, High: 19, Spaces: []int{}, TargetScript: "_unknown", RuneCount: 7}, }, RuneCount: map[string]int{ "Latin": 5, @@ -579,11 +579,11 @@ func TestAnalyzeStringRaw(t *testing.T) { input: inputs[16], eOut: TextAnalysis{ ScriptRanges: []ScriptRange{ - ScriptRange{Low: 0, High: 0, Spaces: []int{0}, TargetScript: "Common", RuneCount: 1}, - ScriptRange{Low: 1, High: 5, Spaces: []int{}, TargetScript: "Latin", RuneCount: 5}, - ScriptRange{Low: 6, High: 6, Spaces: []int{6}, TargetScript: "Common", RuneCount: 1}, - ScriptRange{Low: 7, High: 15, Spaces: []int{}, TargetScript: "Latin", RuneCount: 9}, - ScriptRange{Low: 16, High: 16, Spaces: []int{16}, TargetScript: "Common", RuneCount: 1}, + {Low: 0, High: 0, Spaces: []int{0}, TargetScript: "Common", RuneCount: 1}, + {Low: 1, High: 5, Spaces: []int{}, TargetScript: "Latin", RuneCount: 5}, + {Low: 6, High: 6, Spaces: []int{6}, TargetScript: "Common", RuneCount: 1}, + {Low: 7, High: 15, Spaces: []int{}, TargetScript: "Latin", RuneCount: 9}, + {Low: 16, High: 16, Spaces: []int{16}, TargetScript: "Common", RuneCount: 1}, }, RuneCount: map[string]int{ "Latin": 14, diff --git a/services/thumbnails/pkg/service/grpc/v0/decorators/base.go b/services/thumbnails/pkg/service/grpc/v0/decorators/base.go index 040d2f922a..c43d393dec 100644 --- a/services/thumbnails/pkg/service/grpc/v0/decorators/base.go +++ b/services/thumbnails/pkg/service/grpc/v0/decorators/base.go @@ -22,20 +22,22 @@ type DecoratedService interface { // // Expected implementations will be like: // ``` -// type MyDecorator struct { -// Decorator -// myCustomOpts *opts -// additionalSrv *srv -// } // -// func NewMyDecorator(next DecoratedService, customOpts *customOpts) DecoratedService { -// ..... -// return MyDecorator{ -// Decorator: Decorator{next: next}, -// myCustomOpts: opts, -// additionalSrv: srv, -// } -// } +// type MyDecorator struct { +// Decorator +// myCustomOpts *opts +// additionalSrv *srv +// } +// +// func NewMyDecorator(next DecoratedService, customOpts *customOpts) DecoratedService { +// ..... +// return MyDecorator{ +// Decorator: Decorator{next: next}, +// myCustomOpts: opts, +// additionalSrv: srv, +// } +// } +// // ``` type Decorator struct { next DecoratedService @@ -47,12 +49,14 @@ type Decorator struct { // Your custom decorator is expected to overwrite this function, // but it MUST call the underlying decoratedService at some point // ``` -// func (d MyDecorator) GetThumbnail(ctx context.Context, req *thumbnailssvc.GetThumbnailRequest, resp *thumbnailssvc.GetThumbnailResponse) error { -// doSomething() -// err := d.next.GetThumbnail(ctx, req, resp) -// doAnotherThing() -// return err -// } +// +// func (d MyDecorator) GetThumbnail(ctx context.Context, req *thumbnailssvc.GetThumbnailRequest, resp *thumbnailssvc.GetThumbnailResponse) error { +// doSomething() +// err := d.next.GetThumbnail(ctx, req, resp) +// doAnotherThing() +// return err +// } +// // ``` func (deco Decorator) GetThumbnail(ctx context.Context, req *thumbnailssvc.GetThumbnailRequest, resp *thumbnailssvc.GetThumbnailResponse) error { return deco.next.GetThumbnail(ctx, req, resp) diff --git a/services/webdav/pkg/prop/prop.go b/services/webdav/pkg/prop/prop.go index b34ce19fe8..e61b68ddc1 100644 --- a/services/webdav/pkg/prop/prop.go +++ b/services/webdav/pkg/prop/prop.go @@ -97,9 +97,12 @@ func Next(d *xml.Decoder) (xml.Token, error) { } // ActiveLock holds active lock xml data -// http://www.webdav.org/specs/rfc4918.html#ELEMENT_activelock +// +// http://www.webdav.org/specs/rfc4918.html#ELEMENT_activelock +// // +// +// locktoken?, lockroot)> type ActiveLock struct { XMLName xml.Name `xml:"activelock"` Exclusive *struct{} `xml:"lockscope>exclusive,omitempty"` From 330e30c38e860eee2719e6c430d385f49de168d9 Mon Sep 17 00:00:00 2001 From: case0sh Date: Fri, 6 Oct 2023 10:43:02 +0200 Subject: [PATCH 5/7] revert all changes to idp --- .../idp/pkg/backends/cs3/bootstrap/cs3.go | 4 +- .../idp/pkg/backends/cs3/identifier/cs3.go | 24 +- services/idp/pkg/config/config.go | 2 + .../idp/pkg/config/defaults/defaultconfig.go | 3 + services/idp/pkg/config/parser/parse.go | 4 + services/idp/pkg/service/v0/service.go | 7 +- services/idp/pnpm-lock.yaml | 622 +++++++++--------- 7 files changed, 341 insertions(+), 325 deletions(-) diff --git a/services/idp/pkg/backends/cs3/bootstrap/cs3.go b/services/idp/pkg/backends/cs3/bootstrap/cs3.go index 6eb1af132c..24bc638d11 100644 --- a/services/idp/pkg/backends/cs3/bootstrap/cs3.go +++ b/services/idp/pkg/backends/cs3/bootstrap/cs3.go @@ -19,12 +19,13 @@ package bootstrap import ( "fmt" + "os" + "github.com/libregraph/lico/bootstrap" "github.com/libregraph/lico/identifier" "github.com/libregraph/lico/identity" "github.com/libregraph/lico/identity/managers" cs3 "github.com/owncloud/ocis/v2/services/idp/pkg/backends/cs3/identifier" - "os" ) // Identity managers. @@ -73,6 +74,7 @@ func NewIdentityManager(bs bootstrap.Bootstrap) (identity.Manager, error) { config.TLSClientConfig, // FIXME add a map[string]interface{} property to the lico config.Config so backends can pass custom config parameters through the bootstrap process os.Getenv("CS3_GATEWAY"), + os.Getenv("CS3_MACHINE_AUTH_API_KEY"), config.Settings.Insecure, ) if identifierErr != nil { diff --git a/services/idp/pkg/backends/cs3/identifier/cs3.go b/services/idp/pkg/backends/cs3/identifier/cs3.go index 3bb26a73e5..2370a0734c 100644 --- a/services/idp/pkg/backends/cs3/identifier/cs3.go +++ b/services/idp/pkg/backends/cs3/identifier/cs3.go @@ -33,10 +33,11 @@ var cs3SpportedScopes = []string{ type CS3Backend struct { supportedScopes []string - logger logrus.FieldLogger - tlsConfig *tls.Config - gatewayURI string - insecure bool + logger logrus.FieldLogger + tlsConfig *tls.Config + gatewayURI string + machineAuthAPIKey string + insecure bool sessions cmap.ConcurrentMap @@ -48,6 +49,7 @@ func NewCS3Backend( c *config.Config, tlsConfig *tls.Config, gatewayURI string, + machineAuthAPIKey string, insecure bool, ) (*CS3Backend, error) { @@ -58,10 +60,11 @@ func NewCS3Backend( b := &CS3Backend{ supportedScopes: supportedScopes, - logger: c.Logger, - tlsConfig: tlsConfig, - gatewayURI: gatewayURI, - insecure: insecure, + logger: c.Logger, + tlsConfig: tlsConfig, + gatewayURI: gatewayURI, + machineAuthAPIKey: machineAuthAPIKey, + insecure: insecure, sessions: cmap.New(), } @@ -154,8 +157,9 @@ func (b *CS3Backend) ResolveUserByUsername(ctx context.Context, username string) client := cs3gateway.NewGatewayAPIClient(l) res, err := client.Authenticate(ctx, &cs3gateway.AuthenticateRequest{ - Type: "machine", - ClientId: "username:" + username, + Type: "machine", + ClientId: "username:" + username, + ClientSecret: b.machineAuthAPIKey, }) if err != nil { return nil, fmt.Errorf("cs3 backend machine authenticate rpc error: %v", err) diff --git a/services/idp/pkg/config/config.go b/services/idp/pkg/config/config.go index c75f24e33d..2ffc1eb0a9 100644 --- a/services/idp/pkg/config/config.go +++ b/services/idp/pkg/config/config.go @@ -20,6 +20,8 @@ type Config struct { Reva *shared.Reva `yaml:"reva"` + MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY;IDP_MACHINE_AUTH_API_KEY" desc:"Machine auth API key used to validate internal requests necessary for the access to resources from other services."` + Asset Asset `yaml:"asset"` IDP Settings `yaml:"idp"` Clients []Client `yaml:"clients"` diff --git a/services/idp/pkg/config/defaults/defaultconfig.go b/services/idp/pkg/config/defaults/defaultconfig.go index 264b8c29ce..ac0d15bf5d 100644 --- a/services/idp/pkg/config/defaults/defaultconfig.go +++ b/services/idp/pkg/config/defaults/defaultconfig.go @@ -159,6 +159,9 @@ func EnsureDefaults(cfg *config.Config) { cfg.Reva = structs.CopyOrZeroValue(cfg.Commons.Reva) } + if cfg.MachineAuthAPIKey == "" && cfg.Commons != nil && cfg.Commons.MachineAuthAPIKey != "" { + cfg.MachineAuthAPIKey = cfg.Commons.MachineAuthAPIKey + } } // Sanitize sanitizes the configuration diff --git a/services/idp/pkg/config/parser/parse.go b/services/idp/pkg/config/parser/parse.go index b13a2c9679..3939baccdb 100644 --- a/services/idp/pkg/config/parser/parse.go +++ b/services/idp/pkg/config/parser/parse.go @@ -35,6 +35,10 @@ func ParseConfig(cfg *config.Config) error { func Validate(cfg *config.Config) error { switch cfg.IDP.IdentityManager { + case "cs3": + if cfg.MachineAuthAPIKey == "" { + return shared.MissingMachineAuthApiKeyError(cfg.Service.Name) + } case "ldap": if cfg.Ldap.BindPassword == "" { return shared.MissingLDAPBindPassword(cfg.Service.Name) diff --git a/services/idp/pkg/service/v0/service.go b/services/idp/pkg/service/v0/service.go index a8e7b14e9f..7aabdad7f8 100644 --- a/services/idp/pkg/service/v0/service.go +++ b/services/idp/pkg/service/v0/service.go @@ -57,7 +57,7 @@ func NewService(opts ...Option) Service { switch options.Config.IDP.IdentityManager { case "cs3": cs3BackendSupport.MustRegister() - if err := initCS3EnvVars(options.Config.Reva.Address); err != nil { + if err := initCS3EnvVars(options.Config.Reva.Address, options.Config.MachineAuthAPIKey); err != nil { logger.Fatal().Err(err).Msg("could not initialize cs3 backend env vars") } case "ldap": @@ -152,9 +152,10 @@ func createTemporaryClientsConfig(filePath, ocisURL string, clients []config.Cli } // Init cs3 backend vars which are currently not accessible via idp api -func initCS3EnvVars(cs3Addr string) error { +func initCS3EnvVars(cs3Addr, machineAuthAPIKey string) error { defaults := map[string]string{ - "CS3_GATEWAY": cs3Addr, + "CS3_GATEWAY": cs3Addr, + "CS3_MACHINE_AUTH_API_KEY": machineAuthAPIKey, } for k, v := range defaults { diff --git a/services/idp/pnpm-lock.yaml b/services/idp/pnpm-lock.yaml index 957d87300e..7f272d763c 100644 --- a/services/idp/pnpm-lock.yaml +++ b/services/idp/pnpm-lock.yaml @@ -204,19 +204,19 @@ devDependencies: version: 1.7.0(typescript@4.9.5) postcss-flexbugs-fixes: specifier: 5.0.2 - version: 5.0.2(postcss@8.4.31) + version: 5.0.2(postcss@8.4.29) postcss-loader: specifier: 4.3.0 - version: 4.3.0(postcss@8.4.31)(webpack@4.47.0) + version: 4.3.0(postcss@8.4.29)(webpack@4.47.0) postcss-normalize: specifier: 10.0.1 - version: 10.0.1(browserslist@4.21.10)(postcss@8.4.31) + version: 10.0.1(browserslist@4.21.10)(postcss@8.4.29) postcss-preset-env: specifier: 9.1.2 - version: 9.1.2(postcss@8.4.31) + version: 9.1.2(postcss@8.4.29) postcss-safe-parser: specifier: 6.0.0 - version: 6.0.0(postcss@8.4.31) + version: 6.0.0(postcss@8.4.29) react-dev-utils: specifier: ^12.0.1 version: 12.0.1(eslint@7.32.0)(typescript@4.9.5)(webpack@4.47.0) @@ -1734,18 +1734,18 @@ packages: resolution: {integrity: sha512-M0qqxAcwCsIVfpFQSlGN5XjXWu8l5JDZN+fPt1LeW5SZexQTgnaEvgXAY+CeygRw0EeppWHi12JxESWiWrB0Sg==} dev: true - /@csstools/postcss-cascade-layers@4.0.0(postcss@8.4.31): + /@csstools/postcss-cascade-layers@4.0.0(postcss@8.4.29): resolution: {integrity: sha512-dVPVVqQG0FixjM9CG/+8eHTsCAxRKqmNh6H69IpruolPlnEF1611f2AoLK8TijTSAsqBSclKd4WHs1KUb/LdJw==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: '@csstools/selector-specificity': 3.0.0(postcss-selector-parser@6.0.13) - postcss: 8.4.31 + postcss: 8.4.29 postcss-selector-parser: 6.0.13 dev: true - /@csstools/postcss-color-function@3.0.3(postcss@8.4.31): + /@csstools/postcss-color-function@3.0.3(postcss@8.4.29): resolution: {integrity: sha512-5oNUbO89SX7BuSB0ZiUxDaQt4R2K3A+RQZlxNHOvghZJO/UqgomLPII6JkgrywLQ0Y4JDzbyNuwr0OKo2v0RsQ==} engines: {node: ^14 || ^16 || >=18} peerDependencies: @@ -1754,11 +1754,11 @@ packages: '@csstools/css-color-parser': 1.3.1(@csstools/css-parser-algorithms@2.3.1)(@csstools/css-tokenizer@2.2.0) '@csstools/css-parser-algorithms': 2.3.1(@csstools/css-tokenizer@2.2.0) '@csstools/css-tokenizer': 2.2.0 - '@csstools/postcss-progressive-custom-properties': 3.0.0(postcss@8.4.31) - postcss: 8.4.31 + '@csstools/postcss-progressive-custom-properties': 3.0.0(postcss@8.4.29) + postcss: 8.4.29 dev: true - /@csstools/postcss-color-mix-function@2.0.3(postcss@8.4.31): + /@csstools/postcss-color-mix-function@2.0.3(postcss@8.4.29): resolution: {integrity: sha512-q/fv8pdRR07GAJTvemXbQ02hwVGmVcOjBJj7+gnlGrAVwSzrPEsJc8zM/EzoqVJTZtm/DwG6TWu+VJIxVpyUBg==} engines: {node: ^14 || ^16 || >=18} peerDependencies: @@ -1767,11 +1767,11 @@ packages: '@csstools/css-color-parser': 1.3.1(@csstools/css-parser-algorithms@2.3.1)(@csstools/css-tokenizer@2.2.0) '@csstools/css-parser-algorithms': 2.3.1(@csstools/css-tokenizer@2.2.0) '@csstools/css-tokenizer': 2.2.0 - '@csstools/postcss-progressive-custom-properties': 3.0.0(postcss@8.4.31) - postcss: 8.4.31 + '@csstools/postcss-progressive-custom-properties': 3.0.0(postcss@8.4.29) + postcss: 8.4.29 dev: true - /@csstools/postcss-exponential-functions@1.0.0(postcss@8.4.31): + /@csstools/postcss-exponential-functions@1.0.0(postcss@8.4.29): resolution: {integrity: sha512-FPndJ/7oGlML7/4EhLi902wGOukO0Nn37PjwOQGc0BhhjQPy3np3By4d3M8s9Cfmp9EHEKgUHRN2DQ5HLT/hTw==} engines: {node: ^14 || ^16 || >=18} peerDependencies: @@ -1780,20 +1780,20 @@ packages: '@csstools/css-calc': 1.1.3(@csstools/css-parser-algorithms@2.3.1)(@csstools/css-tokenizer@2.2.0) '@csstools/css-parser-algorithms': 2.3.1(@csstools/css-tokenizer@2.2.0) '@csstools/css-tokenizer': 2.2.0 - postcss: 8.4.31 + postcss: 8.4.29 dev: true - /@csstools/postcss-font-format-keywords@3.0.0(postcss@8.4.31): + /@csstools/postcss-font-format-keywords@3.0.0(postcss@8.4.29): resolution: {integrity: sha512-ntkGj+1uDa/u6lpjPxnkPcjJn7ChO/Kcy08YxctOZI7vwtrdYvFhmE476dq8bj1yna306+jQ9gzXIG/SWfOaRg==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true - /@csstools/postcss-gradients-interpolation-method@4.0.3(postcss@8.4.31): + /@csstools/postcss-gradients-interpolation-method@4.0.3(postcss@8.4.29): resolution: {integrity: sha512-dEK3WbajX538Zu3lPMtBPAO1pooR7zslJ1mDrWKQzlwQczls3fEz+tlRhd7KWMMlsoIwNGMIGq2W/GqEErDjkg==} engines: {node: ^14 || ^16 || >=18} peerDependencies: @@ -1802,11 +1802,11 @@ packages: '@csstools/css-color-parser': 1.3.1(@csstools/css-parser-algorithms@2.3.1)(@csstools/css-tokenizer@2.2.0) '@csstools/css-parser-algorithms': 2.3.1(@csstools/css-tokenizer@2.2.0) '@csstools/css-tokenizer': 2.2.0 - '@csstools/postcss-progressive-custom-properties': 3.0.0(postcss@8.4.31) - postcss: 8.4.31 + '@csstools/postcss-progressive-custom-properties': 3.0.0(postcss@8.4.29) + postcss: 8.4.29 dev: true - /@csstools/postcss-hwb-function@3.0.3(postcss@8.4.31): + /@csstools/postcss-hwb-function@3.0.3(postcss@8.4.29): resolution: {integrity: sha512-2TqrRD8JzSwQCRKKNc9BFhSEmsz+mR3RtwSw5mQSGILC+LIYCVWeYwC33cI+saFWv0DGZ0NXLx5VSX2tdJyU6w==} engines: {node: ^14 || ^16 || >=18} peerDependencies: @@ -1815,61 +1815,61 @@ packages: '@csstools/css-color-parser': 1.3.1(@csstools/css-parser-algorithms@2.3.1)(@csstools/css-tokenizer@2.2.0) '@csstools/css-parser-algorithms': 2.3.1(@csstools/css-tokenizer@2.2.0) '@csstools/css-tokenizer': 2.2.0 - postcss: 8.4.31 + postcss: 8.4.29 dev: true - /@csstools/postcss-ic-unit@3.0.0(postcss@8.4.31): + /@csstools/postcss-ic-unit@3.0.0(postcss@8.4.29): resolution: {integrity: sha512-FH3+zfOfsgtX332IIkRDxiYLmgwyNk49tfltpC6dsZaO4RV2zWY6x9VMIC5cjvmjlDO7DIThpzqaqw2icT8RbQ==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: - '@csstools/postcss-progressive-custom-properties': 3.0.0(postcss@8.4.31) - postcss: 8.4.31 + '@csstools/postcss-progressive-custom-properties': 3.0.0(postcss@8.4.29) + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true - /@csstools/postcss-is-pseudo-class@4.0.1(postcss@8.4.31): + /@csstools/postcss-is-pseudo-class@4.0.1(postcss@8.4.29): resolution: {integrity: sha512-KJGLbjjjg+mdNclLyCfsZaJS4xCaRaxKAnmWKpIp1FarEem3ZdoOxTlIELwvlE5BVg1t3QTmp0+DPSlLTTFMhA==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: '@csstools/selector-specificity': 3.0.0(postcss-selector-parser@6.0.13) - postcss: 8.4.31 + postcss: 8.4.29 postcss-selector-parser: 6.0.13 dev: true - /@csstools/postcss-logical-float-and-clear@2.0.0(postcss@8.4.31): + /@csstools/postcss-logical-float-and-clear@2.0.0(postcss@8.4.29): resolution: {integrity: sha512-Wki4vxsF6icRvRz8eF9bPpAvwaAt0RHwhVOyzfoFg52XiIMjb6jcbHkGxwpJXP4DVrnFEwpwmrz5aTRqOW82kg==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 dev: true - /@csstools/postcss-logical-resize@2.0.0(postcss@8.4.31): + /@csstools/postcss-logical-resize@2.0.0(postcss@8.4.29): resolution: {integrity: sha512-lCQ1aX8c5+WI4t5EoYf3alTzJNNocMqTb+u1J9CINdDhFh1fjovqK+0aHalUHsNstZmzFPNzIkU4Mb3eM9U8SA==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true - /@csstools/postcss-logical-viewport-units@2.0.1(postcss@8.4.31): + /@csstools/postcss-logical-viewport-units@2.0.1(postcss@8.4.29): resolution: {integrity: sha512-R5s19SscS7CHoxvdYNMu2Y3WDwG4JjdhsejqjunDB1GqfzhtHSvL7b5XxCkUWqm2KRl35hI6kJ4HEaCDd/3BXg==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: '@csstools/css-tokenizer': 2.2.0 - postcss: 8.4.31 + postcss: 8.4.29 dev: true - /@csstools/postcss-media-minmax@1.0.7(postcss@8.4.31): + /@csstools/postcss-media-minmax@1.0.7(postcss@8.4.29): resolution: {integrity: sha512-5LGLdu8cJgRPmvkjUNqOPKIKeHbyQmoGKooB5Rh0mp5mLaNI9bl+IjFZ2keY0cztZYsriJsGf6Lu8R5XetuwoQ==} engines: {node: ^14 || ^16 || >=18} peerDependencies: @@ -1879,10 +1879,10 @@ packages: '@csstools/css-parser-algorithms': 2.3.1(@csstools/css-tokenizer@2.2.0) '@csstools/css-tokenizer': 2.2.0 '@csstools/media-query-list-parser': 2.1.4(@csstools/css-parser-algorithms@2.3.1)(@csstools/css-tokenizer@2.2.0) - postcss: 8.4.31 + postcss: 8.4.29 dev: true - /@csstools/postcss-media-queries-aspect-ratio-number-values@2.0.2(postcss@8.4.31): + /@csstools/postcss-media-queries-aspect-ratio-number-values@2.0.2(postcss@8.4.29): resolution: {integrity: sha512-kQJR6NvTRidsaRjCdHGjra2+fLoFiDQOm5B2aZrhmXqng/hweXjruboKzB326rxQO2L0m0T+gCKbZgyuncyhLg==} engines: {node: ^14 || ^16 || >=18} peerDependencies: @@ -1891,30 +1891,30 @@ packages: '@csstools/css-parser-algorithms': 2.3.1(@csstools/css-tokenizer@2.2.0) '@csstools/css-tokenizer': 2.2.0 '@csstools/media-query-list-parser': 2.1.4(@csstools/css-parser-algorithms@2.3.1)(@csstools/css-tokenizer@2.2.0) - postcss: 8.4.31 + postcss: 8.4.29 dev: true - /@csstools/postcss-nested-calc@3.0.0(postcss@8.4.31): + /@csstools/postcss-nested-calc@3.0.0(postcss@8.4.29): resolution: {integrity: sha512-HsB66aDWAouOwD/GcfDTS0a7wCuVWaTpXcjl5VKP0XvFxDiU+r0T8FG7xgb6ovZNZ+qzvGIwRM+CLHhDgXrYgQ==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true - /@csstools/postcss-normalize-display-values@3.0.0(postcss@8.4.31): + /@csstools/postcss-normalize-display-values@3.0.0(postcss@8.4.29): resolution: {integrity: sha512-6Nw55PRXEKEVqn3bzA8gRRPYxr5tf5PssvcE5DRA/nAxKgKtgNZMCHCSd1uxTCWeyLnkf6h5tYRSB0P1Vh/K/A==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true - /@csstools/postcss-oklab-function@3.0.3(postcss@8.4.31): + /@csstools/postcss-oklab-function@3.0.3(postcss@8.4.29): resolution: {integrity: sha512-8Wdpmy8mvVyHsToJkrnNpwpAgqCPNpQMLNqkR62smbEuFcmRHEiDnb0OlkKjErzmiBMr7vjZAQ6e2lA9oVguQQ==} engines: {node: ^14 || ^16 || >=18} peerDependencies: @@ -1923,21 +1923,21 @@ packages: '@csstools/css-color-parser': 1.3.1(@csstools/css-parser-algorithms@2.3.1)(@csstools/css-tokenizer@2.2.0) '@csstools/css-parser-algorithms': 2.3.1(@csstools/css-tokenizer@2.2.0) '@csstools/css-tokenizer': 2.2.0 - '@csstools/postcss-progressive-custom-properties': 3.0.0(postcss@8.4.31) - postcss: 8.4.31 + '@csstools/postcss-progressive-custom-properties': 3.0.0(postcss@8.4.29) + postcss: 8.4.29 dev: true - /@csstools/postcss-progressive-custom-properties@3.0.0(postcss@8.4.31): + /@csstools/postcss-progressive-custom-properties@3.0.0(postcss@8.4.29): resolution: {integrity: sha512-2/D3CCL9DN2xhuUTP8OKvKnaqJ1j4yZUxuGLsCUOQ16wnDAuMLKLkflOmZF5tsPh/02VPeXRmqIN+U595WAulw==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true - /@csstools/postcss-relative-color-syntax@2.0.3(postcss@8.4.31): + /@csstools/postcss-relative-color-syntax@2.0.3(postcss@8.4.29): resolution: {integrity: sha512-9MOzad5i0fnkOI6qXzcznuyGhLYARBkR8wDsyqbANkZ20srHJZ6PAy44g5eNw3+B7yvslUK4hx9ehnbbI9x4rw==} engines: {node: ^14 || ^16 || >=18} peerDependencies: @@ -1946,21 +1946,21 @@ packages: '@csstools/css-color-parser': 1.3.1(@csstools/css-parser-algorithms@2.3.1)(@csstools/css-tokenizer@2.2.0) '@csstools/css-parser-algorithms': 2.3.1(@csstools/css-tokenizer@2.2.0) '@csstools/css-tokenizer': 2.2.0 - '@csstools/postcss-progressive-custom-properties': 3.0.0(postcss@8.4.31) - postcss: 8.4.31 + '@csstools/postcss-progressive-custom-properties': 3.0.0(postcss@8.4.29) + postcss: 8.4.29 dev: true - /@csstools/postcss-scope-pseudo-class@3.0.0(postcss@8.4.31): + /@csstools/postcss-scope-pseudo-class@3.0.0(postcss@8.4.29): resolution: {integrity: sha512-GFNVsD97OuEcfHmcT0/DAZWAvTM/FFBDQndIOLawNc1Wq8YqpZwBdHa063Lq+Irk7azygTT+Iinyg3Lt76p7rg==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-selector-parser: 6.0.13 dev: true - /@csstools/postcss-stepped-value-functions@3.0.1(postcss@8.4.31): + /@csstools/postcss-stepped-value-functions@3.0.1(postcss@8.4.29): resolution: {integrity: sha512-y1sykToXorFE+5cjtp//xAMWEAEple0kcZn2QhzEFIZDDNvGOCp5JvvmmPGsC3eDlj6yQp70l9uXZNLnimEYfA==} engines: {node: ^14 || ^16 || >=18} peerDependencies: @@ -1969,21 +1969,21 @@ packages: '@csstools/css-calc': 1.1.3(@csstools/css-parser-algorithms@2.3.1)(@csstools/css-tokenizer@2.2.0) '@csstools/css-parser-algorithms': 2.3.1(@csstools/css-tokenizer@2.2.0) '@csstools/css-tokenizer': 2.2.0 - postcss: 8.4.31 + postcss: 8.4.29 dev: true - /@csstools/postcss-text-decoration-shorthand@3.0.2(postcss@8.4.31): + /@csstools/postcss-text-decoration-shorthand@3.0.2(postcss@8.4.29): resolution: {integrity: sha512-vO2onX7/TPU3LMrSvg+FhMxTujhU+LELP9zln7SiB5BJqZi+y/ZOJZRBHFvCfM9J1lnNkskMN96bP5g3yg7Jmw==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: '@csstools/color-helpers': 3.0.2 - postcss: 8.4.31 + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true - /@csstools/postcss-trigonometric-functions@3.0.1(postcss@8.4.31): + /@csstools/postcss-trigonometric-functions@3.0.1(postcss@8.4.29): resolution: {integrity: sha512-hW+JPv0MPQfWC1KARgvJI6bisEUFAZWSvUNq/khGCupYV/h6Z9R2ZFz0Xc633LXBst0ezbXpy7NpnPurSx5Klw==} engines: {node: ^14 || ^16 || >=18} peerDependencies: @@ -1992,16 +1992,16 @@ packages: '@csstools/css-calc': 1.1.3(@csstools/css-parser-algorithms@2.3.1)(@csstools/css-tokenizer@2.2.0) '@csstools/css-parser-algorithms': 2.3.1(@csstools/css-tokenizer@2.2.0) '@csstools/css-tokenizer': 2.2.0 - postcss: 8.4.31 + postcss: 8.4.29 dev: true - /@csstools/postcss-unset-value@3.0.0(postcss@8.4.31): + /@csstools/postcss-unset-value@3.0.0(postcss@8.4.29): resolution: {integrity: sha512-P0JD1WHh3avVyKKRKjd0dZIjCEeaBer8t1BbwGMUDtSZaLhXlLNBqZ8KkqHzYWXOJgHleXAny2/sx8LYl6qhEA==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 dev: true /@csstools/selector-specificity@3.0.0(postcss-selector-parser@6.0.13): @@ -3731,7 +3731,7 @@ packages: hasBin: true dev: true - /autoprefixer@10.4.15(postcss@8.4.31): + /autoprefixer@10.4.15(postcss@8.4.29): resolution: {integrity: sha512-KCuPB8ZCIqFdA4HwKXsvz7j6gvSDNhDP7WnUjBleRkKjPdvCmHFuQ77ocavI8FT6NdvlBnE2UFr2H4Mycn8Vew==} engines: {node: ^10 || ^12 || >=14} hasBin: true @@ -3743,7 +3743,7 @@ packages: fraction.js: 4.3.6 normalize-range: 0.1.2 picocolors: 1.0.0 - postcss: 8.4.31 + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true @@ -4787,33 +4787,33 @@ packages: engines: {node: '>=8'} dev: true - /css-blank-pseudo@6.0.0(postcss@8.4.31): + /css-blank-pseudo@6.0.0(postcss@8.4.29): resolution: {integrity: sha512-VbfLlOWO7sBHBTn6pwDQzc07Z0SDydgDBfNfCE0nvrehdBNv9RKsuupIRa/qal0+fBZhAALyQDPMKz5lnvcchw==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-selector-parser: 6.0.13 dev: true - /css-declaration-sorter@6.4.1(postcss@8.4.31): + /css-declaration-sorter@6.4.1(postcss@8.4.29): resolution: {integrity: sha512-rtdthzxKuyq6IzqX6jEcIzQF/YqccluefyCYheovBOLhFT/drQA9zj/UbRAa9J7C0o6EG6u3E6g+vKkay7/k3g==} engines: {node: ^10 || ^12 || >=14} peerDependencies: postcss: ^8.0.9 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 dev: true - /css-has-pseudo@6.0.0(postcss@8.4.31): + /css-has-pseudo@6.0.0(postcss@8.4.29): resolution: {integrity: sha512-X+r+JBuoO37FBOWVNhVJhxtSBUFHgHbrcc0CjFT28JEdOw1qaDwABv/uunyodUuSy2hMPe9j/HjssxSlvUmKjg==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: '@csstools/selector-specificity': 3.0.0(postcss-selector-parser@6.0.13) - postcss: 8.4.31 + postcss: 8.4.29 postcss-selector-parser: 6.0.13 postcss-value-parser: 4.2.0 dev: true @@ -4824,26 +4824,26 @@ packages: peerDependencies: webpack: ^4.27.0 || ^5.0.0 dependencies: - icss-utils: 5.1.0(postcss@8.4.31) + icss-utils: 5.1.0(postcss@8.4.29) loader-utils: 2.0.4 - postcss: 8.4.31 - postcss-modules-extract-imports: 3.0.0(postcss@8.4.31) - postcss-modules-local-by-default: 4.0.3(postcss@8.4.31) - postcss-modules-scope: 3.0.0(postcss@8.4.31) - postcss-modules-values: 4.0.0(postcss@8.4.31) + postcss: 8.4.29 + postcss-modules-extract-imports: 3.0.0(postcss@8.4.29) + postcss-modules-local-by-default: 4.0.3(postcss@8.4.29) + postcss-modules-scope: 3.0.0(postcss@8.4.29) + postcss-modules-values: 4.0.0(postcss@8.4.29) postcss-value-parser: 4.2.0 schema-utils: 3.3.0 semver: 7.5.4 webpack: 4.47.0 dev: true - /css-prefers-color-scheme@9.0.0(postcss@8.4.31): + /css-prefers-color-scheme@9.0.0(postcss@8.4.29): resolution: {integrity: sha512-03QGAk/FXIRseDdLb7XAiu6gidQ0Nd8945xuM7VFVPpc6goJsG9uIO8xQjTxwbPdPIIV4o4AJoOJyt8gwDl67g==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 dev: true /css-select@4.3.0: @@ -4900,62 +4900,62 @@ packages: hasBin: true dev: true - /cssnano-preset-default@5.2.14(postcss@8.4.31): + /cssnano-preset-default@5.2.14(postcss@8.4.29): resolution: {integrity: sha512-t0SFesj/ZV2OTylqQVOrFgEh5uanxbO6ZAdeCrNsUQ6fVuXwYTxJPNAGvGTxHbD68ldIJNec7PyYZDBrfDQ+6A==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 dependencies: - css-declaration-sorter: 6.4.1(postcss@8.4.31) - cssnano-utils: 3.1.0(postcss@8.4.31) - postcss: 8.4.31 - postcss-calc: 8.2.4(postcss@8.4.31) - postcss-colormin: 5.3.1(postcss@8.4.31) - postcss-convert-values: 5.1.3(postcss@8.4.31) - postcss-discard-comments: 5.1.2(postcss@8.4.31) - postcss-discard-duplicates: 5.1.0(postcss@8.4.31) - postcss-discard-empty: 5.1.1(postcss@8.4.31) - postcss-discard-overridden: 5.1.0(postcss@8.4.31) - postcss-merge-longhand: 5.1.7(postcss@8.4.31) - postcss-merge-rules: 5.1.4(postcss@8.4.31) - postcss-minify-font-values: 5.1.0(postcss@8.4.31) - postcss-minify-gradients: 5.1.1(postcss@8.4.31) - postcss-minify-params: 5.1.4(postcss@8.4.31) - postcss-minify-selectors: 5.2.1(postcss@8.4.31) - postcss-normalize-charset: 5.1.0(postcss@8.4.31) - postcss-normalize-display-values: 5.1.0(postcss@8.4.31) - postcss-normalize-positions: 5.1.1(postcss@8.4.31) - postcss-normalize-repeat-style: 5.1.1(postcss@8.4.31) - postcss-normalize-string: 5.1.0(postcss@8.4.31) - postcss-normalize-timing-functions: 5.1.0(postcss@8.4.31) - postcss-normalize-unicode: 5.1.1(postcss@8.4.31) - postcss-normalize-url: 5.1.0(postcss@8.4.31) - postcss-normalize-whitespace: 5.1.1(postcss@8.4.31) - postcss-ordered-values: 5.1.3(postcss@8.4.31) - postcss-reduce-initial: 5.1.2(postcss@8.4.31) - postcss-reduce-transforms: 5.1.0(postcss@8.4.31) - postcss-svgo: 5.1.0(postcss@8.4.31) - postcss-unique-selectors: 5.1.1(postcss@8.4.31) + css-declaration-sorter: 6.4.1(postcss@8.4.29) + cssnano-utils: 3.1.0(postcss@8.4.29) + postcss: 8.4.29 + postcss-calc: 8.2.4(postcss@8.4.29) + postcss-colormin: 5.3.1(postcss@8.4.29) + postcss-convert-values: 5.1.3(postcss@8.4.29) + postcss-discard-comments: 5.1.2(postcss@8.4.29) + postcss-discard-duplicates: 5.1.0(postcss@8.4.29) + postcss-discard-empty: 5.1.1(postcss@8.4.29) + postcss-discard-overridden: 5.1.0(postcss@8.4.29) + postcss-merge-longhand: 5.1.7(postcss@8.4.29) + postcss-merge-rules: 5.1.4(postcss@8.4.29) + postcss-minify-font-values: 5.1.0(postcss@8.4.29) + postcss-minify-gradients: 5.1.1(postcss@8.4.29) + postcss-minify-params: 5.1.4(postcss@8.4.29) + postcss-minify-selectors: 5.2.1(postcss@8.4.29) + postcss-normalize-charset: 5.1.0(postcss@8.4.29) + postcss-normalize-display-values: 5.1.0(postcss@8.4.29) + postcss-normalize-positions: 5.1.1(postcss@8.4.29) + postcss-normalize-repeat-style: 5.1.1(postcss@8.4.29) + postcss-normalize-string: 5.1.0(postcss@8.4.29) + postcss-normalize-timing-functions: 5.1.0(postcss@8.4.29) + postcss-normalize-unicode: 5.1.1(postcss@8.4.29) + postcss-normalize-url: 5.1.0(postcss@8.4.29) + postcss-normalize-whitespace: 5.1.1(postcss@8.4.29) + postcss-ordered-values: 5.1.3(postcss@8.4.29) + postcss-reduce-initial: 5.1.2(postcss@8.4.29) + postcss-reduce-transforms: 5.1.0(postcss@8.4.29) + postcss-svgo: 5.1.0(postcss@8.4.29) + postcss-unique-selectors: 5.1.1(postcss@8.4.29) dev: true - /cssnano-utils@3.1.0(postcss@8.4.31): + /cssnano-utils@3.1.0(postcss@8.4.29): resolution: {integrity: sha512-JQNR19/YZhz4psLX/rQ9M83e3z2Wf/HdJbryzte4a3NSuafyp9w/I4U+hx5C2S9g41qlstH7DEWnZaaj83OuEA==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 dev: true - /cssnano@5.1.15(postcss@8.4.31): + /cssnano@5.1.15(postcss@8.4.29): resolution: {integrity: sha512-j+BKgDcLDQA+eDifLx0EO4XSA56b7uut3BQFH+wbSaSTuGLuiyTa/wbRYthUXX8LC9mLg+WWKe8h+qJuwTAbHw==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 dependencies: - cssnano-preset-default: 5.2.14(postcss@8.4.31) + cssnano-preset-default: 5.2.14(postcss@8.4.29) lilconfig: 2.1.0 - postcss: 8.4.31 + postcss: 8.4.29 yaml: 1.10.2 dev: true @@ -6880,13 +6880,13 @@ packages: safer-buffer: 2.1.2 dev: true - /icss-utils@5.1.0(postcss@8.4.31): + /icss-utils@5.1.0(postcss@8.4.29): resolution: {integrity: sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==} engines: {node: ^10 || ^12 || >= 14} peerDependencies: postcss: ^8.1.0 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 dev: true /idb@7.1.1: @@ -8914,9 +8914,9 @@ packages: peerDependencies: webpack: ^4.0.0 dependencies: - cssnano: 5.1.15(postcss@8.4.31) + cssnano: 5.1.15(postcss@8.4.29) last-call-webpack-plugin: 3.0.0 - postcss: 8.4.31 + postcss: 8.4.29 webpack: 4.47.0 dev: true @@ -9182,17 +9182,17 @@ packages: engines: {node: '>=0.10.0'} dev: true - /postcss-attribute-case-insensitive@6.0.2(postcss@8.4.31): + /postcss-attribute-case-insensitive@6.0.2(postcss@8.4.29): resolution: {integrity: sha512-IRuCwwAAQbgaLhxQdQcIIK0dCVXg3XDUnzgKD8iwdiYdwU4rMWRWyl/W9/0nA4ihVpq5pyALiHB2veBJ0292pw==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-selector-parser: 6.0.13 dev: true - /postcss-browser-comments@4.0.0(browserslist@4.21.10)(postcss@8.4.31): + /postcss-browser-comments@4.0.0(browserslist@4.21.10)(postcss@8.4.29): resolution: {integrity: sha512-X9X9/WN3KIvY9+hNERUqX9gncsgBA25XaeR+jshHz2j8+sYyHktHw1JdKuMjeLpGktXidqDhA7b/qm1mrBDmgg==} engines: {node: '>=8'} peerDependencies: @@ -9200,61 +9200,61 @@ packages: postcss: '>=8' dependencies: browserslist: 4.21.10 - postcss: 8.4.31 + postcss: 8.4.29 dev: true - /postcss-calc@8.2.4(postcss@8.4.31): + /postcss-calc@8.2.4(postcss@8.4.29): resolution: {integrity: sha512-SmWMSJmB8MRnnULldx0lQIyhSNvuDl9HfrZkaqqE/WHAhToYsAvDq+yAsA/kIyINDszOp3Rh0GFoNuH5Ypsm3Q==} peerDependencies: postcss: ^8.2.2 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-selector-parser: 6.0.13 postcss-value-parser: 4.2.0 dev: true - /postcss-clamp@4.1.0(postcss@8.4.31): + /postcss-clamp@4.1.0(postcss@8.4.29): resolution: {integrity: sha512-ry4b1Llo/9zz+PKC+030KUnPITTJAHeOwjfAyyB60eT0AorGLdzp52s31OsPRHRf8NchkgFoG2y6fCfn1IV1Ow==} engines: {node: '>=7.6.0'} peerDependencies: postcss: ^8.4.6 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true - /postcss-color-functional-notation@6.0.0(postcss@8.4.31): + /postcss-color-functional-notation@6.0.0(postcss@8.4.29): resolution: {integrity: sha512-kaWTgnhRKFtfMF8H0+NQBFxgr5CGg05WGe07Mc1ld6XHwwRWlqSbHOW0zwf+BtkBQpsdVUu7+gl9dtdvhWMedw==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: - '@csstools/postcss-progressive-custom-properties': 3.0.0(postcss@8.4.31) - postcss: 8.4.31 + '@csstools/postcss-progressive-custom-properties': 3.0.0(postcss@8.4.29) + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true - /postcss-color-hex-alpha@9.0.2(postcss@8.4.31): + /postcss-color-hex-alpha@9.0.2(postcss@8.4.29): resolution: {integrity: sha512-SfPjgr//VQ/DOCf80STIAsdAs7sbIbxATvVmd+Ec7JvR8onz9pjawhq3BJM3Pie40EE3TyB0P6hft16D33Nlyg==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true - /postcss-color-rebeccapurple@9.0.0(postcss@8.4.31): + /postcss-color-rebeccapurple@9.0.0(postcss@8.4.29): resolution: {integrity: sha512-RmUFL+foS05AKglkEoqfx+KFdKRVmqUAxlHNz4jLqIi7046drIPyerdl4B6j/RA2BSP8FI8gJcHmLRrwJOMnHw==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true - /postcss-colormin@5.3.1(postcss@8.4.31): + /postcss-colormin@5.3.1(postcss@8.4.29): resolution: {integrity: sha512-UsWQG0AqTFQmpBegeLLc1+c3jIqBNB0zlDGRWR+dQ3pRKJL1oeMzyqmH3o2PIfn9MBdNrVPWhDbT769LxCTLJQ==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: @@ -9263,22 +9263,22 @@ packages: browserslist: 4.21.10 caniuse-api: 3.0.0 colord: 2.9.3 - postcss: 8.4.31 + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true - /postcss-convert-values@5.1.3(postcss@8.4.31): + /postcss-convert-values@5.1.3(postcss@8.4.29): resolution: {integrity: sha512-82pC1xkJZtcJEfiLw6UXnXVXScgtBrjlO5CBmuDQc+dlb88ZYheFsjTn40+zBVi3DkfF7iezO0nJUPLcJK3pvA==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 dependencies: browserslist: 4.21.10 - postcss: 8.4.31 + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true - /postcss-custom-media@10.0.0(postcss@8.4.31): + /postcss-custom-media@10.0.0(postcss@8.4.29): resolution: {integrity: sha512-NxDn7C6GJ7X8TsWOa8MbCdq9rLERRLcPfQSp856k1jzMreL8X9M6iWk35JjPRIb9IfRnVohmxAylDRx7n4Rv4g==} engines: {node: ^14 || ^16 || >=18} peerDependencies: @@ -9288,10 +9288,10 @@ packages: '@csstools/css-parser-algorithms': 2.3.1(@csstools/css-tokenizer@2.2.0) '@csstools/css-tokenizer': 2.2.0 '@csstools/media-query-list-parser': 2.1.4(@csstools/css-parser-algorithms@2.3.1)(@csstools/css-tokenizer@2.2.0) - postcss: 8.4.31 + postcss: 8.4.29 dev: true - /postcss-custom-properties@13.3.0(postcss@8.4.31): + /postcss-custom-properties@13.3.0(postcss@8.4.29): resolution: {integrity: sha512-q4VgtIKSy5+KcUvQ0WxTjDy9DZjQ5VCXAZ9+tT9+aPMbA0z6s2t1nMw0QHszru1ib5ElkXl9JUpYYU37VVUs7g==} engines: {node: ^14 || ^16 || >=18} peerDependencies: @@ -9300,11 +9300,11 @@ packages: '@csstools/cascade-layer-name-parser': 1.0.4(@csstools/css-parser-algorithms@2.3.1)(@csstools/css-tokenizer@2.2.0) '@csstools/css-parser-algorithms': 2.3.1(@csstools/css-tokenizer@2.2.0) '@csstools/css-tokenizer': 2.2.0 - postcss: 8.4.31 + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true - /postcss-custom-selectors@7.1.4(postcss@8.4.31): + /postcss-custom-selectors@7.1.4(postcss@8.4.29): resolution: {integrity: sha512-TU2xyUUBTlpiLnwyE2ZYMUIYB41MKMkBZ8X8ntkqRDQ8sdBLhFFsPgNcOliBd5+/zcK51C9hRnSE7hKUJMxQSw==} engines: {node: ^14 || ^16 || >=18} peerDependencies: @@ -9313,131 +9313,131 @@ packages: '@csstools/cascade-layer-name-parser': 1.0.4(@csstools/css-parser-algorithms@2.3.1)(@csstools/css-tokenizer@2.2.0) '@csstools/css-parser-algorithms': 2.3.1(@csstools/css-tokenizer@2.2.0) '@csstools/css-tokenizer': 2.2.0 - postcss: 8.4.31 + postcss: 8.4.29 postcss-selector-parser: 6.0.13 dev: true - /postcss-dir-pseudo-class@8.0.0(postcss@8.4.31): + /postcss-dir-pseudo-class@8.0.0(postcss@8.4.29): resolution: {integrity: sha512-Oy5BBi0dWPwij/IA+yDYj+/OBMQ9EPqAzTHeSNUYrUWdll/PRJmcbiUj0MNcsBi681I1gcSTLvMERPaXzdbvJg==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-selector-parser: 6.0.13 dev: true - /postcss-discard-comments@5.1.2(postcss@8.4.31): + /postcss-discard-comments@5.1.2(postcss@8.4.29): resolution: {integrity: sha512-+L8208OVbHVF2UQf1iDmRcbdjJkuBF6IS29yBDSiWUIzpYaAhtNl6JYnYm12FnkeCwQqF5LeklOu6rAqgfBZqQ==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 dev: true - /postcss-discard-duplicates@5.1.0(postcss@8.4.31): + /postcss-discard-duplicates@5.1.0(postcss@8.4.29): resolution: {integrity: sha512-zmX3IoSI2aoenxHV6C7plngHWWhUOV3sP1T8y2ifzxzbtnuhk1EdPwm0S1bIUNaJ2eNbWeGLEwzw8huPD67aQw==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 dev: true - /postcss-discard-empty@5.1.1(postcss@8.4.31): + /postcss-discard-empty@5.1.1(postcss@8.4.29): resolution: {integrity: sha512-zPz4WljiSuLWsI0ir4Mcnr4qQQ5e1Ukc3i7UfE2XcrwKK2LIPIqE5jxMRxO6GbI3cv//ztXDsXwEWT3BHOGh3A==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 dev: true - /postcss-discard-overridden@5.1.0(postcss@8.4.31): + /postcss-discard-overridden@5.1.0(postcss@8.4.29): resolution: {integrity: sha512-21nOL7RqWR1kasIVdKs8HNqQJhFxLsyRfAnUDm4Fe4t4mCWL9OJiHvlHPjcd8zc5Myu89b/7wZDnOSjFgeWRtw==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 dev: true - /postcss-double-position-gradients@5.0.0(postcss@8.4.31): + /postcss-double-position-gradients@5.0.0(postcss@8.4.29): resolution: {integrity: sha512-wR8npIkrIVUTicUpCWSSo1f/g7gAEIH70FMqCugY4m4j6TX4E0T2Q5rhfO0gqv00biBZdLyb+HkW8x6as+iJNQ==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: - '@csstools/postcss-progressive-custom-properties': 3.0.0(postcss@8.4.31) - postcss: 8.4.31 + '@csstools/postcss-progressive-custom-properties': 3.0.0(postcss@8.4.29) + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true - /postcss-flexbugs-fixes@5.0.2(postcss@8.4.31): + /postcss-flexbugs-fixes@5.0.2(postcss@8.4.29): resolution: {integrity: sha512-18f9voByak7bTktR2QgDveglpn9DTbBWPUzSOe9g0N4WR/2eSt6Vrcbf0hmspvMI6YWGywz6B9f7jzpFNJJgnQ==} peerDependencies: postcss: ^8.1.4 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 dev: true - /postcss-focus-visible@9.0.0(postcss@8.4.31): + /postcss-focus-visible@9.0.0(postcss@8.4.29): resolution: {integrity: sha512-zA4TbVaIaT8npZBEROhZmlc+GBKE8AELPHXE7i4TmIUEQhw/P/mSJfY9t6tBzpQ1rABeGtEOHYrW4SboQeONMQ==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-selector-parser: 6.0.13 dev: true - /postcss-focus-within@8.0.0(postcss@8.4.31): + /postcss-focus-within@8.0.0(postcss@8.4.29): resolution: {integrity: sha512-E7+J9nuQzZaA37D/MUZMX1K817RZGDab8qw6pFwzAkDd/QtlWJ9/WTKmzewNiuxzeq6WWY7ATiRePVoDKp+DnA==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-selector-parser: 6.0.13 dev: true - /postcss-font-variant@5.0.0(postcss@8.4.31): + /postcss-font-variant@5.0.0(postcss@8.4.29): resolution: {integrity: sha512-1fmkBaCALD72CK2a9i468mA/+tr9/1cBxRRMXOUaZqO43oWPR5imcyPjXwuv7PXbCid4ndlP5zWhidQVVa3hmA==} peerDependencies: postcss: ^8.1.0 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 dev: true - /postcss-gap-properties@5.0.0(postcss@8.4.31): + /postcss-gap-properties@5.0.0(postcss@8.4.29): resolution: {integrity: sha512-YjsEEL6890P7MCv6fch6Am1yq0EhQCJMXyT4LBohiu87+4/WqR7y5W3RIv53WdA901hhytgRvjlrAhibhW4qsA==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 dev: true - /postcss-image-set-function@6.0.0(postcss@8.4.31): + /postcss-image-set-function@6.0.0(postcss@8.4.29): resolution: {integrity: sha512-bg58QnJexFpPBU4IGPAugAPKV0FuFtX5rHYNSKVaV91TpHN7iwyEzz1bkIPCiSU5+BUN00e+3fV5KFrwIgRocw==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true - /postcss-initial@4.0.1(postcss@8.4.31): + /postcss-initial@4.0.1(postcss@8.4.29): resolution: {integrity: sha512-0ueD7rPqX8Pn1xJIjay0AZeIuDoF+V+VvMt/uOnn+4ezUKhZM/NokDeP6DwMNyIoYByuN/94IQnt5FEkaN59xQ==} peerDependencies: postcss: ^8.0.0 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 dev: true - /postcss-lab-function@6.0.3(postcss@8.4.31): + /postcss-lab-function@6.0.3(postcss@8.4.29): resolution: {integrity: sha512-+0WxmblCb2Khfj9wpJQKd/9QhtHK/ImIqfnXX4HEoTDmjdtI6IUjXnC83bYX0CaHitpPjWnoQjoasW7qb1TCHw==} engines: {node: ^14 || ^16 || >=18} peerDependencies: @@ -9446,11 +9446,11 @@ packages: '@csstools/css-color-parser': 1.3.1(@csstools/css-parser-algorithms@2.3.1)(@csstools/css-tokenizer@2.2.0) '@csstools/css-parser-algorithms': 2.3.1(@csstools/css-tokenizer@2.2.0) '@csstools/css-tokenizer': 2.2.0 - '@csstools/postcss-progressive-custom-properties': 3.0.0(postcss@8.4.31) - postcss: 8.4.31 + '@csstools/postcss-progressive-custom-properties': 3.0.0(postcss@8.4.29) + postcss: 8.4.29 dev: true - /postcss-loader@4.3.0(postcss@8.4.31)(webpack@4.47.0): + /postcss-loader@4.3.0(postcss@8.4.29)(webpack@4.47.0): resolution: {integrity: sha512-M/dSoIiNDOo8Rk0mUqoj4kpGq91gcxCfb9PoyZVdZ76/AuhxylHDYZblNE8o+EQ9AMSASeMFEKxZf5aU6wlx1Q==} engines: {node: '>= 10.13.0'} peerDependencies: @@ -9460,34 +9460,34 @@ packages: cosmiconfig: 7.1.0 klona: 2.0.6 loader-utils: 2.0.4 - postcss: 8.4.31 + postcss: 8.4.29 schema-utils: 3.3.0 semver: 7.5.4 webpack: 4.47.0 dev: true - /postcss-logical@7.0.0(postcss@8.4.31): + /postcss-logical@7.0.0(postcss@8.4.29): resolution: {integrity: sha512-zYf3vHkoW82f5UZTEXChTJvH49Yl9X37axTZsJGxrCG2kOUwtaAoz9E7tqYg0lsIoJLybaL8fk/2mOi81zVIUw==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true - /postcss-merge-longhand@5.1.7(postcss@8.4.31): + /postcss-merge-longhand@5.1.7(postcss@8.4.29): resolution: {integrity: sha512-YCI9gZB+PLNskrK0BB3/2OzPnGhPkBEwmwhfYk1ilBHYVAZB7/tkTHFBAnCrvBBOmeYyMYw3DMjT55SyxMBzjQ==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-value-parser: 4.2.0 - stylehacks: 5.1.1(postcss@8.4.31) + stylehacks: 5.1.1(postcss@8.4.29) dev: true - /postcss-merge-rules@5.1.4(postcss@8.4.31): + /postcss-merge-rules@5.1.4(postcss@8.4.29): resolution: {integrity: sha512-0R2IuYpgU93y9lhVbO/OylTtKMVcHb67zjWIfCiKR9rWL3GUk1677LAqD/BcHizukdZEjT8Ru3oHRoAYoJy44g==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: @@ -9495,199 +9495,199 @@ packages: dependencies: browserslist: 4.21.10 caniuse-api: 3.0.0 - cssnano-utils: 3.1.0(postcss@8.4.31) - postcss: 8.4.31 + cssnano-utils: 3.1.0(postcss@8.4.29) + postcss: 8.4.29 postcss-selector-parser: 6.0.13 dev: true - /postcss-minify-font-values@5.1.0(postcss@8.4.31): + /postcss-minify-font-values@5.1.0(postcss@8.4.29): resolution: {integrity: sha512-el3mYTgx13ZAPPirSVsHqFzl+BBBDrXvbySvPGFnQcTI4iNslrPaFq4muTkLZmKlGk4gyFAYUBMH30+HurREyA==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true - /postcss-minify-gradients@5.1.1(postcss@8.4.31): + /postcss-minify-gradients@5.1.1(postcss@8.4.29): resolution: {integrity: sha512-VGvXMTpCEo4qHTNSa9A0a3D+dxGFZCYwR6Jokk+/3oB6flu2/PnPXAh2x7x52EkY5xlIHLm+Le8tJxe/7TNhzw==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 dependencies: colord: 2.9.3 - cssnano-utils: 3.1.0(postcss@8.4.31) - postcss: 8.4.31 + cssnano-utils: 3.1.0(postcss@8.4.29) + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true - /postcss-minify-params@5.1.4(postcss@8.4.31): + /postcss-minify-params@5.1.4(postcss@8.4.29): resolution: {integrity: sha512-+mePA3MgdmVmv6g+30rn57USjOGSAyuxUmkfiWpzalZ8aiBkdPYjXWtHuwJGm1v5Ojy0Z0LaSYhHaLJQB0P8Jw==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 dependencies: browserslist: 4.21.10 - cssnano-utils: 3.1.0(postcss@8.4.31) - postcss: 8.4.31 + cssnano-utils: 3.1.0(postcss@8.4.29) + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true - /postcss-minify-selectors@5.2.1(postcss@8.4.31): + /postcss-minify-selectors@5.2.1(postcss@8.4.29): resolution: {integrity: sha512-nPJu7OjZJTsVUmPdm2TcaiohIwxP+v8ha9NehQ2ye9szv4orirRU3SDdtUmKH+10nzn0bAyOXZ0UEr7OpvLehg==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-selector-parser: 6.0.13 dev: true - /postcss-modules-extract-imports@3.0.0(postcss@8.4.31): + /postcss-modules-extract-imports@3.0.0(postcss@8.4.29): resolution: {integrity: sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==} engines: {node: ^10 || ^12 || >= 14} peerDependencies: postcss: ^8.1.0 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 dev: true - /postcss-modules-local-by-default@4.0.3(postcss@8.4.31): + /postcss-modules-local-by-default@4.0.3(postcss@8.4.29): resolution: {integrity: sha512-2/u2zraspoACtrbFRnTijMiQtb4GW4BvatjaG/bCjYQo8kLTdevCUlwuBHx2sCnSyrI3x3qj4ZK1j5LQBgzmwA==} engines: {node: ^10 || ^12 || >= 14} peerDependencies: postcss: ^8.1.0 dependencies: - icss-utils: 5.1.0(postcss@8.4.31) - postcss: 8.4.31 + icss-utils: 5.1.0(postcss@8.4.29) + postcss: 8.4.29 postcss-selector-parser: 6.0.13 postcss-value-parser: 4.2.0 dev: true - /postcss-modules-scope@3.0.0(postcss@8.4.31): + /postcss-modules-scope@3.0.0(postcss@8.4.29): resolution: {integrity: sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==} engines: {node: ^10 || ^12 || >= 14} peerDependencies: postcss: ^8.1.0 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-selector-parser: 6.0.13 dev: true - /postcss-modules-values@4.0.0(postcss@8.4.31): + /postcss-modules-values@4.0.0(postcss@8.4.29): resolution: {integrity: sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==} engines: {node: ^10 || ^12 || >= 14} peerDependencies: postcss: ^8.1.0 dependencies: - icss-utils: 5.1.0(postcss@8.4.31) - postcss: 8.4.31 + icss-utils: 5.1.0(postcss@8.4.29) + postcss: 8.4.29 dev: true - /postcss-nesting@12.0.1(postcss@8.4.31): + /postcss-nesting@12.0.1(postcss@8.4.29): resolution: {integrity: sha512-6LCqCWP9pqwXw/njMvNK0hGY44Fxc4B2EsGbn6xDcxbNRzP8GYoxT7yabVVMLrX3quqOJ9hg2jYMsnkedOf8pA==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: '@csstools/selector-specificity': 3.0.0(postcss-selector-parser@6.0.13) - postcss: 8.4.31 + postcss: 8.4.29 postcss-selector-parser: 6.0.13 dev: true - /postcss-normalize-charset@5.1.0(postcss@8.4.31): + /postcss-normalize-charset@5.1.0(postcss@8.4.29): resolution: {integrity: sha512-mSgUJ+pd/ldRGVx26p2wz9dNZ7ji6Pn8VWBajMXFf8jk7vUoSrZ2lt/wZR7DtlZYKesmZI680qjr2CeFF2fbUg==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 dev: true - /postcss-normalize-display-values@5.1.0(postcss@8.4.31): + /postcss-normalize-display-values@5.1.0(postcss@8.4.29): resolution: {integrity: sha512-WP4KIM4o2dazQXWmFaqMmcvsKmhdINFblgSeRgn8BJ6vxaMyaJkwAzpPpuvSIoG/rmX3M+IrRZEz2H0glrQNEA==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true - /postcss-normalize-positions@5.1.1(postcss@8.4.31): + /postcss-normalize-positions@5.1.1(postcss@8.4.29): resolution: {integrity: sha512-6UpCb0G4eofTCQLFVuI3EVNZzBNPiIKcA1AKVka+31fTVySphr3VUgAIULBhxZkKgwLImhzMR2Bw1ORK+37INg==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true - /postcss-normalize-repeat-style@5.1.1(postcss@8.4.31): + /postcss-normalize-repeat-style@5.1.1(postcss@8.4.29): resolution: {integrity: sha512-mFpLspGWkQtBcWIRFLmewo8aC3ImN2i/J3v8YCFUwDnPu3Xz4rLohDO26lGjwNsQxB3YF0KKRwspGzE2JEuS0g==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true - /postcss-normalize-string@5.1.0(postcss@8.4.31): + /postcss-normalize-string@5.1.0(postcss@8.4.29): resolution: {integrity: sha512-oYiIJOf4T9T1N4i+abeIc7Vgm/xPCGih4bZz5Nm0/ARVJ7K6xrDlLwvwqOydvyL3RHNf8qZk6vo3aatiw/go3w==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true - /postcss-normalize-timing-functions@5.1.0(postcss@8.4.31): + /postcss-normalize-timing-functions@5.1.0(postcss@8.4.29): resolution: {integrity: sha512-DOEkzJ4SAXv5xkHl0Wa9cZLF3WCBhF3o1SKVxKQAa+0pYKlueTpCgvkFAHfk+Y64ezX9+nITGrDZeVGgITJXjg==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true - /postcss-normalize-unicode@5.1.1(postcss@8.4.31): + /postcss-normalize-unicode@5.1.1(postcss@8.4.29): resolution: {integrity: sha512-qnCL5jzkNUmKVhZoENp1mJiGNPcsJCs1aaRmURmeJGES23Z/ajaln+EPTD+rBeNkSryI+2WTdW+lwcVdOikrpA==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 dependencies: browserslist: 4.21.10 - postcss: 8.4.31 + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true - /postcss-normalize-url@5.1.0(postcss@8.4.31): + /postcss-normalize-url@5.1.0(postcss@8.4.29): resolution: {integrity: sha512-5upGeDO+PVthOxSmds43ZeMeZfKH+/DKgGRD7TElkkyS46JXAUhMzIKiCa7BabPeIy3AQcTkXwVVN7DbqsiCew==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 dependencies: normalize-url: 6.1.0 - postcss: 8.4.31 + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true - /postcss-normalize-whitespace@5.1.1(postcss@8.4.31): + /postcss-normalize-whitespace@5.1.1(postcss@8.4.29): resolution: {integrity: sha512-83ZJ4t3NUDETIHTa3uEg6asWjSBYL5EdkVB0sDncx9ERzOKBVJIUeDO9RyA9Zwtig8El1d79HBp0JEi8wvGQnA==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true - /postcss-normalize@10.0.1(browserslist@4.21.10)(postcss@8.4.31): + /postcss-normalize@10.0.1(browserslist@4.21.10)(postcss@8.4.29): resolution: {integrity: sha512-+5w18/rDev5mqERcG3W5GZNMJa1eoYYNGo8gB7tEwaos0ajk3ZXAI4mHGcNT47NE+ZnZD1pEpUOFLvltIwmeJA==} engines: {node: '>= 12'} peerDependencies: @@ -9696,136 +9696,136 @@ packages: dependencies: '@csstools/normalize.css': 12.0.0 browserslist: 4.21.10 - postcss: 8.4.31 - postcss-browser-comments: 4.0.0(browserslist@4.21.10)(postcss@8.4.31) + postcss: 8.4.29 + postcss-browser-comments: 4.0.0(browserslist@4.21.10)(postcss@8.4.29) sanitize.css: 13.0.0 dev: true - /postcss-opacity-percentage@2.0.0(postcss@8.4.31): + /postcss-opacity-percentage@2.0.0(postcss@8.4.29): resolution: {integrity: sha512-lyDrCOtntq5Y1JZpBFzIWm2wG9kbEdujpNt4NLannF+J9c8CgFIzPa80YQfdza+Y+yFfzbYj/rfoOsYsooUWTQ==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.2 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 dev: true - /postcss-ordered-values@5.1.3(postcss@8.4.31): + /postcss-ordered-values@5.1.3(postcss@8.4.29): resolution: {integrity: sha512-9UO79VUhPwEkzbb3RNpqqghc6lcYej1aveQteWY+4POIwlqkYE21HKWaLDF6lWNuqCobEAyTovVhtI32Rbv2RQ==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 dependencies: - cssnano-utils: 3.1.0(postcss@8.4.31) - postcss: 8.4.31 + cssnano-utils: 3.1.0(postcss@8.4.29) + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true - /postcss-overflow-shorthand@5.0.0(postcss@8.4.31): + /postcss-overflow-shorthand@5.0.0(postcss@8.4.29): resolution: {integrity: sha512-2rlxDyeSics/hC2FuMdPnWiP9WUPZ5x7FTuArXLFVpaSQ2woPSfZS4RD59HuEokbZhs/wPUQJ1E3MT6zVv94MQ==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true - /postcss-page-break@3.0.4(postcss@8.4.31): + /postcss-page-break@3.0.4(postcss@8.4.29): resolution: {integrity: sha512-1JGu8oCjVXLa9q9rFTo4MbeeA5FMe00/9C7lN4va606Rdb+HkxXtXsmEDrIraQ11fGz/WvKWa8gMuCKkrXpTsQ==} peerDependencies: postcss: ^8 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 dev: true - /postcss-place@9.0.0(postcss@8.4.31): + /postcss-place@9.0.0(postcss@8.4.29): resolution: {integrity: sha512-qLEPD9VPH5opDVemwmRaujODF9nExn24VOC3ghgVLEvfYN7VZLwJHes0q/C9YR5hI2UC3VgBE8Wkdp1TxCXhtg==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true - /postcss-preset-env@9.1.2(postcss@8.4.31): + /postcss-preset-env@9.1.2(postcss@8.4.29): resolution: {integrity: sha512-+v7BbUNLgUD1j+dBQw3YRExLnIhroBradExkhDLpkLwZowzhgUQgSYW4PJul2SlST2qyistlEIPaHTJK9tZlEw==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: - '@csstools/postcss-cascade-layers': 4.0.0(postcss@8.4.31) - '@csstools/postcss-color-function': 3.0.3(postcss@8.4.31) - '@csstools/postcss-color-mix-function': 2.0.3(postcss@8.4.31) - '@csstools/postcss-exponential-functions': 1.0.0(postcss@8.4.31) - '@csstools/postcss-font-format-keywords': 3.0.0(postcss@8.4.31) - '@csstools/postcss-gradients-interpolation-method': 4.0.3(postcss@8.4.31) - '@csstools/postcss-hwb-function': 3.0.3(postcss@8.4.31) - '@csstools/postcss-ic-unit': 3.0.0(postcss@8.4.31) - '@csstools/postcss-is-pseudo-class': 4.0.1(postcss@8.4.31) - '@csstools/postcss-logical-float-and-clear': 2.0.0(postcss@8.4.31) - '@csstools/postcss-logical-resize': 2.0.0(postcss@8.4.31) - '@csstools/postcss-logical-viewport-units': 2.0.1(postcss@8.4.31) - '@csstools/postcss-media-minmax': 1.0.7(postcss@8.4.31) - '@csstools/postcss-media-queries-aspect-ratio-number-values': 2.0.2(postcss@8.4.31) - '@csstools/postcss-nested-calc': 3.0.0(postcss@8.4.31) - '@csstools/postcss-normalize-display-values': 3.0.0(postcss@8.4.31) - '@csstools/postcss-oklab-function': 3.0.3(postcss@8.4.31) - '@csstools/postcss-progressive-custom-properties': 3.0.0(postcss@8.4.31) - '@csstools/postcss-relative-color-syntax': 2.0.3(postcss@8.4.31) - '@csstools/postcss-scope-pseudo-class': 3.0.0(postcss@8.4.31) - '@csstools/postcss-stepped-value-functions': 3.0.1(postcss@8.4.31) - '@csstools/postcss-text-decoration-shorthand': 3.0.2(postcss@8.4.31) - '@csstools/postcss-trigonometric-functions': 3.0.1(postcss@8.4.31) - '@csstools/postcss-unset-value': 3.0.0(postcss@8.4.31) - autoprefixer: 10.4.15(postcss@8.4.31) + '@csstools/postcss-cascade-layers': 4.0.0(postcss@8.4.29) + '@csstools/postcss-color-function': 3.0.3(postcss@8.4.29) + '@csstools/postcss-color-mix-function': 2.0.3(postcss@8.4.29) + '@csstools/postcss-exponential-functions': 1.0.0(postcss@8.4.29) + '@csstools/postcss-font-format-keywords': 3.0.0(postcss@8.4.29) + '@csstools/postcss-gradients-interpolation-method': 4.0.3(postcss@8.4.29) + '@csstools/postcss-hwb-function': 3.0.3(postcss@8.4.29) + '@csstools/postcss-ic-unit': 3.0.0(postcss@8.4.29) + '@csstools/postcss-is-pseudo-class': 4.0.1(postcss@8.4.29) + '@csstools/postcss-logical-float-and-clear': 2.0.0(postcss@8.4.29) + '@csstools/postcss-logical-resize': 2.0.0(postcss@8.4.29) + '@csstools/postcss-logical-viewport-units': 2.0.1(postcss@8.4.29) + '@csstools/postcss-media-minmax': 1.0.7(postcss@8.4.29) + '@csstools/postcss-media-queries-aspect-ratio-number-values': 2.0.2(postcss@8.4.29) + '@csstools/postcss-nested-calc': 3.0.0(postcss@8.4.29) + '@csstools/postcss-normalize-display-values': 3.0.0(postcss@8.4.29) + '@csstools/postcss-oklab-function': 3.0.3(postcss@8.4.29) + '@csstools/postcss-progressive-custom-properties': 3.0.0(postcss@8.4.29) + '@csstools/postcss-relative-color-syntax': 2.0.3(postcss@8.4.29) + '@csstools/postcss-scope-pseudo-class': 3.0.0(postcss@8.4.29) + '@csstools/postcss-stepped-value-functions': 3.0.1(postcss@8.4.29) + '@csstools/postcss-text-decoration-shorthand': 3.0.2(postcss@8.4.29) + '@csstools/postcss-trigonometric-functions': 3.0.1(postcss@8.4.29) + '@csstools/postcss-unset-value': 3.0.0(postcss@8.4.29) + autoprefixer: 10.4.15(postcss@8.4.29) browserslist: 4.21.10 - css-blank-pseudo: 6.0.0(postcss@8.4.31) - css-has-pseudo: 6.0.0(postcss@8.4.31) - css-prefers-color-scheme: 9.0.0(postcss@8.4.31) + css-blank-pseudo: 6.0.0(postcss@8.4.29) + css-has-pseudo: 6.0.0(postcss@8.4.29) + css-prefers-color-scheme: 9.0.0(postcss@8.4.29) cssdb: 7.7.2 - postcss: 8.4.31 - postcss-attribute-case-insensitive: 6.0.2(postcss@8.4.31) - postcss-clamp: 4.1.0(postcss@8.4.31) - postcss-color-functional-notation: 6.0.0(postcss@8.4.31) - postcss-color-hex-alpha: 9.0.2(postcss@8.4.31) - postcss-color-rebeccapurple: 9.0.0(postcss@8.4.31) - postcss-custom-media: 10.0.0(postcss@8.4.31) - postcss-custom-properties: 13.3.0(postcss@8.4.31) - postcss-custom-selectors: 7.1.4(postcss@8.4.31) - postcss-dir-pseudo-class: 8.0.0(postcss@8.4.31) - postcss-double-position-gradients: 5.0.0(postcss@8.4.31) - postcss-focus-visible: 9.0.0(postcss@8.4.31) - postcss-focus-within: 8.0.0(postcss@8.4.31) - postcss-font-variant: 5.0.0(postcss@8.4.31) - postcss-gap-properties: 5.0.0(postcss@8.4.31) - postcss-image-set-function: 6.0.0(postcss@8.4.31) - postcss-initial: 4.0.1(postcss@8.4.31) - postcss-lab-function: 6.0.3(postcss@8.4.31) - postcss-logical: 7.0.0(postcss@8.4.31) - postcss-nesting: 12.0.1(postcss@8.4.31) - postcss-opacity-percentage: 2.0.0(postcss@8.4.31) - postcss-overflow-shorthand: 5.0.0(postcss@8.4.31) - postcss-page-break: 3.0.4(postcss@8.4.31) - postcss-place: 9.0.0(postcss@8.4.31) - postcss-pseudo-class-any-link: 9.0.0(postcss@8.4.31) - postcss-replace-overflow-wrap: 4.0.0(postcss@8.4.31) - postcss-selector-not: 7.0.1(postcss@8.4.31) + postcss: 8.4.29 + postcss-attribute-case-insensitive: 6.0.2(postcss@8.4.29) + postcss-clamp: 4.1.0(postcss@8.4.29) + postcss-color-functional-notation: 6.0.0(postcss@8.4.29) + postcss-color-hex-alpha: 9.0.2(postcss@8.4.29) + postcss-color-rebeccapurple: 9.0.0(postcss@8.4.29) + postcss-custom-media: 10.0.0(postcss@8.4.29) + postcss-custom-properties: 13.3.0(postcss@8.4.29) + postcss-custom-selectors: 7.1.4(postcss@8.4.29) + postcss-dir-pseudo-class: 8.0.0(postcss@8.4.29) + postcss-double-position-gradients: 5.0.0(postcss@8.4.29) + postcss-focus-visible: 9.0.0(postcss@8.4.29) + postcss-focus-within: 8.0.0(postcss@8.4.29) + postcss-font-variant: 5.0.0(postcss@8.4.29) + postcss-gap-properties: 5.0.0(postcss@8.4.29) + postcss-image-set-function: 6.0.0(postcss@8.4.29) + postcss-initial: 4.0.1(postcss@8.4.29) + postcss-lab-function: 6.0.3(postcss@8.4.29) + postcss-logical: 7.0.0(postcss@8.4.29) + postcss-nesting: 12.0.1(postcss@8.4.29) + postcss-opacity-percentage: 2.0.0(postcss@8.4.29) + postcss-overflow-shorthand: 5.0.0(postcss@8.4.29) + postcss-page-break: 3.0.4(postcss@8.4.29) + postcss-place: 9.0.0(postcss@8.4.29) + postcss-pseudo-class-any-link: 9.0.0(postcss@8.4.29) + postcss-replace-overflow-wrap: 4.0.0(postcss@8.4.29) + postcss-selector-not: 7.0.1(postcss@8.4.29) postcss-value-parser: 4.2.0 dev: true - /postcss-pseudo-class-any-link@9.0.0(postcss@8.4.31): + /postcss-pseudo-class-any-link@9.0.0(postcss@8.4.29): resolution: {integrity: sha512-QNCYIL98VKFKY6HGDEJpF6+K/sg9bxcUYnOmNHJxZS5wsFDFaVoPeG68WAuhsqwbIBSo/b9fjEnTwY2mTSD+uA==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-selector-parser: 6.0.13 dev: true - /postcss-reduce-initial@5.1.2(postcss@8.4.31): + /postcss-reduce-initial@5.1.2(postcss@8.4.29): resolution: {integrity: sha512-dE/y2XRaqAi6OvjzD22pjTUQ8eOfc6m/natGHgKFBK9DxFmIm69YmaRVQrGgFlEfc1HePIurY0TmDeROK05rIg==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: @@ -9833,43 +9833,43 @@ packages: dependencies: browserslist: 4.21.10 caniuse-api: 3.0.0 - postcss: 8.4.31 + postcss: 8.4.29 dev: true - /postcss-reduce-transforms@5.1.0(postcss@8.4.31): + /postcss-reduce-transforms@5.1.0(postcss@8.4.29): resolution: {integrity: sha512-2fbdbmgir5AvpW9RLtdONx1QoYG2/EtqpNQbFASDlixBbAYuTcJ0dECwlqNqH7VbaUnEnh8SrxOe2sRIn24XyQ==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-value-parser: 4.2.0 dev: true - /postcss-replace-overflow-wrap@4.0.0(postcss@8.4.31): + /postcss-replace-overflow-wrap@4.0.0(postcss@8.4.29): resolution: {integrity: sha512-KmF7SBPphT4gPPcKZc7aDkweHiKEEO8cla/GjcBK+ckKxiZslIu3C4GCRW3DNfL0o7yW7kMQu9xlZ1kXRXLXtw==} peerDependencies: postcss: ^8.0.3 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 dev: true - /postcss-safe-parser@6.0.0(postcss@8.4.31): + /postcss-safe-parser@6.0.0(postcss@8.4.29): resolution: {integrity: sha512-FARHN8pwH+WiS2OPCxJI8FuRJpTVnn6ZNFiqAM2aeW2LwTHWWmWgIyKC6cUo0L8aeKiF/14MNvnpls6R2PBeMQ==} engines: {node: '>=12.0'} peerDependencies: postcss: ^8.3.3 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 dev: true - /postcss-selector-not@7.0.1(postcss@8.4.31): + /postcss-selector-not@7.0.1(postcss@8.4.29): resolution: {integrity: sha512-1zT5C27b/zeJhchN7fP0kBr16Cc61mu7Si9uWWLoA3Px/D9tIJPKchJCkUH3tPO5D0pCFmGeApAv8XpXBQJ8SQ==} engines: {node: ^14 || ^16 || >=18} peerDependencies: postcss: ^8.4 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-selector-parser: 6.0.13 dev: true @@ -9881,24 +9881,24 @@ packages: util-deprecate: 1.0.2 dev: true - /postcss-svgo@5.1.0(postcss@8.4.31): + /postcss-svgo@5.1.0(postcss@8.4.29): resolution: {integrity: sha512-D75KsH1zm5ZrHyxPakAxJWtkyXew5qwS70v56exwvw542d9CRtTo78K0WeFxZB4G7JXKKMbEZtZayTGdIky/eA==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-value-parser: 4.2.0 svgo: 2.8.0 dev: true - /postcss-unique-selectors@5.1.1(postcss@8.4.31): + /postcss-unique-selectors@5.1.1(postcss@8.4.29): resolution: {integrity: sha512-5JiODlELrz8L2HwxfPnhOWZYWDxVHWL83ufOv84NrcgipI7TaeRsatAhK4Tr2/ZiYldpK/wBvw5BD3qfaK96GA==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 dependencies: - postcss: 8.4.31 + postcss: 8.4.29 postcss-selector-parser: 6.0.13 dev: true @@ -9906,8 +9906,8 @@ packages: resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} dev: true - /postcss@8.4.31: - resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} + /postcss@8.4.29: + resolution: {integrity: sha512-cbI+jaqIeu/VGqXEarWkRCCffhjgXc0qjBtXpqJhTBohMUjUQnbBr0xqX3vEKudc4iviTewcJo5ajcec5+wdJw==} engines: {node: ^10 || ^12 || >=14} dependencies: nanoid: 3.3.6 @@ -10646,7 +10646,7 @@ packages: adjust-sourcemap-loader: 4.0.0 convert-source-map: 1.9.0 loader-utils: 2.0.4 - postcss: 8.4.31 + postcss: 8.4.29 source-map: 0.6.1 dev: true @@ -11346,14 +11346,14 @@ packages: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} - /stylehacks@5.1.1(postcss@8.4.31): + /stylehacks@5.1.1(postcss@8.4.29): resolution: {integrity: sha512-sBpcd5Hx7G6seo7b1LkpttvTz7ikD0LlH5RmdcBNb6fFR0Fl7LQwHDFr300q4cwUqi+IYrFGmsIHieMBfnN/Bw==} engines: {node: ^10 || ^12 || >=14.0} peerDependencies: postcss: ^8.2.15 dependencies: browserslist: 4.21.10 - postcss: 8.4.31 + postcss: 8.4.29 postcss-selector-parser: 6.0.13 dev: true From 9b291c0739be593ff2397c9676dd3668763c45dc Mon Sep 17 00:00:00 2001 From: case0sh Date: Fri, 6 Oct 2023 10:53:39 +0200 Subject: [PATCH 6/7] revert all changes to frontend --- services/frontend/pkg/config/config.go | 5 +++-- services/frontend/pkg/config/defaults/defaultconfig.go | 4 ++++ services/frontend/pkg/config/parser/parse.go | 4 ++++ services/frontend/pkg/revaconfig/config.go | 1 + 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/services/frontend/pkg/config/config.go b/services/frontend/pkg/config/config.go index c8dbb8d81a..86728f7440 100644 --- a/services/frontend/pkg/config/config.go +++ b/services/frontend/pkg/config/config.go @@ -20,8 +20,9 @@ type Config struct { TransferSecret string `yaml:"transfer_secret" env:"OCIS_TRANSFER_SECRET" desc:"Transfer secret for signing file up- and download requests."` - TokenManager *TokenManager `yaml:"token_manager"` - Reva *shared.Reva `yaml:"reva"` + TokenManager *TokenManager `yaml:"token_manager"` + Reva *shared.Reva `yaml:"reva"` + MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY;FRONTEND_MACHINE_AUTH_API_KEY" desc:"The machine auth API key used to validate internal requests necessary to access resources from other services."` SkipUserGroupsInToken bool `yaml:"skip_user_groups_in_token" env:"FRONTEND_SKIP_USER_GROUPS_IN_TOKEN" desc:"Disables the loading of user's group memberships from the reva access token."` diff --git a/services/frontend/pkg/config/defaults/defaultconfig.go b/services/frontend/pkg/config/defaults/defaultconfig.go index 3bd7b93cfb..f3726a2010 100644 --- a/services/frontend/pkg/config/defaults/defaultconfig.go +++ b/services/frontend/pkg/config/defaults/defaultconfig.go @@ -169,6 +169,10 @@ func EnsureDefaults(cfg *config.Config) { cfg.TransferSecret = cfg.Commons.TransferSecret } + if cfg.MachineAuthAPIKey == "" && cfg.Commons != nil && cfg.Commons.MachineAuthAPIKey != "" { + cfg.MachineAuthAPIKey = cfg.Commons.MachineAuthAPIKey + } + } // Sanitize sanitized the configuration diff --git a/services/frontend/pkg/config/parser/parse.go b/services/frontend/pkg/config/parser/parse.go index 3645d30183..3045136e3b 100644 --- a/services/frontend/pkg/config/parser/parse.go +++ b/services/frontend/pkg/config/parser/parse.go @@ -43,6 +43,10 @@ func Validate(cfg *config.Config) error { return shared.MissingRevaTransferSecretError(cfg.Service.Name) } + if cfg.MachineAuthAPIKey == "" { + return shared.MissingMachineAuthApiKeyError(cfg.Service.Name) + } + if cfg.GRPCClientTLS == nil && cfg.Commons != nil { cfg.GRPCClientTLS = structs.CopyOrZeroValue(cfg.Commons.GRPCClientTLS) } diff --git a/services/frontend/pkg/revaconfig/config.go b/services/frontend/pkg/revaconfig/config.go index a98913dafb..c490a16b04 100644 --- a/services/frontend/pkg/revaconfig/config.go +++ b/services/frontend/pkg/revaconfig/config.go @@ -168,6 +168,7 @@ func FrontendConfigFromStruct(cfg *config.Config, logger log.Logger) (map[string "stat_cache_table": cfg.OCS.StatCacheTable, "prefix": cfg.OCS.Prefix, "additional_info_attribute": cfg.OCS.AdditionalInfoAttribute, + "machine_auth_apikey": cfg.MachineAuthAPIKey, "enable_denials": cfg.OCS.EnableDenials, "cache_warmup_driver": cfg.OCS.CacheWarmupDriver, "cache_warmup_drivers": map[string]interface{}{ From 06d7702577157d68b99096d02b6b78257f0322b2 Mon Sep 17 00:00:00 2001 From: case0sh Date: Fri, 6 Oct 2023 11:23:05 +0200 Subject: [PATCH 7/7] revert all changes to ocdav --- services/ocdav/pkg/command/server.go | 1 + services/ocdav/pkg/config/config.go | 2 ++ .../pkg/config/defaults/defaultconfig.go | 19 ++++++++++++------- services/ocdav/pkg/config/parser/parse.go | 4 ++++ 4 files changed, 19 insertions(+), 7 deletions(-) diff --git a/services/ocdav/pkg/command/server.go b/services/ocdav/pkg/command/server.go index 1a5a254ec9..881aabf03a 100644 --- a/services/ocdav/pkg/command/server.go +++ b/services/ocdav/pkg/command/server.go @@ -77,6 +77,7 @@ func Server(cfg *config.Config) *cli.Command { ocdav.Version(cfg.Status.Version), ocdav.VersionString(cfg.Status.VersionString), ocdav.Edition(cfg.Status.Edition), + ocdav.MachineAuthAPIKey(cfg.MachineAuthAPIKey), ocdav.Broker(broker.NoOp{}), // ocdav.FavoriteManager() // FIXME needs a proper persistence implementation https://github.com/owncloud/ocis/issues/1228 // ocdav.LockSystem(), // will default to the CS3 lock system diff --git a/services/ocdav/pkg/config/config.go b/services/ocdav/pkg/config/config.go index 61b6118e2c..a89acd3880 100644 --- a/services/ocdav/pkg/config/config.go +++ b/services/ocdav/pkg/config/config.go @@ -31,6 +31,8 @@ type Config struct { // Timeout in seconds when making requests to the gateway Timeout int64 `yaml:"gateway_request_timeout" env:"OCDAV_GATEWAY_REQUEST_TIMEOUT" desc:"Request timeout in seconds for requests from the oCDAV service to the GATEWAY service."` + MachineAuthAPIKey string `yaml:"machine_auth_api_key" env:"OCIS_MACHINE_AUTH_API_KEY;OCDAV_MACHINE_AUTH_API_KEY" desc:"Machine auth API key used to validate internal requests necessary for the access to resources from other services."` + Context context.Context `yaml:"-"` Status Status `yaml:"-"` diff --git a/services/ocdav/pkg/config/defaults/defaultconfig.go b/services/ocdav/pkg/config/defaults/defaultconfig.go index f8def03d8d..07d11f6bd8 100644 --- a/services/ocdav/pkg/config/defaults/defaultconfig.go +++ b/services/ocdav/pkg/config/defaults/defaultconfig.go @@ -77,13 +77,14 @@ func DefaultConfig() *config.Config { Service: config.Service{ Name: "ocdav", }, - Reva: shared.DefaultRevaConfig(), - WebdavNamespace: "/users/{{.Id.OpaqueId}}", - FilesNamespace: "/users/{{.Id.OpaqueId}}", - SharesNamespace: "/Shares", - PublicURL: "https://localhost:9200", - Insecure: false, - Timeout: 84300, + Reva: shared.DefaultRevaConfig(), + WebdavNamespace: "/users/{{.Id.OpaqueId}}", + FilesNamespace: "/users/{{.Id.OpaqueId}}", + SharesNamespace: "/Shares", + PublicURL: "https://localhost:9200", + Insecure: false, + Timeout: 84300, + MachineAuthAPIKey: "", Status: config.Status{ Version: version.Legacy, VersionString: version.LegacyString, @@ -131,6 +132,10 @@ func EnsureDefaults(cfg *config.Config) { } else if cfg.TokenManager == nil { cfg.TokenManager = &config.TokenManager{} } + + if cfg.MachineAuthAPIKey == "" && cfg.Commons != nil && cfg.Commons.MachineAuthAPIKey != "" { + cfg.MachineAuthAPIKey = cfg.Commons.MachineAuthAPIKey + } } // Sanitize sanitizes the configuration diff --git a/services/ocdav/pkg/config/parser/parse.go b/services/ocdav/pkg/config/parser/parse.go index 5e948297c1..545dfe45af 100644 --- a/services/ocdav/pkg/config/parser/parse.go +++ b/services/ocdav/pkg/config/parser/parse.go @@ -37,5 +37,9 @@ func Validate(cfg *config.Config) error { if cfg.TokenManager.JWTSecret == "" { return shared.MissingJWTTokenError(cfg.Service.Name) } + if cfg.MachineAuthAPIKey == "" { + return shared.MissingMachineAuthApiKeyError(cfg.Service.Name) + } + return nil }