# Credentials and auto-fill

Valakes keeps your passwords, tokens and key passphrases in an encrypted vault and uses them for you.

Source: https://docs.valakes.com/credentials/

Last updated: 2026-11-28

Valakes keeps your passwords, tokens and key passphrases in an encrypted vault and uses them for you. When a program on the server asks for a password, Valakes checks that the prompt is genuine and sends the value itself. You never type it, and it does not appear on screen, in the history or in anything an agent reads.

## What goes into the vault

The vault is under Settings, **Credentials and vault**. Each credential has a name, a user name, a kind and a note. The kinds are password, token, SSH private key and SSH key passphrase.

You write the name of a credential where the secret would go, as `{{cred:name}}`, or you run the command and let Valakes answer the prompt. Your own screen and Valakes' history keep the placeholder and never the value.

## How a stored value is protected

- Every value is encrypted with AES-256-GCM in the database inside Valakes' data folder, and each one is bound to its own record, so moving a value to another record does not make it open.
- The key that opens the vault is wrapped by your operating system's store: your account's protection on Windows, the Keychain on macOS.
- If someone copies the data folder to another computer or account, the vault cannot be opened there. Valakes lists the credentials as needing re-entry and deletes nothing until you confirm.
- The vault key leaves Valakes' memory after the idle time you set (Settings, **Credentials and vault**, "Lock the vault after"). A screen lock or sleep always locks it. Locking removes no credential.
- A decrypted value exists only in the host process of Valakes (the main process), at the moment of use. It is never sent to the window you see, and it is never logged.

The limit: the operating system store protects against other users and against a copied folder. It does not protect against code that runs as you inside Valakes, and on Windows a program running as your user can ask for the key. The [Security FAQ](https://docs.valakes.com/security-faq/) gives the whole picture.

## Bindings and auto-fill

A credential becomes useful when you bind it. A binding ties the credential to a tool, to a host (or to the address written in the command) and to an **Auto-fill** switch. A placeholder works only for the tool and the host it is bound to.

Valakes ships ten tool rules: `psql`, `mysql`, `mongosh`, `redis-cli`, `curl`, `docker login`, `sudo`, `git`, `ssh` and `scp`. When the command you typed uses one of them and a binding fits, a chip under the composer shows what Valakes is going to do.

- With **Auto-fill** on, Valakes answers the password prompt itself.
- With it off, the chip asks first, for example "Fill with pg?", and waits for you.

## Binding several hosts at once

A new binding for the host the session is on lists your hosts as checkboxes. Tick them one by one, or press a button above the list: **All**, or one button for each environment you have (PROD, STAGING, dev, other). A button ticks the hosts that are in that environment now. Press it again to clear them. A host that already has the same binding is shown as "already bound" and is skipped.

Valakes reads the selection when you save. A host you add later is not bound until you add it yourself, and a host you move to another environment keeps the binding it has. You confirm once, in a native dialog that lists the hosts, production hosts first.

The same buttons sit above the host list of a binding for an address written in the command.

## Three ways a value reaches the server

| Way | When it is used | What happens |
| --- | --- | --- |
| Prompt | The program asks for a password. This is the usual way. | Valakes checks that the prompt is genuine and sends the value once, straight from its main process to the server connection. |
| Standard input | `docker login --password-stdin` | A small helper in your shell reads the value with echo off and hands it to the program. Valakes writes the value only after the helper has announced itself. |
| Inline | The value is written into the command, such as `curl -u user:{{cred:http}}`. | A last resort, and only for you, never for an agent. It needs the binding's **Allow inline** or a confirmation each time, and a native dialog warns that the password will appear in the process list on the server. |

## When Valakes fills a prompt

Auto-fill is not a reaction to any text that looks like `Password:`. A server, a log file or a database can print that word, so Valakes answers only when all of these hold:

1. The prompt belongs to a command you just submitted.
2. The command matches a tool rule, on the host the credential is bound to.
3. Shell integration is working on the connection, the prompt line is clean and the output has gone quiet.
4. The prompt has not been answered yet. Each one is answered once.

If one of them is missing, Valakes asks you instead. The command also has to be one simple command. For you, a placeholder in a pipe or a list is not auto-filled and the chip asks; for an agent the call is refused. If the value comes back in the terminal output, Valakes masks the echo on your screen and pauses auto-fill for that session.

One gap stays open: the program that reads the prompt belongs to the server. If it exits in the instant between its prompt and the answer, the answer can land at the shell prompt as typed text and enter the server's shell history. Valakes narrows that window and cannot close it.

## Agents and credentials

An agent never receives a value. It writes the placeholder, and Valakes answers the prompt on its behalf. The rules for an agent are stricter than for you:

- The binding must have **Auto-fill** on, and the value must be at least 6 bytes long, because shorter values cannot be masked reliably.
- A command that uses a credential on a production host, or a production credential on any host, always waits for your approval, even when the host is on Full.
- `list_credentials` returns names and the placeholder to write, never a value.

Valakes hides the stored values it knows from what an agent reads. It cannot hide a secret it does not know, such as a password in a `.env` file on the server. The [Security FAQ](https://docs.valakes.com/security-faq/) explains what masking catches and what it does not, and [Agents](https://docs.valakes.com/agents/) covers the rest of the agent side.
