Preview functionality. This is a preview feature and is subject to change. Inline configuration remains fully supported.
Declare a connection
Declare each connection with environment variables that follow this pattern:<NAME> is a label you choose, and is how a resource references the connection. <PROPERTY> is one of the properties the connection’s type accepts.
Connection names have to start with a letter and can contain letters, numbers and underscores, so
DEFAULT_SR is a valid name. A name can’t contain _CONFIG_, because that’s the delimiter between the name and the property. Gateway rejects such a variable at startup rather than guessing where the name ends. Names are case-insensitive and Gateway stores them in upper case, so default_sr and DEFAULT_SR are the same connection. We recommend you declare them in upper case to match the variable.TYPE, which selects the system it connects to:
Every connection follows the same shape. This one is a Confluent-like schema registry named
DEFAULT_SR, which needs only a URL:
Reference a connection
A resource reaches a connection through a field in its own configuration:
Set the field to the connection’s
<NAME>. The schema registry connection declared above is named DEFAULT_SR, so an Interceptor or topic view reaches it with:
400 Bad Request. Remove a connection that a resource already names and the resource stays saved and visible through the API, but stops serving traffic.
An Interceptor can name a schema registry connection, or configure a registry inline in its own schemaRegistryConfig. Gateway rejects a configuration that sets both rather than silently picking one.
Connect to a schema registry
Gateway needs a schema registry to decode Avro, Protobuf and JSON-Schema records. Both Interceptors and topic views can reference a schema registry connection. Gateway contacts the registry at startup and fails to start if it can’t be reached — see what happens at startup for the timeout, the permissions the connection needs and what the log shows.Confluent-like schema registries
SetTYPE to CONFLUENT_SCHEMA_REGISTRY for Confluent Schema Registry and compatible registries, including Redpanda Schema Registry:
AWS Glue schema registries
SetTYPE to AWS_SCHEMA_REGISTRY for AWS Glue Schema Registry:
BASIC_CREDENTIALS_ property unset and Gateway falls back to the AWS SDK’s default credentials provider, which searches environment variables, Java system properties, the shared credentials and config files, and container or instance IAM roles. See how the AWS SDK resolves default credentials.
Pass additional client properties
A schema registry connection also accepts any property its registry’s own client understands. Gateway doesn’t interpret these properties. It collects them and hands the map to the client, so a key the client doesn’t recognize passes startup rather than failing it. Use indexed entries, where each value is akey=value pair split at the first =:
= and migration from existing JSON configuration:
- Indexed entries win. An indexed entry overrides the same key in the JSON object, so you can patch one value without rewriting the object.
- Two indexed entries can’t share a key. There’s no patch order between them, so Gateway rejects the pair and names the key.
_CONFIG_0=schema.registry.url=… beside _CONFIG_SCHEMA_REGISTRY_URL, for example. Gateway doesn’t check for the overlap, and which of the two it connects with is left to the registry’s client.
Which keys to use depends on the registry:
Connect to a KMS
Gateway encrypts data in Kafka records with keys held in a key management service. An external connection holds the provider’s address, credentials and account details, so an Interceptor names a key rather than a full key URI. Not every provider is available as an external connection yet. Encryption Interceptors reach more of them through their own inlinekmsConfig, so configure a provider inline until it arrives here.
HashiCorp Vault
SetTYPE to HASHICORP_VAULT. This example authenticates with a token, one of three auth methods covered below:
kmsConfig does. We’re widening it in future releases, and until then inline configuration is the way to use anything missing here:
- Secrets engines. An external connection supports the Transit secrets engine (
MOUNT=transitabove). Inline configuration also supports Transform, which needs Vault Enterprise. - Auth methods. An external connection supports the three below, out of the eleven inline configuration offers.
Authenticate with a token
SetAUTH_TYPE to TOKEN and AUTH_TOKEN to the Vault token Gateway authenticates with:
Authenticate with AppRole
SetAUTH_TYPE to APP_ROLE and pass the role ID and secret ID. Vault exchanges them for a short-lived token, which Gateway renews in the background:
AUTH_MOUNT when you mounted it somewhere other than approle, see the environment variables reference.
Authenticate with a username and password
SetAUTH_TYPE to USERNAME_PASSWORD and pass the userpass login. Vault exchanges it for a short-lived token, which Gateway renews in the background:
AUTH_MOUNT when you mounted it somewhere other than userpass, see the environment variables reference.
AWS KMS
SetTYPE to AWS_KMS. A connection covers one AWS account in one region. This example authenticates with access keys, one of three credential types covered below:
REGION and ACCOUNT_ID are both required, because Gateway builds each key’s full ARN from them — so an Interceptor names a key as a bare key id or alias/<name>, never an ARN. See how the ARN is built and what’s rejected.
The connection needs kms:Encrypt and kms:Decrypt on every key it uses, allowed by the key policy and by the identity’s IAM policy.
Authenticate with access keys
SetCREDENTIALS_TYPE to BASIC and pass a long-lived access key pair:
Authenticate with temporary credentials
SetCREDENTIALS_TYPE to SESSION and pass the session token alongside the key pair. Gateway doesn’t refresh these, so they stop working when they expire:
Authenticate with the AWS default provider chain
SetCREDENTIALS_TYPE to DEFAULT and pass no credentials at all. Gateway uses the AWS SDK’s default provider chain, which searches the container or instance role, IAM Roles for Service Accounts, the shared credentials file and the AWS_ environment variables. This suits a Gateway that already runs with an AWS identity, and it’s the only type where the credentials rotate without a restart:
What happens at startup
Connections are read once, when Gateway starts, and this is true of every connection type:- Configuration is validated. An unrecognized property, or a malformed value such as a JSON object of additional client properties, fails startup and names the variable.
- Connections load before persisted resources. Interceptors and topic views are activated from storage after the connections exist, so their names resolve.
- A missing connection doesn’t stop Gateway. If an Interceptor or topic view names a connection that’s no longer declared, that resource stays saved and visible through the API but doesn’t activate, while everything else starts normally. Gateway logs an error naming the missing connection — check the startup log.
- Secrets are masked in the startup log. Additional client property values are masked whichever format set them, and their keys stay visible.
Gateway checks schema registry connections in parallel and waits for all of them to finish, so one broken connection doesn’t hide another — you see every failure in one startup attempt. Each attempt is bounded by
GATEWAY_EXTERNAL_CONNECTIONS_INIT_TIMEOUT_SECONDS, which defaults to 30 seconds and caps at 300. See the variable reference.
The check, and the permission it needs, differ by registry:
- Confluent-like — Gateway lists the registry’s subjects, so the connection needs permission to list them even if your Interceptors only read schemas by ID.
- AWS Glue — Gateway requests a schema version that deliberately doesn’t exist, so the connection needs
glue:GetSchemaVersionand a not-found answer counts as success.
Verify the configuration
Gateway logs each schema registry connection’s startup check. Look for one line per connection:No external connections configured and starts normally.
Gateway reports KMS connections separately, one line each:
No KMS connections configured. Neither summary includes a credential.
Current limitations
- Connections are read and checked once, at startup. Changing one takes a restart. Gateway doesn’t monitor a system that becomes unreachable afterwards, so that failure surfaces on traffic needing an uncached schema.
- A schema-backed topic view has to use
SELECT *. AWHEREclause is still allowed. See read schema-encoded topics. - Gateway doesn’t contact a KMS at startup. It validates the connection’s properties, so a wrong credential or an unreachable provider surfaces when an Interceptor that names it loads, not at boot.
- An Interceptor that names a removed connection stops applying, rather than failing. It stays saved and visible through the API, but after a restart the traffic it covered passes through unprocessed. An upcoming release will reject that traffic instead.
- There’s no API that lists configured connections. Use the startup log to confirm what Gateway loaded.