I have an interesting scenario: senior members of our team would like access to some Information Security dashboards that I created within an app.
The question is: is there a way to grant read-only access to all indexes within this app but only to a few ones outside it? Additionally, I would like to prevent users from running ad-hoc searches when in the app - they should only be allowed to run dashboards.
User A has access to indexes 1, 2 and 3 when using App X and should run searches and dashboards with no issues. However, when using App Z, they should only be able to run dashboards. These dashboards are populated with data from indexes 1, 2, 3 ... 50.
The most direct way to get what you want is to create a new, "temporary" summary index, that holds only the extra information that you want to give them access to, and write the data from indexes 4-50 in a summary form to that index. That way, no confidential information is potentially exposed.
It is a little extra work in setup, but in the long run you will bypass a lot of potential audit findings and rejiggering of permissions.
If that strategy is not practical due to the nature or depth of the data that the dashboard depicts, then consider building a data model and granting access to specific items in the data model, as opposed to granting direct access to the indexes. This is slightly more upfront engineering, but much more flexible and adaptable in the long run. If you'd like more detail, let us know and we can get you a reference.