diff --git a/controller/persistence/migration_initialize.go b/controller/persistence/migration_initialize.go index 72091e48e..e5dfb1114 100644 --- a/controller/persistence/migration_initialize.go +++ b/controller/persistence/migration_initialize.go @@ -276,6 +276,10 @@ var tunnelDefinitions = map[string]interface{}{ "format": "hostname", "not": map[string]interface{}{"$ref": "#/definitions/ipAddressFormat"}, }, + "wildcardDomain": map[string]interface{}{ + "type": "string", + "pattern": "^\\*\\.(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9])$", + }, "cidr": map[string]interface{}{ "type": "string", "oneOf": []interface{}{ @@ -297,6 +301,7 @@ var tunnelDefinitions = map[string]interface{}{ "oneOf": []interface{}{ map[string]interface{}{"$ref": "#/definitions/ipAddress"}, map[string]interface{}{"$ref": "#/definitions/hostname"}, + map[string]interface{}{"$ref": "#/definitions/wildcardDomain"}, map[string]interface{}{"$ref": "#/definitions/cidr"}, }, }, diff --git a/controller/persistence/migrations.go b/controller/persistence/migrations.go index 7d5c87281..234ef92bb 100644 --- a/controller/persistence/migrations.go +++ b/controller/persistence/migrations.go @@ -22,7 +22,7 @@ import ( ) const ( - CurrentDbVersion = 24 + CurrentDbVersion = 25 FieldVersion = "version" ) @@ -96,14 +96,21 @@ func (m *Migrations) migrate(step *boltz.MigrationStep) int { step.SetError(m.stores.ConfigType.Update(step.Ctx, hostV2ConfigType, nil)) } - if step.CurrentVersion < 23 { + if step.CurrentVersion < 23 { m.addProcessMultiPostureCheck(step) - } + } if step.CurrentVersion < 24 { m.addIdentityIdToSessions(step) } + if step.CurrentVersion < 25 { + step.SetError(m.stores.ConfigType.Update(step.Ctx, interceptV1ConfigType, nil)) + step.SetError(m.stores.ConfigType.Update(step.Ctx, hostV1ConfigType, nil)) + step.SetError(m.stores.ConfigType.Update(step.Ctx, hostV2ConfigType, nil)) + + } + // current version if step.CurrentVersion <= CurrentDbVersion { return CurrentDbVersion