We are working on getting Amazon MSK (Kafka) working with IAM authentication & thereafter making it publicly accessible by DNS using changes in the aws kafka advertised listeners. To make this happen we are following the same infrastructure plan as below, but instead of using an Interface Endpoint, we are using a Network Loadbalancer: https://aws.amazon.com/blogs/big-data/how-goldman-sachs-builds-cross-account-connectivity-to-their-amazon-msk-clusters-with-aws-privatelink/
The interesting part is that the same infrastructure works perfectly using SASL/SCRAM authentication but not with IAM authentication. Do you have any info regarding issues about publicly accessible AWS MSK and IAM authentication?
Basically we are following the ideas in the guide, specifically Pattern 2: Front all MSK brokers with a single shared interface endpoint, but using IAM authentication instead Using your IAM Guide for AWS MSK we have successfully communicated with our brokers using the internal dns broker adress. When we later change the advertised listeners in accordance to the guide above we fail to communicate with the broker and are given the error message:
java.util.concurrent.ExecutionException: org.apache.kafka.common.errors.SaslAuthenticationException: [9d5b944c-df83-4573-9979-4d121f49a533]: Hostname verification failed
at org.apache.kafka.common.internals.KafkaFutureImpl.wrapAndThrow(KafkaFutureImpl.java:45)
at org.apache.kafka.common.internals.KafkaFutureImpl.access$000(KafkaFutureImpl.java:32)
at org.apache.kafka.common.internals.KafkaFutureImpl$SingleWaiter.await(KafkaFutureImpl.java:104)
at org.apache.kafka.common.internals.KafkaFutureImpl.get(KafkaFutureImpl.java:272)
at kafka.admin.ConfigCommand$.getResourceConfig(ConfigCommand.scala:552)
at kafka.admin.ConfigCommand$.$anonfun$describeResourceConfig$4(ConfigCommand.scala:512)
at kafka.admin.ConfigCommand$.$anonfun$describeResourceConfig$4$adapted(ConfigCommand.scala:504)
at scala.collection.immutable.List.foreach(List.scala:431)
at kafka.admin.ConfigCommand$.describeResourceConfig(ConfigCommand.scala:504)
at kafka.admin.ConfigCommand$.describeConfig(ConfigCommand.scala:484)
at kafka.admin.ConfigCommand$.processCommand(ConfigCommand.scala:304)
at kafka.admin.ConfigCommand$.main(ConfigCommand.scala:97)
at kafka.admin.ConfigCommand.main(ConfigCommand.scala)
Caused by: org.apache.kafka.common.errors.SaslAuthenticationException: [9d5b944c-df83-4573-9979-4d121f49a533]: Hostname verification failed