…if the user from x-proxy-user header exists…
No. The x-proxy-user
is mandatory Kibana Proxy Authentication | Security for Elasticsearch | Search Guard
This sounds like a hole in security. Because anybody who looked at the code and saw those “other parameters” can create a user.
What do you want to achieve? Give a concrete use case.