@@ -36,54 +36,6 @@ var ClientMTLSTest = suite.ConformanceTest{
36
36
Description : "Use Gateway with Client MTLS policy" ,
37
37
Manifests : []string {"testdata/client-mtls.yaml" },
38
38
Test : func (t * testing.T , suite * suite.ConformanceTestSuite ) {
39
- t .Run ("Client MTLS with ClusterTrustBundle" , func (t * testing.T ) {
40
- if ! EnabledClusterTrustBundle () {
41
- t .Skipf ("Skipping test as ClusterTrustBundle is not enabled" )
42
- }
43
-
44
- depNS := "envoy-gateway-system"
45
- ns := "gateway-conformance-infra"
46
- routeNN := types.NamespacedName {Name : "client-mtls-clustertrustbundle" , Namespace : ns }
47
- gwNN := types.NamespacedName {Name : "client-mtls-clustertrustbundle" , Namespace : ns }
48
- gwAddr := kubernetes .GatewayAndHTTPRoutesMustBeAccepted (t , suite .Client , suite .TimeoutConfig , suite .ControllerName , kubernetes .NewGatewayRef (gwNN ), routeNN )
49
- kubernetes .NamespacesMustBeReady (t , suite .Client , suite .TimeoutConfig , []string {depNS })
50
- certNN := types.NamespacedName {Name : "client-example-com" , Namespace : ns }
51
-
52
- expected := http.ExpectedResponse {
53
- Request : http.Request {
54
- Host : "www.example.com" ,
55
- Path : "/cluster-trust-bundle" ,
56
- },
57
- ExpectedRequest : & http.ExpectedRequest {
58
- Request : http.Request {
59
- Host : "www.example.com" ,
60
- Path : "/cluster-trust-bundle" ,
61
- Headers : map [string ]string {
62
- "X-Forwarded-Client-Cert" : "Hash=42a13e4b02c8a6d2ae5bf2fdaa032e24fdbabbaa79b6017fd0db6c077e6999e0;Subject=\" O=example organization,CN=client.example.com\" " ,
63
- },
64
- },
65
- },
66
- Response : http.Response {
67
- StatusCode : 200 ,
68
- },
69
- Namespace : ns ,
70
- }
71
-
72
- req := http .MakeRequest (t , & expected , gwAddr , "HTTPS" , "https" )
73
-
74
- // This test uses the same key/cert pair as both a client cert and server cert
75
- // Both backend and client treat the self-signed cert as a trusted CA
76
- cPem , keyPem , caPem , err := GetTLSSecret (suite .Client , certNN )
77
- if err != nil {
78
- t .Fatalf ("unexpected error finding TLS secret: %v" , err )
79
- }
80
-
81
- combined := string (cPem ) + "\n " + string (caPem )
82
-
83
- WaitForConsistentMTLSResponse (t , suite .RoundTripper , req , expected , suite .TimeoutConfig .RequiredConsecutiveSuccesses , suite .TimeoutConfig .MaxTimeToConsistency ,
84
- []byte (combined ), keyPem , "www.example.com" )
85
- })
86
-
87
39
t .Run ("Use Client MTLS" , func (t * testing.T ) {
88
40
depNS := "envoy-gateway-system"
89
41
ns := "gateway-conformance-infra"
0 commit comments