Stealing HTTPS Requests
Decrypt and steal HTTPS traffic using TLS certificates
Configuring HTTPS stealing in the cluster
apiVersion: mirrord.metalbear.co/v1alpha
kind: MirrordTlsStealConfig
metadata:
# The name indicates that this configuration is for the `example-deploy` deployment,
# but it does not really matter. The mirrord Operator does not inspect config resources' names.
name: tls-steal-config-for-example-deploy
# This is the namespace-scoped variant of the configuration resource,
# so it must live in the same namespace as the `example-deploy` deployment.
namespace: example-deploy-namespace
spec:
# A wildcard pattern that will be matched against session target's path.
#
# This pattern can contain `*` and `?` characters, where:
# 1. `*` will match any amount of any characters;
# 2. `?` will any character once.
#
# E.g `deploy/*/container/container-?` will match both `deploy/name/container/container-1` and `deploy/another-name/container/container-2`.
#
# mirrord session target path is produced from:
# 1. Target resource type (e.g deploy, pod, rollout, statefulset, etc.);
# 2. Target resource name;
# 3. `container` literal (if the user selected an exact container as the target);
# 4. Target container name (if the user selected an exact container as the target).
#
# Note that the user can target pods of the `example-deploy` deployment either indirectly, by targeting the deployment, or directly.
# They can also specify an exact target container or not.
#
# Optional. Defaults to a pattern that matches everything.
targetPath: "*/example-deploy*"
# A label selector that will be matched against session target's labels.
#
# Optional. Defaults to a selector that matches everything.
selector:
matchLabels:
app: example-deploy
# Each port on the target can be configured separately.
ports:
# This entry configures HTTPS stealing from port 443.
- port: 443
# Configures how the mirrord-agent authenticates itself and verifies the clients (original request senders) when acting as a TLS server.
agentAsServer:
# Configures how the server authenticates itself.
authentication:
# Path to a PEM file containing a certificate chain to use.
#
# This file must contain at least one certificate.
# It can contain entries of other types, e.g private keys, which are ignored.
# Certificates are expected to be listed from the end-entity to the root.
certPem: /path/to/server/cert.pem
# Path to a PEM file containing a private key matching the certificate chain from `certPem`.
#
# This file must contain exactly one private key.
# It can contain entries of other types, e.g certificates, which are ignored.
keyPem: /path/to/server/key.pem
# ALPN protocols supported by the server, in order of preference.
#
# If empty, ALPN is disabled.
#
# Optional. Defaults to an empty list.
alpnProtocols:
- h2
- http/1.1
- http/1.0
# Configures how the server verifies the clients.
#
# Optional. If not present, the server will not offer TLS client authentication at all.
verification:
# Whether anonymous clients should be accepted.
#
# Optional. Defaults to false.
allowAnonymous: false
# Whether the server should accept any certificate, regardless of its validity and who signed it.
#
# Note that this setting does not affect whether anonymous clients are accepted or not.
# If `allowAnonymous` is not set, some certificate will still be required.
#
# Optional. Defaults to false.
acceptAnyCert: false
# Paths to PEM files and directories PEM files containing allowed root certificates.
#
# Directories are not traversed recursively.
#
# Each certificate found in the files is treated as an allowed root.
# The files can contain entries of other types, e.g private keys, which are ignored.
#
# Optional. Defaults to an empty list.
trustRoots:
- /path/to/trusted/client/root/cert.pem
# Configures how the mirrord-agent authenticates itself and verifies the server (original request destination) when acting as a TLS client.
agentAsClient:
# Configures how the client authenticates itself.
#
# Optional. If not present, the client will make the connections anonymously.
authentication:
# Path to a PEM file containing a certificate chain to use.
#
# This file must contain at least one certificate.
# It can contain entries of other types, e.g private keys, which are ignored.
# Certificates are expected to be listed from the end-entity to the root.
certPem: /path/to/client/cert.pem
# Path to a PEM file containing a private key matching the certificate chain from `certPem`.
#
# This file must contain exactly one private key.
# It can contain entries of other types, e.g certificates, which are ignored.
keyPem: /path/to/client/key.pem
# Configures how the client verifies the server.
verification:
# Whether to accept any certificate, regardless of its validity and who signed it.
#
# Optional. Defaults to false.
acceptAnyCert: false
# Paths to PEM files and directories PEM files containing allowed root certificates.
#
# Directories are not traversed recursively.
#
# Each certificate found in the files is treated as an allowed root.
# The files can contain entries of other types, e.g private keys, which are ignored.
#
# Optional. Defaults to an empty list.
trustRoots:
- /path/to/trusted/server/root/cert.pemConfiguring delivery of stolen HTTPS to your local application
Last updated
Was this helpful?

