Configuration

Schema Registry

Access Control

User permissions to Kafka cluster resources are defined by Schema actions. See: User authorization.

Configuration

Kpow supports Confluent Schema Registry and AWS Glue Schema Registry.

Kpow connects to a Schema registry with environment variables.

Confluent Schema Registry

VariableDescription
SCHEMA_REGISTRY_NAMEUI and logs friendly name for this Schema registry
SCHEMA_REGISTRY_URLThe client connection URL for your registry
SCHEMA_REGISTRY_AUTHUSER_INFO if basic authentication is configured
SCHEMA_REGISTRY_USERUsername if basic authentication is configured
SCHEMA_REGISTRY_PASSWORDPassword if basic authentication is configured
SCHEMA_REGISTRY_RESOURCE_IDSOptional, comma separated list of unique ids. Only specify when configuring multiple schema registries.
SCHEMA_REGISTRY_OBSERVATION_VERSIONOptional, sets the observation version used to snapshot schema resources. Default=1. See Observation Version.

Confluent SSL Configuration

The following environment variables can be used to configure Confluent schema registry connections with mutual-TLS:

VariableDescription
SCHEMA_REGISTRY_SSL_KEYSTORE_LOCATIONLocation of the keystore file
SCHEMA_REGISTRY_SSL_KEYSTORE_PASSWORDPassword to access the keystore file
SCHEMA_REGISTRY_SSL_KEYSTORE_KEYSpecific key to use within the keystore
SCHEMA_REGISTRY_SSL_KEY_PASSWORDPassword to access the key within the keystore
SCHEMA_REGISTRY_SSL_KEYSTORE_TYPEKeystore type
SCHEMA_REGISTRY_SSL_KEYMANAGER_ALGORITHMKeymanager algorithm
SCHEMA_REGISTRY_SSL_TRUSTSTORE_LOCATIONLocation of the truststore file
SCHEMA_REGISTRY_SSL_TRUSTSTORE_PASSWORDPassword to access the truststore file
SCHEMA_REGISTRY_SSL_TRUSTSTORE_TYPETruststore type
SCHEMA_REGISTRY_SSL_TRUSTMANAGER_ALGORITHMTrustmanager algorithm
SCHEMA_REGISTRY_SSL_ENDPOINT_IDENTIFICATION_ALGORITHMSSL endpoint identification algorithm
SCHEMA_REGISTRY_SSL_PROVIDERSSL provider
SCHEMA_REGISTRY_SSL_CIPHER_SUITESSSL cipher suites
SCHEMA_REGISTRY_SSL_PROTOCOLSSL protocol
SCHEMA_REGISTRY_SSL_ENABLED_PROTOCOLSSSL enabled protocols
SCHEMA_REGISTRY_SSL_SECURE_RANDOM_IMPLEMENTATIONSSL secure random implementation
SCHEMA_REGISTRY_SSL_KEYSTORE_CERTIFICATE_CHAINSSL keystore certificate chain
SCHEMA_REGISTRY_SSL_TRUSTSTORE_CERTIFICATESSSL truststore certificates
SCHEMA_REGISTRY_SSL_ENGINE_FACTORY_CLASSSSL engine factory class

Confluent Cloud Oauth Configuration

The following environment variables can be used to configure Confluent schema registry with Confluent Cloud via Oauth

See the Confluent Cloud guide to Schema Registry Oauth for more information.

VariableDescription
SCHEMA_REGISTRY_BEARER_AUTH_CREDENTIALS_SOURCEOAUTHBEARER or SASL_OAUTHBEARER_INHERIT
SCHEMA_REGISTRY_BEARER_AUTH_TOKENBearer Auth token
SCHEMA_REGISTRY_BEARER_AUTH_ISSUER_ENDPOINT_URLOpenID provider URL
SCHEMA_REGISTRY_BEARER_AUTH_CLIENT_IDClient ID
SCHEMA_REGISTRY_BEARER_AUTH_CLIENT_SECRETClient secret
SCHEMA_REGISTRY_BEARER_AUTH_SCOPEScope
SCHEMA_REGISTRY_BEARER_AUTH_SCOPE_CLAIM_NAMEScope claim name
SCHEMA_REGISTRY_BEARER_AUTH_SUB_CLAIM_NAMEScope sub claim name
SCHEMA_REGISTRY_BEARER_AUTH_LOGICAL_CLUSTERLSRC resource ID
SCHEMA_REGISTRY_BEARER_AUTH_IDENTITY_POOL_IDIdentity pool ID
SCHEMA_REGISTRY_BEARER_AUTH_CACHE_EXPIRY_BUFFER_SECONDSCache expiry buffer seconds

