16 KiB
Lore integration
Status: phase 1 integration verified end to end. Last updated 2026-11-25.
Facts here were checked against Lore's main at commit 6b12f00 (2026-11-25), workspace
version 0.14.1-nightly, and the release-specific facts against the v0.14.0 release, which
lore.lock pins. Lore is pre-1.0, so re-check before relying on them.
Minimum Lore version
v0.14.0 (12 November 2026).
- v0.11.0 added OIDC login through the device grant and the per-repository token exchange.
- v0.12.0 added token refresh and logout revocation.
- v0.14.0 fixed verification of tokens from a token-exchange issuer.
How Lore handles authentication
Verified in docs/reference/lore-server-config.md and
docs/proposals/2026-08-20-oidc-oauth2-authentication.md.
loreserverhas no user database. With[server.auth]configured it verifies a bearer JWT on every request, locally, against keys it fetched from the issuer. It makes no call to the issuer per request.- It advertises the issuer to clients, which then log in at the issuer directly.
- Lore defines two modes:
- Tier 1: actions are read from a role claim in the login token and apply to every repository on the server.
- Tier 2: the client exchanges its login token for a short-lived token scoped to one
repository, and the server reads permissions from that token's
resourcesclaim.
- lore-forge uses Tier 2.
What the issuer must provide
Lore calls this the capability profile. lore-forge implements all of it; details are in token-issuer.md.
| Requirement | Standard | Used for |
|---|---|---|
| Discovery document and JWKS | OIDC Discovery | Server and client find endpoints and keys |
JWT access tokens with a stable sub |
RFC 9068 (at+jwt) |
Local verification |
| Device authorization grant | RFC 8628 | lore auth login |
| Refresh token grant | RFC 6749 | Keeping CLI logins alive |
| Client credentials grant | RFC 6749 | CI logins |
| Fixed audience | Server rejects tokens minted for other services | |
| Token exchange with a resource indicator | RFC 8693, RFC 8707 | Per-repository tokens |
| Revocation | RFC 7009 | lore auth logout |
Server configuration lore-forge generates
lore-forge loreserver-config writes the whole loreserver configuration. The trust settings
are below. With --store, --tls-cert/--tls-key, --port and --http-port, it also places
the stores, gives both public endpoints (QUIC and gRPC) the certificate, moves the ports, and
always binds the plaintext HTTP endpoint to 127.0.0.1. The deployment that uses this is in
deployment.md. Field names are from the config reference; the values are
examples.
[server.auth]
jwt_issuer = "https://forge.example.com"
jwt_audience = ["https://lore.example.com"]
jwt_typ = "at+jwt"
resource_claim = "resources" # enables per-repository authorization
[server.auth.oidc]
client_id = "lore-cli"
scopes = ["openid", "offline_access"]
resource_template = "https://lore.example.com/partitions/{id}"
# token_exchange_issuer defaults to jwt_issuer, which is what we want:
# lore-forge is both the login issuer and the exchange issuer.
[environment.endpoint]
user_url = "https://forge.example.com" # registry and name lookup
Defaults worth knowing: resource_id_template is urc-{id} and resource_wildcard is
urc-*, so a resource entry for a repository is named urc-<repository id>.
Start order: loreserver fetches the issuer's keys at startup and refuses to start if it
cannot. lore-forge must be up first.
Transport security (verified in v0.14.0's lore-server-config.md and lore-cli-config.md,
and by scripts/e2e-lore.sh, which runs over TLS by default):
[server.grpc]serves TLS only with its owncertificateblock. Without one it is plaintext, and the CLI's gRPC calls carry tokens in the clear.[server.http]cannot serve TLS. Lore's clients do not use it.lores://validates the certificate and is the default scheme.lore://accepts any QUIC certificate and sends gRPC without TLS.- Clients trust the system's roots, or the file
SSL_CERT_FILEnames.loreserverreads P-256 keys in SEC1 form. - Readiness:
loreserverlogs no "listening" line by default;GET /health_checkon the HTTP port answers once it is up. - The
locallock store is in memory, so aloreserverrestart releases every lock.
Surfaces lore-forge uses
| Need | Lore surface | Verified |
|---|---|---|
| Browse trees, history, diffs | lore.thin_client.v1.ThinClientService: RevisionTree, RevisionInfo, RevisionDiff; RevisionService.BranchList, RevisionList; RepositoryService.RepositoryGet; HTTP content |
Verified end to end; see "Reading repositories" |
| Download file content | HTTP /v1/repository/{id}/content/{address}, plus presigned URLs |
Routes read |
| Activity, webhooks, CI triggers | NotificationService.Subscribe. Events: branch created, pushed, deleted; resource locked, unlocked; obliterate |
Proto read; [notification] mode = "local" is the default |
| Locks | LockService: Lock, Query, Status, Unlock, AdminLock |
Proto read |
| Repository and branch admin | lore.repository.v1.RepositoryService, lore.revision.v1.RevisionService |
Proto read |
| Landing a change | RevisionService.BranchPush with fast_forward_merge |
Proto read |
Landing
BranchPushRequest takes the signature of a revision that is already on the server, and a
fast_forward_merge flag: when the new tip does not descend from the current one, the server
attempts the merge itself. So lore-forge can land a reviewed branch with one call and needs no
working copy or Lore library.
Hooks are not used
Lore's server hooks (lore-server/src/hooks/) are Rust traits compiled into the server. There
are no out-of-process hooks. lore-forge does not rely on them; review gating is done through
token permissions instead (see forge-features.md).
Services lore-forge provides to Lore
Both are defined in lore-proto/proto/lore/user/v1/user.proto and reached through user_url.
Verified in docs/reference/lore-server-config.md, lore-server/src/authnz/auth.rs and
lore-transport/src/auth/ucs_auth.rs:
- Both services are served at the same
user_url. - They are gRPC.
loreserverdialsuser_urlwith tonic; accepted schemes areucs-auth,httpsandhttp, with TLS used forhttps. So lore-forge must serve gRPC (HTTP/2) as well as its web pages, and a reverse proxy in front of it must pass gRPC through. - Lore clients call
UserServiceatuser_urltoo, not onlyloreserver, so it must be reachable from wherever the CLI runs. Withoutuser_url, clients show raw user IDs as names.
RepositoryRegistryService
RepositoryRegister(id, name)—loreservercalls this before storing a new repository, forwarding the caller's login token, and refuses the create if the registry refuses. The registry may reject the name, deny permission, or report a missing prerequisite. This is how lore-forge enforces namespaces; see namespaces-and-access.md.RepositoryUnregister(id)— called before a delete, which is refused if the registry refuses. The forwarded token may be repository-scoped or the login token.RepositoryList— streams the repositories the caller has permissions on, with those permissions. Backslore repository list.
UserService
UserGet,UserFind— resolve user IDs to display names and back. Lore records only an identifier in revision history, so this is how the CLI shows names for revision authors and lock holders.
Repositories on one server
- One
loreserverhosts many repositories. Each has an ID, a name, branches and metadata. Lore also calls a repository a "partition". - Names are
/-separated segments of ASCII alphanumerics,-,_and.; no segment is empty or starts with.. Sostudio/gameis a valid name. - Repositories are addressed as
lore://host:port/<name>. - Listing fails past 100,000 repositories, which indicates the intended scale.
Token details that affect lore-forge
- Signing algorithm: the server takes the algorithm from each key's declared
algin the JWKS and verifies with thejsonwebtokencrate; RS256 is assumed only whenalgis absent. lore-forge will use ES256 and always declarealg. - Identity: the server reads the caller's identity from the
identityclaim, or the aliashttps://lore.org/claims/identity, falling back tosub. That value is recorded as the creator and committer of revisions. - Where a token may be sent: the client refuses to send a token to a host the token does
not name. It reads allowed hosts from a
root_domainsclaim (or its namespaced alias), and otherwise fromaudentries that arehttpsURLs or domains. The audience must therefore cover theloreserverhost. - Actions:
read,write,owner,admin,migrate,push-protected,set-protected,obliterate,presign. Any grant on a repository impliesread. - Exchanged token lifetime: at most five minutes in Lore's sample service. The client keeps an exchanged token until it expires, so a permission change takes effect within that window.
Not relied upon
- Lore's Rust crates. They are unpublished (
publish = false) and pre-1.0. lore-forge talks to Lore over its network protocols. Onlyforge-loreuses Lore's protocol definitions, pinned to a git revision. - Forks. Lore's roadmap lists forks as "later, exploring", so change requests are branch-based.
Verified end to end
scripts/e2e-lore.sh runs an unmodified loreserver and lore CLI against lore-forge, using
the configuration lore-forge loreserver-config generates. By default it uses the official
release pinned in lore.lock. As of 2026-11-25 it passes against the v0.14.0 release. An
earlier version of the test, which read claims with --with-claims, passed against a source
build of 6b12f00. Whether main still has --with-access-token is unchecked. Together these
verify:
loreserverstarts against lore-forge's discovery document and ES256 JWKS.lore auth logincompletes the device grant through lore-forge's approval page, over plain http on localhost (the client allows loopback http).lore repository create,commit,pushandclonework with exchanged repository-scoped tokens, and the token Lore stores carries theresourcesclaim.lore repository listis answered by the registry'sRepositoryList.lore auth inforesolves the user's display name throughUserService.--with-access-tokenprints the stored repository token, whose payload the test checks. (--with-claimsexists onmainbut not in v0.14.0.)- A second user is refused create in another's namespace, clone and listing.
lore auth login --token-type api-key(token fromLORE_TOKEN) logs in through token exchange with a lore-forge API token; the CLI sends the typeapi-keyverbatim.lore auth login --client-id <service account>(secret fromLORE_CLIENT_SECRET) logs in with the client credentials grant. A service account without a grant is refused clone; after a grant it clones.lore auth logoutreaches the revocation endpoint.loreserver's ports can be moved with[server.quic],[server.grpc]and[server.http]portsettings; the test uses this (LORE_PORT) to run beside a deployment fromrun/.- How refusals surface: the registry's
INVALID_ARGUMENTmessage reaches the CLI verbatim;NOT_FOUNDis reported byloreserverasFAILED_PRECONDITION"A required Auth entity was not found";PERMISSION_DENIEDand an exchangeinvalid_targetboth show as "Not authorized to access repository".
Release binaries
Verified against the v0.14.0 GitHub release:
- Each release publishes
lore-<version>-<target>.tar.gz,loreserver-<version>-<target>.tar.gzandliblore-<version>-<target>.tar.gz(the C library andlore.h; a zip on Windows) foraarch64-apple-darwin,x86_64-unknown-linux-gnuandaarch64-unknown-linux-gnu, plus Windows and-debugvariants. There is no Intel macOS build. - GitHub records a SHA-256 for every asset, which
scripts/fetch-lore.sh --pincopies intolore.lock. - Binaries sit at the archive root. The
loreserverarchive also holds sample configuration inconfig/, which the fetch script keeps asconfig-examples/. loreserverhas its defaults compiled in. A config directory holding only the generatedforge.tomlis enough. The public QUIC endpoint listens on0.0.0.0:41337. Without[server.quic.certificate], it generates a self-signed certificate on every start.- On macOS the
loreCLI stores the key for its token store in the keychain (tokenstore_encryption_key). Each process asks for access until "Always Allow" is chosen.LORE_AUTH_STORE=fallbackkeeps the key in a file beside the store (LORE_AUTH_PATH) instead, which is howscripts/e2e-lore.shruns without prompts. Programs linking liblore read those two variables but not the CLI's[auth]config. - liblore and the CLI share logins through that store. A login made through liblore's
auth_login_interactivegoes through the same device flow aslore auth login. What the desktop client found about liblore is in desktop-client.md. - v0.14.0's
user.protodiffers from6b12f00only in comments, so the vendored proto matches.
Reading repositories
Read in Lore's source at 6b12f00 (the protos are identical in v0.14.0 apart from comments)
and confirmed by scripts/e2e-lore.sh against the v0.14.0 release:
- The public gRPC endpoint (
[server.grpc], port 41337 over TCP) is plaintext HTTP/2 when it has no certificate; there is no self-signed fallback as for QUIC. The CLI uses gRPC for revision calls whatever the URL scheme. - Partition-scoped calls (
RevisionService,ThinClientService,StorageService) needauthorization: Bearer <token>and the repository ID as 16 raw bytes underlore-partition-binandurc-repository-id-bin(the CLI sends both). The token must be repository-scoped: a login token matches noresourcesentry and is refused. Every read call needs onlyread. RepositoryGetreturns the default branch, fixed at creation (mainis only the default name).BranchListstreams branches;latestis the tip's signature.RevisionListreturns at most 100 revisions newest first, following first parents, with paging signatures. Its items carry no message, author or parents;RevisionInfodoes.RevisionTreetakes a path prefix and a depth and can attribute each entry to the revision that last changed it.RevisionDiffstreams changes between two signatures.ContentDiffis unimplemented: it answersUNIMPLEMENTED.- File content is served decoded on the HTTP port (41339) at
GET /v1/repository/<id hex>/content/<hash hex>[-<context hex>]with the same bearer token, and honoursRange. The HTTP endpoint is plaintext. lore branch merge <branch>commits the merge itself, with no message.- Timestamps in
Revisionare milliseconds.
Unverified
- How
BranchPushwithfast_forward_mergereports a conflict. - Whether a repository can be renamed, which decides whether namespaces can be renamed.
- Whether identical content is deduplicated across repositories or only within one.
- Whether
NotificationService.Subscribeis reachable by an external subscriber in the defaultlocalmode, and what permission it needs. - What
loreserveritself checks on repository create beyond asking the registry, other than the error mapping above. - How stable
ThinClientServiceis between releases. - Whether a TreeNode in a linked repository can be read with a token for the parent repository, or needs one for the linked repository.
- Paging
RevisionListwithsignature_backward; the browser does not page yet. - Whether a push
loreserverhas acknowledged survives a crash within the local stores' 10-second flush interval. A clean SIGTERM stop keeps it (shown by the e2e backup check).
Upstream files worth reading
docs/proposals/2026-08-20-oidc-oauth2-authentication.md— the authentication design.docs/reference/lore-server-config.md, section "Authentication" — every setting.contrib/oidc/README.mdandcontrib/oidc/exchange/— runnable demos and the sample token exchange service, which is the contract lore-forge's issuer follows.lore-proto/proto/— all gRPC definitions.docs/roadmap.md— what Epic plans, including its own web client.