Skip to content

Commit

Permalink
GATE-3151: adds support for egress policies
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Borkenstein authored and ivan-section-io committed Jan 12, 2023
1 parent 373cced commit 1e59cf0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .changelog/1142.txt
@@ -0,0 +1,3 @@
```release-note:enhancement
teams_rules: adds support for Egress Policies
```
17 changes: 14 additions & 3 deletions teams_rules.go
Expand Up @@ -35,6 +35,14 @@ type TeamsRuleSettings struct {

// whether to disable dnssec validation for allow action
InsecureDisableDNSSECValidation bool `json:"insecure_disable_dnssec_validation"`

EgressSettings *EgressSettings `json:"egress"`
}

type EgressSettings struct {
Ipv6Range string `json:"ipv6"`
Ipv4 string `json:"ipv4"`
Ipv4Fallback string `json:"ipv4_fallback"`
}

// TeamsL4OverrideSettings used in l4 filter type rule with action set to override.
Expand All @@ -61,9 +69,10 @@ type TeamsFilterType string
type TeamsGatewayAction string

const (
HttpFilter TeamsFilterType = "http"
DnsFilter TeamsFilterType = "dns"
L4Filter TeamsFilterType = "l4"
HttpFilter TeamsFilterType = "http"
DnsFilter TeamsFilterType = "dns"
L4Filter TeamsFilterType = "l4"
EgressFilter TeamsFilterType = "egress"
)

const (
Expand All @@ -79,6 +88,7 @@ const (
NoIsolate TeamsGatewayAction = "noisolate"
Override TeamsGatewayAction = "override"
L4Override TeamsGatewayAction = "l4_override"
Egress TeamsGatewayAction = "egress"
)

func TeamsRulesActionValues() []string {
Expand All @@ -95,6 +105,7 @@ func TeamsRulesActionValues() []string {
string(NoIsolate),
string(Override),
string(L4Override),
string(Egress),
}
}

Expand Down

0 comments on commit 1e59cf0

Please sign in to comment.