Contact Us 1-800-596-4880

Transport Layer Security Policy - 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.

Summary

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.

Configure Policy Parameters

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

requireClientCertificate

Optional

false

Enables/disables inbound mTLS.

trustedCA

Optional, unless requireClientCertificate is true

N/A

The CA used to validate the client certificate. If no trusted CA is provided, the policy uses the default OS CA.

certificate

Optional

N/A

A TLS certificate key pair. 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.

maxversion

Optional

1.3

The maximum TLS version allowed.

ciphers

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.

Resource Configuration Examples

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.

Apply TLS Configuration to All API Instances

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

Apply TLS Configuration to a Specific API Instance

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.

Apply mTLS Inbound Configuration to a Specific API Instance

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.

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