Hi @Jurgen_Wagner_DVT I wholly agree with @leandrojmp
This quote alone leads me to a solution with a layer outside Elasticsearch such as Logstash, API Gateway etc.
The approach you are suggesting IMHO would be a significant security hole and would be a ripe target for privilege escalation whether intentional or a simple bug in the ingest pipeline.
Allowing a pipeline that is executed with the privilege of the calling user to then access resources in any way that that calling user was not authorized for, would be a security hole / escalation of privileges.
Elasticsearch as a datastore and search engine has a strong security model and many users depend on that, I do not see this as a feature that would be added. Of course, you can always submit an enhancement request and perhaps the Product Managers / Tech Lead will see it differently.