no permissions for [cluster:monitor/main]

So, I somehow got elastic search version 6.5.1 working with the respective search guard version i.e. com.floragunn:search-guard-6:6.5.1-24.3.
But now the issue that I have is I think I can not provide the password as environment variable while running docker image if elastic search is being run as docker image. Because that functionality is available after search guard version 25 as mentioned here in this thread.

Is there a way to achieve the same in this version of search-guard or its not possible to do in versions below that 25.

So, here is the problem now if i run elastic search version less than 6.6, respective search guard version would be less than 25 and providing the password while running docker images wont be possible and if I run elastic search version 6.6 or 6.7 and respective search guard plugin I get issue that is mentioned here