Support setting httpd_location field in WAF login form.
When using the UTM box as a reverse proxy handling user authentication before allowing access to an internal web app, a user is redirected to the login form if they've not logged in already. I need to be able to redirect users to the page they requested originally once they've authenticated successfully. For example, if they try to access https://example.com/foo, they get redirected to https://example.com/somethingform where they enter their credentials. They submit the form which is submitted to https://example.com/somethinglogin. If they're successful, they're then sent to https://example.com/. I need them to be setn to the original https://example.com/foo in that last step.
Looking at the generated configs in /var/chroot-reverseproxy/usr/apache/conf/reverseproxy.cong, it looks like we could add some variables to the AuthFormLoginRequiredLocation definitions. Something like so:
Trouble is, without some server-side processing, the form page doesn't do anything with it. Maybe we could enable Apache SSI? Is there something else already enabled like Perl or PHP for scripting in Apache?
Paul Dugas commented
Did some digging. What I'm looking for is support for the "Inline Login" functionality in Apache's mod_auth_form module. Instead of setting AuthFormLoginRequiredLocation to point to the login page, I want the generated configs to set ErrorDocument 401. The uploaded login page then needs to have an empty "action" in the <form> tag.
What would it take to add an "Inline Form" option to the Form Template configs and have the generation of reverseproxy.conf respond accordingly?