# Kibana 7.9.0 - 403 Forbidden on /api/kibana/settings

**URL:** https://discuss.elastic.co/t/kibana-7-9-0-403-forbidden-on-api-kibana-settings/246201
**Category:** Kibana
**Tags:** elastic-stack-security
**Created:** [August 25, 2020, 12:54am UTC](https://discuss.elastic.co/t/kibana-7-9-0-403-forbidden-on-api-kibana-settings/246201 "2020-08-25T00:54:59Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![cotjoey](https://avatars.discourse-cdn.com/v4/letter/c/76d3ee/32.png) [@cotjoey](https://discuss.elastic.co/u/cotjoey)
#### Post date: [August 25, 2020, 12:54am UTC](https://discuss.elastic.co/t/kibana-7-9-0-403-forbidden-on-api-kibana-settings/246201/1 "2020-08-25T00:54:59Z")

</div>

I've been struggling trying to set up a read-only user for Kibana. It seems like I have it working now, with the exception of an error popping up in the Discover app. It seems to be exactly the issue listed here: [https://github.com/elastic/kibana/pull/54122](https://github.com/elastic/kibana/pull/54122) where the defaultIndex cannot be set because of missing permissions.

I have version 7.9.0 installed, which I think is the version that should contain that fix?

Nonetheless, here's a description of what I'm seeing:

In the browser:

```auto
{"statusCode":403,"error":"Forbidden","message":"Unable to update config"}

```

Payload:

```auto
{"changes":{"defaultIndex":"79252c80-e646-11ea-a164-698e3f6ff28b"}}

```

My JSON space definition is:

```auto
{
  "id": "users",
  "name": "Users",
  "description" : "This is the Users Space (Read Only)",
  "color": "#aabbcc",
  "initials": "US",
  "disabledFeatures": ["enterpriseSearch", "ml", "siem", "visualize", "dashboard", "advancedSettings", "savedObjectsManagement", "ingestManager", "monitoring", "timelion", "graph", "maps", "canvas", "infrastructure", "uptime"]
}

```

My JSON role definition is (my\_bogus\_role):

```auto
{
  "elasticsearch": {
    "cluster": ["monitor"],
    "indices": [
      {
        "names": ["*"],
        "privileges": ["monitor"]
      },
      {
        "names": ["apm-*"],
        "privileges": ["read","view_index_metadata"]
      },
      {
        "names": ["filebeat-*"],
        "privileges": ["read","view_index_metadata"]
      },
      {
        "names": ["metricbeat-*"],
        "privileges": ["read","view_index_metadata"]
      },
      {
        "names": ["packetbeat-*"],
        "privileges": ["read","view_index_metadata"]
      },
      {
        "names": ["heartbeat-*"],
        "privileges": ["read","view_index_metadata"]
      },
      {
        "names": ["auditbeat-*"],
        "privileges": ["read","view_index_metadata"]
      },
      {
        "names": [".ml-anomalies*"],
        "privileges": ["read","view_index_metadata"]
      },
      {
        "names": ["observability-annotations"],
        "privileges": ["read","view_index_metadata"]
      }
    ]
  },
  "kibana": [
    {
      "base": [],
      "feature": {
        "indexPatterns": ["all"],
        "apm": ["read"],
        "logs": ["read"],
        "discover": ["read"],
        "dev_tools": ["read"]
      },
      "spaces": ["users"]
    }
  ]
}

```

My JSON user definition is:

```auto
{
  "password": "password",
  "roles": ["my_bogus_role"],
  "full_name": "Bogus User"
}

```

Thank you for any help you can provide.

Joey

---

<div class="post-metadata">

### Author: ![mattkime](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mattkime/32/43522_2.png) [@mattkime](https://discuss.elastic.co/u/mattkime)
#### Post date: [August 25, 2020, 6:26pm UTC](https://discuss.elastic.co/t/kibana-7-9-0-403-forbidden-on-api-kibana-settings/246201/2 "2020-08-25T18:26:42Z")

</div>

Hello @cotjoey -

Its attempting to set the defaultIndex because none is set. If you log in as a user with sufficient privileges it will be set and the error will no longer appear.

---

<div class="post-metadata">

### Author: ![cotjoey](https://avatars.discourse-cdn.com/v4/letter/c/76d3ee/32.png) [@cotjoey](https://discuss.elastic.co/u/cotjoey)
#### Post date: [August 26, 2020, 8:06pm UTC](https://discuss.elastic.co/t/kibana-7-9-0-403-forbidden-on-api-kibana-settings/246201/3 "2020-08-26T20:06:31Z")

</div>

Hello,

I was looking for a way to mostly set this up for my users before they login. I found a few API calls that can set the default index-pattern for my Space (users). I'll use that for automation:

# Fetch index-pattern unique id

```auto
curl -s -u elastic:password -XGET "https://kibana_host:5601/s/users/api/saved_objects/_find?type=index-pattern&search_fields=title&search=apm*&fields=id" -k

```

# Set defaultIndex with unique id fetched above:

```auto
curl -s -u elastic:password -XPOST -H "Content-Type: application/json" -H "kbn-xsrf: true" https://kibana_host:5601/s/users/api/kibana/settings -d '{"changes":{"defaultIndex":"12345678-1234-1234-1234-123456789012"}}' -k

```

Thank you for your help.  
Joey

---

<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: [September 23, 2020, 8:06pm UTC](https://discuss.elastic.co/t/kibana-7-9-0-403-forbidden-on-api-kibana-settings/246201/4 "2020-09-23T20:06:32Z")

</div>

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