Contact Us 1-800-596-4880

Transport Layer Security Policy - Outbound

Policy Name

Transport Layer Security (TLS) - Outbound

Summary

Enables two-way authentication between the API proxy and an upstream service

Category

Security

First Omni version available

v1.4.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.

Summary

The TLS outbound policy applies an outbound TLS or mTLS context to an upstream service in Local Mode. For how to apply the policy, and how to configure a default outbound TLS context for every HTTPS upstream service and outgoing policy request without its own TLS context, see Configuring TLS Context for Omni Gateway in Local Mode.

Apply outbound TLS contexts to each upstream service individually, because upstream services might require different certificates and CAs. If you don’t apply an outbound TLS context, the default outbound TLS context or the built-in outbound TLS applies. For upstream certificate requirements, see Certificate Requirements.

TLS policies don’t support policy ordering.

Configure Policy Parameters

Refer to the following policy definition and table of parameters:

- policyRef:
    name: tls-outbound
  config:
    skipValidation: <boolean> // REQUIRED
    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, ensure that your API upstream supports the listed ciphers. For the supported ciphers, see Supported TLS Versions and Ciphers.

Parameter Required or Optional Default Value Description

skipValidation

Required

false

If true, the upstream certificate is not validated.

trustedCA

Optional, unless skipValidation is false

N/A

The CA used to validate the upstream server certificate. If no trusted CA is provided, the policy uses the default OS CA. If you provide a trusted CA, it replaces the default OS CA. Include the complete CA chain for the upstream.

certificate

Optional

N/A

The client certificate to present for mTLS. To comply with security standards, all certificates must be 2048 bits or longer.

certificate.key

Required if certificate is set

N/A

The private key part of the certificate.

certificate.crt

Required if certificate is set

N/A

The public key part of the certificate.

certificate.keyPassphrase

Optional, unless the private key is encrypted

N/A

The passphrase that decrypts the private key.

alpn

Optional

h2 and http/1.1

A prioritized list of supported application level protocols; for example, h2, http/1.1, and so forth.

minversion

Optional

1.2

The minimum TLS version allowed. Supported values are 1.2 and 1.3.

maxversion

Optional

1.3

The maximum TLS version allowed. Supported values are 1.2 and 1.3.

ciphers

Optional

For the default and other supported ciphers, see Supported TLS Versions and Ciphers.

A list of supported TLS ciphers (IANA format).

Resource Configuration Examples

You can format the YAML file to configure TLS or mTLS for a upstream service.

Sample configuration for adding outbound TLS context for a specific upstream service:

apiVersion: gateway.mulesoft.com/v1alpha1
kind: PolicyBinding
metadata:
  name: tls-outbound
spec:
  targetRef:
    kind: Service
    name: ingress-test-outbound-upstream
  policyRef:
    name: tls-outbound
  config:
    skipValidation: false
    trustedCA: |
      -----BEGIN CERTIFICATE-----
      # insert the CA that signs the upstream server certificate
      -----END CERTIFICATE-----

This example uses the default values for alpn, minversion, maxversion, and ciphers.

Sample configuration for adding outbound mTLS context for a specific upstream service:

apiVersion: gateway.mulesoft.com/v1alpha1
kind: PolicyBinding
metadata:
  name: mtls-outbound
spec:
  targetRef:
    kind: Service
    name: ingress-test-outbound-upstream
  policyRef:
    name: tls-outbound
  config:
    skipValidation: false
    trustedCA: |
      -----BEGIN CERTIFICATE-----
      # insert the CA that signs the upstream server certificate
      -----END CERTIFICATE-----
    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_ECDSA_WITH_CHACHA20_POLY1305_SHA256
      - TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
      - TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
      - TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
      - TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384

Supported TLS Versions 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

TLS_AES_128_GCM_SHA256

1.3

Yes

Secure

TLS_AES_256_GCM_SHA384

1.3

Yes

Secure

TLS_CHACHA20_POLY1305_SHA256

1.3

Yes

Secure

TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256

1.2

Yes

Recommended

TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384

1.2

Yes

Recommended

TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256

1.2

Yes

Recommended

TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256

1.2

No

Recommended

TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256

1.2

Yes

Secure

TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384

1.2

Yes

Secure

TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256

1.2

Yes

Secure

TLS_RSA_WITH_AES_128_GCM_SHA256

1.2

No

Weak

TLS_RSA_WITH_AES_256_GCM_SHA384

1.2

No

Weak

TLS_RSA_WITH_AES_128_CBC_SHA

1.2

No

Weak

TLS_RSA_WITH_AES_256_CBC_SHA

1.2

No

Weak

TLS_PSK_WITH_AES_128_CBC_SHA

1.2

No

Weak

TLS_PSK_WITH_AES_256_CBC_SHA

1.2

No

Weak

TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA

1.2

No

Weak

TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA

1.2

No

Weak

TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA

1.2

No

Weak

TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA

1.2

No

Weak

TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA

1.2

No

Weak

TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA

1.2

No

Weak