Skip to content

Commit

Permalink
GUACAMOLE-1868: Add support for new PAM Hostname field.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmuehlner committed Oct 20, 2023
1 parent 3514a21 commit ead103a
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import com.keepersecurity.secretsManager.core.KeyPair;
import com.keepersecurity.secretsManager.core.KeyPairs;
import com.keepersecurity.secretsManager.core.Login;
import com.keepersecurity.secretsManager.core.PamHostnames;
import com.keepersecurity.secretsManager.core.Password;
import com.keepersecurity.secretsManager.core.SecretsManager;
import com.keepersecurity.secretsManager.core.Text;
Expand Down Expand Up @@ -411,6 +412,11 @@ public String getHostname(KeeperRecord record) {
if (hostsField != null)
return getSingleStringValue(hostsField.getValue(), Host::getHostName);

// Next, try a PAM hostname
PamHostnames pamHostsField = getField(record, PamHostnames.class, null);
if (pamHostsField != null)
return getSingleStringValue(pamHostsField.getValue(), Host::getHostName);

KeeperRecordData data = record.getData();
List<KeeperRecordField> custom = data.getCustom();

Expand Down

0 comments on commit ead103a

Please sign in to comment.