# Experiment Surface Authorization

> Verify beta, preview and canary surfaces inherit the authorization model rather than shipping narrower or absent checks alongside the stable API. Use when the product runs experiments, beta flags or enrolled-cohort behavior that changes what an operation does for enrolled identities

- Skill: `wsh7ash/experiment-surface-authorization` (Agent Skill)
- Install (CLI): `npx get-skill add wsh7ash/experiment-surface-authorization`
- Raw SKILL.md: https://api.skillmd.com/api/skills/wsh7ash/experiment-surface-authorization/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Data & Analytics
- Author: Wsh7Ash (https://skillmd.com/u/wsh7ash)
- Updated: 2026-11-22
- Page: https://skillmd.com/skills/wsh7ash/experiment-surface-authorization

---


# Experiment Surface Authorization

> Verify beta, preview and canary surfaces inherit the authorization model rather than shipping narrower or absent checks alongside the stable API

**Use when:** the product runs experiments, beta flags or enrolled-cohort behavior that changes what an operation does for enrolled identities

**Avoid when:** no experiment framework exists and every identity sees the same stable surface, leaving no variant to compare

## Procedure

1. Identify how experiments select subjects: cohort flag, header, session attribute, plan state or account-level enrollment.
2. Record every experiment your test identities are enrolled in, since the stable surface is only one of several behaviors live at once.
3. Run the standard object-level and function-level probes through each variant your identities can reach, not only the stable path.
4. Compare authorization verdicts across variants, checking that the experiment changed behavior without changing the checks that protect it.
5. Test enrollment transitions: joining, leaving and rejoining an experiment, verifying session and cache state re-align with the new surface.
6. Check holdout and kill-switch behavior, since the emergency path must return to the stable authorization model exactly.
7. Record per-variant verdicts alongside the stable matrix so the report covers the experiment dimension explicitly.

## Signals

- A beta variant of an operation serves peer-owned data that the stable variant correctly refuses for the same credential.
- Experiment selection depends on a client-supplied flag or header, so an unenrolled caller can adopt the variant surface at will.
- Enrollment deactivated but the caller's session continues serving the experimental behavior from cache or token claims.
- The experiment routes to a new code path whose middleware registrations differ, skipping checks the stable path runs.

## Patterns

**1. Variant probe**

```text
variant=checkout-v2 as member: peer object -> 200
stable variant: same case -> 403
-> experiment path missing ownership check
```

**2. Adopt probe**

```text
header X-Experiment: checkout-v2 (never enrolled) -> behavior switches -> enrollment not server-verified
```

**3. Result row**

```text
experiment=checkout-v2 objects=5 leaks=1 adoptable-by-header=yes kill-switch-restores=stable-checks
```

## Pitfalls

- Testing only the stable surface and calling the review done, while every enrolled cohort lives on variant behavior.
- Assuming experiment enrollment logic shares the stable middleware, when flag-driven kernels often bypass ordinary checks.
- Ignoring holdout or ramp percentages, where a small slice serving an experiment receives different enforcement than everyone else.

## Done when

- Every experiment surface your identities reach has been probed with the same object-level and function-level requests as the stable path.
- Enrollment transitions and kill-switch behavior are recorded, and any variant that changes authorization without cause is documented.

## References

- [OWASP API Security Top 10](https://owasp.org/www-project-api-security/)
- [OWASP Web Security Testing Guide](https://owasp.org/www-project-web-security-testing-guide/)

