I want the data being read-only and limit user access to other indices.
If you use this example role as a base, I think that should achieve what you need. You'll just need to switch logstash-* to foo-* and remove the cluster section. Let me know if that doesn't work for some reason.
As an aside, you might also want to install the Kibana Shield plugin which will give you some additional functionality like a proper login screen.
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.