How to access Kibana with x-pack security disabled?

Hi!

I starting es and kibana in a docker compose file, I have set xpack.security.enabled=false, but when accessing the kibana UI I am still asked for an enrollment token, which from my understanding would not be generated when switching off security.

Is there a setting I need to pass to kibana to avoid needing any security?

This is all for local development only, and I am using version 8.2.3

Thanks!

It should be pretty easy to work with security enabled, as everything would work out of the box with minimal effort. Install Elasticsearch with Docker | Elasticsearch Guide [8.2] | Elastic will get you all the way there and this way you are already ready to take this to production when ready or not worry if your instance gets exposed to the internet ! All that with the only additional effort of logging in to Kibana once in a while :slight_smile:

If you really want to disable security, you need to share your docker compose file so that we can make suggestions as to what is wrong and what can be fixed.

Hey thanks for the reply, I am using docker compose and the guide for using compose is quite involved - requires storing certs etc.

For production I will be using elastic cloud, so seems overkill to set up security for local dev.

Here is my compose file:

version: "3.9"

services:
  app:
    build: .
    working_dir: /code/app
    command: uvicorn main:app --host 0.0.0.0 --reload
    environment:
      DEBUG: 1
    volumes:
      - ./app:/code/app
    ports:
      - 8000:8000
    restart: on-failure
    networks:
      - elastic

  elastic:
    image: elasticsearch:8.2.3
    container_name: elastic
    environment:
      - discovery.type=single-node
      - ES_JAVA_OPTS=-Xms1g -Xmx1g
      - xpack.security.enabled=false
    volumes:
      - es_data:/usr/share/elasticsearch/data
    ports:
      - 127.0.0.1:9200:9200
    networks:
      - elastic

  kibana:
    image: kibana:8.2.3
    environment:
      - xpack.security.enabled=false
    ports:
      - target: 5601
        published: 5601
    depends_on:
      - elasticsearch
    networks:
      - elastic      

volumes:
  es_data:
    driver: local

networks:
  elastic:
    name: elastic
    driver: bridge

Thanks!

Kibana environment variables need to be in capital letters ( Install Kibana with Docker | Kibana Guide [8.2] | Elastic )

environment:
      - XPACK_SECURITY_ENABLED=false

Thanks! But setting this still asks for an enrollment token when accessing Kibana:

  kibana:
    image: kibana:8.2.3
    environment:
      - XPACK_SECURITY_ENABLED=false
    ports:
      - target: 5601
        published: 5601
    depends_on:
      - elastic
    networks:
      - elastic  

See this reply Kibana asking for Enrollment Token when xpack.security.enabled: false in Elasticsearch - #2 by ikakavas

Thank you!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.