How to disable SSL locally?

Hey all - I have a single test instance of opensearch running locally via this docker command:

docker run -d --name os1 -p 9200:9200 -p 9300:9300 -e "plugins.security.disabled: true" -e "opendistro_security.ssl.http.enabled: false" -e "discovery.type=single-node" -e "script.painless.regex.enabled=true" opensearchproject/opensearch:1.0.0

I am not able to get the regular response running curl localhost:9200 - it is always throwing this exception:

io.netty.handler.codec.DecoderException: io.netty.handler.ssl.NotSslRecordException: not an SSL/TLS record

I thought I disabled what I needed in the docker run command (opendistro_security.ssl.http.enabled: false and plugins.security.disabled: true), but perhaps not?

Would love any tips. Thanks!
Tim

FWIW, passing these params via docker run didn’t work - I had to ssh into the docker container using docker exec -it <container-id> /bin/bash and then modified the /usr/share/opensearch/config/opensearch.yml file – I just replaced all the demo security config settings in there with a single line plugins.security.disabled: true

Stopping and starting the container with the same command then caused the curl localhost:9200 to come back without the SSL exception.

@heck0045

Alternatively, you could attach opensearch.yml file with desired settings to your docker run and avoid doing it manually inside the docker.

Do you have a sample for this? I am trying to disable security using just the run command as well.

@cyberwombat Could you open a new thread and describe how you deploy your cluster?
Do you want to disable the security plugin or SSL connection to the cluster?

@pablo How do disable SSL/security using a single line npm script on start

For me the correct setting of the env var worked to turn off ssl and security. No need to ssh into the container etc…

-e "plugins.security.disabled=true"
1 Like