mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 14:47:33 +00:00
chore!(api): remove improved_performance
field from feature flags
This commit is contained in:
@@ -23,7 +23,6 @@ func systemFeaturesToCommand(req *feature_pb.SetSystemFeaturesRequest) (*command
|
||||
LegacyIntrospection: req.OidcLegacyIntrospection,
|
||||
UserSchema: req.UserSchema,
|
||||
TokenExchange: req.OidcTokenExchange,
|
||||
ImprovedPerformance: improvedPerformanceListToDomain(req.ImprovedPerformance),
|
||||
OIDCSingleV1SessionTermination: req.OidcSingleV1SessionTermination,
|
||||
DisableUserTokenEvent: req.DisableUserTokenEvent,
|
||||
EnableBackChannelLogout: req.EnableBackChannelLogout,
|
||||
@@ -40,7 +39,6 @@ func systemFeaturesToPb(f *query.SystemFeatures) *feature_pb.GetSystemFeaturesRe
|
||||
OidcLegacyIntrospection: featureSourceToFlagPb(&f.LegacyIntrospection),
|
||||
UserSchema: featureSourceToFlagPb(&f.UserSchema),
|
||||
OidcTokenExchange: featureSourceToFlagPb(&f.TokenExchange),
|
||||
ImprovedPerformance: featureSourceToImprovedPerformanceFlagPb(&f.ImprovedPerformance),
|
||||
OidcSingleV1SessionTermination: featureSourceToFlagPb(&f.OIDCSingleV1SessionTermination),
|
||||
DisableUserTokenEvent: featureSourceToFlagPb(&f.DisableUserTokenEvent),
|
||||
EnableBackChannelLogout: featureSourceToFlagPb(&f.EnableBackChannelLogout),
|
||||
@@ -60,7 +58,6 @@ func instanceFeaturesToCommand(req *feature_pb.SetInstanceFeaturesRequest) (*com
|
||||
LegacyIntrospection: req.OidcLegacyIntrospection,
|
||||
UserSchema: req.UserSchema,
|
||||
TokenExchange: req.OidcTokenExchange,
|
||||
ImprovedPerformance: improvedPerformanceListToDomain(req.ImprovedPerformance),
|
||||
WebKey: req.WebKey,
|
||||
DebugOIDCParentError: req.DebugOidcParentError,
|
||||
OIDCSingleV1SessionTermination: req.OidcSingleV1SessionTermination,
|
||||
@@ -80,7 +77,6 @@ func instanceFeaturesToPb(f *query.InstanceFeatures) *feature_pb.GetInstanceFeat
|
||||
OidcLegacyIntrospection: featureSourceToFlagPb(&f.LegacyIntrospection),
|
||||
UserSchema: featureSourceToFlagPb(&f.UserSchema),
|
||||
OidcTokenExchange: featureSourceToFlagPb(&f.TokenExchange),
|
||||
ImprovedPerformance: featureSourceToImprovedPerformanceFlagPb(&f.ImprovedPerformance),
|
||||
WebKey: featureSourceToFlagPb(&f.WebKey),
|
||||
DebugOidcParentError: featureSourceToFlagPb(&f.DebugOIDCParentError),
|
||||
OidcSingleV1SessionTermination: featureSourceToFlagPb(&f.OIDCSingleV1SessionTermination),
|
||||
@@ -92,13 +88,6 @@ func instanceFeaturesToPb(f *query.InstanceFeatures) *feature_pb.GetInstanceFeat
|
||||
}
|
||||
}
|
||||
|
||||
func featureSourceToImprovedPerformanceFlagPb(fs *query.FeatureSource[[]feature.ImprovedPerformanceType]) *feature_pb.ImprovedPerformanceFeatureFlag {
|
||||
return &feature_pb.ImprovedPerformanceFeatureFlag{
|
||||
ExecutionPaths: improvedPerformanceTypesToPb(fs.Value),
|
||||
Source: featureLevelToSourcePb(fs.Level),
|
||||
}
|
||||
}
|
||||
|
||||
func loginV2ToDomain(loginV2 *feature_pb.LoginV2) (_ *feature.LoginV2, err error) {
|
||||
if loginV2 == nil {
|
||||
return nil, nil
|
||||
@@ -159,48 +148,3 @@ func featureLevelToSourcePb(level feature.Level) feature_pb.Source {
|
||||
return feature_pb.Source(level)
|
||||
}
|
||||
}
|
||||
|
||||
func improvedPerformanceTypesToPb(types []feature.ImprovedPerformanceType) []feature_pb.ImprovedPerformance {
|
||||
res := make([]feature_pb.ImprovedPerformance, len(types))
|
||||
|
||||
for i, typ := range types {
|
||||
res[i] = improvedPerformanceTypeToPb(typ)
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
func improvedPerformanceTypeToPb(typ feature.ImprovedPerformanceType) feature_pb.ImprovedPerformance {
|
||||
switch typ {
|
||||
case feature.ImprovedPerformanceTypeUnspecified:
|
||||
return feature_pb.ImprovedPerformance_IMPROVED_PERFORMANCE_UNSPECIFIED
|
||||
case feature.ImprovedPerformanceTypeOrgByID:
|
||||
return feature_pb.ImprovedPerformance_IMPROVED_PERFORMANCE_ORG_BY_ID
|
||||
default:
|
||||
return feature_pb.ImprovedPerformance(typ)
|
||||
}
|
||||
}
|
||||
|
||||
func improvedPerformanceListToDomain(list []feature_pb.ImprovedPerformance) []feature.ImprovedPerformanceType {
|
||||
if list == nil {
|
||||
return nil
|
||||
}
|
||||
res := make([]feature.ImprovedPerformanceType, len(list))
|
||||
|
||||
for i, typ := range list {
|
||||
res[i] = improvedPerformanceToDomain(typ)
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
func improvedPerformanceToDomain(typ feature_pb.ImprovedPerformance) feature.ImprovedPerformanceType {
|
||||
switch typ {
|
||||
case feature_pb.ImprovedPerformance_IMPROVED_PERFORMANCE_UNSPECIFIED:
|
||||
return feature.ImprovedPerformanceTypeUnspecified
|
||||
case feature_pb.ImprovedPerformance_IMPROVED_PERFORMANCE_ORG_BY_ID:
|
||||
return feature.ImprovedPerformanceTypeOrgByID
|
||||
default:
|
||||
return feature.ImprovedPerformanceTypeUnspecified
|
||||
}
|
||||
}
|
||||
|
@@ -24,7 +24,6 @@ func Test_systemFeaturesToCommand(t *testing.T) {
|
||||
OidcLegacyIntrospection: nil,
|
||||
UserSchema: gu.Ptr(true),
|
||||
OidcTokenExchange: gu.Ptr(true),
|
||||
ImprovedPerformance: nil,
|
||||
OidcSingleV1SessionTermination: gu.Ptr(true),
|
||||
LoginV2: &feature_pb.LoginV2{
|
||||
Required: true,
|
||||
@@ -37,7 +36,6 @@ func Test_systemFeaturesToCommand(t *testing.T) {
|
||||
LegacyIntrospection: nil,
|
||||
UserSchema: gu.Ptr(true),
|
||||
TokenExchange: gu.Ptr(true),
|
||||
ImprovedPerformance: nil,
|
||||
OIDCSingleV1SessionTermination: gu.Ptr(true),
|
||||
LoginV2: &feature.LoginV2{
|
||||
Required: true,
|
||||
@@ -76,10 +74,6 @@ func Test_systemFeaturesToPb(t *testing.T) {
|
||||
Level: feature.LevelSystem,
|
||||
Value: false,
|
||||
},
|
||||
ImprovedPerformance: query.FeatureSource[[]feature.ImprovedPerformanceType]{
|
||||
Level: feature.LevelSystem,
|
||||
Value: []feature.ImprovedPerformanceType{feature.ImprovedPerformanceTypeOrgByID},
|
||||
},
|
||||
OIDCSingleV1SessionTermination: query.FeatureSource[bool]{
|
||||
Level: feature.LevelSystem,
|
||||
Value: true,
|
||||
@@ -126,10 +120,6 @@ func Test_systemFeaturesToPb(t *testing.T) {
|
||||
Enabled: false,
|
||||
Source: feature_pb.Source_SOURCE_SYSTEM,
|
||||
},
|
||||
ImprovedPerformance: &feature_pb.ImprovedPerformanceFeatureFlag{
|
||||
ExecutionPaths: []feature_pb.ImprovedPerformance{feature_pb.ImprovedPerformance_IMPROVED_PERFORMANCE_ORG_BY_ID},
|
||||
Source: feature_pb.Source_SOURCE_SYSTEM,
|
||||
},
|
||||
OidcSingleV1SessionTermination: &feature_pb.FeatureFlag{
|
||||
Enabled: true,
|
||||
Source: feature_pb.Source_SOURCE_SYSTEM,
|
||||
@@ -163,7 +153,6 @@ func Test_instanceFeaturesToCommand(t *testing.T) {
|
||||
OidcLegacyIntrospection: nil,
|
||||
UserSchema: gu.Ptr(true),
|
||||
OidcTokenExchange: gu.Ptr(true),
|
||||
ImprovedPerformance: nil,
|
||||
WebKey: gu.Ptr(true),
|
||||
DebugOidcParentError: gu.Ptr(true),
|
||||
OidcSingleV1SessionTermination: gu.Ptr(true),
|
||||
@@ -180,7 +169,6 @@ func Test_instanceFeaturesToCommand(t *testing.T) {
|
||||
LegacyIntrospection: nil,
|
||||
UserSchema: gu.Ptr(true),
|
||||
TokenExchange: gu.Ptr(true),
|
||||
ImprovedPerformance: nil,
|
||||
WebKey: gu.Ptr(true),
|
||||
DebugOIDCParentError: gu.Ptr(true),
|
||||
OIDCSingleV1SessionTermination: gu.Ptr(true),
|
||||
@@ -223,10 +211,6 @@ func Test_instanceFeaturesToPb(t *testing.T) {
|
||||
Level: feature.LevelSystem,
|
||||
Value: false,
|
||||
},
|
||||
ImprovedPerformance: query.FeatureSource[[]feature.ImprovedPerformanceType]{
|
||||
Level: feature.LevelSystem,
|
||||
Value: []feature.ImprovedPerformanceType{feature.ImprovedPerformanceTypeOrgByID},
|
||||
},
|
||||
WebKey: query.FeatureSource[bool]{
|
||||
Level: feature.LevelInstance,
|
||||
Value: true,
|
||||
@@ -281,10 +265,6 @@ func Test_instanceFeaturesToPb(t *testing.T) {
|
||||
Enabled: false,
|
||||
Source: feature_pb.Source_SOURCE_SYSTEM,
|
||||
},
|
||||
ImprovedPerformance: &feature_pb.ImprovedPerformanceFeatureFlag{
|
||||
ExecutionPaths: []feature_pb.ImprovedPerformance{feature_pb.ImprovedPerformance_IMPROVED_PERFORMANCE_ORG_BY_ID},
|
||||
Source: feature_pb.Source_SOURCE_SYSTEM,
|
||||
},
|
||||
WebKey: &feature_pb.FeatureFlag{
|
||||
Enabled: true,
|
||||
Source: feature_pb.Source_SOURCE_INSTANCE,
|
||||
|
@@ -15,7 +15,6 @@ func systemFeaturesToCommand(req *feature_pb.SetSystemFeaturesRequest) *command.
|
||||
LegacyIntrospection: req.OidcLegacyIntrospection,
|
||||
UserSchema: req.UserSchema,
|
||||
TokenExchange: req.OidcTokenExchange,
|
||||
ImprovedPerformance: improvedPerformanceListToDomain(req.ImprovedPerformance),
|
||||
OIDCSingleV1SessionTermination: req.OidcSingleV1SessionTermination,
|
||||
}
|
||||
}
|
||||
@@ -28,7 +27,6 @@ func systemFeaturesToPb(f *query.SystemFeatures) *feature_pb.GetSystemFeaturesRe
|
||||
OidcLegacyIntrospection: featureSourceToFlagPb(&f.LegacyIntrospection),
|
||||
UserSchema: featureSourceToFlagPb(&f.UserSchema),
|
||||
OidcTokenExchange: featureSourceToFlagPb(&f.TokenExchange),
|
||||
ImprovedPerformance: featureSourceToImprovedPerformanceFlagPb(&f.ImprovedPerformance),
|
||||
OidcSingleV1SessionTermination: featureSourceToFlagPb(&f.OIDCSingleV1SessionTermination),
|
||||
}
|
||||
}
|
||||
@@ -40,7 +38,6 @@ func instanceFeaturesToCommand(req *feature_pb.SetInstanceFeaturesRequest) *comm
|
||||
LegacyIntrospection: req.OidcLegacyIntrospection,
|
||||
UserSchema: req.UserSchema,
|
||||
TokenExchange: req.OidcTokenExchange,
|
||||
ImprovedPerformance: improvedPerformanceListToDomain(req.ImprovedPerformance),
|
||||
WebKey: req.WebKey,
|
||||
DebugOIDCParentError: req.DebugOidcParentError,
|
||||
OIDCSingleV1SessionTermination: req.OidcSingleV1SessionTermination,
|
||||
@@ -55,20 +52,12 @@ func instanceFeaturesToPb(f *query.InstanceFeatures) *feature_pb.GetInstanceFeat
|
||||
OidcLegacyIntrospection: featureSourceToFlagPb(&f.LegacyIntrospection),
|
||||
UserSchema: featureSourceToFlagPb(&f.UserSchema),
|
||||
OidcTokenExchange: featureSourceToFlagPb(&f.TokenExchange),
|
||||
ImprovedPerformance: featureSourceToImprovedPerformanceFlagPb(&f.ImprovedPerformance),
|
||||
WebKey: featureSourceToFlagPb(&f.WebKey),
|
||||
DebugOidcParentError: featureSourceToFlagPb(&f.DebugOIDCParentError),
|
||||
OidcSingleV1SessionTermination: featureSourceToFlagPb(&f.OIDCSingleV1SessionTermination),
|
||||
}
|
||||
}
|
||||
|
||||
func featureSourceToImprovedPerformanceFlagPb(fs *query.FeatureSource[[]feature.ImprovedPerformanceType]) *feature_pb.ImprovedPerformanceFeatureFlag {
|
||||
return &feature_pb.ImprovedPerformanceFeatureFlag{
|
||||
ExecutionPaths: improvedPerformanceTypesToPb(fs.Value),
|
||||
Source: featureLevelToSourcePb(fs.Level),
|
||||
}
|
||||
}
|
||||
|
||||
func featureSourceToFlagPb(fs *query.FeatureSource[bool]) *feature_pb.FeatureFlag {
|
||||
return &feature_pb.FeatureFlag{
|
||||
Enabled: fs.Value,
|
||||
@@ -96,48 +85,3 @@ func featureLevelToSourcePb(level feature.Level) feature_pb.Source {
|
||||
return feature_pb.Source(level)
|
||||
}
|
||||
}
|
||||
|
||||
func improvedPerformanceTypesToPb(types []feature.ImprovedPerformanceType) []feature_pb.ImprovedPerformance {
|
||||
res := make([]feature_pb.ImprovedPerformance, len(types))
|
||||
|
||||
for i, typ := range types {
|
||||
res[i] = improvedPerformanceTypeToPb(typ)
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
func improvedPerformanceTypeToPb(typ feature.ImprovedPerformanceType) feature_pb.ImprovedPerformance {
|
||||
switch typ {
|
||||
case feature.ImprovedPerformanceTypeUnspecified:
|
||||
return feature_pb.ImprovedPerformance_IMPROVED_PERFORMANCE_UNSPECIFIED
|
||||
case feature.ImprovedPerformanceTypeOrgByID:
|
||||
return feature_pb.ImprovedPerformance_IMPROVED_PERFORMANCE_ORG_BY_ID
|
||||
default:
|
||||
return feature_pb.ImprovedPerformance(typ)
|
||||
}
|
||||
}
|
||||
|
||||
func improvedPerformanceListToDomain(list []feature_pb.ImprovedPerformance) []feature.ImprovedPerformanceType {
|
||||
if list == nil {
|
||||
return nil
|
||||
}
|
||||
res := make([]feature.ImprovedPerformanceType, len(list))
|
||||
|
||||
for i, typ := range list {
|
||||
res[i] = improvedPerformanceToDomain(typ)
|
||||
}
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
func improvedPerformanceToDomain(typ feature_pb.ImprovedPerformance) feature.ImprovedPerformanceType {
|
||||
switch typ {
|
||||
case feature_pb.ImprovedPerformance_IMPROVED_PERFORMANCE_UNSPECIFIED:
|
||||
return feature.ImprovedPerformanceTypeUnspecified
|
||||
case feature_pb.ImprovedPerformance_IMPROVED_PERFORMANCE_ORG_BY_ID:
|
||||
return feature.ImprovedPerformanceTypeOrgByID
|
||||
default:
|
||||
return feature.ImprovedPerformanceTypeUnspecified
|
||||
}
|
||||
}
|
||||
|
@@ -23,7 +23,6 @@ func Test_systemFeaturesToCommand(t *testing.T) {
|
||||
OidcLegacyIntrospection: nil,
|
||||
UserSchema: gu.Ptr(true),
|
||||
OidcTokenExchange: gu.Ptr(true),
|
||||
ImprovedPerformance: nil,
|
||||
OidcSingleV1SessionTermination: gu.Ptr(true),
|
||||
}
|
||||
want := &command.SystemFeatures{
|
||||
@@ -32,7 +31,6 @@ func Test_systemFeaturesToCommand(t *testing.T) {
|
||||
LegacyIntrospection: nil,
|
||||
UserSchema: gu.Ptr(true),
|
||||
TokenExchange: gu.Ptr(true),
|
||||
ImprovedPerformance: nil,
|
||||
OIDCSingleV1SessionTermination: gu.Ptr(true),
|
||||
}
|
||||
got := systemFeaturesToCommand(arg)
|
||||
@@ -66,10 +64,6 @@ func Test_systemFeaturesToPb(t *testing.T) {
|
||||
Level: feature.LevelSystem,
|
||||
Value: false,
|
||||
},
|
||||
ImprovedPerformance: query.FeatureSource[[]feature.ImprovedPerformanceType]{
|
||||
Level: feature.LevelSystem,
|
||||
Value: []feature.ImprovedPerformanceType{feature.ImprovedPerformanceTypeOrgByID},
|
||||
},
|
||||
OIDCSingleV1SessionTermination: query.FeatureSource[bool]{
|
||||
Level: feature.LevelSystem,
|
||||
Value: true,
|
||||
@@ -101,10 +95,6 @@ func Test_systemFeaturesToPb(t *testing.T) {
|
||||
Enabled: false,
|
||||
Source: feature_pb.Source_SOURCE_SYSTEM,
|
||||
},
|
||||
ImprovedPerformance: &feature_pb.ImprovedPerformanceFeatureFlag{
|
||||
ExecutionPaths: []feature_pb.ImprovedPerformance{feature_pb.ImprovedPerformance_IMPROVED_PERFORMANCE_ORG_BY_ID},
|
||||
Source: feature_pb.Source_SOURCE_SYSTEM,
|
||||
},
|
||||
OidcSingleV1SessionTermination: &feature_pb.FeatureFlag{
|
||||
Enabled: true,
|
||||
Source: feature_pb.Source_SOURCE_SYSTEM,
|
||||
@@ -121,7 +111,6 @@ func Test_instanceFeaturesToCommand(t *testing.T) {
|
||||
OidcLegacyIntrospection: nil,
|
||||
UserSchema: gu.Ptr(true),
|
||||
OidcTokenExchange: gu.Ptr(true),
|
||||
ImprovedPerformance: nil,
|
||||
WebKey: gu.Ptr(true),
|
||||
OidcSingleV1SessionTermination: gu.Ptr(true),
|
||||
}
|
||||
@@ -131,7 +120,6 @@ func Test_instanceFeaturesToCommand(t *testing.T) {
|
||||
LegacyIntrospection: nil,
|
||||
UserSchema: gu.Ptr(true),
|
||||
TokenExchange: gu.Ptr(true),
|
||||
ImprovedPerformance: nil,
|
||||
WebKey: gu.Ptr(true),
|
||||
OIDCSingleV1SessionTermination: gu.Ptr(true),
|
||||
}
|
||||
@@ -166,10 +154,6 @@ func Test_instanceFeaturesToPb(t *testing.T) {
|
||||
Level: feature.LevelSystem,
|
||||
Value: false,
|
||||
},
|
||||
ImprovedPerformance: query.FeatureSource[[]feature.ImprovedPerformanceType]{
|
||||
Level: feature.LevelSystem,
|
||||
Value: []feature.ImprovedPerformanceType{feature.ImprovedPerformanceTypeOrgByID},
|
||||
},
|
||||
WebKey: query.FeatureSource[bool]{
|
||||
Level: feature.LevelInstance,
|
||||
Value: true,
|
||||
@@ -205,10 +189,6 @@ func Test_instanceFeaturesToPb(t *testing.T) {
|
||||
Enabled: false,
|
||||
Source: feature_pb.Source_SOURCE_SYSTEM,
|
||||
},
|
||||
ImprovedPerformance: &feature_pb.ImprovedPerformanceFeatureFlag{
|
||||
ExecutionPaths: []feature_pb.ImprovedPerformance{feature_pb.ImprovedPerformance_IMPROVED_PERFORMANCE_ORG_BY_ID},
|
||||
Source: feature_pb.Source_SOURCE_SYSTEM,
|
||||
},
|
||||
WebKey: &feature_pb.FeatureFlag{
|
||||
Enabled: true,
|
||||
Source: feature_pb.Source_SOURCE_INSTANCE,
|
||||
|
@@ -21,7 +21,6 @@ type InstanceFeatures struct {
|
||||
LegacyIntrospection *bool
|
||||
UserSchema *bool
|
||||
TokenExchange *bool
|
||||
ImprovedPerformance []feature.ImprovedPerformanceType
|
||||
WebKey *bool
|
||||
DebugOIDCParentError *bool
|
||||
OIDCSingleV1SessionTermination *bool
|
||||
@@ -38,8 +37,6 @@ func (m *InstanceFeatures) isEmpty() bool {
|
||||
m.LegacyIntrospection == nil &&
|
||||
m.UserSchema == nil &&
|
||||
m.TokenExchange == nil &&
|
||||
// nil check to allow unset improvements
|
||||
m.ImprovedPerformance == nil &&
|
||||
m.WebKey == nil &&
|
||||
m.DebugOIDCParentError == nil &&
|
||||
m.OIDCSingleV1SessionTermination == nil &&
|
||||
|
@@ -47,12 +47,6 @@ func (m *InstanceFeaturesWriteModel) Reduce() (err error) {
|
||||
return err
|
||||
}
|
||||
reduceInstanceFeature(&m.InstanceFeatures, key, e.Value)
|
||||
case *feature_v2.SetEvent[[]feature.ImprovedPerformanceType]:
|
||||
_, key, err := e.FeatureInfo()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
reduceInstanceFeature(&m.InstanceFeatures, key, e.Value)
|
||||
}
|
||||
}
|
||||
return m.WriteModel.Reduce()
|
||||
@@ -71,7 +65,6 @@ func (m *InstanceFeaturesWriteModel) Query() *eventstore.SearchQueryBuilder {
|
||||
feature_v2.InstanceLegacyIntrospectionEventType,
|
||||
feature_v2.InstanceUserSchemaEventType,
|
||||
feature_v2.InstanceTokenExchangeEventType,
|
||||
feature_v2.InstanceImprovedPerformanceEventType,
|
||||
feature_v2.InstanceWebKeyEventType,
|
||||
feature_v2.InstanceDebugOIDCParentErrorEventType,
|
||||
feature_v2.InstanceOIDCSingleV1SessionTerminationEventType,
|
||||
@@ -107,9 +100,6 @@ func reduceInstanceFeature(features *InstanceFeatures, key feature.Key, value an
|
||||
case feature.KeyUserSchema:
|
||||
v := value.(bool)
|
||||
features.UserSchema = &v
|
||||
case feature.KeyImprovedPerformance:
|
||||
v := value.([]feature.ImprovedPerformanceType)
|
||||
features.ImprovedPerformance = v
|
||||
case feature.KeyWebKey:
|
||||
v := value.(bool)
|
||||
features.WebKey = &v
|
||||
@@ -144,7 +134,6 @@ func (wm *InstanceFeaturesWriteModel) setCommands(ctx context.Context, f *Instan
|
||||
cmds = appendFeatureUpdate(ctx, cmds, aggregate, wm.LegacyIntrospection, f.LegacyIntrospection, feature_v2.InstanceLegacyIntrospectionEventType)
|
||||
cmds = appendFeatureUpdate(ctx, cmds, aggregate, wm.TokenExchange, f.TokenExchange, feature_v2.InstanceTokenExchangeEventType)
|
||||
cmds = appendFeatureUpdate(ctx, cmds, aggregate, wm.UserSchema, f.UserSchema, feature_v2.InstanceUserSchemaEventType)
|
||||
cmds = appendFeatureSliceUpdate(ctx, cmds, aggregate, wm.ImprovedPerformance, f.ImprovedPerformance, feature_v2.InstanceImprovedPerformanceEventType)
|
||||
cmds = appendFeatureUpdate(ctx, cmds, aggregate, wm.WebKey, f.WebKey, feature_v2.InstanceWebKeyEventType)
|
||||
cmds = appendFeatureUpdate(ctx, cmds, aggregate, wm.DebugOIDCParentError, f.DebugOIDCParentError, feature_v2.InstanceDebugOIDCParentErrorEventType)
|
||||
cmds = appendFeatureUpdate(ctx, cmds, aggregate, wm.OIDCSingleV1SessionTermination, f.OIDCSingleV1SessionTermination, feature_v2.InstanceOIDCSingleV1SessionTerminationEventType)
|
||||
|
@@ -15,7 +15,6 @@ type SystemFeatures struct {
|
||||
LegacyIntrospection *bool
|
||||
TokenExchange *bool
|
||||
UserSchema *bool
|
||||
ImprovedPerformance []feature.ImprovedPerformanceType
|
||||
OIDCSingleV1SessionTermination *bool
|
||||
DisableUserTokenEvent *bool
|
||||
EnableBackChannelLogout *bool
|
||||
@@ -29,8 +28,6 @@ func (m *SystemFeatures) isEmpty() bool {
|
||||
m.LegacyIntrospection == nil &&
|
||||
m.UserSchema == nil &&
|
||||
m.TokenExchange == nil &&
|
||||
// nil check to allow unset improvements
|
||||
m.ImprovedPerformance == nil &&
|
||||
m.OIDCSingleV1SessionTermination == nil &&
|
||||
m.DisableUserTokenEvent == nil &&
|
||||
m.EnableBackChannelLogout == nil &&
|
||||
|
@@ -40,12 +40,6 @@ func (m *SystemFeaturesWriteModel) Reduce() error {
|
||||
return err
|
||||
}
|
||||
reduceSystemFeature(&m.SystemFeatures, key, e.Value)
|
||||
case *feature_v2.SetEvent[[]feature.ImprovedPerformanceType]:
|
||||
_, key, err := e.FeatureInfo()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
reduceSystemFeature(&m.SystemFeatures, key, e.Value)
|
||||
}
|
||||
}
|
||||
return m.WriteModel.Reduce()
|
||||
@@ -64,7 +58,6 @@ func (m *SystemFeaturesWriteModel) Query() *eventstore.SearchQueryBuilder {
|
||||
feature_v2.SystemLegacyIntrospectionEventType,
|
||||
feature_v2.SystemUserSchemaEventType,
|
||||
feature_v2.SystemTokenExchangeEventType,
|
||||
feature_v2.SystemImprovedPerformanceEventType,
|
||||
feature_v2.SystemOIDCSingleV1SessionTerminationEventType,
|
||||
feature_v2.SystemDisableUserTokenEvent,
|
||||
feature_v2.SystemEnableBackChannelLogout,
|
||||
@@ -97,8 +90,6 @@ func reduceSystemFeature(features *SystemFeatures, key feature.Key, value any) {
|
||||
case feature.KeyTokenExchange:
|
||||
v := value.(bool)
|
||||
features.TokenExchange = &v
|
||||
case feature.KeyImprovedPerformance:
|
||||
features.ImprovedPerformance = value.([]feature.ImprovedPerformanceType)
|
||||
case feature.KeyOIDCSingleV1SessionTermination:
|
||||
v := value.(bool)
|
||||
features.OIDCSingleV1SessionTermination = &v
|
||||
@@ -124,7 +115,6 @@ func (wm *SystemFeaturesWriteModel) setCommands(ctx context.Context, f *SystemFe
|
||||
cmds = appendFeatureUpdate(ctx, cmds, aggregate, wm.LegacyIntrospection, f.LegacyIntrospection, feature_v2.SystemLegacyIntrospectionEventType)
|
||||
cmds = appendFeatureUpdate(ctx, cmds, aggregate, wm.UserSchema, f.UserSchema, feature_v2.SystemUserSchemaEventType)
|
||||
cmds = appendFeatureUpdate(ctx, cmds, aggregate, wm.TokenExchange, f.TokenExchange, feature_v2.SystemTokenExchangeEventType)
|
||||
cmds = appendFeatureSliceUpdate(ctx, cmds, aggregate, wm.ImprovedPerformance, f.ImprovedPerformance, feature_v2.SystemImprovedPerformanceEventType)
|
||||
cmds = appendFeatureUpdate(ctx, cmds, aggregate, wm.OIDCSingleV1SessionTermination, f.OIDCSingleV1SessionTermination, feature_v2.SystemOIDCSingleV1SessionTerminationEventType)
|
||||
cmds = appendFeatureUpdate(ctx, cmds, aggregate, wm.DisableUserTokenEvent, f.DisableUserTokenEvent, feature_v2.SystemDisableUserTokenEvent)
|
||||
cmds = appendFeatureUpdate(ctx, cmds, aggregate, wm.EnableBackChannelLogout, f.EnableBackChannelLogout, feature_v2.SystemEnableBackChannelLogout)
|
||||
|
@@ -2,7 +2,6 @@ package feature
|
||||
|
||||
import (
|
||||
"net/url"
|
||||
"slices"
|
||||
)
|
||||
|
||||
//go:generate enumer -type Key -transform snake -trimprefix Key
|
||||
@@ -16,6 +15,7 @@ const (
|
||||
KeyUserSchema
|
||||
KeyTokenExchange
|
||||
KeyActionsDeprecated
|
||||
// This key is kept for backwards compatibility, do not use in new code.
|
||||
KeyImprovedPerformance
|
||||
KeyWebKey
|
||||
KeyDebugOIDCParentError
|
||||
@@ -41,35 +41,23 @@ const (
|
||||
)
|
||||
|
||||
type Features struct {
|
||||
LoginDefaultOrg bool `json:"login_default_org,omitempty"`
|
||||
TriggerIntrospectionProjections bool `json:"trigger_introspection_projections,omitempty"`
|
||||
LegacyIntrospection bool `json:"legacy_introspection,omitempty"`
|
||||
UserSchema bool `json:"user_schema,omitempty"`
|
||||
TokenExchange bool `json:"token_exchange,omitempty"`
|
||||
ImprovedPerformance []ImprovedPerformanceType `json:"improved_performance,omitempty"`
|
||||
WebKey bool `json:"web_key,omitempty"`
|
||||
DebugOIDCParentError bool `json:"debug_oidc_parent_error,omitempty"`
|
||||
OIDCSingleV1SessionTermination bool `json:"oidc_single_v1_session_termination,omitempty"`
|
||||
DisableUserTokenEvent bool `json:"disable_user_token_event,omitempty"`
|
||||
EnableBackChannelLogout bool `json:"enable_back_channel_logout,omitempty"`
|
||||
LoginV2 LoginV2 `json:"login_v2,omitempty"`
|
||||
PermissionCheckV2 bool `json:"permission_check_v2,omitempty"`
|
||||
ConsoleUseV2UserApi bool `json:"console_use_v2_user_api,omitempty"`
|
||||
LoginDefaultOrg bool `json:"login_default_org,omitempty"`
|
||||
TriggerIntrospectionProjections bool `json:"trigger_introspection_projections,omitempty"`
|
||||
LegacyIntrospection bool `json:"legacy_introspection,omitempty"`
|
||||
UserSchema bool `json:"user_schema,omitempty"`
|
||||
TokenExchange bool `json:"token_exchange,omitempty"`
|
||||
WebKey bool `json:"web_key,omitempty"`
|
||||
DebugOIDCParentError bool `json:"debug_oidc_parent_error,omitempty"`
|
||||
OIDCSingleV1SessionTermination bool `json:"oidc_single_v1_session_termination,omitempty"`
|
||||
DisableUserTokenEvent bool `json:"disable_user_token_event,omitempty"`
|
||||
EnableBackChannelLogout bool `json:"enable_back_channel_logout,omitempty"`
|
||||
LoginV2 LoginV2 `json:"login_v2,omitempty"`
|
||||
PermissionCheckV2 bool `json:"permission_check_v2,omitempty"`
|
||||
ConsoleUseV2UserApi bool `json:"console_use_v2_user_api,omitempty"`
|
||||
}
|
||||
|
||||
/* Note: do not generate the stringer or enumer for this type, is it breaks existing events */
|
||||
|
||||
type ImprovedPerformanceType int32
|
||||
|
||||
const (
|
||||
ImprovedPerformanceTypeUnspecified ImprovedPerformanceType = iota
|
||||
ImprovedPerformanceTypeOrgByID
|
||||
)
|
||||
|
||||
func (f Features) ShouldUseImprovedPerformance(typ ImprovedPerformanceType) bool {
|
||||
return slices.Contains(f.ImprovedPerformance, typ)
|
||||
}
|
||||
|
||||
type LoginV2 struct {
|
||||
Required bool `json:"required,omitempty"`
|
||||
BaseURI *url.URL `json:"base_uri,omitempty"`
|
||||
|
@@ -14,7 +14,6 @@ type InstanceFeatures struct {
|
||||
LegacyIntrospection FeatureSource[bool]
|
||||
UserSchema FeatureSource[bool]
|
||||
TokenExchange FeatureSource[bool]
|
||||
ImprovedPerformance FeatureSource[[]feature.ImprovedPerformanceType]
|
||||
WebKey FeatureSource[bool]
|
||||
DebugOIDCParentError FeatureSource[bool]
|
||||
OIDCSingleV1SessionTermination FeatureSource[bool]
|
||||
|
@@ -44,8 +44,6 @@ func (m *InstanceFeaturesReadModel) Reduce() (err error) {
|
||||
err = reduceInstanceFeatureSet(m.instance, e)
|
||||
case *feature_v2.SetEvent[*feature.LoginV2]:
|
||||
err = reduceInstanceFeatureSet(m.instance, e)
|
||||
case *feature_v2.SetEvent[[]feature.ImprovedPerformanceType]:
|
||||
err = reduceInstanceFeatureSet(m.instance, e)
|
||||
}
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -67,7 +65,6 @@ func (m *InstanceFeaturesReadModel) Query() *eventstore.SearchQueryBuilder {
|
||||
feature_v2.InstanceLegacyIntrospectionEventType,
|
||||
feature_v2.InstanceUserSchemaEventType,
|
||||
feature_v2.InstanceTokenExchangeEventType,
|
||||
feature_v2.InstanceImprovedPerformanceEventType,
|
||||
feature_v2.InstanceWebKeyEventType,
|
||||
feature_v2.InstanceDebugOIDCParentErrorEventType,
|
||||
feature_v2.InstanceOIDCSingleV1SessionTerminationEventType,
|
||||
@@ -97,7 +94,6 @@ func (m *InstanceFeaturesReadModel) populateFromSystem() bool {
|
||||
m.instance.LegacyIntrospection = m.system.LegacyIntrospection
|
||||
m.instance.UserSchema = m.system.UserSchema
|
||||
m.instance.TokenExchange = m.system.TokenExchange
|
||||
m.instance.ImprovedPerformance = m.system.ImprovedPerformance
|
||||
m.instance.OIDCSingleV1SessionTermination = m.system.OIDCSingleV1SessionTermination
|
||||
m.instance.DisableUserTokenEvent = m.system.DisableUserTokenEvent
|
||||
m.instance.EnableBackChannelLogout = m.system.EnableBackChannelLogout
|
||||
@@ -124,8 +120,6 @@ func reduceInstanceFeatureSet[T any](features *InstanceFeatures, event *feature_
|
||||
features.UserSchema.set(level, event.Value)
|
||||
case feature.KeyTokenExchange:
|
||||
features.TokenExchange.set(level, event.Value)
|
||||
case feature.KeyImprovedPerformance:
|
||||
features.ImprovedPerformance.set(level, event.Value)
|
||||
case feature.KeyWebKey:
|
||||
features.WebKey.set(level, event.Value)
|
||||
case feature.KeyDebugOIDCParentError:
|
||||
|
@@ -8,13 +8,10 @@ import (
|
||||
"time"
|
||||
|
||||
sq "github.com/Masterminds/squirrel"
|
||||
"github.com/zitadel/logging"
|
||||
|
||||
"github.com/zitadel/zitadel/internal/api/authz"
|
||||
domain_pkg "github.com/zitadel/zitadel/internal/domain"
|
||||
es "github.com/zitadel/zitadel/internal/eventstore"
|
||||
"github.com/zitadel/zitadel/internal/eventstore/handler/v2"
|
||||
"github.com/zitadel/zitadel/internal/feature"
|
||||
"github.com/zitadel/zitadel/internal/query/projection"
|
||||
"github.com/zitadel/zitadel/internal/telemetry/tracing"
|
||||
"github.com/zitadel/zitadel/internal/v2/eventstore"
|
||||
@@ -134,10 +131,14 @@ func (q *Queries) OrgByID(ctx context.Context, shouldTriggerBulk bool, id string
|
||||
}
|
||||
}()
|
||||
|
||||
if !authz.GetInstance(ctx).Features().ShouldUseImprovedPerformance(feature.ImprovedPerformanceTypeOrgByID) {
|
||||
return q.oldOrgByID(ctx, shouldTriggerBulk, id)
|
||||
if !shouldTriggerBulk {
|
||||
return q.orgFromProjection(ctx, id)
|
||||
}
|
||||
|
||||
return q.orgFromEventstore(ctx, id)
|
||||
}
|
||||
|
||||
func (q *Queries) orgFromEventstore(ctx context.Context, id string) (*Org, error) {
|
||||
foundOrg := readmodel.NewOrg(id)
|
||||
eventCount, err := q.eventStoreV4.Query(
|
||||
ctx,
|
||||
@@ -168,17 +169,7 @@ func (q *Queries) OrgByID(ctx context.Context, shouldTriggerBulk bool, id string
|
||||
}, nil
|
||||
}
|
||||
|
||||
func (q *Queries) oldOrgByID(ctx context.Context, shouldTriggerBulk bool, id string) (org *Org, err error) {
|
||||
ctx, span := tracing.NewSpan(ctx)
|
||||
defer func() { span.EndWithError(err) }()
|
||||
|
||||
if shouldTriggerBulk {
|
||||
_, traceSpan := tracing.NewNamedSpan(ctx, "TriggerOrgProjection")
|
||||
ctx, err = projection.OrgProjection.Trigger(ctx, handler.WithAwaitRunning())
|
||||
logging.OnError(err).Debug("trigger failed")
|
||||
traceSpan.EndWithError(err)
|
||||
}
|
||||
|
||||
func (q *Queries) orgFromProjection(ctx context.Context, id string) (org *Org, err error) {
|
||||
stmt, scan := prepareOrgQuery()
|
||||
query, args, err := stmt.Where(sq.Eq{
|
||||
OrgColumnID.identifier(): id,
|
||||
|
@@ -80,10 +80,6 @@ func (*instanceFeatureProjection) Reducers() []handler.AggregateReducer {
|
||||
Event: feature_v2.InstanceTokenExchangeEventType,
|
||||
Reduce: reduceInstanceSetFeature[bool],
|
||||
},
|
||||
{
|
||||
Event: feature_v2.InstanceImprovedPerformanceEventType,
|
||||
Reduce: reduceInstanceSetFeature[[]feature.ImprovedPerformanceType],
|
||||
},
|
||||
{
|
||||
Event: feature_v2.InstanceWebKeyEventType,
|
||||
Reduce: reduceInstanceSetFeature[bool],
|
||||
|
@@ -72,10 +72,6 @@ func (*systemFeatureProjection) Reducers() []handler.AggregateReducer {
|
||||
Event: feature_v2.SystemTokenExchangeEventType,
|
||||
Reduce: reduceSystemSetFeature[bool],
|
||||
},
|
||||
{
|
||||
Event: feature_v2.SystemImprovedPerformanceEventType,
|
||||
Reduce: reduceSystemSetFeature[[]feature.ImprovedPerformanceType],
|
||||
},
|
||||
{
|
||||
Event: feature_v2.SystemDisableUserTokenEvent,
|
||||
Reduce: reduceSystemSetFeature[bool],
|
||||
|
@@ -25,7 +25,6 @@ type SystemFeatures struct {
|
||||
LegacyIntrospection FeatureSource[bool]
|
||||
UserSchema FeatureSource[bool]
|
||||
TokenExchange FeatureSource[bool]
|
||||
ImprovedPerformance FeatureSource[[]feature.ImprovedPerformanceType]
|
||||
OIDCSingleV1SessionTermination FeatureSource[bool]
|
||||
DisableUserTokenEvent FeatureSource[bool]
|
||||
EnableBackChannelLogout FeatureSource[bool]
|
||||
|
@@ -37,11 +37,6 @@ func (m *SystemFeaturesReadModel) Reduce() error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
case *feature_v2.SetEvent[[]feature.ImprovedPerformanceType]:
|
||||
err := reduceSystemFeatureSet(m.system, e)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
return m.ReadModel.Reduce()
|
||||
@@ -60,7 +55,6 @@ func (m *SystemFeaturesReadModel) Query() *eventstore.SearchQueryBuilder {
|
||||
feature_v2.SystemLegacyIntrospectionEventType,
|
||||
feature_v2.SystemUserSchemaEventType,
|
||||
feature_v2.SystemTokenExchangeEventType,
|
||||
feature_v2.SystemImprovedPerformanceEventType,
|
||||
feature_v2.SystemOIDCSingleV1SessionTerminationEventType,
|
||||
feature_v2.SystemDisableUserTokenEvent,
|
||||
feature_v2.SystemEnableBackChannelLogout,
|
||||
@@ -94,8 +88,6 @@ func reduceSystemFeatureSet[T any](features *SystemFeatures, event *feature_v2.S
|
||||
features.UserSchema.set(level, event.Value)
|
||||
case feature.KeyTokenExchange:
|
||||
features.TokenExchange.set(level, event.Value)
|
||||
case feature.KeyImprovedPerformance:
|
||||
features.ImprovedPerformance.set(level, event.Value)
|
||||
case feature.KeyOIDCSingleV1SessionTermination:
|
||||
features.OIDCSingleV1SessionTermination.set(level, event.Value)
|
||||
case feature.KeyDisableUserTokenEvent:
|
||||
|
@@ -12,7 +12,6 @@ func init() {
|
||||
eventstore.RegisterFilterEventMapper(AggregateType, SystemLegacyIntrospectionEventType, eventstore.GenericEventMapper[SetEvent[bool]])
|
||||
eventstore.RegisterFilterEventMapper(AggregateType, SystemUserSchemaEventType, eventstore.GenericEventMapper[SetEvent[bool]])
|
||||
eventstore.RegisterFilterEventMapper(AggregateType, SystemTokenExchangeEventType, eventstore.GenericEventMapper[SetEvent[bool]])
|
||||
eventstore.RegisterFilterEventMapper(AggregateType, SystemImprovedPerformanceEventType, eventstore.GenericEventMapper[SetEvent[[]feature.ImprovedPerformanceType]])
|
||||
eventstore.RegisterFilterEventMapper(AggregateType, SystemOIDCSingleV1SessionTerminationEventType, eventstore.GenericEventMapper[SetEvent[bool]])
|
||||
eventstore.RegisterFilterEventMapper(AggregateType, SystemDisableUserTokenEvent, eventstore.GenericEventMapper[SetEvent[bool]])
|
||||
eventstore.RegisterFilterEventMapper(AggregateType, SystemEnableBackChannelLogout, eventstore.GenericEventMapper[SetEvent[bool]])
|
||||
@@ -25,7 +24,6 @@ func init() {
|
||||
eventstore.RegisterFilterEventMapper(AggregateType, InstanceLegacyIntrospectionEventType, eventstore.GenericEventMapper[SetEvent[bool]])
|
||||
eventstore.RegisterFilterEventMapper(AggregateType, InstanceUserSchemaEventType, eventstore.GenericEventMapper[SetEvent[bool]])
|
||||
eventstore.RegisterFilterEventMapper(AggregateType, InstanceTokenExchangeEventType, eventstore.GenericEventMapper[SetEvent[bool]])
|
||||
eventstore.RegisterFilterEventMapper(AggregateType, InstanceImprovedPerformanceEventType, eventstore.GenericEventMapper[SetEvent[[]feature.ImprovedPerformanceType]])
|
||||
eventstore.RegisterFilterEventMapper(AggregateType, InstanceWebKeyEventType, eventstore.GenericEventMapper[SetEvent[bool]])
|
||||
eventstore.RegisterFilterEventMapper(AggregateType, InstanceDebugOIDCParentErrorEventType, eventstore.GenericEventMapper[SetEvent[bool]])
|
||||
eventstore.RegisterFilterEventMapper(AggregateType, InstanceOIDCSingleV1SessionTerminationEventType, eventstore.GenericEventMapper[SetEvent[bool]])
|
||||
|
@@ -17,7 +17,6 @@ var (
|
||||
SystemLegacyIntrospectionEventType = setEventTypeFromFeature(feature.LevelSystem, feature.KeyLegacyIntrospection)
|
||||
SystemUserSchemaEventType = setEventTypeFromFeature(feature.LevelSystem, feature.KeyUserSchema)
|
||||
SystemTokenExchangeEventType = setEventTypeFromFeature(feature.LevelSystem, feature.KeyTokenExchange)
|
||||
SystemImprovedPerformanceEventType = setEventTypeFromFeature(feature.LevelSystem, feature.KeyImprovedPerformance)
|
||||
SystemOIDCSingleV1SessionTerminationEventType = setEventTypeFromFeature(feature.LevelSystem, feature.KeyOIDCSingleV1SessionTermination)
|
||||
SystemDisableUserTokenEvent = setEventTypeFromFeature(feature.LevelSystem, feature.KeyDisableUserTokenEvent)
|
||||
SystemEnableBackChannelLogout = setEventTypeFromFeature(feature.LevelSystem, feature.KeyEnableBackChannelLogout)
|
||||
@@ -30,7 +29,6 @@ var (
|
||||
InstanceLegacyIntrospectionEventType = setEventTypeFromFeature(feature.LevelInstance, feature.KeyLegacyIntrospection)
|
||||
InstanceUserSchemaEventType = setEventTypeFromFeature(feature.LevelInstance, feature.KeyUserSchema)
|
||||
InstanceTokenExchangeEventType = setEventTypeFromFeature(feature.LevelInstance, feature.KeyTokenExchange)
|
||||
InstanceImprovedPerformanceEventType = setEventTypeFromFeature(feature.LevelInstance, feature.KeyImprovedPerformance)
|
||||
InstanceWebKeyEventType = setEventTypeFromFeature(feature.LevelInstance, feature.KeyWebKey)
|
||||
InstanceDebugOIDCParentErrorEventType = setEventTypeFromFeature(feature.LevelInstance, feature.KeyDebugOIDCParentError)
|
||||
InstanceOIDCSingleV1SessionTerminationEventType = setEventTypeFromFeature(feature.LevelInstance, feature.KeyOIDCSingleV1SessionTermination)
|
||||
|
@@ -34,21 +34,6 @@ message FeatureFlag {
|
||||
];
|
||||
}
|
||||
|
||||
message ImprovedPerformanceFeatureFlag {
|
||||
repeated ImprovedPerformance execution_paths = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "[1]";
|
||||
description: "Which of the performance improvements is enabled";
|
||||
}
|
||||
];
|
||||
|
||||
Source source = 2 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
description: "The source where the setting of the feature was defined. The source may be the resource itself or a resource owner through inheritance.";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message LoginV2FeatureFlag {
|
||||
bool required = 1;
|
||||
optional string base_uri = 2;
|
||||
@@ -59,24 +44,6 @@ message LoginV2FeatureFlag {
|
||||
];
|
||||
}
|
||||
|
||||
enum ImprovedPerformance {
|
||||
IMPROVED_PERFORMANCE_UNSPECIFIED = 0;
|
||||
// Uses the eventstore to query the org by id
|
||||
// instead of the sql table.
|
||||
IMPROVED_PERFORMANCE_ORG_BY_ID = 1;
|
||||
// Improves performance on write side by using
|
||||
// optimized processes to query data to determine
|
||||
// correctnes of data.
|
||||
IMPROVED_PERFORMANCE_PROJECT_GRANT = 2;
|
||||
IMPROVED_PERFORMANCE_PROJECT = 3;
|
||||
IMPROVED_PERFORMANCE_USER_GRANT = 4;
|
||||
|
||||
// Improve performance on write side when
|
||||
// users are checked against verified domains
|
||||
// from other organizations.
|
||||
IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIED = 5;
|
||||
}
|
||||
|
||||
message LoginV2 {
|
||||
// Require that all users must use the new login UI. If enabled, all users will be redirected to the login V2 regardless of the application's preference.
|
||||
bool required = 1;
|
||||
|
@@ -123,8 +123,8 @@ message GetInstanceFeaturesRequest {
|
||||
}
|
||||
|
||||
message GetInstanceFeaturesResponse {
|
||||
reserved 7;
|
||||
reserved "actions";
|
||||
reserved 7, 8;
|
||||
reserved "actions", "improved_performance";
|
||||
zitadel.object.v2.Details details = 1;
|
||||
FeatureFlag login_default_org = 2 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
@@ -161,13 +161,6 @@ message GetInstanceFeaturesResponse {
|
||||
}
|
||||
];
|
||||
|
||||
ImprovedPerformanceFeatureFlag improved_performance = 8 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "[1]";
|
||||
description: "Improves performance of specified execution paths.";
|
||||
}
|
||||
];
|
||||
|
||||
FeatureFlag web_key = 9 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "true";
|
||||
|
@@ -96,8 +96,8 @@ message ResetSystemFeaturesResponse {
|
||||
message GetSystemFeaturesRequest {}
|
||||
|
||||
message GetSystemFeaturesResponse {
|
||||
reserved 7;
|
||||
reserved "actions";
|
||||
reserved 7, 8;
|
||||
reserved "actions", "improved_performance";
|
||||
zitadel.object.v2.Details details = 1;
|
||||
FeatureFlag login_default_org = 2 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
@@ -134,13 +134,6 @@ message GetSystemFeaturesResponse {
|
||||
}
|
||||
];
|
||||
|
||||
ImprovedPerformanceFeatureFlag improved_performance = 8 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "[1]";
|
||||
description: "Improves performance of specified execution paths.";
|
||||
}
|
||||
];
|
||||
|
||||
FeatureFlag oidc_single_v1_session_termination = 9 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "true";
|
||||
|
@@ -33,36 +33,3 @@ message FeatureFlag {
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
message ImprovedPerformanceFeatureFlag {
|
||||
repeated ImprovedPerformance execution_paths = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "[1]";
|
||||
description: "Which of the performance improvements is enabled";
|
||||
}
|
||||
];
|
||||
|
||||
Source source = 2 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
description: "The source where the setting of the feature was defined. The source may be the resource itself or a resource owner through inheritance.";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
enum ImprovedPerformance {
|
||||
IMPROVED_PERFORMANCE_UNSPECIFIED = 0;
|
||||
// Uses the eventstore to query the org by id
|
||||
// instead of the sql table.
|
||||
IMPROVED_PERFORMANCE_ORG_BY_ID = 1;
|
||||
// Improves performance on write side by using
|
||||
// optimized processes to query data to determine
|
||||
// correctnes of data.
|
||||
IMPROVED_PERFORMANCE_PROJECT_GRANT = 2;
|
||||
IMPROVED_PERFORMANCE_PROJECT = 3;
|
||||
IMPROVED_PERFORMANCE_USER_GRANT = 4;
|
||||
|
||||
// Improve performance on write side when
|
||||
// users are checked against verified domains
|
||||
// from other organizations.
|
||||
IMPROVED_PERFORMANCE_ORG_DOMAIN_VERIFIED = 5;
|
||||
}
|
@@ -11,8 +11,8 @@ import "zitadel/feature/v2beta/feature.proto";
|
||||
option go_package = "github.com/zitadel/zitadel/pkg/grpc/feature/v2beta;feature";
|
||||
|
||||
message SetInstanceFeaturesRequest{
|
||||
reserved 6;
|
||||
reserved "actions";
|
||||
reserved 6, 7;
|
||||
reserved "actions", "improved_performance";
|
||||
optional bool login_default_org = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "true";
|
||||
@@ -46,15 +46,6 @@ message SetInstanceFeaturesRequest{
|
||||
}
|
||||
];
|
||||
|
||||
repeated ImprovedPerformance improved_performance = 7 [
|
||||
(validate.rules).repeated.unique = true,
|
||||
(validate.rules).repeated.items.enum = {defined_only: true, not_in: [0]},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "[1]";
|
||||
description: "Improves performance of specified execution paths.";
|
||||
}
|
||||
];
|
||||
|
||||
optional bool web_key = 8 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "true";
|
||||
@@ -97,8 +88,8 @@ message GetInstanceFeaturesRequest {
|
||||
}
|
||||
|
||||
message GetInstanceFeaturesResponse {
|
||||
reserved 7;
|
||||
reserved "actions";
|
||||
reserved 7, 8;
|
||||
reserved "actions", "improved_performance";
|
||||
zitadel.object.v2beta.Details details = 1;
|
||||
FeatureFlag login_default_org = 2 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
@@ -135,13 +126,6 @@ message GetInstanceFeaturesResponse {
|
||||
}
|
||||
];
|
||||
|
||||
ImprovedPerformanceFeatureFlag improved_performance = 8 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "[1]";
|
||||
description: "Improves performance of specified execution paths.";
|
||||
}
|
||||
];
|
||||
|
||||
FeatureFlag web_key = 9 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "true";
|
||||
|
@@ -11,8 +11,8 @@ import "zitadel/feature/v2beta/feature.proto";
|
||||
option go_package = "github.com/zitadel/zitadel/pkg/grpc/feature/v2beta;feature";
|
||||
|
||||
message SetSystemFeaturesRequest{
|
||||
reserved 6;
|
||||
reserved "actions";
|
||||
reserved 6, 7;
|
||||
reserved "actions", "improved_performance";
|
||||
optional bool login_default_org = 1 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "true";
|
||||
@@ -48,15 +48,6 @@ message SetSystemFeaturesRequest{
|
||||
}
|
||||
];
|
||||
|
||||
repeated ImprovedPerformance improved_performance = 7 [
|
||||
(validate.rules).repeated.unique = true,
|
||||
(validate.rules).repeated.items.enum = {defined_only: true, not_in: [0]},
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "[1]";
|
||||
description: "Improves performance of specified execution paths.";
|
||||
}
|
||||
];
|
||||
|
||||
optional bool oidc_single_v1_session_termination = 8 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "true";
|
||||
@@ -78,8 +69,8 @@ message ResetSystemFeaturesResponse {
|
||||
message GetSystemFeaturesRequest {}
|
||||
|
||||
message GetSystemFeaturesResponse {
|
||||
reserved 7;
|
||||
reserved "actions";
|
||||
reserved 7, 8;
|
||||
reserved "actions", "improved_performance";
|
||||
zitadel.object.v2beta.Details details = 1;
|
||||
FeatureFlag login_default_org = 2 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
@@ -116,13 +107,6 @@ message GetSystemFeaturesResponse {
|
||||
}
|
||||
];
|
||||
|
||||
ImprovedPerformanceFeatureFlag improved_performance = 8 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "[1]";
|
||||
description: "Improves performance of specified execution paths.";
|
||||
}
|
||||
];
|
||||
|
||||
FeatureFlag oidc_single_v1_session_termination = 9 [
|
||||
(grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {
|
||||
example: "true";
|
||||
|
Reference in New Issue
Block a user