# Cp-schema-registry docker config for Basic HTTP authentication

**URL:** https://forum.confluent.io/t/cp-schema-registry-docker-config-for-basic-http-authentication/7521
**Category:** Schema Registry
**Created:** [29 March 2023 08:20 UTC](https://forum.confluent.io/t/cp-schema-registry-docker-config-for-basic-http-authentication/7521 "2023-03-29T08:20:47Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![sevenouts](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/sevenouts/32/2838_2.png) [@sevenouts](https://forum.confluent.io/u/sevenouts)
#### Post date: [29 March 2023 08:20 UTC](https://forum.confluent.io/t/cp-schema-registry-docker-config-for-basic-http-authentication/7521/1 "2023-03-29T08:20:47Z")

</div>

Hi everyone,  
I’m trying to config schema registry using docker for basic http authentication  
Based on this documentation:

> [HTTP Basic Authentication | Confluent Documentation](https://docs.confluent.io/platform/current/security/basic-auth.html)

i have to do this setting

> export SCHEMA\_REGISTRY\_OPTS=-Djava.security.auth.login.config=/path/to/the/jaas\_config.conf  
> /bin/schema-registry-start /etc/schema-registry/schema-registry.properties

if i don’t use confluent, then how do i replace this ?

This are my current docker compose

> services:  
> schema-registry:  
> image: confluentinc/cp-schema-registry:5.4.1  
> hostname: schema-registry  
> depends\_on:  
> - kafka-broker-1  
> - kafka-broker-2  
> - kafka-broker-3  
> ports:  
> - “8081:8081”  
> environment:  
> SCHEMA\_REGISTRY\_HOST\_NAME: schema-registry  
> SCHEMA\_REGISTRY\_KAFKASTORE\_CONNECTION\_URL: ‘zookeeper:2181’  
> SCHEMA\_REGISTRY\_LISTENERS: [http://schema-registry:8081](http://schema-registry:8081)  
> SCHEMA\_REGISTRY\_KAFKASTORE\_BOOTSTRAP\_SERVERS: EXTERNAL://kafka-broker-2:9092,INTERNAL://localhost:29093,PLAINTEXT://kafka-broker-2:9292  
> SCHEMA\_REGISTRY\_DEBUG: ‘true’  
> SCHEMA\_REGISTRY\_CONFLUENT\_SCHEMA\_REGISTRY\_AUTHORIZER\_CLASS: io.confluent.kafka.schemaregistry.security.authorizer.schemaregistryacl.SchemaRegistryAclAuthorizer  
> SCHEMA\_REGISTRY\_SCHEMA\_REGISTRY\_RESOURCE\_EXTENSION\_CLASS: io.confluent.kafka.schemaregistry.security.SchemaRegistrySecurityResourceExtension  
> SCHEMA\_REGISTRY\_AUTHENTICATION\_METHOD: BASIC  
> SCHEMA\_REGISTRY\_AUTHENTICATION\_ROLES: admin  
> SCHEMA\_REGISTRY\_OPTS: ‘-Djava.security.auth.login.config=/opt/security/schema-registry.jaas /bin/schema-registry-start /etc/schema-registry/schema-registry.properties’  
> volumes:  
> - “./volumes/jaas:/opt/security”  
> networks:  
> - ${GLOBAL\_NETWORK:-kafka}
