Working with PAM in Java SDK
Accessing PAM connection settings for RDP, SSH, VNC, Kubernetes, and RBI in the Java SDK
PAM (Privileged Access Manager) records contain connection settings that define how to connect to privileged resources. The Java SDK provides three specialized classes to access these settings:
PamRbiConnection - RBI (Remote Browser Isolation) connection settings including audio and clipboard controls
PamSettingsConnection - Protocol-specific connection settings (RDP, SSH, VNC, Kubernetes)
PamSettingsPortForward - Port forwarding configuration including local port settings
Access PAM Connection Settings
import com.keepersecurity.secretsManager.core.*;
// Assume storage is already initialized
SecretsManagerOptions options = new SecretsManagerOptions(storage);
KeeperSecrets secrets = SecretsManager.getSecrets(options);
KeeperRecord pamRecord = secrets.getRecords().get(0);
KeeperRecordData data = pamRecord.getData();
// Access PAM settings field
PamSettings pamSettings = data.getField(PamSettings.class);
if (pamSettings != null && !pamSettings.getValue().isEmpty()) {
PamSetting setting = pamSettings.getValue().get(0);
// Access connection settings
if (setting.getConnection() != null) {
PamSettingsConnection conn = setting.getConnection();
System.out.println("Protocol: " + conn.getProtocol());
System.out.println("Port: " + conn.getPort());
// Access protocol-specific settings
if ("rdp".equals(conn.getProtocol())) {
System.out.println("Screen Width: " + conn.getWidth());
System.out.println("Screen Height: " + conn.getHeight());
System.out.println("Color Depth: " + conn.getColorDepth());
}
}
}RDP Connection Settings
Access RDP-specific settings for Windows Remote Desktop connections:
SSH/Terminal Connection Settings
Access SSH and terminal-specific settings:
VNC Connection Settings
Access VNC-specific settings for remote desktop control:
Kubernetes Connection Settings
Access Kubernetes-specific settings:
RBI Audio and Clipboard Controls
Access RBI (Remote Browser Isolation) settings for audio and clipboard management:
Port Forwarding Configuration
Access port forwarding settings with local port customization:
Complete PAM Connection Example
Protocol-Specific Field Availability
The PamSettingsConnection class contains fields for multiple protocols (RDP, SSH, VNC, Kubernetes). Only fields relevant to the record's connectionType will be populated.
Example:
RDP records:
width,height,colorDepthwill have valuesSSH records:
fontName,terminalType,localewill have valuesVNC records:
enableAudio,cursor,swapRedBluewill have valuesK8s records:
namespace,pod,containerwill have values
Always check for null before accessing protocol-specific fields:
Accessing SSH fields on an RDP record will return null.
Last updated
Was this helpful?

