Sharing Dashboards Perma URL / Locked Parameters

My goal is to allow the creation of a dashboard, which can be embedded on to my users account, so that they can view only their data.

What I was thinking was:

  • Create a user which has access to a specific global* index pattern
  • All indices then become accessible via visualizations I can create
  • Create a proxy which adds the Authorization Basic base64 to load the /app/kibana# embed for the dashboard.

So far, the above all works. I've successfully created dashboards and can share them via the proxy.

The problem is that I don't know how I can filter by specific user. If each document has:

user: 1
user: 2
user: 3 etc...

How can I have a dashboard which has visualizations, such that when I try and embed the dashboard, ONLY the data which matches a specific user === 1 will be returned, if I'm loading for user 1.

I can obviously create a filter, but then anyone can just select another user and load their data too. (It's not actually super sensitive data, so we have no problems in there "technically" being a risk of exposing other user data. Everything is published on a website anyway, so there is no expectancy of private data.

So, is this possible?
Have a dashboard, whcih can be shared by all users, and then from my own personal SaaS app, when it's embedded, I pass some custom prop to force a search on only particular field values?