-
Notifications
You must be signed in to change notification settings - Fork 597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GATE-4979: Add support for resolver policies #1436
Conversation
teams_rules.go
Outdated
@@ -57,6 +57,12 @@ type TeamsRuleSettings struct { | |||
|
|||
// Action taken when an untrusted origin certificate error occurs in a http allow rule | |||
UntrustedCertSettings *UntrustedCertSettings `json:"untrusted_cert"` | |||
|
|||
// Specifies that a resolver policy should use Cloudflare's DNS Resolver. | |||
ResolveDnsThroughCF bool `json:"resolve_dns_through_cloudflare,omitempty"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as the JSON is resolve_dns_through_cloudflare
, let's keep the struct matching it.
also, per https://github.com/cloudflare/cloudflare-go/blob/master/docs/conventions.md#booleans (and eventually semgrep checks when the queue clears), we'll want to use *bool
, not bool
here.
teams_rules.go
Outdated
@@ -101,6 +107,28 @@ type TeamsCheckSessionSettings struct { | |||
Duration Duration `json:"duration"` | |||
} | |||
|
|||
type ( | |||
DnsResolverSettings struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we please prefix these types (like the others) to avoid polluting the global namespace?
couple of small convention changes to address but looks good overall 👍 |
thanks Jacob, will fix these now |
changelog detected ✅ |
8b1f00f
to
ceecdc1
Compare
swapped to using inbuilt helpers in 553f4e2 but other than that, looks great! thanks 🏆 |
This functionality has been released in v0.81.0. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
Description
Resolver policies allow a Zero Trust customer to configure which upstream DNS Resolver to use when criteria in a a rule are matched.
This PR provides this functionality to Golang API Clients.
Has your change been tested?
Additional serialization tests have been added
Types of changes
What sort of change does your code introduce/modify?
Checklist:
and relies on stable APIs.