Teams should first deny anonymous access to the subgraph, then restrict schema and federation endpoints with gateway or network controls. If public reachability is unavoidable, enforce persisted-query enforcement, disable unnecessary schema discovery, and require tight allowlists for operations and originating clients. That reduces exposure of federation helper fields, entity lookups, and internal resolver details.
Why public reachability changes the first security move
Once a subgraph is internet-reachable, the main question is no longer whether it is convenient to query, but whether it is safe to expose schema and federation behavior at all. The first step is to remove anonymous access, because public reachability without an access gate turns introspection, entity resolution, and resolver behavior into an easy recon target.
That initial control matters because subgraphs often expose more than ordinary application data. They can reveal federation helper fields, internal type relationships, and lookup patterns that make later abuse easier even when the data itself seems low sensitivity.
How to reduce exposure without breaking federation
The next layer is to put the subgraph behind gateway or network controls that limit who can reach schema and federation endpoints. OWASP API Security Top 10 is a useful reference point here because the same patterns that weaken APIs, especially weak authorization and uncontrolled access paths, also weaken exposed GraphQL surfaces.
If public access cannot be removed immediately, constrain what the subgraph will answer. Persisted-query enforcement narrows the query set to known operations, and disabling unnecessary schema discovery reduces what an outsider can learn about internal structure. Tight allowlists for operations and originating clients are the practical fallback when exposure must remain, because they reduce the chance that arbitrary queries become a reconnaissance or exfiltration channel.
Exposure control should also include federation-specific thinking. A subgraph that is technically public but still accepts broad schema access can leak internal resolver details, cross-service identifiers, and entity lookup behavior that help an attacker map the wider system.
What teams should verify before calling it safe
Teams should verify that anonymous callers cannot enumerate the schema, reach federation helper endpoints, or invoke operations outside the intended allowlist. They should also confirm that gateway policy, network filtering, and application-layer query controls all line up, because a single missing layer can leave the subgraph effectively public even after a partial fix.
It is also worth checking whether the public route is truly required for every client. In practice, many exposure problems start as a temporary exception that quietly becomes the default path, so the control objective should be to make public reachability the exception rather than the operating model.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP API Security Top 10 addresses the attack and risk surface, while NIST SP 800-53 Rev 5 and OWASP ASVS set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP API Security Top 10 | API8 — Security Misconfiguration | Public subgraph exposure often results from overly open API and schema access paths. |
| Recommendation — Restrict schema access and enforce allowlists on exposed API paths. | ||
| NIST SP 800-53 Rev 5 | AC-3 — Access Enforcement | Anonymous access to a reachable subgraph is an access enforcement failure. |
| SC-7 — Boundary Protection | Gateway and network controls are boundary defenses for a publicly reachable subgraph. | |
| Recommendation — Enforce access decisions on subgraph and federation endpoints. Place the subgraph behind boundary controls that limit who can reach it. | ||
| OWASP ASVS | V8 — Authorization | Persisted queries and allowlists reduce unauthorized operations against exposed GraphQL surfaces. |
| Recommendation — Require authorization checks that constrain which operations may execute. | ||
Practitioner Guidance
What to prioritise: Remove anonymous access first, then decide whether the subgraph needs any public path at all. If it does, treat gateway enforcement, schema discovery suppression, and client allowlisting as a single control set rather than optional hardening steps.
What to verify: Test the subgraph from an untrusted client and confirm that it cannot enumerate schema details, probe federation helpers, or execute non-approved operations. If any of those still work, the exposure is not actually contained.
Common mistake: Teams often protect the gateway while leaving the subgraph itself queryable. That split control can still expose internal structure, so the subgraph endpoint must be locked down directly, not only through the front door.
Practitioner takeaway: If a subgraph must be reachable from the public internet, the safe default is least exposure first, then tightly bounded access, not “public but monitored.”
Related resources from NHI Mgmt Group
- What should teams do first when exposed Microsoft Exchange servers are publicly reachable during active exploitation?
- What breaks when access enforcement depends on a publicly reachable broker?
- How should teams protect AI app dashboards that are publicly reachable by default?
- What should teams do first when a reachable decoder vulnerability appears?
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on November 25, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org