]> www.infradead.org Git - users/dwmw2/openconnect.git/commit
F5: implement f5_obtain_cookie
authorDaniel Lenski <dlenski@gmail.com>
Mon, 8 Feb 2021 20:43:07 +0000 (12:43 -0800)
committerDaniel Lenski <dlenski@gmail.com>
Mon, 29 Mar 2021 03:13:30 +0000 (20:13 -0700)
commitacad194101b4c49a06f1380a46bb951758290b37
treebe8a6cf7cefec32ca9406270c46bfb1d16293903
parentc7ae333307fc5164ed87ae234a7541845372ceef
F5: implement f5_obtain_cookie

Like Fortinet, F5's authentication interface is very Javascript-heavy.
Unlike with Fortinet, I didn't even both to try to parse and "follow" HTML forms.

For now, we just create a static form (with username and password fields),
ask the user to fill it out, submit it, and attempt to detect successful login
by a length-0 response including F5_ST and MRHSession cookies.

The F5_ST cookie appears to be a reliable(?) indicator of successful login.
It's a "session timeout" cookie (https://support.f5.com/csp/article/K15387),
which looks like '1z1z1z1612808487z604800'. The 4th field appears to be the
Unix epoch timestamp of session activation, and the 5th appears to be the
duration in seconds until it expires.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
f5.c
test-f5-login.py