# Long Lived Credential Window

> Measure how long an idle credential stays fully usable, and whether it is tied to the session or account state behind it. Use when credentials have long lifetimes and you need to prove how far inactivity, account change or rotation extends their reach

- Skill: `wsh7ash/long-lived-credential-window` (Agent Skill)
- Install (CLI): `npx get-skill add wsh7ash/long-lived-credential-window`
- Raw SKILL.md: https://api.skillmd.com/api/skills/wsh7ash/long-lived-credential-window/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: Wsh7Ash (https://skillmd.com/u/wsh7ash)
- Updated: 2026-11-22
- Page: https://skillmd.com/skills/wsh7ash/long-lived-credential-window

---


# Long-Lived Credential Idle Window

> Measure how long an idle credential stays fully usable, and whether it is tied to the session or account state behind it

**Use when:** credentials have long lifetimes and you need to prove how far inactivity, account change or rotation extends their reach

**Avoid when:** all credentials are short-lived and bound to active sessions with no long-lived surface to study

## Procedure

1. Select a credential with the longest lifetime in the product and record issuance, expiry and idle timeout policy.
2. Create the credential, leave it completely idle past the idle timeout and then issue the same exact request again.
3. Re-issue after events known to rotate credentials: password change, recovery, account deactivation or another login.
4. Compare API-only credentials, script-issued ones and UI-issued cookies to see which rotation applies to which.
5. Test a rotated variant of the same credential and verify which one the old surface accepts afterward.
6. Record the idle window against account state for each credential type, including why a window exists where it does.

## Signals

- An idle credential that exceeded the promised idle timeout continues authorizing the same set of operations.
- Account rotation events like password changes leave the credential fully usable, breaking the stated lifecycle contract.
- A credential issued by a script excludes idle timeout and outlives any same-named UI-issued session.
- A rotated variant of the same credential name is accepted, so rotation means only a replacement token, not a revoked one.

## Patterns

**1. Idle probe**

```text
idle window advertised=30m  -> replay at t+35m: 200 -> idle idle timeout absent for this credential type
```

**2. Rotation map**

```text
event Summary:=password-change -> token accepted=no | recovery-token accepted=yes label=rotated-only
```

**3. Result row**

```text
credential=api-key lifetime=inherit-idle=90d post-password-change=still-accepted
```

## Pitfalls

- Using a test credential rotatable only in the UI, so the API-issued surface never gets tested.
- Assuming every credential type shares one rotation policy, then thrashing account states with the wrong surface.
- Publishing an idle window result without emphasizing which exact names of events rotate, which restore and which ignore.

## Done when

- Every credential type has been idle-past-timeout and rotation-event tested, and its results are recorded by type.
- Idle window and rotation events are tied to clear evidence per credential type, not per asserted policy.

## References

- [OWASP - session and credential lifecycle](https://cheatsheetseries.owasp.org/cheatsheets/Authentication_Cheat_Sheet.html)
- [OWASP API Security Top 10](https://owasp.org/www-project-api-security/)

