lablup / lablup/backend.ai

Add GQL endpoint without authentication

Open
#7,577 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
670
Forks
183
Avg merge
17h 7m
Merged PRs (30d)
358

Description

## Motivation

Currently, all GraphQL endpoints require authentication, making it impossible to verify end-to-end connectivity (Webserver → Hive Gateway → Manager) without valid credentials.

1. **Health Check & Status Verification**: Verify that the entire GraphQL Federation stack (Web Server, Hive Gateway, Manager) is operational without requiring user credentials.
1. **Client Connectivity Testing**: Allow CLI tools and Web UI to verify connectivity to the [http://Backend.AI](http://Backend.AI) API before attempting authentication.
1. **Service Discovery**: Enable clients to discover available services and capabilities without authentication.
1. **Monitoring & Observability**: Allow external monitoring systems to check service health without managing authentication credentials.

The current architecture requires authentication at multiple layers:

- **Manager**: `CustomGraphQLView` sets `auth_required=True` and checks `request.get("is_authorized", False)`
- **Webserver**: Uses `web_handler_with_jwt` which generates JWT tokens from authenticated sessions
- **Hive Gateway**: Forwards authentication headers to subgraphs

This makes it impossible to verify end-to-end connectivity without valid credentials.

## Scope

- Document current architecture and data flow
- Propose new public endpoints at each layer:
- Manager: /admin/gql/public (Strawberry, no auth)
- Hive Gateway: path-based routing to public supergraph
- Webserver: /func/admin/gql/public using anon_web_handler
- Define security considerations (rate limiting, query depth limiting)
- Define exposed vs restricted information

JIRA Issue: BA-3548

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.