Merge pull request #785 from openziti/wildcard-domain-intercept

Wildcard domain intercept
This commit is contained in:
ekoby
2021-09-16 09:10:20 -04:00
committed by GitHub
2 changed files with 15 additions and 3 deletions
@@ -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"},
},
},
+10 -3
View File
@@ -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