It seems that if I created users/roles/tenants over the API and run secureadmin.sh afterwards for whatever reason to update the cluster security configuration, it will delete any previous record added over the API.
Is this the expected behavior ? I find this problematic.
Thanks ejohns81
I understood this but my problem is, I am automating everything in chef so that i can manage and changes internal user(admin,kibanaserver,logstash etc) password anytime for different env.
I am maintaining password in vault and reading it from there new password (if i change) and updating into my config files using chef.
Now problem is, to reflect this changes i have to run secutiryadmin.sh for /securityconfig/ folder then it will update my new password for internal user but now i will lost everything for other user which i created from kibana.
We ended up doing everything over the OD API for users. When we create the cluster we have ofcourse the initial users (admin,management and 1 for monitoring). From that point on we do everything over REST and no need to call the securityadmin.sh anymore.
We simply did some automation to call the API and create the needed roles/users/tenants
This is exactly what i want to do but it looks like the API wipes out my entire configuration.
I want to use the API to update the password of our bind id. Before doing it, i wanted to do a simple update, for example:
PATCH {curhost}/_opendistro/_security/api/securityconfig
[ {
“op”: “replace”, “path”: “/config/dynamic/authc/ldapnam/description”, “value”: “What descripiton”
} ]
The command returns success, but queries after the PATCH fail. When i run the query to get the Configuration:
{{curhost}}/_opendistro/_security/api/securityconfig
Nothing is returned.
I end up having to run securityadmin.sh to restore functionality.
I have a similar problem. I configured a cluster with terraform using securityadmin.sh as a final step. Everithing ok, but if I add/edit some role all my previous configuration dissapear forcing me to run securityadmin.sh again to recover my config.
For testing roles pruposes I prefer to use the kibana UI because it is more friendly than console with vim.