Schema registry

Related Documentation
OpenAPI Specifications
Incompatible with
on-prem

What is a schema registry?

Schema registries are resources that you can use in Schema Validation policies to validate messages against the Confluent schema registry.

Event Gateway supports the following registry types:

  • Avro
  • JSON Schema

You can also set schema_type to any v1.3+ to accept records in any supported format, rather than a single fixed format. With any, Event Gateway resolves the format of each record individually. Values that carry a schema reference, in the Confluent wire format or in a record header, are decoded using the registry. Any other value is parsed as JSON without a schema.

Set up a schema registry

Note: Event Gateway only requires read-only access to the schema registry to fetch schemas for validation.

Security considerations

A policy can compute its behavior straight from schema metadata, for example a Mask Fields or Encrypt Fields selector built from record.value.schema.metadata.tags, or a condition that checks record.value.schema.metadata.properties. For those policies, the registry is a trusted input.

That means anyone with write access to the registry can change what a policy does without touching the policy itself. For example, removing a PII tag stops a field from being masked or encrypted. The change takes effect for every record validated against that schema version, on every virtual cluster that uses it.

Restrict write access to the registry to the same degree you’d restrict the policies it drives. Review metadata changes before they go live, and keep a registry-side audit log so changes stay traceable after the fact.

Schema

Help us make these docs great!

Kong Developer docs are open source. If you find these useful and want to make them better, contribute today!