AWS Glue Schema Registry

VariableDescription
SCHEMA_REGISTRY_NAMEUI and logs friendly name for this Schema Registry
SCHEMA_REGISTRY_ARNThe ARN of your AWS Glue Schema Registry
SCHEMA_REGISTRY_REGIONThe Region of your AWS Glue Schema Registry (default: us-east-1)

AWS Glue authentication

By default, Kpow will use the DefaultAWSCredentialsProviderChain to authenticate with AWS Glue schema registry.

Static credentials

You can authenticate using static credentials by specifying:

SCHEMA_REGISTRY_ACCESS_KEY_ID=xxx
SCHEMA_REGISTRY_SECRET_ACCESS_KEY=xxx
Cross-account AWS Access (STS Assume Role)

If you wish to configure cross-account AWS Schema registry access (where for example Kpow is living in AWS Account A and AWS Glue is living in Account B) you can configure an IAM role+trust policy.

This blog post demonstrates how to configure an IAM role for this exact scenario with example Terraform in the GitHub repo.

You can configure Kpow to assume a role with the following environment variables:

SCHEMA_REGISTRY_STS_ROLE_ARN="arn:aws:iam::ACCOUNT_B_ID:root"
SCHEMA_REGISTRY_STS_SESSION_NAME="session_name"
SCHEMA_REGISTRY_STS_REGION="us-east-2" # (default us-east-1)

Configuring multiple Schema Registries

Kpow supports multiple Schema Registries associated to a single Kafka cluster.

To configure multiple Schema Registries, use the environment variable SCHEMA_REGISTRY_RESOURCE_IDS to define a comma separated list of Schema Registries. Kpow uses the resource ID as a prefix in the environment variable.

Example configuration when configuring two Schema Registries:

SCHEMA_REGISTRY_RESOURCE_IDS=DEV1,QA2

DEV1_SCHEMA_REGISTRY_URL="https://dev1.schema-registry.mycorp.org"
DEV1_SCHEMA_REGISTRY_AUTH="USER_INFO"
DEV1_SCHEMA_REGISTRY_USER=""
DEV1_SCHEMA_REGISTRY_PASSWORD=""

QA2_SCHEMA_REGISTRY_URL="https://qa2.schema-registry.mycorp.org"
QA2_SCHEMA_REGISTRY_AUTH="USER_INFO"
QA2_SCHEMA_REGISTRY_USER=""
QA2_SCHEMA_REGISTRY_PASSWORD=""

In this example we have defined connections to two Schema Registry resources: DEV1 and QA2

Note: The values for SCHEMA_REGISTRY_RESOURCE_IDS must be upper-case like DEV1 and not dev1.

Observation version

To control how Kpow snapshots schemas, use the SCHEMA_REGISTRY_OBSERVATION_VERSION flag to set the observation version.

By default, when SCHEMA_REGISTRY_OBSERVATION_VERSION is set to 1, Kpow follows a two-step process to capture schema metadata. First, it retrieves all schema names with a single query. Then, with the specified parallelism level, it makes two REST calls for each schema: one to fetch metadata and another to fetch compatibility.

This method provides the most context at an aggregate level, but can be resource-intensive for larger schema registries, as the number of REST calls increases proportionally to the number of schemas.

Alternatively, when SCHEMA_REGISTRY_OBSERVATION_VERSION is set to 2 (Confluent only), Kpow uses a single-step process to capture schema metadata. It makes a single REST call to fetch all schemas, including their metadata. This approach can be much more efficient than version 1, but compatibility information is only available at the individual schema level in Kpow's UI.