-
Notifications
You must be signed in to change notification settings - Fork 703
feat(api): add insecureSkipVerify flag to Backend TLS settigns #6222
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -123,7 +123,6 @@ type UnixSocket struct { | |
|
|
||
| // BackendSpec describes the desired state of BackendSpec. | ||
| // +kubebuilder:validation:XValidation:rule="self.type != 'DynamicResolver' || !has(self.endpoints)",message="DynamicResolver type cannot have endpoints specified" | ||
| // +kubebuilder:validation:XValidation:rule="has(self.tls) ? self.type == 'DynamicResolver' : true",message="TLS settings can only be specified for DynamicResolver backends" | ||
| type BackendSpec struct { | ||
| // Type defines the type of the backend. Defaults to "Endpoints" | ||
| // | ||
|
|
@@ -161,7 +160,6 @@ type BackendSpec struct { | |
| } | ||
|
|
||
| // BackendTLSSettings holds the TLS settings for the backend. | ||
| // Only used for DynamicResolver backends. | ||
| // +kubebuilder:validation:XValidation:message="must not contain both CACertificateRefs and WellKnownCACertificates",rule="!(has(self.caCertificateRefs) && size(self.caCertificateRefs) > 0 && has(self.wellKnownCACertificates) && self.wellKnownCACertificates != \"\")" | ||
| // +kubebuilder:validation:XValidation:message="must specify either CACertificateRefs or WellKnownCACertificates",rule="(has(self.caCertificateRefs) && size(self.caCertificateRefs) > 0 || has(self.wellKnownCACertificates) && self.wellKnownCACertificates != \"\")" | ||
| type BackendTLSSettings struct { | ||
|
|
@@ -176,6 +174,8 @@ type BackendTLSSettings struct { | |
| // specified. Only one of CACertificateRefs or WellKnownCACertificates may be specified, | ||
| // not both. | ||
| // | ||
| // Only used for DynamicResolver backends. | ||
| // | ||
| // +kubebuilder:validation:MaxItems=8 | ||
| // +optional | ||
| CACertificateRefs []gwapiv1.LocalObjectReference `json:"caCertificateRefs,omitempty"` | ||
|
|
@@ -187,8 +187,18 @@ type BackendTLSSettings struct { | |
| // must be specified with at least one entry for a valid configuration. Only one of | ||
| // CACertificateRefs or WellKnownCACertificates may be specified, not both. | ||
| // | ||
| // Only used for DynamicResolver backends. | ||
| // | ||
| // +optional | ||
| WellKnownCACertificates *gwapiv1a3.WellKnownCACertificatesType `json:"wellKnownCACertificates,omitempty"` | ||
|
|
||
| // InsecureSkipVerify indicates whether the upstream's certificate verification | ||
| // should be skipped. Defaults to "false". | ||
| // | ||
| // +kubebuilder:default=false | ||
| // +optional | ||
| // +notImplementedHide | ||
| InsecureSkipVerify *bool `json:"insecureSkipVerify,omitempty"` | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. im not a fan of this term, but its an industry wide term
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @envoyproxy/gateway-maintainers thoughts on
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 insecureSkipVerfiy |
||
| } | ||
|
|
||
| // BackendType defines the type of the Backend. | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| backends: | ||
| - apiVersion: gateway.envoyproxy.io/v1alpha1 | ||
| kind: Backend | ||
| metadata: | ||
| name: backend-1 | ||
| namespace: default | ||
| spec: | ||
| tls: | ||
| caCertificateRefs: | ||
| - name: backend-ca-certificate | ||
| group: "" | ||
| kind: ConfigMap | ||
| endpoints: | ||
| - ip: | ||
| address: 1.1.1.1 | ||
| port: 3001 | ||
| zone: zone1 | ||
| - apiVersion: gateway.envoyproxy.io/v1alpha1 | ||
| kind: Backend | ||
| metadata: | ||
| name: backend-2 | ||
| namespace: default | ||
| spec: | ||
| tls: | ||
| wellKnownCACertificates: System | ||
| endpoints: | ||
| - ip: | ||
| address: 2.2.2.2 | ||
| port: 3001 | ||
| zone: zone2 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| backends: | ||
| - apiVersion: gateway.envoyproxy.io/v1alpha1 | ||
| kind: Backend | ||
| metadata: | ||
| creationTimestamp: null | ||
| name: backend-1 | ||
| namespace: default | ||
| spec: | ||
| endpoints: | ||
| - ip: | ||
| address: 1.1.1.1 | ||
| port: 3001 | ||
| zone: zone1 | ||
| tls: | ||
| caCertificateRefs: | ||
| - group: "" | ||
| kind: ConfigMap | ||
| name: backend-ca-certificate | ||
| status: | ||
| conditions: | ||
| - lastTransitionTime: null | ||
| message: 'The Backend was not accepted: TLS.CACertificateRefs settings can only | ||
| be specified for DynamicResolver backends' | ||
| reason: Accepted | ||
| status: "False" | ||
| type: Invalid | ||
| - apiVersion: gateway.envoyproxy.io/v1alpha1 | ||
| kind: Backend | ||
| metadata: | ||
| creationTimestamp: null | ||
| name: backend-2 | ||
| namespace: default | ||
| spec: | ||
| endpoints: | ||
| - ip: | ||
| address: 2.2.2.2 | ||
| port: 3001 | ||
| zone: zone2 | ||
| tls: | ||
| wellKnownCACertificates: System | ||
| status: | ||
| conditions: | ||
| - lastTransitionTime: null | ||
| message: 'The Backend was not accepted: TLS.WellKnownCACertificates settings | ||
| can only be specified for DynamicResolver backends' | ||
| reason: Accepted | ||
| status: "False" | ||
| type: Invalid | ||
| infraIR: {} | ||
| xdsIR: {} |
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.
I dont think will work, we'll need to enable this TLS section for all backend, lets raise a GH issue to track it