-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document how to set basic authentication #25
Comments
Seconded. |
I've had the need for this (for our tests) as well, and got it running as a docker composition where I had to include jaas_config file along with a file that had users (I used PropertyFileLoginModule) into a volume which got attached to the container. With that and using a few environment variables I got basic auth configured for the container. This is far from ideal as I've had to create the files and do the volume mounting for it to work. I couldn't find a different way to get it working based on what is available now by this image. Given that schema registry uses jaas perhaps it would be useful if at lease a built in |
@imran-els Hello, I'm struggling with the same issue, do you have an example on how you set up the jaas_config file ? |
See https://stackoverflow.com/questions/65931319/how-to-run-schema-registry-container-for-sasl-plain-kafka-cluster/65943146#65943146 I set |
Adding this here for anyone else who wants to add basic auth to their confluent schema registry Docker container. The documentation suggests that it is as simple as configuring your container with these environment variables:
But the documentation is wrong. In this image, any environment variables prefixed with
The actual desired config is:
Which can be achieved by adding another
|
Got it working with the below:
Following https://docs.confluent.io/platform/current/schema-registry/security/index.html#configuring-the-rest-api-for-basic-http-authentication for the content of schema_reg_jaas_config.conf and realm.properties. |
I started reading this
https://docs.confluent.io/current/security/basic-auth.html
and this
https://hub.docker.com/r/confluentinc/cp-schema-registry
I could not find there information how to configure basic auth for schema registry.
Then I looked at
https://github.com/confluentinc/cp-docker-images/blob/v5.2.1/debian/schema-registry/Dockerfile
https://github.com/confluentinc/cp-docker-images/blob/v5.2.1/debian/schema-registry/include/etc/confluent/docker/run
https://github.com/confluentinc/cp-docker-images/blob/v5.2.1/debian/schema-registry/include/etc/confluent/docker/launch
https://github.com/confluentinc/cp-docker-images/blob/v5.2.1/debian/schema-registry/include/etc/confluent/docker/configure
So far I understood that schema-registry.properties mentioned in https://docs.confluent.io/current/security/basic-auth.html comes from line
https://github.com/confluentinc/cp-docker-images/blob/v5.2.1/debian/schema-registry/include/etc/confluent/docker/configure#L37
But I don't understand where does template
comes from and what does it have in place of
authentication.roles
,authentication.method
andauthentication.realm
. Could you please help me with it?Ideally documentation of this docker image should have a section with that information. I think configuring basic authentication is a very important task and this image could not be used in production if that procedure is not explained in its documentation.
The text was updated successfully, but these errors were encountered: