# Docker Compose file for =\> kafka.auth.mode : SERVICE\_ACCOUNT

**URL:** <https://forum.confluent.io/t/docker-compose-file-for-kafka-auth-mode-service-account/5348>\
**Category:** Self-Managed Connectors\
**Created:** [21 June 2022 20:25 UTC](https://forum.confluent.io/t/docker-compose-file-for-kafka-auth-mode-service-account/5348 "2022-06-21T20:25:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gautamg](https://avatars.discourse-cdn.com/v4/letter/g/76d3ee/32.png) [@gautamg](https://forum.confluent.io/u/gautamg)\
**Post date:** [21 June 2022 20:25 UTC](https://forum.confluent.io/t/docker-compose-file-for-kafka-auth-mode-service-account/5348/1 "2022-06-21T20:25:27Z")

</div>

For the below auth mode for a given kafka connector config

```auto
"kafka.auth.mode". : "SERVICE_ACCOUNT",
"kafka.service.account.id" : sa- ******",

```

how would the docker-compose file look like for the connect, producer and consumer environment variables when it comes to authentication configuration?

Currently, with the **“kafka.auth.mode”: “KAFKA\_API\_KEY”** way of authenticating, the environment variables in docker-compose.yaml file looks like below for those sections

```auto
      # Connect worker
      CONNECT_SECURITY_PROTOCOL: SASL_SSL
      CONNECT_SASL_JAAS_CONFIG: org.apache.kafka.common.security.plain.PlainLoginModule required username="[redacted]" password="[redacted]";
      CONNECT_SASL_MECHANISM: PLAIN
      CONNECT_SSL_ENDPOINT_IDENTIFICATION_ALGORITHM: "HTTPS"
      # Connect producer
      CONNECT_PRODUCER_SECURITY_PROTOCOL: SASL_SSL
      CONNECT_PRODUCER_SASL_JAAS_CONFIG: org.apache.kafka.common.security.plain.PlainLoginModule required username="[redacted]" password="[redacted]";
      CONNECT_PRODUCER_SASL_MECHANISM: PLAIN
      # Connect consumer
      CONNECT_CONSUMER_SECURITY_PROTOCOL: SASL_SSL
      CONNECT_CONSUMER_SASL_JAAS_CONFIG: org.apache.kafka.common.security.plain.PlainLoginModule required username="[redacted]" password="[redacted]";
      CONNECT_CONSUMER_SASL_MECHANISM: PLAIN

```

I am looking for the equivalent for the above for **“kafka.auth.mode” : “SERVICE\_ACCOUNT”** for the docker-compose.yaml file.

Much appreciated
