Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
3b3b623
backport of commit 9db9b3787d6980c3ce7f76830c31aefa6653293b
Feb 22, 2023
a27a78c
backport of commit b5ad45fefd03ee2d692e19ae75268ce1133d5550
Feb 22, 2023
afa026e
backport of commit 9dad7c26bd9843fb8b5bcc99ac624d432a959f77
Feb 22, 2023
847596f
backport of commit b7103a5dab77381ffb528f74c9bf6adc88ffe8ba
Feb 22, 2023
b90e06d
backport of commit c6f9c822a6d1a0636b76c60100c4b1dca4cb49ac
Feb 22, 2023
e60ffa5
backport of commit f382d9aaa584d74524c8f55de35582562a53fbac
Feb 22, 2023
e3e31d8
backport of commit 5d6fe671201f97d4f8653ad81b307bba56d2a194
Feb 22, 2023
f002618
backport of commit d0c0794d09478c9f1b0fd112032dced9ec428577
Feb 22, 2023
f584de2
backport of commit d146e8772abc651a832f7397083aad89d8b8ba61
Feb 22, 2023
f56a8f1
backport of commit 4f42ecde52cb7a996f8b1b24673fd37fb1beef6a
nathancoleman Feb 22, 2023
02f792e
backport of commit c7a5f112e69f5fd96324057afcd9dde2d9d334af
Feb 22, 2023
d34f849
backport of commit 09f2183833db2a7664d991467f124d7eb86b8183
Feb 22, 2023
fe11d1f
backport of commit c85c52ed2b789e9887e4c8981f0be20b03e52004
Feb 22, 2023
1171758
backport of commit db5c6623f3f563480ceec4817c5e7532b075fa1f
nathancoleman Feb 22, 2023
d25f3f5
backport of commit 5a484ec905fd9f7766b224aa930790a054d6fa69
Feb 22, 2023
79a6c5a
backport of commit 12aa5f7b90d64f871208175eba9b0b4933b958dd
Feb 22, 2023
451c6e5
backport of commit b5064230889011813498c054ce30d58a501b38cf
Feb 22, 2023
bd51c39
backport of commit ee47464ce8acb239eeb08433f97f5f33591217e5
Feb 22, 2023
caa4d60
backport of commit 5013c4f77268e3d186d13f09793167df47a9da95
Feb 22, 2023
a60e8d5
backport of commit 05bbf1a1d582fc509ad64aabf3e24e1cf57f9102
Feb 22, 2023
58b56dd
backport of commit 423c9c817084e9bd82f9c34a20f7263de66af349
Feb 22, 2023
0a2189c
backport of commit a1487162a6c16ccca1428794a1ba241efc4dd5ff
nathancoleman Feb 22, 2023
d57de7b
backport of commit 932703438c7ed78b0f8984540d4ed3c9834e88ea
Feb 22, 2023
a709004
backport of commit 11d5e1f0175a524a19465a1773b67dace8f50f32
Feb 22, 2023
0ecffc9
backport of commit 8153958e0b2b2087d1fb78171adfe481137c8c55
Feb 22, 2023
05d7f11
backport of commit 7113e5487f063b7d0bff4122bd1068bdccb7d235
Feb 22, 2023
c6ccfc5
backport of commit f151ac5a01b6b875a99f1d61d8958445ae44b28a
missylbytes Feb 22, 2023
7bb7787
backport of commit 86054d67a0ad4cd3cbdb772ed91613adc86234a6
nathancoleman Feb 22, 2023
6df18e2
backport of commit f7f9ed9094e599c3a912d195a49d85075260d3df
nathancoleman Feb 22, 2023
6b8de85
backport of commit 103888309323569f796fcc1d0fc9224b0ef93a02
nathancoleman Feb 22, 2023
7c6f1e4
backport of commit b737955b13e86936ff5d768d4569116e49582c72
missylbytes Feb 22, 2023
1bd5e16
backport of commit 81ab0481fdee81ba30d227e625125233b405afbe
Feb 22, 2023
44675da
backport of commit 2e6acc2a4aa164756ce68a9350bbe88ed8e31642
Feb 22, 2023
89f4ef4
backport of commit 7df0765f49c15290f175fb18f6aa057897b688a5
Feb 22, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion website/content/docs/api-gateway/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: >-

# API Gateway for Kubernetes Overview

This topic provides an overview of the Consul API Gateway.
This topic provides an overview of the Consul API Gateway for deploying on Kubernetes. If you would like to deploy on virtual machines, refer to [API Gateways on Virtual Machines](/consul/docs/connect/gateways/api-gateway/usage).

## What is Consul API Gateway?

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,280 @@
---
layout: docs
page_title: API Gateway Configuration Entry Reference
description: Learn how to configure a Consul API Gateway on VMs.
---

# API Gateway Configuration Entry Reference

This topic provides reference information for the API gateway configuration entry that you can deploy to networks in virtual machine (VM) environments. For reference information about configuring Consul API gateways on Kubernetes, refer to [Gateway Resource Configuration](/consul/docs/api-gateway/configuration/gateway).

## Introduction

A gateway is a type of network infrastructure that determines how service traffic should be handled. Gateways contain one or more listeners that bind to a set of hosts and ports. An HTTP Route or TCP Route can then attach to a gateway listener to direct traffic from the gateway to a service.

## Configuration model

The following list outlines field hierarchy, language-specific data types, and requirements in an `api-gateway` configuration entry. Click on a property name to view additional details, including default values.

