# Credential and Data Security

Use these controls before a backend stores a DX1 credential or retrieves dealership data. The public portal is not an approved place to enter a key, token, returned route, real identifier, or Production response.

## Credentials and Routing

- Keep the dealership API key in an approved server-side secret store.
- Keep bearer tokens and the returned `api_url` out of browser code, client-side storage, source control, screenshots, and public issues.
- Redact the complete `Authorization` header rather than attempting partial masking.
- Validate a returned base URL against an organization-managed host policy before sending a bearer token.
- Rotate or replace credentials through the approved DX1 process; do not publish them while troubleshooting.


## Retrieved Data

- Treat customer, lead, lienholder, deal, sale, service, parts-transaction, and dealership records as sensitive Production data.
- Request and retain only fields required for the dealership-authorized purpose.
- Apply appropriate access control, encryption, retention, deletion, monitoring, and incident-response controls.
- Keep request and response bodies out of ordinary logs. Use status, UTC time, endpoint name, attempt number, and a safe correlation identifier for diagnostics.
- Use fabricated records and identifiers in tests, examples, screenshots, issues, and pull requests.


## Replay environments

Replay/Try It defaults to the Redocly-hosted DX1 mock server. Use fabricated identifiers and payload values. Mock responses are generated from the OpenAPI description and contain no live dealership data.

The DX1 Dealership API reference also provides an opt-in direct-browser live session. The user enters the dealership key once in **Connect live**; the portal exchanges and immediately discards it. Only the returned short-lived bearer token and `api_url` are kept in browser tab session storage and reused across operations. They are removed at token expiration, tab close, or **Disconnect live**. Follow [Live Replay testing](/docs/dx1-dealership-api/getting-started/live-replay-testing), minimize live result sizes, and clear Replay history if a response contains sensitive data.

## Prohibited Production Data Paths

Do not send Production requests or payloads through Redocly, a CORS proxy, a documentation relay, middleware added for the portal, or the direct-browser test environment. Production interactive execution requires separate security and architecture approval.