> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://tester.army/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://tester.army/_mcp/server.

# HTTP Basic Auth

If your staging or preview site is behind HTTP Basic Authentication, save credentials in TesterArmy so the AI agent can access it during test runs.

![HTTP Basic Auth browser prompt](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/testerarmy-subpath.docs.buildwithfern.com/9c33173e8bd9327e33d89e187c914e4d94c3ffa310e2a05842b62dfe8e8805ba/docs/assets/docs/basic-auth.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260817%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260817T151819Z&X-Amz-Expires=604800&X-Amz-Signature=a64387e76e1bfe89e074feccddaac2a225d2d87ad4abd4c176f18df408aca805&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)

## Setup

1. Go to **Project Settings → Integrations → Site Protection**.
2. Click **Set up** on the HTTP Basic Auth card.
3. Enter the **username** and **password**.
4. Click **Save**.

Credentials are stored encrypted and sent automatically with every test run for that project.

## Troubleshooting

### Basic auth prompt still appears

Check that the credentials are saved under **Project Settings → Integrations → Site Protection**, not under app test accounts.

### `401 Unauthorized`

The saved HTTP Basic Auth username or password is likely wrong. Confirm the same credentials work in a normal browser, update the Site Protection settings, and retry the run.

### App login still fails

HTTP Basic Auth only unlocks the site before the app loads. If the app itself has a login form, also add [Test Credentials](/auth/credentials).