# Refresh Inheritance Check

> Verify refresh flows mint credentials that inherit only the privileges the original grant earned, and never recycled privileges the caller already lost. Use when the API issues refresh tokens, service-issued grants or long-lived credentials that produce new access tokens

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

---


# Refresh Inheritance Check

> Verify refresh flows mint credentials that inherit only the privileges the original grant earned, and never recycled privileges the caller already lost

**Use when:** the API issues refresh tokens, service-issued grants or long-lived credentials that produce new access tokens

**Avoid when:** access credentials contain no expiry and there is no refresh path to think about

## Procedure

1. Record the original refresh grant's claims, width and any scope narrowing available in the access-token space.
2. Refresh explicitly, capturing the new access token's claims and recording which additions and removals happened.
3. Test whether a refresh from a narrower context spreads a broader privilege the narrower context never possessed.
4. Check how refreshed tokens treat scope, tenant and state-driven role changes made since the original grant.
5. Test refresh while the parent grant is revoked, suspended or rotated, then map where violation of inheritance lies.
6. Record a matrix of parent-state to refreshed-token-events so the propagation model is explicit.

## Signals

- A refresh from one scope surfaces webhook or admin permissions the original session never carried.
- The refreshed token outlives account changes like tenant suspension, so no hard invalidation exists at refresh time.
- Returning codes for the wrong tenant through the refresh surface are accepted as valid refreshes.
- Refresh chains create parallel valid access tokens well beyond any documented session limit.

## Patterns

**1. Grant capture**

```text
grant_0 scope=[read] role=member -> refresh_1 scope=[read] role=member -> inheritance exact
```

**2. State refresh**

```text
account suspended at t1, refresh at t2 -> 401 -> state applied at refresh correct
```

**3. Result row**

```text
parent=revoked refreshed=? invalidated=no direct-evidence=found via refresh surface
```

## Pitfalls

- Sampling refresh once and assuming an inheritance model, which collapses when a narrower context is introduced.
- Concluding inheritance is correct without testing broadenings from a lower-privileged scope.
- Forgetting to check whether the refreshed token can call operations the parent could only uniquely reach, which limits context.

## Done when

- Refresh flows have been exercised from grant creation through suspension and revocation, with each event recorded.
- Any state change since the original grant is reflected in refreshed credentials, and divergence is captured as findings.

## References

- [RFC 6749 - refresh token semantics](https://www.rfc-editor.org/rfc/rfc6749)
- [OWASP - session management cheat sheet](https://cheatsheetseries.owasp.org/cheatsheets/Session_Management_Cheat_Sheet.html)

