Repository navigation
Folder defaults for entries with credential variables, a script before connecting, and a command instead of the SSH shell.
Folder defaults can cover unset credential variables (#297)
An entry whose credentials are variables ($acme_username, $acme_password) used to ask every user who hadn't set them. A folder can now opt in, per session type, to cover such entries with its default credentials: tick for $variables on that type in the folder's default credentials ("cover_variables": true in the API).
- A user who has set every variable the entry uses connects as themselves, as before.
- A user who has set none of them connects with the folder's defaults for the entry's type.
- A user who has set some is asked for the rest, as before, never given a mix of theirs and the folder's.
It is off unless a folder turns it on, follows the same inheritance and access boundary as folder defaults already do, and doesn't apply to entries set to prompt. Covered entries show [folder] instead of "credentials needed", and a connect that uses the fallback is logged with credential_source="folder_defaults". One entry per host now covers both engineers with their own named account and everyone else on the shared one. See Covering entries that use credential variables. Thanks @bitzenik for the clear write-up.
Pre-connect scripts (#329)
An entry can run a script before rustguac connects to it, for example to power on a VM that is off most of the time through its provider's API. Pick it under Before connecting, run in the entry editor. Only executables in pre_connect_scripts_dir (default /opt/rustguac/pre-connect, create it owned by root) can run, so editing connections never lets anyone run a program of their choosing. The script gets the connection's details (never its credentials) on stdin and as RUSTGUAC_* variables, in an environment cleared of rustguac's own. Exit 0 and the connection goes ahead; a failure, or running past pre_connect_timeout_secs (default 120), stops it with the script's last line on stderr. See Pre-connect scripts for the details and a Proxmox example. Thanks @mb91.
SSH: a command instead of the login shell (#345)
An SSH entry can set a Command (ssh_command) to run instead of the login shell, and the session ends when it exits. For example, database access through a bastion with the clients installed: psql -h db.internal -U alice appdb, with the SSH login from Vault and the database password typed at the prompt or kept on the bastion. With typescript recording on, every query is recorded. The Guacamole importer brings a connection's command across. See SSH. Thanks @MohammadJamshidi1 for the push.