Skip to main content

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​

info

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 scriptEnvironment variable also set
{{credential.db-admin.password}}CRED_DB_ADMIN_PASSWORD
{{credential.payment-gw.api_key}}CRED_PAYMENT_GW_API_KEY
tip

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:

  1. device — a credential scoped to that specific device,
  2. location — a credential scoped to the device's location,
  3. organization — the estate-wide default.

The first match wins.

info

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​

FailureWhat you see
The credential does not resolve for that deviceAn error naming the credential
The credential resolves but the field is missingAn 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:

ControlNotes
SearchMatches name, description, device, location or rule
Category filterall / ssh / database / api / custom
show auto-generatedA checkbox — rule-generated credentials are hidden by default
Actions dropdownbulk modify, import csv
new credential
ColumnNotes
nameWith an auto badge on rule-generated credentials
category
scopeA badge — see below
targetThe device or location it is scoped to
fieldsUp to three field-name chips, then +N
created
Row menuview 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​

FieldNotes
NameWhat scripts will reference in the token
Description
Categoryssh / database / api / custom — organisational only
Scopeorganization, location or device, with searchable pickers
FieldsA repeatable list of name/value pairs, each with a show/hide toggle
note

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:

ColumnRequired
nameYes — the only required column
descriptionNo
categoryNo
scopeNo
locationNo
deviceNo
usernameNo
passwordNo
api_keyNo
portNo
tip

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:

StepContents
1. detailsName, description, category
2. targetingA target all switch, or any combination of locations, device tags, location tags and groups
3. generatorsA repeatable list of fields, each with a field name and a generator type

Three generator types:

GeneratorProduces
static valueThe same fixed value on every generated credential
random passwordA generated password, with a length and a character set you choose
device templateA value built from device data, using the tokens below

device template tokens​

The template field has click-to-insert buttons for five tokens:

TokenInserts
{{device.name}}Device name
{{device.hostname}}Hostname
{{device.ip}}IP address
{{device.id}}Device id
{{location.name}}Location name
note

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.

note

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.

tip

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​

PermissionMinimum roleGrants
credential:viewtechnicianSeeing credentials and their field names
credential:createmanagerCreating credentials and rules
credential:editmanagerEditing credentials
credential:revealmanagerRevealing a stored value
credential:deleteadminDeleting credentials
caution

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​

info

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.

caution

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:

note

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.