Detect redirection command in failed authentication response#1318
Open
rmilecki wants to merge 3 commits into
Open
Detect redirection command in failed authentication response#1318rmilecki wants to merge 3 commits into
rmilecki wants to merge 3 commits into
Conversation
afc4953 to
1db33e6
Compare
Author
|
I've slightly improved commit message. Included one more example with a Do you think it's OK to merge this? I find it harmless but helpful debugging output. |
Author
|
I thought of one possible change for this pull request. Maybe we should check for |
Authentication replies from gateway include a "ret" value that provides info about authentication result. Examples: ret=0,redir=/remote/login?&err=sslvpn_login_password_expired&lang=en ret=0,redir=/remote/login?&err=sslvpn_login_permission_denied&lang=en ret=1,redir=/remote/hostcheck_install?auth_type=1&user=0123456789ABCDEF&&grpname=0123456789ABCDEF012345&portal=0123456789ABCDEF0123456789&rip=1.1.1.1&realm= ret=6,actionurl=/remote/logincheck,magic=1-12345678,reqid=0,grpid=1,pid=249,is_chal_rsp=1,pass_renew=1,allow_cancel=1,chal_msg=Your password will expire in 3 days. Would you like to change it? Extract & use that value to determine authentication status. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
1db33e6 to
2b8dbe6
Compare
2b8dbe6 to
1b6c771
Compare
1b6c771 to
d012e4c
Compare
In some situations server may command user agent to redirect to a specific page as a result of a failed authentication attempt. Examples of such responses: 1. ret=0,redir=/remote/login?&err=sslvpn_login_permission_denied&lang=en 2. ret=0,redir=/remote/login?&err=sslvpn_login_password_expired&lang=en When using a real web browser it results in JavaScript redirecting user to the URL from "redir" key. Those redirection URLs may contain a meaningful error code (see examples above). Check them and log a relevant error message with "err" parameter value if present. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
d012e4c to
8a742ec
Compare
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.