apache / apache/gravitino

[Improvement] Allow unauthenticated access to /api/version endpoint

Open Beginner friendly
#12,515 1 comment 0 reactions 0 assignees View on GitHub
improvement
Dominant language
Java
Stars
3.2k
Forks
935
Avg merge
1d 17h
Merged PRs (30d)
339

Description

## What would you like to be improved?

The `/api/version` endpoint currently requires authentication. Accessing it without credentials returns a 401 `UnauthorizedException`:

```
curl http://:8090/api/version
{"code":1011,"type":"UnauthorizedException","message":"The provided credentials did not support",...}
```

The version endpoint is a purely informational, read-only API that exposes no sensitive data. Requiring authentication creates unnecessary friction for:
- Operators checking server version during deployment/upgrades
- Health monitoring tools and scripts that don't need full credentials
- Client compatibility checks before establishing an authenticated session

By contrast, the `/health` endpoint already bypasses authentication (via `HealthCheckPathMatcher`), so there is an established pattern to follow.

## How should we improve?

Extend the authentication bypass in `AuthenticationFilter` (or `HealthCheckPathMatcher`) to also skip authentication for `GET /api/version`, similar to how health check paths are handled today.

Contributor guide

Open the contributing guide

Research direction

Read AuthenticationFilter and HealthCheckPathMatcher to trace how /health bypasses authentication. Add the same handling for GET /api/version, then verify that an unauthenticated request returns the version response while other protected endpoints still require credentials.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, authentication
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
78/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.