Kibana 4 dashboards access control with Shield

Thanks @matt . I'm particularly interested in how you intercept the AJAX calls from the frontend (kibana_index) and how you solved Kibana 4.x with multiple indexes.

If I'm not wrong, kibana passes the index name in different (inconsistent) ways. Sometimes in the body:

POST http://localhost:9200/_mget?timeout=0&ignore_unavailable=true&preference=1436769679508
BODY:
{"docs":[{"_index":".kibana","_type":"index-pattern","_id":"[myindex-]YYYY.MM.DD"}]}

Other times in the URL itself:

POST http://localhost:9200/.kibana/index-pattern/_search?fields=
BODY:
{"query":{"match_all":{}},"size":2147483647}