Skip to content

Commit

Permalink
feat: fix unit tests
Browse files Browse the repository at this point in the history
Signed-off-by: zufardhiyaulhaq <zufardhiyaulhaq@gmail.com>
  • Loading branch information
zufardhiyaulhaq committed Apr 19, 2024
1 parent 206ed3e commit 8ae90f7
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion internal/gatewayapi/clienttrafficpolicy.go
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@ func (t *Translator) translateListenerTLSParameters(policy *egv1a1.ClientTraffic

if len(irCACert.Certificate) > 0 {
httpIR.TLS.CACertificate = irCACert
httpIR.TLS.RequiredClientCertificate = !tlsParams.ClientValidation.Optional
httpIR.TLS.RequireClientCertificate = !tlsParams.ClientValidation.Optional
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,14 @@ infraIR:
name: envoy-gateway/gateway-1/http-1
ports:
- containerPort: 10443
name: http-1
name: https-443
protocol: HTTPS
servicePort: 443
- address: null
name: envoy-gateway/gateway-1/http-2
ports:
- containerPort: 8080
name: http-2
name: http-8080
protocol: HTTP
servicePort: 8080
metadata:
Expand All @@ -221,7 +221,7 @@ infraIR:
name: envoy-gateway/gateway-2/http-1
ports:
- containerPort: 10443
name: http-1
name: https-443
protocol: HTTPS
servicePort: 443
metadata:
Expand Down Expand Up @@ -252,7 +252,7 @@ xdsIR:
- name: envoy-gateway/tls-secret-1
privateKey: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1JSUV2UUlCQURBTkJna3Foa2lHOXcwQkFRRUZBQVNDQktjd2dnU2pBZ0VBQW9JQkFRQzc3aHZBUEFlRlJucS8KdHBHVmRKTmVjYWFqSzZrUXlDalk1ci9wWHhOQmE5dldWUUhVbkNXVk95bHBFZGg2T2ZZbUdnb0phdE1UVFlBWAorVml2TFM5WHBIOG5QQ1lhWm9CZGkyUDQxZGtuazJSekZabWwvWFI1SFp0RFpqZURPM3d2Qkpvbm0rTXhQN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4TUY4T0R6cVR2Q3hMRjJYd3BScjdjSDFuZ2J4eUJ6cEdlbkpsVTI2Q2hJT1BMZUV1NTUyUVJYVGwrU2JlQQpXUzNpS01Pb3F5NGV0b0ExNWFueW43Zm01YnpINEcyZ3Yxd1pWYlBkT1dNQWRZU2I5NDIvR09CSWUzSnIyVHo3CjRJdDRROWFERnF1aG9iOTVQMUhHQkxSQ2Y5QT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
requiredClientCertificate: true
requireClientCertificate: true
maxVersion: "1.3"
minVersion: "1.2"
- address: 0.0.0.0
Expand Down Expand Up @@ -286,6 +286,6 @@ xdsIR:
- name: envoy-gateway/tls-secret-1
privateKey: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1JSUV2UUlCQURBTkJna3Foa2lHOXcwQkFRRUZBQVNDQktjd2dnU2pBZ0VBQW9JQkFRQzc3aHZBUEFlRlJucS8KdHBHVmRKTmVjYWFqSzZrUXlDalk1ci9wWHhOQmE5dldWUUhVbkNXVk95bHBFZGg2T2ZZbUdnb0phdE1UVFlBWAorVml2TFM5WHBIOG5QQ1lhWm9CZGkyUDQxZGtuazJSekZabWwvWFI1SFp0RFpqZURPM3d2Qkpvbm0rTXhQN0JrCjVMZ2U5aEZIUndqRWJMY1k3dys3enE4QkRBeUlIdjdPSjNhN3g5L2pYMlJaRnU3TzVyNXlmRVE2RnNLY3pURG8Kb0N4ZFVrTklndHBWQ29ETEt2Ykw2MW5kTnVsZTMvbURtL3YyU3lUSHVkMVM1ZHFzcDhrSmR1OFhVUmZjMllFbApGS1d2QnRuamgvanJMTVhGY2FoVi9veEpyQ0h1dC9QQ0xiQlRBalRldVNEYXVTN09IYkpSREt3bUg3b1Z2eUlDCmFJeWFZY1pOQWdNQkFBRUNnZ0VBSG1McVd4NHZCbk9ybHFLMGVNLzM5c1lLOEVpTTlra0c5eHRJWGVSTGxCWnIKM2dTeUNSTStXRzk2ZGZkaFkxSDFPa1ZDUGpJO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FYK1ZpdkxTOVhwSDhuUENZYVpvQmRpMlA0MWRrbmsyUnpGWm1sCi9YUjVIWnREWmplRE8zd3ZCSm9ubStNeFA3Qms1TGdlOWhGSFJ3akViTGNZN3crN3pxOEJEQXlJSHY3T0ozYTcKeDkvalgyUlpGdTdPNXI1eWZFUTZGc0tjelREb29DeGRVa05JZ3RwVkNvRExLdmJMNjFuZE51bGUzL21EbS92MgpTeVRIdWQxUzVkcXNwOGtKZHU4WFVSZmMyWUVsRktXdkJ0bmpoL2pyTE1YRmNhaFYvb3hKckNIdXQvUENMYkJUCkFqVGV1U0RhdVM3T0hiSlJES3dtSDdvVnZ5SUNhSXlhWWNaTkFnTUJBQUV3RFFZSktvWklodmNOQVFFTEJRQUQKZ2dFQkFHeW5yNGNPMWFZbjRNQk90aVJ2WHFJdllHNnpxZXNrNGpQbU96TjdiUTdyRzdNUngzSVQ2SW4zVFI4RApHbFAxVE54TTg5cXZRcXp4VERsdER3bXluTlV1SEdEUW4yV1Z1OFEyK0RqRnFoc3B1WHp0NnhVK2RoVVBxUnV1Ckt6c1l4TDNpMVlWZ2pDQWtBUmp4SGhMWHYwdkFUWUVRMlJ6Uko5c2ZGcWVCMHVxSk5WL0lHamJFSzQ2eTQ5QU0KNzU4TUY4T0R6cVR2Q3hMRjJYd3BScjdjSDFuZ2J4eUJ6cEdlbkpsVTI2Q2hJT1BMZUV1NTUyUVJYVGwrU2JlQQpXUzNpS01Pb3F5NGV0b0ExNWFueW43Zm01YnpINEcyZ3Yxd1pWYlBkT1dNQWRZU2I5NDIvR09CSWUzSnIyVHo3CjRJdDRROWFERnF1aG9iOTVQMUhHQkxSQ2Y5QT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
requiredClientCertificate: false
requireClientCertificate: false
maxVersion: "1.3"
minVersion: "1.2"
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ xdsIR:
- name: envoy-gateway/tls-secret-1
privateKey: LS0tLS1CRUdJTiBQUklW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Z2dFQkFHeW5yNGNPMWFZbjRNQk90aVJ2WHFJdllHNnpxZXNrNGpQbU96TjdiUTdyRzdNUngzSVQ2SW4zVFI4RApHbFAxVE54TTg5cXZRcXp4VERsdER3bXluTlV1SEdEUW4yV1Z1OFEyK0RqRnFoc3B1WHp0NnhVK2RoVVBxUnV1Ckt6c1l4TDNpMVlWZ2pDQWtBUmp4SGhMWHYwdkFUWUVRMlJ6Uko5c2ZGcWVCMHVxSk5WL0lHamJFSzQ2eTQ5QU0KNzU4TUY4T0R6cVR2Q3hMRjJYd3BScjdjSDFuZ2J4eUJ6cEdlbkpsVTI2Q2hJT1BMZUV1NTUyUVJYVGwrU2JlQQpXUzNpS01Pb3F5NGV0b0ExNWFueW43Zm01YnpINEcyZ3Yxd1pWYlBkT1dNQWRZU2I5NDIvR09CSWUzSnIyVHo3CjRJdDRROWFERnF1aG9iOTVQMUhHQkxSQ2Y5QT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
requiredClientCertificate: true
requireClientCertificate: true
maxVersion: "1.3"
minVersion: "1.2"
- address: 0.0.0.0
Expand Down Expand Up @@ -284,6 +284,6 @@ xdsIR:
- name: envoy-gateway/tls-secret-1
privateKey: LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0tLS0tCk1JSUV2UUlCQURBTkJna3Foa2lHOXcwQkFRRUZBQVNDQktjd2dnU2pBZ0VBQW9JQkFRQzc3aHZBUEFlRlJucS8KdHBHVmRKTmVjYWFqSzZrUXlDalk1ci9wWHhOQmE5dldWUUhVbkNXVk95bHBFZGg2T2ZZbUdnb0phdE1UVFlBWAorVml2TFM5WHBIOG5QQ1lhWm9CZGkyUDQxZGtuazJSekZabWwvWFI1SFp0RFpqZURPM3d2Qkpvbm0rTXhQN0JrCjVMZ2U5aEZIUndqRWJMY1k3dys3enE4QkRBeUlIdjdPSjNhN3g5L2pYMlJaRnU3TzVyNXlmRVE2RnNLY3pURG8Kb0N4ZFVrTklndHBWQ29ETEt2Ykw2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01YnpINEcyZ3Yxd1pWYlBkT1dNQWRZU2I5NDIvR09CSWUzSnIyVHo3CjRJdDRROWFERnF1aG9iOTVQMUhHQkxSQ2Y5QT0KLS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
requiredClientCertificate: true
requireClientCertificate: true
maxVersion: "1.3"
minVersion: "1.2"
2 changes: 1 addition & 1 deletion internal/ir/xds.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ type TLSConfig struct {
Certificates []TLSCertificate `json:"certificates,omitempty" yaml:"certificates,omitempty"`
// CACertificate to verify the client
CACertificate *TLSCACertificate `json:"caCertificate,omitempty" yaml:"caCertificate,omitempty"`
// RequiredClientCertificate to enforce client certificate
// RequireClientCertificate to enforce client certificate
RequireClientCertificate bool `json:"requireClientCertificate,omitempty" yaml:"requireClientCertificate,omitempty"`
// MinVersion defines the minimal version of the TLS protocol supported by this listener.
MinVersion *TLSVersion `json:"minVersion,omitempty" yaml:"version,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion internal/xds/translator/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ func buildXdsDownstreamTLSSocket(tlsConfig *ir.TLSConfig) (*corev3.TransportSock
}

if tlsConfig.CACertificate != nil {
tlsCtx.RequireClientCertificate = &wrappers.BoolValue{Value: tlsConfig.RequiredClientCertificate}
tlsCtx.RequireClientCertificate = &wrappers.BoolValue{Value: tlsConfig.RequireClientCertificate}
tlsCtx.CommonTlsContext.ValidationContextType = &tlsv3.CommonTlsContext_ValidationContextSdsSecretConfig{
ValidationContextSdsSecretConfig: &tlsv3.SdsSecretConfig{
Name: tlsConfig.CACertificate.Name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ http:
caCertificate:
name: ca-cert
certificate: [99, 101, 114, 116, 45, 100, 97, 116, 97]
requiredClientCertificate: false
requireClientCertificate: false
routes:
- name: "first-route"
hostname: "*"
Expand Down
2 changes: 1 addition & 1 deletion internal/xds/translator/testdata/in/xds-ir/mutual-tls.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ http:
caCertificate:
name: ca-cert
certificate: [99, 101, 114, 116, 45, 100, 97, 116, 97]
requiredClientCertificate: true
requireClientCertificate: true
routes:
- name: "first-route"
hostname: "*"
Expand Down

0 comments on commit 8ae90f7

Please sign in to comment.