I have ES6.4. I am using basic auth and I can use the SG secured cluster to collect data and view it in Kibana.
I am trying to use the REST API to add more users to internalusers so I can have customer specific logins to Kibana.
Following these docs, as admin in the Kibana console or using CURL I submit the following:
GET /_searchguard/api/internalusers/
``
but I get the error:
{
“error”: {
“root_cause”: [
{
“type”: “security_exception”,
“reason”: “Unexpected exception indices:data/read/get”
}
],
“type”: “security_exception”,
“reason”: “Unexpected exception indices:data/read/get”
},
“status”: 500
}
``
I have also tried single users e.g.:
GET /_searchguard/api/internalusers/kibanaro
``
but get:
{
“error”: “no handler found for uri [/_searchguard/api/internalusers/kibanaro] and method [GET]”
}
``
I also tried to simply view the content of the searchguard index with this:
curl -sku admin: https://localhost:9200/_search/searchguard?pretty -H ‘Content-Type: application/json’ -d ‘{ “query” :{“match_all”:{}}}’
``
but got a similar error to the internalusers call:
{
“error” : {
“root_cause” : [
{
“type” : “security_exception”,
“reason” : “Unexpected exception indices:data/write/index”
}
],
“type” : “security_exception”,
“reason” : “Unexpected exception indices:data/write/index”
},
“status” : 500
}
``
Can you point me in the right direction.
Regards,
Martin
···
Initialise SG with:
./sgadmin.sh -cd …/sgconfig/ -nhnv -icl -arc -cacert root-ca.pem -cert admin.pem -key admin.key
``
SG reports everything is up, status green.
sgconfig folder (sg_action_groups.yml, sg_roles_mapping.yml & sg_roles.yml are unchanged).
sg_config.yml
searchguard:
dynamic:
http:
anonymous_auth_enabled: false
xff:
enabled: true
internalProxies: ‘.’
remoteIpHeader: ‘x-forwarded-for’
proxiesHeader: ‘x-forwarded-by’
trustedProxies: '.’
authc:
basic_internal_auth_domain:
http_enabled: true
transport_enabled: true
order: 1
http_authenticator:
type: basic
challenge: true
authentication_backend:
type: intern
``
sg_internal_users.yml
admin:
readonly: true
hash:
roles:
- admin
logstash:
readonly: true
hash:
roles:
- logstash
kibanaserver:
readonly: true
hash:
kibanaro:
readonly: true
hash:
roles:
- kibanauser
- readall
readall:
readonly: true
hash:
roles:
- readall
snapshotrestore:
readonly: true
hash:
roles:
- snapshotrestore
``