-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add requiredClientCertificate on mutual TLS to make it optional
Signed-off-by: zufardhiyaulhaq <zufardhiyaulhaq@gmail.com>
- Loading branch information
1 parent
8f2e175
commit 8952af1
Showing
13 changed files
with
171 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
...al/xds/translator/testdata/in/xds-ir/mutual-tls-required-client-certificate-disabled.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
http: | ||
- name: "first-listener" | ||
address: "0.0.0.0" | ||
port: 10080 | ||
hostnames: | ||
- "*" | ||
path: | ||
mergeSlashes: true | ||
escapedSlashesAction: UnescapeAndRedirect | ||
tls: | ||
alpnProtocols: | ||
- h2 | ||
- http/1.1 | ||
certificates: | ||
- name: secret-1 | ||
# byte slice representation of "key-data" | ||
serverCertificate: [99, 101, 114, 116, 45, 100, 97, 116, 97] | ||
# byte slice representation of "key-data" | ||
privateKey: [107, 101, 121, 45, 100, 97, 116, 97] | ||
- name: secret-2 | ||
serverCertificate: [99, 101, 114, 116, 45, 100, 97, 116, 97] | ||
privateKey: [107, 101, 121, 45, 100, 97, 116, 97] | ||
caCertificate: | ||
name: ca-cert | ||
certificate: [99, 101, 114, 116, 45, 100, 97, 116, 97] | ||
requiredClientCertificate: false | ||
routes: | ||
- name: "first-route" | ||
hostname: "*" | ||
destination: | ||
name: "first-route-dest" | ||
settings: | ||
- endpoints: | ||
- host: "1.2.3.4" | ||
port: 50000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...nslator/testdata/out/xds-ir/mutual-tls-required-client-certificate-disabled.clusters.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
- circuitBreakers: | ||
thresholds: | ||
- maxRetries: 1024 | ||
commonLbConfig: | ||
localityWeightedLbConfig: {} | ||
connectTimeout: 10s | ||
dnsLookupFamily: V4_ONLY | ||
edsClusterConfig: | ||
edsConfig: | ||
ads: {} | ||
resourceApiVersion: V3 | ||
serviceName: first-route-dest | ||
lbPolicy: LEAST_REQUEST | ||
name: first-route-dest | ||
outlierDetection: {} | ||
perConnectionBufferLimitBytes: 32768 | ||
type: EDS |
12 changes: 12 additions & 0 deletions
12
...slator/testdata/out/xds-ir/mutual-tls-required-client-certificate-disabled.endpoints.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
- clusterName: first-route-dest | ||
endpoints: | ||
- lbEndpoints: | ||
- endpoint: | ||
address: | ||
socketAddress: | ||
address: 1.2.3.4 | ||
portValue: 50000 | ||
loadBalancingWeight: 1 | ||
loadBalancingWeight: 1 | ||
locality: | ||
region: first-route-dest/backend/0 |
57 changes: 57 additions & 0 deletions
57
...slator/testdata/out/xds-ir/mutual-tls-required-client-certificate-disabled.listeners.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
- address: | ||
socketAddress: | ||
address: 0.0.0.0 | ||
portValue: 10080 | ||
drainType: MODIFY_ONLY | ||
filterChains: | ||
- filters: | ||
- name: envoy.filters.network.http_connection_manager | ||
typedConfig: | ||
'@type': type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager | ||
commonHttpProtocolOptions: | ||
headersWithUnderscoresAction: REJECT_REQUEST | ||
http2ProtocolOptions: | ||
initialConnectionWindowSize: 1048576 | ||
initialStreamWindowSize: 65536 | ||
maxConcurrentStreams: 100 | ||
httpFilters: | ||
- name: envoy.filters.http.router | ||
typedConfig: | ||
'@type': type.googleapis.com/envoy.extensions.filters.http.router.v3.Router | ||
suppressEnvoyHeaders: true | ||
mergeSlashes: true | ||
normalizePath: true | ||
pathWithEscapedSlashesAction: UNESCAPE_AND_REDIRECT | ||
rds: | ||
configSource: | ||
ads: {} | ||
resourceApiVersion: V3 | ||
routeConfigName: first-listener | ||
serverHeaderTransformation: PASS_THROUGH | ||
statPrefix: https | ||
useRemoteAddress: true | ||
transportSocket: | ||
name: envoy.transport_sockets.tls | ||
typedConfig: | ||
'@type': type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext | ||
commonTlsContext: | ||
alpnProtocols: | ||
- h2 | ||
- http/1.1 | ||
tlsCertificateSdsSecretConfigs: | ||
- name: secret-1 | ||
sdsConfig: | ||
ads: {} | ||
resourceApiVersion: V3 | ||
- name: secret-2 | ||
sdsConfig: | ||
ads: {} | ||
resourceApiVersion: V3 | ||
validationContextSdsSecretConfig: | ||
name: ca-cert | ||
sdsConfig: | ||
ads: {} | ||
resourceApiVersion: V3 | ||
requireClientCertificate: false | ||
name: first-listener | ||
perConnectionBufferLimitBytes: 32768 |
14 changes: 14 additions & 0 deletions
14
...ranslator/testdata/out/xds-ir/mutual-tls-required-client-certificate-disabled.routes.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
- ignorePortInHostMatching: true | ||
name: first-listener | ||
virtualHosts: | ||
- domains: | ||
- '*' | ||
name: first-listener/* | ||
routes: | ||
- match: | ||
prefix: / | ||
name: first-route | ||
route: | ||
cluster: first-route-dest | ||
upgradeConfigs: | ||
- upgradeType: websocket |
16 changes: 16 additions & 0 deletions
16
...anslator/testdata/out/xds-ir/mutual-tls-required-client-certificate-disabled.secrets.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
- name: secret-1 | ||
tlsCertificate: | ||
certificateChain: | ||
inlineBytes: Y2VydC1kYXRh | ||
privateKey: | ||
inlineBytes: a2V5LWRhdGE= | ||
- name: secret-2 | ||
tlsCertificate: | ||
certificateChain: | ||
inlineBytes: Y2VydC1kYXRh | ||
privateKey: | ||
inlineBytes: a2V5LWRhdGE= | ||
- name: ca-cert | ||
validationContext: | ||
trustedCa: | ||
inlineBytes: Y2VydC1kYXRh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters