# Error saving Spaces

**URL:** <https://discuss.elastic.co/t/error-saving-spaces/157118>\
**Category:** Kibana\
**Created:** [November 16, 2018, 6:16pm UTC](https://discuss.elastic.co/t/error-saving-spaces/157118 "2018-11-16T18:16:03Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![niklaskurvinen](https://avatars.discourse-cdn.com/v4/letter/n/cdc98d/32.png) [@niklaskurvinen](https://discuss.elastic.co/u/niklaskurvinen)\
**Post date:** [November 21, 2018, 11:47am UTC](https://discuss.elastic.co/t/error-saving-spaces/157118/21 "2018-11-21T11:47:55Z")

</div>

Hey @rschirin and @Alufolie , I'm seeing the exact same behavior as you.  
This might be unrelated, but I'm curious if you have issues opening/editing roles in kibana?  
If I click a role I see the same 403 error for /api/spaces/space as I encounter in the spaces section.

---

<div class="post-metadata">

**Author:** ![rschirin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rschirin/32/45283_2.png) [@rschirin](https://discuss.elastic.co/u/rschirin)\
**Post date:** [November 21, 2018, 11:49am UTC](https://discuss.elastic.co/t/error-saving-spaces/157118/22 "2018-11-21T11:49:39Z")

</div>

hey @niklaskurvinen, can you try to do the same also with Management --\> Roles --\> click on Create Role ?

---

<div class="post-metadata">

**Author:** ![niklaskurvinen](https://avatars.discourse-cdn.com/v4/letter/n/cdc98d/32.png) [@niklaskurvinen](https://discuss.elastic.co/u/niklaskurvinen)\
**Post date:** [November 21, 2018, 11:51am UTC](https://discuss.elastic.co/t/error-saving-spaces/157118/23 "2018-11-21T11:51:37Z")

</div>

Yeah, same issue with create.

Also I just realized that @Alufolie already mentioned the roles in a previous reply in this thread, so sorry for not reading properly I guess. 🙂

---

<div class="post-metadata">

**Author:** ![niklaskurvinen](https://avatars.discourse-cdn.com/v4/letter/n/cdc98d/32.png) [@niklaskurvinen](https://discuss.elastic.co/u/niklaskurvinen)\
**Post date:** [November 21, 2018, 12:42pm UTC](https://discuss.elastic.co/t/error-saving-spaces/157118/24 "2018-11-21T12:42:46Z")

</div>

Disabling spaces restored the access to roles again. I created a couple of tmp roles with the Kibana privileges (all) set (as that was the only common denominator I could see on the old roles i.e. it was "none" before).  
But after turning spaces on again I still have the same issue with my users that uses these new roles, so no luck there.

Hoping that @Brandon_Kobel might be able to share some news on this issue, until then I'll mess around with my environment and share here if I find anything of of value.

---

<div class="post-metadata">

**Author:** ![rschirin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rschirin/32/45283_2.png) [@rschirin](https://discuss.elastic.co/u/rschirin)\
**Post date:** [November 24, 2018, 2:05pm UTC](https://discuss.elastic.co/t/error-saving-spaces/157118/25 "2018-11-24T14:05:49Z")

</div>

If this issue is related to upgrade procedure, probably I will try to install from scretch every node ☹

---

<div class="post-metadata">

**Author:** ![mukai](https://avatars.discourse-cdn.com/v4/letter/m/f08c70/32.png) [@mukai](https://discuss.elastic.co/u/mukai)\
**Post date:** [November 26, 2018, 1:16am UTC](https://discuss.elastic.co/t/error-saving-spaces/157118/26 "2018-11-26T01:16:06Z")

</div>

I have the same ploblem.  
There is no default space and I can't save space.  
I hope that this problem will be solved.

 ![no%20default%20space](https://us1.discourse-cdn.com/elastic/original/3X/6/9/6951c89cfc488917d4858fa076d22dce9f80f20e.png) ![can't%20create%20space](https://us1.discourse-cdn.com/elastic/original/3X/f/7/f7cedfdf63606b1832e1bff5aa7be8f23e2d3aea.png)

---

<div class="post-metadata">

**Author:** ![saif](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saif/32/37431_2.png) [@saif](https://discuss.elastic.co/u/saif)\
**Post date:** [November 26, 2018, 10:27am UTC](https://discuss.elastic.co/t/error-saving-spaces/157118/27 "2018-11-26T10:27:58Z")

</div>

> [@Brandon\_Kobel](#):
>
> GET \_xpack/security/user/\_has\_privileges { "applications": [{ "application": "kibana-.kibana", "resources": "space:default", "privileges": ["action:login"] } ] }

same problem for user roles its the same problem !  
Can't edit or add new user role !!

```
"error","error":{"message":"Unauthorized","name":"Error","stack":"Error: Unauthorized\n at validate (/usr/share/kibana/node_modules/hapi-auth-cookie/lib/index.js:145:49)\n at Object.authenticate (/usr/share/kibana/node_modules/hapi-auth-cookie/lib/index.js:210:13)\n at module.exports.internals.Auth.internals.Auth.test (/usr/share/kibana/node_modules/hapi/lib/auth.js:96:22)\n at Object.test (/usr/share/kibana/node_modules/hapi/lib/plugin.js:65:64)\n at resolve (/usr/share/kibana/node_modules/x-pack/plugins/security/server/lib/authentication/session.js:56:25)\n at new Promise (<anonymous>)\n at Session.get (/usr/share/kibana/node_modules/x-pack/plugins/security/server/lib/authentication/session.js:55:12)

```

---

<div class="post-metadata">

**Author:** ![saif](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saif/32/37431_2.png) [@saif](https://discuss.elastic.co/u/saif)\
**Post date:** [November 26, 2018, 10:57am UTC](https://discuss.elastic.co/t/error-saving-spaces/157118/28 "2018-11-26T10:57:38Z")

</div>

Why it's use anonymous ??

---

<div class="post-metadata">

**Author:** ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)\
**Post date:** [November 26, 2018, 2:37pm UTC](https://discuss.elastic.co/t/error-saving-spaces/157118/29 "2018-11-26T14:37:50Z")

</div>

Can you try to set this in your `kibana.yml`, and see if you get a different result?

```auto
xpack.security.authorization.legacyFallback.enabled: false

```

---

<div class="post-metadata">

**Author:** ![saif](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saif/32/37431_2.png) [@saif](https://discuss.elastic.co/u/saif)\
**Post date:** [November 26, 2018, 2:54pm UTC](https://discuss.elastic.co/t/error-saving-spaces/157118/30 "2018-11-26T14:54:57Z")

</div>

same error

> {"type":"log","@timestamp":"2018-11-26T14:54:17Z","tags":["debug","legacy","proxy"],"pid":20361,"message":"Event is being forwarded: connection"}  
> {"type":"log","@timestamp":"2018-11-26T14:54:17Z","tags":["debug","legacy","proxy"],"pid":20361,"message":"Event is being forwarded: connection"}  
> {"type":"log","@timestamp":"2018-11-26T14:54:17Z","tags":["trace","legacy","service"],"pid":20361,"message":"Request will be handled by proxy GET:/api/security/v1/me."}  
> {"type":"log","@timestamp":"2018-11-26T14:54:17Z","tags":["debug","legacy","proxy"],"pid":20361,"message":"Event is being forwarded: connection"}  
> {"type":"log","@timestamp":"2018-11-26T14:54:17Z","tags":["debug","security","basic"],"pid":20361,"message":"Trying to authenticate user request to /api/security/v1/me."}  
> {"type":"log","@timestamp":"2018-11-26T14:54:17Z","tags":["debug","security","basic"],"pid":20361,"message":"Trying to authenticate via header."}  
> {"type":"log","@timestamp":"2018-11-26T14:54:17Z","tags":["debug","security","basic"],"pid":20361,"message":"Authorization header is not presented."}  
> {"type":"log","@timestamp":"2018-11-26T14:54:17Z","tags":["debug","security","basic"],"pid":20361,"message":"Trying to authenticate via state."}  
> {"type":"log","@timestamp":"2018-11-26T14:54:17Z","tags":["trace","legacy","service"],"pid":20361,"message":"Request will be handled by proxy GET:/api/spaces/space."}  
> {"type":"log","@timestamp":"2018-11-26T14:54:17Z","tags":["debug","security","basic"],"pid":20361,"message":"Trying to authenticate user request to /api/spaces/space."}  
> {"type":"log","@timestamp":"2018-11-26T14:54:17Z","tags":["debug","security","basic"],"pid":20361,"message":"Trying to authenticate via header."}  
> {"type":"log","@timestamp":"2018-11-26T14:54:17Z","tags":["debug","security","basic"],"pid":20361,"message":"Authorization header is not presented."}  
> {"type":"log","@timestamp":"2018-11-26T14:54:17Z","tags":["debug","security","basic"],"pid":20361,"message":"Trying to authenticate via state."}  
> {"type":"log","@timestamp":"2018-11-26T14:54:17Z","tags":["debug","security","basic"],"pid":20361,"message":"Request has been authenticated via state."}  
> {"type":"log","@timestamp":"2018-11-26T14:54:17Z","tags":["trace","legacy","service"],"pid":20361,"message":"Request will be handled by proxy GET:/api/security/v1/users."}  
> {"type":"log","@timestamp":"2018-11-26T14:54:17Z","tags":["debug","security","basic"],"pid":20361,"message":"Request has been authenticated via state."}  
> {"type":"log","@timestamp":"2018-11-26T14:54:17Z","tags":["debug","security","basic"],"pid":20361,"message":"Trying to authenticate user request to /api/security/v1/users."}  
> {"type":"log","@timestamp":"2018-11-26T14:54:17Z","tags":["debug","security","basic"],"pid":20361,"message":"Trying to authenticate via header."}  
> {"type":"log","@timestamp":"2018-11-26T14:54:17Z","tags":["debug","security","basic"],"pid":20361,"message":"Authorization header is not presented."}  
> {"type":"log","@timestamp":"2018-11-26T14:54:17Z","tags":["debug","security","basic"],"pid":20361,"message":"Trying to authenticate via state."}  
> {"type":"log","@timestamp":"2018-11-26T14:54:17Z","tags":["debug","security","basic"],"pid":20361,"message":"Request has been authenticated via state."}  
> {"type":"log","@timestamp":"2018-11-26T14:54:17Z","tags":["debug","legacy","proxy"],"pid":20361,"message":"Event is being forwarded: connection"}  
> e

---

<div class="post-metadata">

**Author:** ![niklaskurvinen](https://avatars.discourse-cdn.com/v4/letter/n/cdc98d/32.png) [@niklaskurvinen](https://discuss.elastic.co/u/niklaskurvinen)\
**Post date:** [November 26, 2018, 2:56pm UTC](https://discuss.elastic.co/t/error-saving-spaces/157118/31 "2018-11-26T14:56:59Z")

</div>

> [@Larry\_Gregory](#):
>
> xpack.security.authorization.legacyFallback.enabled: false

Sadly I still get the same response. Trying to create a space or accessing/creating roles fail, POST request to /api/spaces/space returns `{"statusCode":403,"error":"Forbidden"}`

---

<div class="post-metadata">

**Author:** ![saif](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saif/32/37431_2.png) [@saif](https://discuss.elastic.co/u/saif)\
**Post date:** [November 26, 2018, 2:57pm UTC](https://discuss.elastic.co/t/error-saving-spaces/157118/32 "2018-11-26T14:57:17Z")

</div>

```
{"type":"log","@timestamp":"2018-11-26T14:55:30Z","tags":["debug","legacy","proxy"],"pid":20361,"message":"Event is being forwarded: connection"}
{"type":"log","@timestamp":"2018-11-26T14:55:30Z","tags":["trace","legacy","service"],"pid":20361,"message":"Request will be handled by proxy POST:/api/spaces/space."}
{"type":"log","@timestamp":"2018-11-26T14:55:30Z","tags":["debug","security","basic"],"pid":20361,"message":"Trying to authenticate user request to /api/spaces/space."}
{"type":"log","@timestamp":"2018-11-26T14:55:30Z","tags":["debug","security","basic"],"pid":20361,"message":"Trying to authenticate via header."}
{"type":"log","@timestamp":"2018-11-26T14:55:30Z","tags":["debug","security","basic"],"pid":20361,"message":"Authorization header is not presented."}
{"type":"log","@timestamp":"2018-11-26T14:55:30Z","tags":["debug","security","basic"],"pid":20361,"message":"Trying to authenticate via state."}
{"type":"log","@timestamp":"2018-11-26T14:55:30Z","tags":["debug","security","basic"],"pid":20361,"message":"Request has been authenticated via state."}
```

---

<div class="post-metadata">

**Author:** ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)\
**Post date:** [November 26, 2018, 3:53pm UTC](https://discuss.elastic.co/t/error-saving-spaces/157118/33 "2018-11-26T15:53:01Z")

</div>

Thank you both for trying -- I'm trying to eliminate possibilities.

I have a couple questions, and I'm sorry if any of this is repetitive:

1. What user do you have set in `kibana.yml` for `elasticsearch.username`? What roles are granted to this user? If there are custom roles granted, can you list provide the access that each role grants? Please redact any access to your specific data indices, but leave any system indices (such as .kibana) intact.
2. Which authentication realms are enabled in Elasticsearch (e.g., native, ldap, saml, etc)
3. Are you using a custom `kibana.index` setting? The default is `.kibana`.

---

<div class="post-metadata">

**Author:** ![saif](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saif/32/37431_2.png) [@saif](https://discuss.elastic.co/u/saif)\
**Post date:** [November 26, 2018, 4:03pm UTC](https://discuss.elastic.co/t/error-saving-spaces/157118/34 "2018-11-26T16:03:50Z")

</div>

thank you too,  
i'm using Elastic super user with native auth to eliminate possibilities  
the same problem with kibana user ☹  
and i'm using the default index .kibana

---

<div class="post-metadata">

**Author:** ![Larry\_Gregory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/larry_gregory/32/34969_2.png) [@Larry\_Gregory](https://discuss.elastic.co/u/Larry_Gregory)\
**Post date:** [November 26, 2018, 4:20pm UTC](https://discuss.elastic.co/t/error-saving-spaces/157118/35 "2018-11-26T16:20:33Z")

</div>

> [@saif](#):
>
> i'm using Elastic super user with native auth to eliminate possibilities

Interesting, thanks for the info. In your tests, are you also logging into Kibana as the `elastic` superuser?

This is seemingly random, but is your connection from Kibana to Elasticsearch using a client certificate?

---

<div class="post-metadata">

**Author:** ![saif](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saif/32/37431_2.png) [@saif](https://discuss.elastic.co/u/saif)\
**Post date:** [November 26, 2018, 4:54pm UTC](https://discuss.elastic.co/t/error-saving-spaces/157118/36 "2018-11-26T16:54:14Z")

</div>

im using elastic super user to login  
test with valid CA / cert because i use a loadbalancer  
then i switch with local cert and local ca "generated by elastic-cert-util.."  
and swith without LB  
Kibana attached directely to Es coordinating nodes

i can add new user but not role no space ..... ☹  
i've even tested the new hapi-lib

erase all kibana file .. and fresh install it but i still have the same problem in space / roles and i think in canvas ...

---

<div class="post-metadata">

**Author:** ![saif](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saif/32/37431_2.png) [@saif](https://discuss.elastic.co/u/saif)\
**Post date:** [November 26, 2018, 5:02pm UTC](https://discuss.elastic.co/t/error-saving-spaces/157118/37 "2018-11-26T17:02:12Z")

</div>

in canvas .... i can create a project but i can't acces to my index data i have the same problem

i think in all kibana Plugins

```
{"type":"log","@timestamp":"2018-11-26T16:58:43Z","tags":["debug","legacy","proxy"],"pid":20583,"message":"Event is being forwarded: connection"}
{"type":"log","@timestamp":"2018-11-26T16:58:43Z","tags":["trace","legacy","service"],"pid":20583,"message":"Request will be handled by proxy GET:/."}
{"type":"error","@timestamp":"2018-11-26T16:58:43Z","tags":["debug","security","auth","session"],"pid":20583,"level":"error","error":{"message":"Unauthorized","name":"Error","stack":"Error: Unauthorized\n at validate (/usr/share/kibana/node_modules/hapi-auth-cookie/lib/index.js:145:49)\n at Object.authenticate (/usr/share/kibana/node_modules/hapi-auth-cookie/lib/index.js:210:13)\n at module.exports.internals.Auth.internals.Auth.test (/usr/share/kibana/node_modules/hapi/lib/auth.js:96:22)\n at Object.test (/usr/share/kibana/node_modules/hapi/lib/plugin.js:65:64)\n at resolve (/usr/share/kibana/node_modules/x-pack/plugins/security/server/lib/authentication/session.js:56:25)\n at new Promise (<anonymous>)\n at Session.get (/usr/share/kibana/node_modules/x-pack/plugins/security/server/lib/authentication/session.js:55:12)\n at Authenticator.authenticate (/usr/share/kibana/node_modules/x-pack/plugins/security/server/lib/authentication/authenticator.js:139:49)\n at Object.server.expose.request [as authenticate] (/usr/share/kibana/node_modules/x-pack/plugins/security/server/lib/authentication/authenticator.js:281:60)\n at Object.authenticate (/usr/share/kibana/node_modules/x-pack/plugins/security/server/lib/auth_redirect.js:30:60)\n at request._protect.run (/usr/share/kibana/node_modules/hapi/lib/auth.js:324:34)\n at module.exports.internals.Protect.internals.Protect.run (/usr/share/kibana/node_modules/hapi/lib/protect.js:64:5)\n at internals.Authenticator.execute (/usr/share/kibana/node_modules/hapi/lib/auth.js:320:30)\n at internals.Authenticator.authenticate (/usr/share/kibana/node_modules/hapi/lib/auth.js:306:21)\n at module.exports.internals.Auth.internals.Auth._authenticate (/usr/share/kibana/node_modules/hapi/lib/auth.js:214:19)\n at internals.Auth.authenticate (/usr/share/kibana/node_modules/hapi/lib/auth.js:202:17)\n at each (/usr/share/kibana/node_modules/hapi/lib/request.js:384:16)\n at iterate (/usr/share/kibana/node_modules/items/lib/index.js:36:13)\n at done (/usr/share/kibana/node_modules/items/lib/index.js:28:25)\n at Hoek.once (/usr/share/kibana/node_modules/hapi/lib/protect.js:52:16)\n at wrapped (/usr/share/kibana/node_modules/hoek/lib/index.js:879:20)\n at done (/usr/share/kibana/node_modules/items/lib/index.js:31:25)\n at Function.wrapped [as _next] (/usr/share/kibana/node_modules/hoek/lib/index.js:879:20)\n at Function.internals.continue (/usr/share/kibana/node_modules/hapi/lib/reply.js:108:10)\n at server.ext (/usr/share/kibana/node_modules/hapi-auth-cookie/lib/index.js:133:30)\n at Items.serial (/usr/share/kibana/node_modules/hapi/lib/request.js:403:22)\n at iterate (/usr/share/kibana/node_modules/items/lib/index.js:36:13)\n at Object.exports.serial (/usr/share/kibana/node_modules/items/lib/index.js:39:9)"},"message":"Unauthorized"}
```

---

<div class="post-metadata">

**Author:** ![saif](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saif/32/37431_2.png) [@saif](https://discuss.elastic.co/u/saif)\
**Post date:** [November 27, 2018, 2:12pm UTC](https://discuss.elastic.co/t/error-saving-spaces/157118/38 "2018-11-27T14:12:59Z")

</div>

still have the probem .. any idea please ? 🤣

---

<div class="post-metadata">

**Author:** ![mukai](https://avatars.discourse-cdn.com/v4/letter/m/f08c70/32.png) [@mukai](https://discuss.elastic.co/u/mukai)\
**Post date:** [November 28, 2018, 1:28am UTC](https://discuss.elastic.co/t/error-saving-spaces/157118/39 "2018-11-28T01:28:14Z")

</div>

This problem may be solved with Kibana 6.5.2.  
I am looking forward to it.

> <https://github.com/elastic/kibana/issues/26271>

---

<div class="post-metadata">

**Author:** ![saif](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/saif/32/37431_2.png) [@saif](https://discuss.elastic.co/u/saif)\
**Post date:** [November 29, 2018, 10:15am UTC](https://discuss.elastic.co/t/error-saving-spaces/157118/40 "2018-11-29T10:15:07Z")

</div>

ok thank you

i just modify my

`/usr/share/kibana/node_modules/x-pack/plugins/spaces/server/lib/check_license.js`

and adding 'gold' in  
`const isAnyXpackLicense = xPackInfo.license.isOneOf(['basic', 'gold', 'platinum', 'trial']);`

restart kibana and it's work !

[Previous page](https://discuss.elastic.co/t/error-saving-spaces/157118.md?page=1)

[Next page](https://discuss.elastic.co/t/error-saving-spaces/157118.md?page=3)
