1. Docs
  2. Resources
  3. Data Source
  4. Secrets and credentials

Secrets and credentials

A password typed into a test step is visible to everyone who opens the test. Keep every secret in an encrypted key or in a connection, and let steps reference it.

4 min read Updated CustomersAdmins

In short

On this page you can

  • Store a password, token or API key as an encrypted key.
  • Keep database and Kafka passwords in their connection, never in a step.
  • Replace a secret without seeing the old one.
  • Show an encrypted value again if you created it.
  • Rely on runs to mask encrypted values in logs and reports.

How to use it

  1. Create a key and leave Value comes from on Typed value.
  2. Switch on Encrypt, type the secret and click Save.
  3. In the step, use {{ds:yourKey}} instead of the secret.
  4. To change it later, type the new value and save; leave the field empty to keep it.
  5. Check the run log: the value shows as ••••••.

Where secrets belong#

SecretPut it inThe step uses
Test user password typed into a login formAn encrypted key, for example adminPassword{{ds:adminPassword}} as the Type value
API token or API keyAn encrypted key, for example apiToken{{ds:apiToken}} in the Bearer token or a header
Database passwordThe DB connectionThe connection, picked by name
Kafka SASL passwordThe Kafka connectionThe connection, picked by name
Test mailbox passwordThe email integration under IntegrationsThe Mail step’s mailbox

Never type a secret into a step

Step values are stored with the test case and shown to every project member who opens it. A reference such as {{ds:adminPassword}} carries none of that risk. The same goes for a token typed into a saved request on the API Requests page: anyone who opens the request can read it.

Encrypt a value#

  1. Open or create the key

    In Variables, click New key or open an existing key. Value comes from must be Typed value: a dataset or database value cannot be encrypted.

  2. Switch on Encrypt

    Click Encrypt next to the value. The hint says “Store the value encrypted: it is never shown again and only the test run reads it.”

  3. Type the secret

    The field hides what you type. If the key already had a plain value, you can leave it: on save, that value is encrypted.

  4. Save

    The field now shows “•••••• (set, encrypted)” and “Encrypted. Leave it empty to keep the current value; type a new one to replace it.” In the list the key’s kind is Encrypted and its value “•••••••• set”.

Replace or remove a secret#

  • Replace: type the new value and save. Anyone who can edit keys can replace a secret without seeing the old one.
  • Keep: leave the field empty and save; the stored secret stays.
  • Switch Encrypt off: the old secret is never shown, so the field is empty. Type the new plain value before you save; saving an empty field leaves the key without a value and the secret is gone.
  • Copy: copying an encrypted key gives a plain key without a value. Type the secret again and switch on Encrypt.

Who can see an encrypted value#

WhereWhat appears
The key list“•••••••• set”, or “no value”. Also for its creator.
The key panel, for the creatorAn eye icon: “Show the value (only you, its creator, can)”. Click again to hide it.
The key panel, for anyone else, Admins includedOnly “•••••• (set, encrypted)”. No eye icon. They can replace the value.
Test runsThe runner receives the real value and uses it in the step.
Live log, run report, API request log••••••
Send previews on the screen•••••• is sent in place of the value. Check secured calls with a Dry Run.
The AI (App Map, generation)Key names and “encrypted”, never the value.
AI assistants through MCPNever the value. They cannot write one either; see AI assistants.

On the server, encrypted keys and connection passwords are stored with AES-256-GCM.

Secrets in runs#

Before a run writes a log line, a report entry or a live message, it replaces every known secret with ••••••:

  • the value of every encrypted key read during the run;
  • the Authorization, token and API key headers of API steps;
  • text typed into a password field.

In the report’s list of variables, values whose name looks like a password or token (password, token, secret, api key, bearer, cookie and similar), Authorization values and copies of encrypted values are shown as ••••••. Values shorter than 3 characters are not masked, so do not use very short test passwords.

Masking hides values, not screenshots

A screenshot of a page that displays a secret still shows it. Do not make tests open pages that print passwords or tokens in clear text.

Connection passwords#

  • DB and Kafka passwords are required when you create a connection and stored encrypted.
  • They are never sent back to the screen. The field stays empty when you open the connection; leave it empty to keep the password.
  • Test Connection on a database reads the stored password on the server. A failure message masks it (password=***).
  • The runner receives the password with the run that needs it, and masks it like any other secret.

AI assistants (MCP)#

An assistant connected through the SmartestQA MCP server follows fixed rules:

  • It never asks you for a password and never writes one. When a test needs a credential, it creates the key empty (encrypted for secrets) and asks you to fill it in SmartestQA.
  • Requests it adds to the API library carry tokens and passwords only as {{ds:key}} references.
  • It reads connections with their credentials masked, and can test them.

More in FAQ › MCP.

Checklist#

Do

  • One encrypted key per secret, with a Description.
  • Dedicated test users and a dedicated test mailbox.
  • Least-privilege database users.
  • Rotate a secret by typing the new value and saving.

Don’t

  • Passwords in step values, datasets, descriptions or URLs.
  • Literal tokens in saved API requests.
  • Real people’s logins or inboxes.
  • Switching Encrypt off without a new value.

Didn’t find your answer?Write to support with your project name and what you see on screen.

info@smartestqa.ai
© 2026 Selenity Technology · SmartestQAsmartestqa.aiThis page as MarkdownChecked against smarttest-fe predev 2a8c79cc, smarttest-be 633c2a03, smarttest-testsuite (runner), smartest-mcp-server