# Team Roles, Audit Log and IP Allow-list

## Roles

Every member of a team has one role. Owners and admins assign them under **Settings → Teams**, your team, **Members**, and when they invite someone.

| Role        | What it can do                                                                                                                                 |
| ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| **Owner**   | Everything, including billing, the IP allow-list, single sign-on and deleting the team. One per team, who can hand the team to another member. |
| **Admin**   | Manage members, billing and settings, read the audit log, and everything a member can do.                                                      |
| **Member**  | Work with sources, logs, alerts, monitors, incidents and on-call.                                                                              |
| **Viewer**  | Read-only. Can look at everything a member can see, and change nothing.                                                                        |
| **Billing** | The plan, usage and invoices only. No access to logs, sources, monitors or any other data of the team.                                         |

A **Viewer** can be limited to some client groups, like a member, so an agency's client can look at their own sources and nothing else. Every request that would
change something is refused for a viewer, including through the API: a viewer can create API tokens with read abilities only, and a token made by someone who is later made a viewer stops
writing at once. A Billing member cannot create API tokens at all, and receives the plan usage emails.

The role is judged when a request is made, not when a token or a session was created, so changing someone's role takes effect immediately.

## Two-factor sign-in

Each person turns on two-factor under **Settings → Security** with an authenticator app, and saves the recovery codes it
shows. Someone with a verified phone (**Settings → Profile → Phone**) also sees **Text me a code** at the second
sign-in step: a six-digit code, good for ten minutes and five tries, sent by text (or read out in a call to US and
Canadian numbers). It is a second way in, not a replacement: a text can be moved to another SIM, so the authenticator
app stays the first choice. A person can be sent three codes in ten minutes and ten a day.

## Audit log

Owners and admins see **Audit log** in the user menu. It records, for your team:

- sign-ins, failed attempts for a known address, lock-outs, password resets and two-factor changes
- API token and key changes (creating and revoking tokens, rotating ingest, browser and error keys)
- members, invitations, role changes and client groups
- billing: subscribing, cancelling, resuming, card changes, plan changes and failed payments
- every deletion, and changes to the team, its logo, exports and status pages
- every write made through the [API](https://tailcove.dev/docs/api/authentication) or the [MCP server](https://tailcove.dev/docs/mcp), under the token that made it

Each row has who (the person, and whether an API token was used), what, the target, the IP address and the browser. It never holds a request body or a secret. You can filter by action,
person, address and date, and **Export CSV** (up to 50,000 rows of the current filter; exporting is itself recorded). Rows cannot be changed or deleted by anyone in the app.

How long the log is kept depends on the plan:

| Plan     | Kept for |
| -------- | -------- |
| Free     | 7 days   |
| Pro      | 90 days  |
| Business | 365 days |

Older rows are removed every day and are not shown.

## IP allow-list

The owner can restrict where the team is used from, under **Settings → Teams**, your team, **General → IP allow-list**. Enter addresses and ranges, one per line (IPv4 and IPv6, for example
`203.0.113.7` or `198.51.100.0/24`). When the list is not empty:

- the web app is refused for any other address, and so are the API, the MCP server and every API token of the team
- the address you save from must be on the list, or the list is refused, so you cannot lock yourself out in one step
- **not** affected: sending logs (ingest tokens), the public status page, and incoming webhooks, which are machines and the public rather than people signing in
- the pages about you (profile, security, the list of teams) stay open, so a member shut out of one team can switch to another

If an address changes and the owner is locked out, an operator with access to the server can clear the list with `php artisan tailcove:team-ip-allow-list <team> --clear`; that is written to the
audit log.
