# Direct Origin Consistency Check

> Compare authorization enforcement on the public origin with direct-to-origin or alternate paths that skip the edge, so bypassing the proxy does not bypass the check. Use when a load balancer, gateway or proxy sits in front of the application and the app can also answer on its own address, other ports or an internal origin

- Skill: `wsh7ash/direct-origin-consistency-check` (Agent Skill)
- Install (CLI): `npx get-skill add wsh7ash/direct-origin-consistency-check`
- Raw SKILL.md: https://api.skillmd.com/api/skills/wsh7ash/direct-origin-consistency-check/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/direct-origin-consistency-check

---


# Direct-Origin Consistency Check

> Compare authorization enforcement on the public origin with direct-to-origin or alternate paths that skip the edge, so bypassing the proxy does not bypass the check

**Use when:** a load balancer, gateway or proxy sits in front of the application and the app can also answer on its own address, other ports or an internal origin

**Avoid when:** the application has no directly reachable alternate origin at all, and frontend handling proven by routes table makes one dispersive surface only

## Procedure

1. Identify every address the application will answer: origin IP, alternate ports, internal DNS names and preview or admin hostnames.
2. Send the same authorized and forbidden requests through the public edge and the direct surface, recording the pairing.
3. Diff authorization behavior, since a gateway makes a final permit call for one surface while the app re-decides on the other.
4. Check host-header handling on the direct surface, as alternate-handler routing often relies on the host value the edge normally sets.
5. Record header sets a direct surface accepts, such as forwarded-for hosts and internal path markers the edge usually rejects.
6. Verify encryption, identity and authentication rules match on the direct surface, and note any refactor where they do not.

## Signals

- Direct-to-origin calls answer with even less permission enforcement than the public edge typically applies to the same request.
- Internal-specific handlers like debug, metrics or docs endpoints are directly reachable but filtered at the edge.
- Edge-based auth middleware is removed or highly varied when the request arrives on another port or via an internal name.
- Cross-origin rules like origin allowlists are enforced in the gateway yet wrongly ignored on the direct surface.

## Patterns

**1. Origin pair**

```text
through-edge: /api/admin -> 403
origin-pair: /api/admin -> 200 -> edge check only
```

**2. Header probe**

```text
direct: Host=main-app -> KeyError? app-to-direct-dispatch handling must independent of on edge  headers
```

**3. Result row**

```text
surface=origin-direct endpoints=1 same=0 role-check-missing=yes admin-endpoint=reachable-200
```

## Pitfalls

- Assuming gateway coverage automatically covers direct origins, when the app answers before the gateway since it also runs unfiltered.
- Confusing reachability with unsafe behavior, then flagging endpoints that were in fact correctly refusing on direct paths.
- Reporting the discrepancy without ruling internal-use-only designs, where an origin surface was left open deliberately and they cite it.

## Done when

- Every reachable origin variant is enumerated with pairing tested for the operations that surface exposed.
- Direct surfaces that bypass authorizations are confirmed with the exact requests showing different permission outcomes.

## References

- [OWASP - authentication and routed origins](https://cheatsheetseries.owasp.org/)
- [OWASP API Security Top 10](https://owasp.org/www-project-api-security/)

