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
- Identify how experiments select subjects: cohort flag, header, session attribute, plan state or account-level enrollment.
- Record every experiment your test identities are enrolled in, since the stable surface is only one of several behaviors live at once.
- Run the standard object-level and function-level probes through each variant your identities can reach, not only the stable path.
- Compare authorization verdicts across variants, checking that the experiment changed behavior without changing the checks that protect it.
- Test enrollment transitions: joining, leaving and rejoining an experiment, verifying session and cache state re-align with the new surface.
- Check holdout and kill-switch behavior, since the emergency path must return to the stable authorization model exactly.
- 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
variant=checkout-v2 as member: peer object -> 200
stable variant: same case -> 403
-> experiment path missing ownership check
2. Adopt probe
header X-Experiment: checkout-v2 (never enrolled) -> behavior switches -> enrollment not server-verified
3. Result row
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.