credentials
Credentials are encrypted secrets stored centrally and injected into scripts at the moment they run. They exist so that a script can use a password without the password ever being written into the script.
They also solve a harder problem: the same script can use a different password on every device it runs on.
what a credential actually is
A credential is a named bag of arbitrary encrypted key/value fields. There is no fixed credential "type" with prescribed fields — you decide what fields a credential has and what they are called. The category (ssh, database, api, custom) is organisational metadata for filtering and nothing more; it does not change what fields you can store.
So a credential named db-admin might hold fields called username, password and port. A credential named payment-gw might hold api_key and endpoint. Both are equally valid — the fields are whatever your scripts need.
Values are encrypted at rest. Field names are stored in the clear so they can be displayed in the interface and listed in error messages.
how scripts use credentials
This is the primary use case and the reason the feature exists.
the placeholder token
In the body of a script, write a placeholder where the secret should go:
{{credential.NAME.FIELD}}
At dispatch time, per device, PosKit replaces that token with the real value.
the environment variable
The same value is also injected as an environment variable, named CRED_<NAME>_<FIELD> — uppercased, with hyphens converted to underscores.
| Token in the script | Environment variable also set |
|---|---|
{{credential.db-admin.password}} | CRED_DB_ADMIN_PASSWORD |
{{credential.payment-gw.api_key}} | CRED_PAYMENT_GW_API_KEY |
Prefer the environment variable inside the script body where the language makes that easy. Reading from the environment keeps the secret out of the command line, out of process listings, and out of anything that echoes the script's own source.
The in-app Variable Reference panel sits under every code editor and documents this syntax, along with environment variables and script parameters. It is language-aware, so it shows the correct form for the language you are writing in.
resolution is hierarchical
When a script runs on a device, each token is resolved by looking, in order:
- device — a credential scoped to that specific device,
- location — a credential scoped to the device's location,
- organization — the estate-wide default.
The first match wins.
This is the point of the whole design. One script containing {{credential.till-admin.password}} can fan out across the estate and hand each device a different password — the site-specific one where a location credential exists, the machine-specific one where a device credential exists, and the organisation-wide default everywhere else. The script itself never changes.
when resolution fails
| Failure | What you see |
|---|---|
| The credential does not resolve for that device | An error naming the credential |
| The credential resolves but the field is missing | An error naming the field and listing the fields that are available |
Either failure fails that device's run, and the error appears against that device in the Device Results panel. Other devices in the same run are unaffected — which is exactly how a missing location-scoped credential shows up: one site fails, the rest succeed.
the credentials page
The page has two tabs: credentials and rules.
credentials tab
The toolbar carries:
| Control | Notes |
|---|---|
| Search | Matches name, description, device, location or rule |
| Category filter | all / ssh / database / api / custom |
| show auto-generated | A checkbox — rule-generated credentials are hidden by default |
| Actions dropdown | bulk modify, import csv |
| new credential |
| Column | Notes |
|---|---|
| name | With an auto badge on rule-generated credentials |
| category | |
| scope | A badge — see below |
| target | The device or location it is scoped to |
| fields | Up to three field-name chips, then +N |
| created | |
| Row menu | view details, edit (hidden on rule-generated credentials), delete |
Scope is derived rather than set as a separate field, and shows as rule, device, location or organization.
The list shows 25 per page. Bulk actions are delete, set category and export CSV.
creating a credential
| Field | Notes |
|---|---|
| Name | What scripts will reference in the token |
| Description | |
| Category | ssh / database / api / custom — organisational only |
| Scope | organization, location or device, with searchable pickers |
| Fields | A repeatable list of name/value pairs, each with a show/hide toggle |
When you edit a credential, existing values display as (unchanged). This lets you rotate one value without the old ones being revealed on screen — leave a field as (unchanged) and it keeps its current value.
importing from CSV
import csv creates one credential per row. Any column that is not a reserved one becomes a custom field on that credential.
A downloadable template carries this header row:
| Column | Required |
|---|---|
name | Yes — the only required column |
description | No |
category | No |
scope | No |
location | No |
device | No |
username | No |
password | No |
api_key | No |
port | No |
username, password, api_key and port are just conventional field names in the template, not a fixed schema. Add columns of your own and they become fields with those names — which is the fastest way to load a large, consistently-shaped set of credentials.
rules — credentials generated per device
The rules tab automates the per-device case. Rather than creating a credential for each of four hundred tills by hand, a rule creates them for you.
A rule is a three-step wizard:
| Step | Contents |
|---|---|
| 1. details | Name, description, category |
| 2. targeting | A target all switch, or any combination of locations, device tags, location tags and groups |
| 3. generators | A repeatable list of fields, each with a field name and a generator type |
Three generator types:
| Generator | Produces |
|---|---|
| static value | The same fixed value on every generated credential |
| random password | A generated password, with a length and a character set you choose |
| device template | A value built from device data, using the tokens below |
device template tokens
The template field has click-to-insert buttons for five tokens:
| Token | Inserts |
|---|---|
{{device.name}} | Device name |
{{device.hostname}} | Hostname |
{{device.ip}} | IP address |
{{device.id}} | Device id |
{{location.name}} | Location name |
A sixth token, {{location.id}}, also works — but there is no button for it. Type it into the template by hand and it resolves like the others.
A rule materialises one credential per matching device, automatically.
Rule-generated credentials are flagged auto, hidden from the list by default (use the show auto-generated checkbox), and are not individually editable. Change the rule, not the credentials it produced.
A random password generator plus device-scoped targeting is the clean way to give every till a unique local administrator password. Scripts reference one token; each device gets its own secret; nothing is shared across the estate.
permissions
| Permission | Minimum role | Grants |
|---|---|---|
credential:view | technician | Seeing credentials and their field names |
credential:create | manager | Creating credentials and rules |
credential:edit | manager | Editing credentials |
credential:reveal | manager | Revealing a stored value |
credential:delete | admin | Deleting credentials |
Note the asymmetry: managers can create and reveal credentials but cannot delete them. Deletion is admin-only. This is deliberate — it stops a credential another team's scripts depend on from being removed by someone who does not know it is in use. Plan for an admin to be involved in decommissioning.
security notes
Revealing a credential value requires credential:reveal and writes a security audit event capturing the user and their IP address. Every time a secret is looked at, there is a record of who looked and from where — which is usually exactly what an auditor wants to see for privileged credential access.
Decrypted values never appear in logs. However, a script that deliberately echoes a value will print that secret into the execution output — and that output is stored against the execution and can be exported to CSV.
Never echo, print or Write-Host a credential value, even temporarily while debugging. If you have already done so, treat the value as exposed: rotate it, and consider deleting the execution's record.
what credentials are not used for
Two common points of confusion:
Credentials are not used for remote control. TeamViewer sessions are launched with a one-time, short-lived URL minted by PosKit. There is no stored password involved and nothing for you to configure here.
Network deployment credentials are a separate store. The credentials used to push the agent onto machines during network deployment are configured under Network → Settings. They are not the same thing as the credentials on this page and the two do not share values.