Kibana never writes to the data indexes (like logstash-* for example). So I think what you want is for a readonly user (with a readonly role) to Not be allowed to create/update/delete index patterns, saved searches, visualizations, or dashboards. Those things are all in the .kibana index, so below I've ONLY changed the privileges for the .kibana index.
That way they can Read everything and run queries, even create new visualizations and dashboards (on any existing index pattern) but not save any changes.
Or did you only want the user to not be able to change the index pattern but still be able to create/modify/save Saved searches, Visualizations, and Dashboards?
Are you using both the Elasticsearch Shield x-plugin and the Kibana Shield plugin which gives you the login screen on Kibana?
Or are you only using the Elasticsearch Shield plugin which gives you the browser pop-up login dialog?
If you're only using the Elasticsearch Shield plugin, and you make any typos on the user or password, I believe you get that mget security exception (I know because I accidentally called my user readyonly instead of readonly).
If you know you have the correct user and password and are still getting the mget security exception I would revert back to the original user permissions and make sure it works, and then remove those 4 privileges I noted above, one at a time, log out and back in. If you're watching the Elasticsearch log when you save the roles.yml file you should see a message indicating the roles were updated;
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.