Getting started Community Training Tutorials Documentation APIs, AI & Tools
Transport Layer Security (TLS) - Inbound
Policy Name |
Transport Layer Security (TLS) - Inbound |
Summary |
Enables authentication between a client and the API proxy |
Category |
Security |
First Omni Gateway version available |
v1.0.0 (inbound mTLS: v1.3.0) |
Release Notes |
|
Returned Status Codes |
No return codes exist for this policy. |
|
The following document applies only to Omni Gateway running in Local Mode. To configure TLS in Connected Mode, see Configuring TLS Context for Omni Gateway in Connected Mode. |
The TLS policy applies an inbound TLS or mTLS context to an API instance, or to all API instances in your Omni Gateway, in Local Mode. For how to apply the policy, and how to configure a default inbound TLS context for every HTTPS API instance without its own TLS context, see Configuring TLS Context for Omni Gateway in Local Mode.
Omni Gateway applies inbound TLS at the port level. An inbound TLS context applied to one API instance applies to every API instance that shares its port, so you can’t apply different inbound TLS contexts to API instances on the same port. To use different certificates, deploy the API instances on different ports. Outbound TLS contexts apply to each upstream service individually.
TLS policies don’t support policy ordering.
Refer to the following policy definition and table of parameters:
- policyRef:
name: tls
config:
requireClientCertificate: <boolean> // OPTIONAL
trustedCA: <string> // OPTIONAL
certificate: // OPTIONAL
key: <string> // REQUIRED
crt: <string> // REQUIRED
keyPassphrase: <string> // OPTIONAL
alpn: <array> // OPTIONAL
minversion: <string> // OPTIONAL
maxversion: <string> // OPTIONAL
ciphers: <array> // OPTIONAL
Not including optional parameters in your configuration file applies the parameters default values to your TLS context.
When configuring the ciphers parameter, see Supported TLS Versions and Ciphers for the supported ciphers.
| Parameter | Required or Optional | Default Value | Description |
|---|---|---|---|
|
Optional |
false |
Enables/disables inbound mTLS. |
|
Optional, unless |
N/A |
The CA used to validate the client certificate. If no trusted CA is provided, the policy uses the default OS CA. |
|
Optional |
N/A |
A TLS certificate key pair. To comply with security standards, all certificates must be 2048 bits or longer. |
|
Required if |
N/A |
The private key part of the certificate. |
|
Required if |
N/A |
The public key part of the certificate. |
|
Optional, unless the private key is encrypted |
N/A |
The passphrase that decrypts the private key. |
|
Optional |
|
A prioritized list of supported application level protocols; for example, h2, http/1.1, and so forth. |
|
Optional |
|
The minimum TLS version allowed. |
|
Optional |
|
The maximum TLS version allowed. |
|
Optional |
For the default and other supported ciphers, see Supported TLS Versions and Ciphers. |
A list of supported TLS ciphers (IANA format). For the supported ciphers, see Supported TLS Versions and Ciphers. |
You can format the YAML file to configure TLS or mTLS either for a specific API instance or for all API instances running on your Omni Gateway.
apiVersion: gateway.mulesoft.com/v1alpha1
kind: PolicyBinding
metadata:
name: ingress-https-tls
spec:
targetRef:
kind: Selector
selector:
kind: ApiInstance
policyRef:
name: tls
config:
certificate:
key: |
-----BEGIN PRIVATE KEY-----
# insert private key
-----END PRIVATE KEY-----
crt: |
-----BEGIN CERTIFICATE-----
# insert certificate
-----END CERTIFICATE-----
alpn:
- http/1.1
- h2
minversion: "1.2"
maxversion: "1.3"
ciphers:
- TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
- TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
- TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
- TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
apiVersion: gateway.mulesoft.com/v1alpha1
kind: PolicyBinding
metadata:
name: ingress-https-tls
spec:
targetRef:
kind: ApiInstance
name: ingress-https
policyRef:
name: tls
config:
certificate:
key: |
-----BEGIN PRIVATE KEY-----
# insert private key
-----END PRIVATE KEY-----
crt: |
-----BEGIN CERTIFICATE-----
# insert certificate
-----END CERTIFICATE-----
This example uses the default values for alpn, minversion, maxversion, and ciphers.
apiVersion: gateway.mulesoft.com/v1alpha1
kind: PolicyBinding
metadata:
name: mtls
spec:
targetRef:
kind: ApiInstance
name: ingress-https
policyRef:
name: tls
config:
requireClientCertificate: true
trustedCA: |
-----BEGIN CERTIFICATE-----
# insert the CA that signs client certificates
-----END CERTIFICATE-----
certificate:
key: |
-----BEGIN PRIVATE KEY-----
# insert private key
-----END PRIVATE KEY-----
crt: |
-----BEGIN CERTIFICATE-----
# insert certificate
-----END CERTIFICATE-----
This example uses the default values for alpn, minversion, maxversion, and ciphers.
Omni Gateway supports TLS 1.2 and TLS 1.3:
TLS 1.3: Omni Gateway always supports all TLS 1.3 ciphers. You can’t customize them.
TLS 1.2: Omni Gateway supports the default ciphers unless you customize them. In Secrets Manager, you add ciphers to the defaults. In a configuration file, the ciphers list replaces the defaults, so include every cipher that you want to support.
For outbound TLS, ensure that your upstream services support the TLS versions and ciphers that you configure.
| Cipher | TLS Version | Default | Advice |
|---|---|---|---|
|
1.3 |
Yes |
Secure |
|
1.3 |
Yes |
Secure |
|
1.3 |
Yes |
Secure |
|
1.2 |
Yes |
Recommended |
|
1.2 |
Yes |
Recommended |
|
1.2 |
Yes |
Recommended |
|
1.2 |
No |
Recommended |
|
1.2 |
Yes |
Secure |
|
1.2 |
Yes |
Secure |
|
1.2 |
Yes |
Secure |
|
1.2 |
No |
Weak |
|
1.2 |
No |
Weak |
|
1.2 |
No |
Weak |
|
1.2 |
No |
Weak |
|
1.2 |
No |
Weak |
|
1.2 |
No |
Weak |
|
1.2 |
No |
Weak |
|
1.2 |
No |
Weak |
|
1.2 |
No |
Weak |
|
1.2 |
No |
Weak |
|
1.2 |
No |
Weak |
|
1.2 |
No |
Weak |