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
- Identify every address the application will answer: origin IP, alternate ports, internal DNS names and preview or admin hostnames.
- Send the same authorized and forbidden requests through the public edge and the direct surface, recording the pairing.
- Diff authorization behavior, since a gateway makes a final permit call for one surface while the app re-decides on the other.
- Check host-header handling on the direct surface, as alternate-handler routing often relies on the host value the edge normally sets.
- Record header sets a direct surface accepts, such as forwarded-for hosts and internal path markers the edge usually rejects.
- 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
through-edge: /api/admin -> 403
origin-pair: /api/admin -> 200 -> edge check only
2. Header probe
direct: Host=main-app -> KeyError? app-to-direct-dispatch handling must independent of on edge headers
3. Result row
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.