Forum Discussion
Dear Dario_Garrido
Is this irule for generate_ga_code ?
No mate, this iRule is for GA verifying.
Take into account that there are several steps involved on using Time-based OTP.
- Key generation.
- Key distribution (usually QR-Code).
- Key verification (validate that the code provided by the client is the expected code taking into account the key of this user).
In a production enviroment, F5 should only be doing the third step.
In my lab, I have the user key generated already stored in my A/D.
If my user wants to figure out what the key they have is, then uses a APM policy which captures the user key (LDAP query) and redirects this info to a PHP QR-code generator. Base on this syntax:
https://github.com/google/google-authenticator/wiki/Key-Uri-Format
This is my PHP QR-Code generator
https://github.com/edent/QR-Generator-PHP
After my user has the TOTP key already installed in their device, this previous iRule enters into play.
To be more precise, I'm using this API REST iRule to verify if the validation was passed.
https://community.f5.com/t5/crowdsrc/apm-google-authenticator-http-api/ta-p/287952