- [`Kind`](#kind): string | must be `"api-gateway"`
- [`Name`](#name): string | no default
- [`Meta`](#meta): map | no default
- [`Listeners`](#listeners): list of objects | no default
- [`Port`](#listeners-port): number | node port number
- [`Name`](#listeners-name): string | node name
- [`Protocol`](#listeners-protocol): string | `"tcp"`
- [`TLS`](#listeners-tls): map | none
- [`TLSMinVersion`](#listeners-tlsminversion): string | no default
- [`TLSMaxVersion`](#listeners-tlsmaxversion): string | no default
- [`CipherSuites`](#listeners-ciphersuite): list of strings | Envoy default cipher suites
- [`Certificates`](#listeners-certificates): list of objects | no default
- [`Kind`](#listeners-certificates-kind): string | must be `"inline-certificate"`
- [`Name`](#listeners-certificates-name): string | no default

## Complete configuration

When every field is defined, an `api-gateway` configuration entry has the following form:

<CodeTabs>

``` hcl
Kind = "api-gateway"
Name = "<name of api gateway>"

Meta = {
<any key> = "<any value>"
}

Listeners = [
{
Port = <external service port>
Name = "<unique name for this listener>"
Protocol = "<protocol used by external service>"
TLS = {
Certificates = [
{
Kind: "inline-certificate",
Name: "<name of inline-certificate>"
}
]
CipherSuites = [
"<cipher suite>"
]
MaxVersion = "<version of TLS>"
MinVersion = "<version of TLS>"
}
}
]
```

``` json
{
"kind": "api-gateway",
"name": "<name of api gateway>",
"meta": {
"<any key>": "<any value>"
},
"listeners": [
{
"port": <external service port>,
"name": "<unique name for this listener>",
"protocol": "<protocol used by external service>",
"tls": {
"certificates": [
{
"kind": "inline-certificate",
"name": "<name of inline-certificate>"
}
],
"cipherSuites": [
"<cipher suite>"
],
"maxVersion": "<version of TLS>",
"minVersion": "<version of TLS>"
}
}
]
}
```

</CodeTabs>

## Specification

This section provides details about the fields you can configure in the
`api-gateway` configuration entry.

### `Kind`

Specifies the type of configuration entry to implement. This must be
`api-gateway`.

#### Values

- Default: none
- This field is required.
- Data type: string value that must be set to `"api-gateway"`.

### `Name`

Specifies a name for the configuration entry. The name is metadata that you can
use to reference the configuration entry when performing Consul operations,
such as applying a configuration entry to a specific cluster.

#### Values

- Default: none
- This field is required.
- Data type: string

### `Meta`

Specifies an arbitrary set of key-value pairs to associate with the gateway.

#### Values

- Default: none
- Data type: map containing one or more keys and string values.

### `Listeners`

Specifies a list of listeners that gateway should set up. Listeners are
uniquely identified by their port number.

#### Values

- Default: none
- This field is required.
- Data type: List of maps. Each member of the list contains the following fields:
- `Name`
- `Hostname`
- `Port`
- `Protocol`
- `TLS`

### `Listeners.Name`

Specifies the unique name for the listener. This field accepts letters, numbers and hyphens.

#### Values

- Default: none
- This field is required.
- Data type: string

### `Listeners.Hostname`

Specifies the hostname that the listener receives traffic on.

#### Values

- Default: none
- This field is optional.
- Data type: string

### `Listeners.Port`

Specifies the port number that the listener receives traffic on.

#### Values

- Default: `0`
- This field is required.
- Data type: integer

### `Listeners.Protocol`

Specifies the protocol associated with the listener.

#### Values

- Default: none
- This field is required.
- The data type is one of the following string values: `"tcp"` or `"http"`.

### `Listeners.TLS`

Specifies the TLS configurations for the listener.

#### Values

- Default: none
- Map that contains the following fields:
- `Certificates`
- `MaxVersion`
- `MinVersion`
- `CipherSuites`

### `Listeners.TLS.Certificates`

The list of references to inline certificates that the listener uses for TLS termination.

#### Values

- Default: None
- Data type: List of maps. Each member of the list has the following fields:
- `Kind`
- `Name`

### `Listeners.TLS.Certificates.Kind`

The list of references to inline-certificates that the listener uses for TLS termination.

#### Values

- Default: None
- This field is required and must be set to “inline-certificate”.
- Data type: string

### `Listeners.TLS.Certificates.Name`

The list of references to inline certificates that the listener uses for TLS termination.

#### Values

- Default: None
- This field is required.
- Data type: string

### `Listeners.TLS.MaxVersion`

Specifies the maximum TLS version supported for the listener.

#### Values

- Default depends on the version of Envoy:
Envoy 1.22.0 and later default to `TLSv1_2`
Older versions of Envoy default to `TLSv1_0`
- Data type is one of the following string values:
- `TLS_AUTO`
- `TLSv1_0`
- `TLSv1_1`
- `TLSv1_2`
- `TLSv1_3`

### `Listeners.TLS.MinVersion`

Specifies the minimum TLS version supported for the listener.

#### Values

- Default: none
- Data type is one of the following string values:
- `TLS_AUTO`
- `TLSv1_0`
- `TLSv1_1`
- `TLSv1_2`
- `TLSv1_3`

### `Listeners.TLS.CipherSuites`

Specifies a list of cipher suites that the listener supports when negotiating connections using TLS 1.2 or older.

#### Values

- Defaults to the ciphers supported by the version of Envoy in use. Refer to the
[Envoy documentation](https://www.envoyproxy.io/docs/envoy/latest/api-v3/extensions/transport_sockets/tls/v3/common.proto#envoy-v3-api-field-extensions-transport-sockets-tls-v3-tlsparameters-cipher-suites)
for details.
- Data type: List of string values. Refer to the
[Consul repository](https://github.com/hashicorp/consul/blob/v1.11.2/types/tls.go#L154-L169)
for a list of supported ciphers.
Loading