Repository navigation
feat(auth): authenticate callers by their bearer token - #141
Open
PiquelChips wants to merge 1 commit into
Open
PiquelChips wants to merge 1 commit into
PiquelChips wants to merge 1 commit into
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 34 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
PiquelChips
force-pushed
the
feat/permissions-auth
branch
from
November 22, 2026 15:04
3a54935 to
dab8e3b
Compare
PiquelChips
force-pushed
the
feat/permissions-auth
branch
2 times, most recently
from
November 22, 2026 18:54
14f9083 to
450aec6
Compare
Every request to a server was anonymous, so nothing could tell its callers apart, let alone decide what each may do. Requests now carry `Authorization: Bearer <token>`, which `Credentials` turns into a `Caller`: anonymous without a header, a principal with one. A token is either static, from the `[tokens]` of the server's configuration, compared by hash so response times don't reveal how much of it matched, or one the server signed with its node key, scoped and short-lived, verified without storing it. Static tokens go through the `Authenticator` trait, so other identity providers can take their place. A malformed, unknown or expired token is refused with 401 and the new `unauthorized` error code. The SDK's `Client::with_token` sends one on every request, and never shows it in debug output. The command line sends the remote the token `config.toml` names for its URL under `[tokens]`, or `$ORIGIN_TOKEN`; a remote on a local path is always called as its owner. Nothing is enforced yet: callers are told apart, and every one may still do everything.
PiquelChips
force-pushed
the
feat/permissions-auth
branch
from
November 22, 2026 19:20
450aec6 to
659dd5f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every request to a server is anonymous, so nothing can tell its callers apart, let alone decide what each may do.
Requests now carry
Authorization: Bearer <token>, whichCredentialsturns into aCaller: anonymous without a header, a principal with one.Tokens a server accepts:
[tokens]of its configuration, compared by hash so response times don't reveal how much of one matched. They go through theAuthenticatortrait, so other identity providers can take their place.A malformed, unknown or expired token gets a 401 with the new
unauthorizederror code.Clients: the SDK's
Client::with_tokensends one on every request, and never shows it in debug output. The command line sends the remote the tokenconfig.tomlnames for its URL under[tokens], or$ORIGIN_TOKEN. A remote on a local path is always called as its owner.Nothing is enforced yet: callers are told apart, and each may still do everything.
Note
Written by Claude Opus 5.5 in Claude Code (via T3 Code)