Auth Profiles
Auth profiles attach authentication to web accessibility assessments without pasting secrets into the workbench UI. Each profile stores a strategy and a configuration object. Secret values are resolved from environment variables at runtime.
Auth profiles apply to web live runs only. Native artifact runs do not use auth profiles.
Supported Strategies
| Strategy | Description | Use Case |
|---|---|---|
storage-state | Load a Playwright storage state file (cookies and localStorage) from a prior browser session | Reuse an existing login session without re-authenticating |
scripted-login | Execute an ordered sequence of browser automation steps to log in | Automated login flows with username/password or multi-step authentication |
headers | Inject HTTP headers into every request during the audit | Bearer tokens, API keys, or custom auth headers |
storage-state
Load a Playwright storage state file captured from a prior browser session.
{
"id": "staging-cookies",
"name": "Staging Cookies",
"strategy": "storage-state",
"config": {
"storageStatePath": "/path/to/storage-state.json"
},
"created_at": "2026-01-15T10:00:00.000Z"
} To generate a storage state file:
npx playwright codegen --save-storage=storage-state.json https://example.com Log in manually in the browser that opens, then close it. The resulting file contains cookies and localStorage entries that Playwright will inject before navigating to your audit URLs.
scripted-login
Execute an ordered sequence of browser automation steps to log in before the audit begins.
{
"id": "prod-login",
"name": "Production Login",
"strategy": "scripted-login",
"config": {
"steps": [
{ "action": "navigate", "url": "https://example.com/login" },
{ "action": "fill", "selector": "#username", "value": { "env": "AUDIT_USERNAME" } },
{ "action": "fill", "selector": "#password", "value": { "env": "AUDIT_PASSWORD" } },
{ "action": "click", "selector": "button[type=submit]" },
{ "action": "wait-for-url", "pattern": "**/dashboard**" }
]
},
"created_at": "2026-01-15T10:00:00.000Z"
} Available step actions
| Action | Fields | Purpose |
|---|---|---|
navigate | url | Go to a URL |
fill | selector, value | Type into an input |
click | selector | Click an element |
wait | selector | Wait for an element to appear |
wait-for-url | pattern | Wait for the URL to match a glob |
wait-for-timeout | ms | Wait a fixed number of milliseconds |
Values can be a plain string or an { "env": "VAR_NAME" } reference.
Environment variable references are resolved at execution time from your shell environment.
headers
Inject HTTP headers into every request during the audit.
{
"id": "api-bearer",
"name": "API Bearer Token",
"strategy": "headers",
"config": {
"headers": {
"Authorization": { "env": "AUDIT_BEARER_TOKEN" },
"X-Custom-Header": "static-value"
}
},
"created_at": "2026-01-15T10:00:00.000Z"
}
Header values can be plain strings or { "env": "VAR_NAME" } references.
Profile ID Format
Profile IDs must be lowercase alphanumeric with hyphens, starting with a letter or digit.
- Valid:
prod-login,staging-cookies,api-bearer-v2 - Invalid:
Prod Login,_internal,my profile
Security Model
- The workbench UI never displays profile config details. Only the ID, name, and strategy are sent to the browser.
- Secret values should always use
{ "env": "VAR_NAME" }references, not raw credentials. - Environment variables are resolved at run execution time, not at profile creation time.
- Profiles are not committed to source control. They live in your local data directory.
- The workbench does not log, transmit, or persist resolved secret values.
Using a Profile in an Audit
- Create the profile via the workbench UI or the API (
POST /api/auth-profiles). - Ensure the required environment variables are set in your shell before starting the workbench.
- When creating a new web audit, select the profile from the dropdown.
- The profile ID is stored in the run config. At execution time, the profile is resolved and its config is passed to the web auditor.
- After use, the profile's
last_used_attimestamp is updated.
API Reference
| Method | Route | Purpose |
|---|---|---|
| GET | /api/auth-profiles | List all profiles (ID, name, strategy only) |
| POST | /api/auth-profiles | Create or update a profile |
| DELETE | /api/auth-profiles/:id | Delete a profile |