Skip to content

Indexer: add API key authentication for the GraphQL endpoint #778

Description

@Haroldwonder

Summary

indexer/src/graphql.ts serves the GraphQL endpoint with no authentication. Anyone who can reach the indexer can issue arbitrarily expensive queries, and there's no way to attribute usage to a particular consumer for billing or abuse tracking.

Acceptance Criteria

  • Optional API-key middleware gating the GraphQL endpoint, configurable via env var.
  • Requests without a valid key are rejected with a clear error when auth is enabled.
  • Documented in indexer/README.md.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions