Skip to content

fix: accept the Bearer prefix on REST and gRPC tokens - #119

Merged
w180112 merged 1 commit into
masterfrom
fix/accept-bearer-token
Sep 27, 2026
Merged

w180112 merged 1 commit into
masterfrom
fix/accept-bearer-token

Conversation

@w180112

@w180112 w180112 commented Sep 26, 2026

Copy link
Copy Markdown
Member

Summary

Every REST handler and the gRPC config service passed the Authorization value straight to the JWT parser, so the standard "Bearer " form was rejected with 401. A single bearerToken helper now strips a case-insensitive "Bearer " prefix before validation.

The token blacklist key is built from the same normalized value in the auth middleware, Logout and the gRPC caller check. Otherwise a token revoked in one form would still pass in the other.

Testing

  • make test with new TestBearerToken and Bearer cases in the middleware and gRPC blacklist tests — each shown to fail with the normalization removed
  • Deployed to the bench and controller e2e passed
  • On the bench, raw and Bearer tokens both return 200, and after logging out with Bearer both forms return 401 "Token has been revoked"

Compatibility

Clients sending the raw token, including the web UI and fastrg_cli, are unaffected.

🤖 Generated with Claude Code

Every REST handler and the gRPC config service passed the Authorization
value straight to the JWT parser, so the standard "Bearer <token>" form
was rejected with 401. A single bearerToken helper now strips a
case-insensitive "Bearer " prefix before validation.

The token blacklist key is built from the same normalized value in the
auth middleware, Logout and the gRPC caller check. Otherwise a token
revoked in one form would still pass in the other.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@w180112
w180112 merged commit 95bf363 into master Sep 27, 2026
12 checks passed
@w180112
w180112 deleted the fix/accept-bearer-token branch September 27, 2026 06:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant