Switching to AWS Glue and MSK IAM authentication
Steps to move a cluster from the (default) Confluent Schema Registry with SASL authentication to the AWS Glue Schema Registry with AWS MSK IAM authentication — typically when the underlying cluster itself moves to AWS MSK. The two features are independent but usually configured together. See AWS Glue Schema Registry and AWS MSK IAM authentication for the full property reference.
This is a per-cluster change — if the service uses multiple clusters, do this once per cluster that actually moves, leaving the others on Confluent/SASL untouched.
-
Add the two modules (see Choosing dependencies):
<dependency><groupId>ch.admin.bit.jeap</groupId><artifactId>jeap-messaging-glue-schema-registry</artifactId></dependency><dependency><groupId>ch.admin.bit.jeap</groupId><artifactId>jeap-messaging-aws-msk-iam-auth</artifactId></dependency> -
Decide on credentials. By default both sides fall back to a
DefaultCredentialsProvider(e.g. the ECS task role), which is usually the right choice — for Glue this fallback is a jEAP-owned bean (GlueAutoConfiguration), while for MSK IAM auth it comes from the externalaws-msk-iam-authlibrary itself. Only provide your ownAwsCredentialsProviderbean, or setassumeIamRoleArnon the Glue/MSK properties below, if cross-account access is needed. -
Point the cluster's bootstrap servers at MSK and turn on IAM authentication:
jeap:messaging:kafka:cluster:default-cluster:bootstrapServers: <msk-bootstrap-servers>aws:msk:iamAuthEnabled: trueregion: eu-central-1 # only required when assumeIamRoleArn is also set -
Before switching, make sure the Confluent registry isn't active — this is checked once, globally for the whole service, not per cluster:
jeap.messaging.kafka.useSchemaRegistrymust not befalse(the mock registry) and the legacy top-leveljeap.messaging.kafka.schemaRegistryUrlmust be unset. Either one being set makes the service refuse to start on any cluster that hasaws.glue.registryNameconfigured, withConfluent schema registry and Glue schema registry cannot be active at the same time— regardless of that cluster's own (per-cluster) Confluent properties. Then switch the schema registry to Glue on the cluster:aws:glue:registryName: my-glue-registryregion: eu-central-1aws.glue.registryNameonly activates Glue for this cluster — it does not disable the Confluent registry anywhere, automatically or otherwise; that's purely the global check above. -
Remove the now-unused, per-cluster Confluent-specific properties on this cluster:
schemaRegistryUrl,schemaRegistryUsername,schemaRegistryPassword,username,password. This is cleanup only — unlike step 4's global flags, these per-cluster properties don't affect whether the service starts. LeavesecurityProtocolalone — it defaults toSASL_SSL, which jEAP also uses for MSK IAM auth, so there's nothing to change there. -
Nothing else needs to change:
autoRegisterSchemakeeps registering schemas automatically on first send, and compatibility checking stays effectivelyNONEon Glue for the same reason it is on Confluent — compatibility is already verified at deploy time via the Message Type Registry / Message Contract Service (see Message evolution). -
Roll out and verify: deploy to a non-production environment first, confirm the service starts (jEAP fails fast at startup only if
registryNameorregionis missing outright — a value that's merely wrong, or an IAM permission problem, isn't checked eagerly and will only surface once the service actually tries to produce/consume) and that messages are produced/consumed as before, then promote the change through the usual environments.
Local development and tests are unaffected by this — Glue and MSK IAM auth aren't locally emulated, so
services typically keep using the Confluent mock registry (useSchemaRegistry: false) or a local
Confluent broker for dev/test, and only switch the dev/abn/prd cluster configuration that actually
points at MSK. Because the mock-registry flag is the same global, not per-cluster, switch from step 4,
the aws.glue.registryName/MSK properties must live only in the profiles/environments that don't set
useSchemaRegistry: false — a dev/test profile with the mock registry on and a Glue-configured cluster
in the same property set fails to start.