You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@guacamole.apache.org by "jmuehlner (via GitHub)" <gi...@apache.org> on 2023/11/07 23:35:11 UTC
Re: [PR] GUACAMOLE-1855: Allow MFA modules to be configured to bypass or enforce for specific hosts. [guacamole-client]
jmuehlner commented on code in PR #911:
URL: https://github.com/apache/guacamole-client/pull/911#discussion_r1385740487
##########
extensions/guacamole-auth-duo/src/main/java/org/apache/guacamole/auth/duo/UserVerificationService.java:
##########
@@ -71,10 +74,60 @@ public void verifyAuthenticatedUser(AuthenticatedUser authenticatedUser)
// Pull the original HTTP request used to authenticate
Credentials credentials = authenticatedUser.getCredentials();
HttpServletRequest request = credentials.getRequest();
+ IPAddress clientAddr = new IPAddressString(request.getRemoteAddr()).getAddress();
// Ignore anonymous users
if (authenticatedUser.getIdentifier().equals(AuthenticatedUser.ANONYMOUS_IDENTIFIER))
return;
+
+ // We enforce by default
+ boolean enforceHost = true;
Review Comment:
Isn't this almost exactly the same code as in `UserVerificationService.java` below? Can you create a shared function?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@guacamole.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org