# Kibana CSP configuration

**URL:** <https://discuss.elastic.co/t/kibana-csp-configuration/353681>\
**Category:** Kibana\
**Created:** [February 20, 2024, 11:40am UTC](https://discuss.elastic.co/t/kibana-csp-configuration/353681 "2024-02-20T11:40:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ishank](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ishank/32/72581_2.png) [@ishank](https://discuss.elastic.co/u/ishank)\
**Post date:** [February 20, 2024, 11:40am UTC](https://discuss.elastic.co/t/kibana-csp-configuration/353681/1 "2024-02-20T11:40:40Z")

</div>

Hi

I am having difficulty changing CSP configuration in kibana.yml file.  
I have tried multiple ways to change like:

```auto
csp.script_src: "'self' 'unsafe-eval' 'unsafe-inline';"
csp.script_src: ['self', 'unsafe-eval', 'unsafe-inline']

```

But kibana fails to start without giving any error in the logs. It just get stucks on:

```auto
[2024-02-20T11:32:39.529+00:00][INFO][node] Kibana process configured with roles: [background_tasks, ui

```

Kibana documentation also doesn't give an example for the correct format to specify here.

Please help

---

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [March 8, 2024, 1:10pm UTC](https://discuss.elastic.co/t/kibana-csp-configuration/353681/2 "2024-03-08T13:10:20Z")

</div>

`csp.script_src` is an array configuration ([source](https://github.com/elastic/kibana/blob/main/packages/core/http/core-http-server-internal/src/csp/config.ts#L43)). I tested this yaml snippet and Kibana started without issues:

```auto
csp.strict: false
csp.warnLegacyBrowsers: false
csp.script_src:
  - unsafe-inline
  - self
  - unsafe-eval

```

Mind that `unsafe-inline` has restrictions on `strict` and `warnLegacyBrowsers` values but you should see proper error messages in the Kibana logs.

Hope it helps.

---

<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:** [April 5, 2024, 1:10pm UTC](https://discuss.elastic.co/t/kibana-csp-configuration/353681/3 "2024-04-05T13:10:31Z")

</div>

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