Teaflask Docs

Steep

Steep keys

A Steep key answers one question: which workspace a journey belongs to, and which sites may send it. Your page starts Steep with it, and Teaflask uses it to file each journey and to check where the events came from. The key is meant to sit in page source and client bundles. It is not a secret, and it says nothing about who the user is. That's Identity.

Create a key

Owners create keys under Steep, in the Keys section. Choose New key, then fill in:

  • Label (optional), a name to tell keys apart, like "Production app".
  • Mode, Live or Test.
  • Allowed origins, one per line.

Create key opens the key's page, where you copy the key and choose what it captures. A key starts with stp_live_ or stp_test_.

Live and test keys

Mode Use it for
Live Production
Test Local development and staging

The mode labels the key's journeys and is fixed when you create the key. Steep treats both modes the same: a test key captures and keeps journeys exactly as a live key does.

Allowed origins

An origin is a scheme, a host and an optional port, with no path, query or trailing slash:

https://app.example.com
https://staging.example.com
http://localhost:5173

The match is exact. Case is ignored, but nothing else is: http://localhost:3000 and http://127.0.0.1:3000 are different origins, and there are no wildcards, so list each subdomain. A page on any other origin gets 403 ORIGIN_NOT_ALLOWED, and Steep stops.

You can change a key's origins at any time, under Allowed origins on the key's page. Changes to a key's sites and settings reach your app within two minutes.

The origin check limits which websites can use your key from a browser. It doesn't prove who is calling: a script outside a browser can send any Origin header it likes. To be sure a journey comes from your app, turn on Only capture signed-in users.

Who a key captures

Two settings under Who it captures decide whose journeys a key accepts.

Respect browser privacy signals

Respect browser privacy signals is on by default. While it's on, Steep captures nothing from browsers that send Global Privacy Control. If you turn it off, those browsers are captured and their journeys are marked as having sent the signal.

Only capture signed-in users

Only capture signed-in users is off by default. Turn it on and Steep captures nothing until your app identifies the user with a token from your server, so nobody can send journeys for that key without your server's say-so.

Nothing from before the sign-in is kept, and capture stops when the user signs out. When you turn it on, people who aren't signed in stop being captured within two minutes.

What a key captures

Eight settings under What it captures shape each journey:

Setting Default What it does
Page outlines On Keeps a text outline of what each page shows. See What Steep captures
Typed values On Keeps what users enter in form fields, after redaction. When off, only a field's length is kept, page addresses lose their query values, and requests lose their query values and bodies
Ids in addresses On Keep ids in page, link and request addresses, like /orders/8f14e45f-…. Reset, invite, sign-in and share links stay masked.
Query values in requests On Keep the values in the addresses your app requests, like ?q=refund, after redaction. Needs Typed values.
Request bodies On What your app sends with a request (JSON, form or text), up to 2 KB, after redaction. Needs Typed values.
Response bodies On What the server answers to requests your users start, writes, failures and slow calls (JSON or text), up to 2 KB, after redaction. Needs Page outlines.
Keep journeys for 90 days How long the key's journeys are kept, from 7 to 365 days. It applies to journeys already captured too
Ignored regions (CSS selectors) None Up to 50 selectors. Matching elements and everything inside them are never captured

Ids in addresses also keeps ids in the paths of the requests your app makes, including requests to other companies' services.

A changed setting applies from the next page load in each browser. Shortening Keep journeys for deletes the older journeys within minutes, and can't be undone.

Rotate and revoke

To Do this What happens
Give the key a new value Rotate The old value stops working within a minute. Deploy the new one to your app
Stop a key for good Revoke The key stops working within a minute, and there's no undo. Journeys it already sent stay until they expire

Rotating gives the key a new value and keeps its settings and journeys; the old value stops working within a minute. Pages that send the old value capture nothing until you deploy the new one. A key appearing in public code is expected, and isn't a reason to rotate.

On a revoked key you can change the label and Keep journeys for.

Steep keys and publishable keys

Steep keys and publishable keys are separate. A Steep key never selects an agent, and a publishable key never sends journeys.

Steep key Publishable key
Answers Which workspace a journey belongs to, and which sites may send it Which agent replies
Starts with stp_live_ or stp_test_ pk_live_ or pk_test_
Managed under Steep, in the Keys section The agent's Install section
Allowed origins Can be changed at any time Fixed when the key is created
Rotating Keeps the key's settings and journeys; the old value stops within a minute The old key stops working at once

The same end-user token identifies a user to both, when both keys belong to the same Teaflask organization. Only owners create and change Steep keys; members can see them.

More resources