jimradford / superputty

The SuperPuTTY Window Manager for putty sessions
https://www.facebook.com/superputty
MIT License
1.9k stars 320 forks source link

Global Custom Variable System - Used Per-Session - Improvement to CyberArk PSMP Logins #891

Open waukeerules opened 1 year ago

waukeerules commented 1 year ago

Background: I've been asked to use CyberArk PSMP to manage all network devices instead of direct access.

I am looking for a method that depends on a pre-defined CyberArk PuTTY Session Profile where the hostname/IP is CyberArk PSMP and the Auto-login username is a set of special parameters that PSMP will interpret to login to a remote target. An example of the auto-login username is as follows: AD_User@Service_Account@Remote_Device_IP. This particular setting would have to be moved from the PuTTY Session Profile to SuperPuTTY since we have more control over that data. The problem with that approach is it makes having a shared SuperPuTTY Settings Folder via SMB impossible.. There's also no way for SuperPuTTY to append a given parameter to an existing PuTTY Session Profile. Ideally any user specific setting is a local variable set outside the sessions.XML file so the Session Database can be shared among peers. As long as each user has their local variable set, it should work when selecting a session from the sessions list.

Here's an example of the PuTTY Session Profile: https://blog.51sec.org/2020/07/configure-ssh-clients-integrate-with.html#point2

Here's what I have in mind, say we define a set of variables through a custom variable system in Options. That variable could then be used within each SessionData row. The session Login Username would then be: [AD_User]@[Service_Account]@[hostname] (hostname would be considered a pre-defined variable per-session). And if [hostname] is present then ignore that particular parameter when passing to PuTTY. Otherwise that would override the CyberArk PSMP hostname/IP in the specific PuTTY session.

Thanks in advance!

waukeerules commented 1 year ago

Example: superputty_session_example