Daily password access control iRule
I'm currently searching for a solution to give access to various virtual servers over the internet by means of a password (using simple www authentication). I already have an irule that does this for a static username and password however I'd like to beef it up a bit and have a daily changing password. We don't have the luxury or option to use APM in this case. I also realise what i am suggesting is not the best security wise however it is the right amount of security for the application in question.
One way i think this could work is by using a command such as this to generate a 10 character random password:
tr -dc A-Za-z0-9_ < /dev/urandom | head -c 10 | xargs
I was then thinking of creating this as a script in cron, which would then output it to a file local on the load balancer, this file could then be read by the iRule in order to use that generated string as the password for the day. This is where i get stuck! I have read a little about iFiles and external datagroups but i am a little confused - my understanding is that you can import the file, but once imported it is in memory, changing the value inside the file wont have any effect on the currently loaded datagroup values.
I am running v11.1 if this helps and we are using partitions - is there an easy way to reference this file on the load balancer within an irule dynamically? Or would cron have to have some sort of datagroup reload command within it once it has generated the file, and if so, what would that be? Any help would be much appreciated :-)
(also if anyone knows of a simpler way to do this and thinks i am re-inventing the wheel then please do tell me as it's driving me a little bonkers :) thanks)