Commit Graph
2 Commits
Author SHA1 Message Date
lukaszraczyloandGitHub 9f2690b9bf feat(auth): add users.anonymousAcceptAnyKey for clients that need a key (#16)
The OpenAI SDKs refuse to start without an API key, so keyless callers
set a placeholder key. With users.anonymousGroup alone, that placeholder
gets 401.

Set users.anonymousAcceptAnyKey to true to serve a key that matches no
user as "anonymous". A configured user's key still resolves to that
user. A placeholder key does not count toward the auth-failure
throttle. The admin API and the metrics key fallback still use
identifyKeyed, so they still need a valid key. The option is false by
default, and it needs users.anonymousGroup.
2026-11-27 10:44:03 +00:00
lukaszraczyloandGitHub df1ca8cde2 feat(auth): add opt-in anonymous access with users.anonymousGroup (#15)
Set users.anonymousGroup to a configured group to serve requests that
carry no credential as the reserved user "anonymous" in that group. The
group grant applies, and the group memberLimits are the per-user limits
that all keyless callers share.

A request that sends an Authorization or x-api-key header must carry a
valid key, so a wrong or malformed credential still gets 401. The admin
API and the metrics key fallback use identifyKeyed and never admit the
anonymous user. The name "anonymous" is reserved while the option is
set. The option is empty by default, and then every route needs a key as
before.

The .traefik.yml testData now enables anonymous access, and yaegi-check
exercises it under the interpreter.
2026-11-26 23:54:17 +00:00