jmuehlner commented on code in PR #753:
URL: https://github.com/apache/guacamole-client/pull/753#discussion_r954390299


##########
extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/java/org/apache/guacamole/vault/ksm/secret/KsmClient.java:
##########
@@ -250,13 +290,26 @@ private void validateCache() throws GuacamoleException {
                 String hostname = recordService.getHostname(record);
                 addRecordForHost(record, hostname);
 
-                // Store based on username ONLY if no hostname (will otherwise
+                // ... and domain
+                String domain = recordService.getDomain(record);
+                addRecordForDomain(record, domain);
+
+                // Get the username off of the record
+                String username = recordService.getUsername(record);
+
+                // If domain matching is not enabled for user records,
+                // explicitly set all domains to null to allow matching
+                // on username only
+                if (!confService.getMatchUserRecordsByDomain())
+                    domain = null;

Review Comment:
   Sorry, I'm a little unclear exactly what you mean by "It sounds like the 
minor performance hit and loss of nifty lambda isn't worth the added 
complexity.". 
   
   Are you suggesting I get rid of the refactor that moved the conf parsing 
into the record service?
   
   I think that would be my preference - to just read all the configs once 
before this here `forEach` and get rid of all the exception-throwing stuff in 
the domain service.
   
   We could go back to using a lambda that way too.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to