# Security is enabled by default when debug

**URL:** <https://discuss.elastic.co/t/security-is-enabled-by-default-when-debug/215811>\
**Category:** Elasticsearch\
**Created:** [January 21, 2020, 2:16am UTC](https://discuss.elastic.co/t/security-is-enabled-by-default-when-debug/215811 "2020-01-21T02:16:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yanchun](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yanchun/32/35596_2.png) [@Yanchun](https://discuss.elastic.co/u/Yanchun)\
**Post date:** [January 21, 2020, 2:16am UTC](https://discuss.elastic.co/t/security-is-enabled-by-default-when-debug/215811/1 "2020-01-21T02:16:20Z")

</div>

Hi, I compiled es 6.8.5 from source code with the command `./gradlew run --debug-jvm `, and I want to debug with IDEA, but the `xpack.security.enabled` is default true, it's so inconvenient for debug. I ever compiled 6.4, it's default false. The generated package is in `distribution/build/cluster/run\ node0/elasticsearch-6.8.5-SNAPSHOT`, and the generate config is below:

```
cluster.name: distribution_run
node.name: node-0
pidfile: /Volumes/Files/Study/Elastic/ES/source/elasticsearch/distribution/build/cluster/run node0/es.pid
path.repo: /Volumes/Files/Study/Elastic/ES/source/elasticsearch/distribution/build/cluster/shared/repo
path.shared_data: /Volumes/Files/Study/Elastic/ES/source/elasticsearch/distribution/build/cluster/shared/
node.attr.testattr: test
discovery.zen.master_election.wait_for_joins_timeout: 5s
node.max_local_storage_nodes: 1
http.port: 9200
transport.tcp.port: 9300
cluster.routing.allocation.disk.watermark.low: 1b
cluster.routing.allocation.disk.watermark.high: 1b
cluster.routing.allocation.disk.watermark.flood_stage: 1b
script.max_compilations_rate: 2048/1m
xpack.monitoring.enabled: true
xpack.sql.enabled: true
xpack.rollup.enabled: true
xpack.security.enabled: true
discovery.zen.hosts_provider: file
discovery.zen.ping.unicast.hosts: []

```

All these files are re-generated when I build. How can I disable the xpack.security. And I remember the security is disabled in basic license, but now it's enabled.

---

<div class="post-metadata">

**Author:** ![Yanchun](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yanchun/32/35596_2.png) [@Yanchun](https://discuss.elastic.co/u/Yanchun)\
**Post date:** [January 21, 2020, 6:53am UTC](https://discuss.elastic.co/t/security-is-enabled-by-default-when-debug/215811/2 "2020-01-21T06:53:50Z")

</div>

I have found the solution: comment `setting 'xpack.security.enabled', 'true'` in distribution/build.gradle.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 18, 2020, 6:53am UTC](https://discuss.elastic.co/t/security-is-enabled-by-default-when-debug/215811/3 "2020-02-18T06:53:57Z")

</div>

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