> ## Documentation Index
> Fetch the complete documentation index at: https://docs.praxa.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Security and tenancy

> Keep Praxa credentials, scopes, workspaces, subjects, provider clients, and effect authority in their documented boundaries.

<Warning>
  Keep credentials inside their owning surface. Execution Fabric uses a
  personal workspace API key. Integration Gateway calls use a short-lived
  delegated OAuth token. Memory federation receives provider clients that your
  backend already owns. None of these credentials are interchangeable.
</Warning>

```mermaid theme={null}
flowchart TD
  User["Authenticated owner"] --> Console["Developer Platform console"]
  Console --> Key["Personal workspace API key"]
  Key --> Fabric["Execution Fabric and hosted candidates"]
  App["Your backend"] --> OAuth["Delegated OAuth token"]
  OAuth --> Gateway["Your Integration Gateway"]
  App --> Provider["Caller-owned memory provider client"]
  Provider --> Federation["Read-only memory federation"]
  Key -. never becomes .-> OAuth
  Provider -. never enters .-> Fabric
```

## Boundary checklist

| Boundary                     | Required behavior                                                                                                                       |
| ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| Browser versus backend       | Keep API keys, OAuth tokens, and provider credentials out of browser bundles and browser-visible JSON.                                  |
| Personal versus organization | Use the workspace authority returned by the server. Do not silently fall back from an unavailable organization to personal mutations.   |
| Subject                      | Derive or validate the subject according to the selected contract; do not broaden a query because a caller supplied another identifier. |
| Scope                        | Request only the named operation scopes. A scope authorizes Praxa policy evaluation, not every provider-side effect.                    |
| Provider                     | A connected provider client keeps its own permissions and data ownership.                                                               |
| Approval                     | Bind approval to the exact action, target, run, and current authority state.                                                            |

## Negative tests

Run at least these tests before release:

* No credential
* Malformed credential
* Expired or revoked credential
* Correct credential with the wrong scope
* Valid identifier from another tenant
* Valid tenant with another subject
* Organization request carrying a personal-only memory scope
* Caller-supplied owner or tenant field
* Redirect or proxy attempt outside the allowed upstream origin
