authdb
免费Maintain the standalone cmd/authdb server, pkg/httpserver listener and portal routing, HTTP configuration parser, TLS, shutdown, executable tests, and deployment guidance. Use authdbctl for the management client.
中文简介正在准备中。当前显示原文说明。
Maintain injected credential authenticators, method-isolated caching, request-context propagation, and the pure-Go SQLite API-key plugin. Excludes interactive portal password authentication and identity-store provisioning.
中文简介正在准备中。当前显示原文说明。
查看安装方法安装前可以查看交给 AI 代理的指令内容。
pkg/authproxy.Authenticator is the legacy Basic/API-key boundary. Configure the
policy's realm/method/portal bindings, attach instances with
Gatekeeper.AddAuthenticators, then require HasAuthProxies() success before
serving. Attachment is construction-time only; hosts drain users and close their
own backend handles. No root factory or automatic plugin loader is installed.
Use ContextAuthenticator to receive the protected request context in
BasicAuthContext/APIKeyAuthContext. The validator falls back to legacy methods
when absent, and checks cancellation before and after either call. This cannot
interrupt work inside a legacy method. Configured backend timeouts still apply.
FreshAuthenticator.RequireFreshAuthentication() is a stable lifetime
capability. True bypasses credential cache reads and writes, including the
validator's second payload lookup and explicit CacheUser calls. The runtime
sets server-only cache flags; claims cannot enable or disable this policy.
Ordinary cacheable authenticators preserve their existing behavior. Cache keys
separate payload class, Basic/API-key method, source address, realm, and a SHA-256
secret digest with unambiguous field boundaries. Do not cache reusable plaintext.
plugins/credential-authenticators/sqlite implements API keys only; Basic always
rejects and clears stale response data. Password accounts belong to identity
stores. Import its public parser and call
NewSQLiteCredentialsConfigFromDirectives([]string) with name, path, realm,
and optional timeout, each exactly once with one value. Name/realm are required;
path is absolute; timeout defaults to 1s and accepts 1ms through 30s. Parsing is
pure. sqlite.New(ctx, config) snapshots validated settings.
Trusted provisioning calls Issue(ctx, subject, email, roles, expires) to obtain
a generated 256-bit base64url key after commit. No caller-selected weak key or
plaintext password is accepted. Only the SHA-256 digest is stored. Subject and
roles are bounded; email must be a bare address; roles contain 1–32 identifiers;
expiry is a future Unix second within 30 days. Issuance prunes expired entries and
limits the database to 10,000 live keys. Revoke(ctx,key) is idempotent and
realm-bound. Lost/uncertain issuance results must not be blindly retried.
Each authentication reads current database state; revocation or expiry becomes
effective at the next lookup. Already authorized requests are not canceled.
Plain payload claims include subject, email, roles, realm origin, amr=api_key,
and bounded timestamps. The gatekeeper still evaluates its ACL. Incorrect,
missing, revoked, expired, and wrong-realm keys produce generic denial and no
claims. Database failures return no fallback identity. API keys are bearer
credentials: hosts require TLS, safe header logging, and request admission limits.
GetConfig exposes only name/kind/realm identifiers. Close belongs to the host.
Read private SQLite backends
for pure-Go, local POSIX, private-file, schema, transaction, and uncertain-commit
contracts. This plugin owns a distinct database application and cannot share a
file with other category schemas. Multiple instances may share the same database
and realm; different realms are isolated even in one credential database.
Units prove digest-only storage, malformed input rejection, realm isolation,
expiry, revocation, concurrency, cancellation and reopening. The public consumer
fixture uses the parser, a serialized config, two real database handles, TLS,
AddAuthenticators, and ACL enforcement. It proves immediate revocation and
closed-backend rejection after successful requests; repeat it externally with
internal/tests.RunExternalModule. The core regression
TestE2ECredentialCacheSeparatesMethods first fills a Basic cache and rejects the
identical presented bytes as an API key. Context and no-cache capability tests
also cover validator callers that explicitly invoke CacheUser.
make test TEST_DIR='./plugins/credential-authenticators/sqlite/... ./pkg/authproxy ./pkg/authz/... ./pkg/requests ./pkg/user ./internal/tag'
Run plugin units/parser/public E2E with CGO_ENABLED=0 separately from the race-enabled external-module driver. Never infer production CGO dependencies from the race detector's toolchain requirement.
还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
Maintain the standalone cmd/authdb server, pkg/httpserver listener and portal routing, HTTP configuration parser, TLS, shutdown, executable tests, and deployment guidance. Use authdbctl for the management client.
中文简介正在准备中。当前显示原文说明。
Maintain cmd/authdbctl commands, flags, configuration, terminal input, management retries, output, and executable E2E tests. Use authentication-client for the reusable portal login protocol.
中文简介正在准备中。当前显示原文说明。
Maintain or embed pkg/authclient for portal login, password/TOTP and API-key authentication, native credential transport, configuration parsing, and credential files. Covers authdbctl login wiring; management commands and the admin API have separate owners.
中文简介正在准备中。当前显示原文说明。
Maintain conditional authentication challenge policies, reusable authchal and user-transform FromDirectives parsers, safe claim substitution, GitHub ID/organization transforms, registered-factor inventory, passwordless WebAuthn selection, verified AMR access claims, and policy revalidation across portal login, refresh, OIDC, and direct authentication.
中文简介正在准备中。当前显示原文说明。
Maintain portal cookie configuration, reusable cookie directive parsing, common prefixes and explicit names, domain attributes, factory issuance/deletion, and cookie interoperability with OIDC, refresh, OAuth, and gatekeepers.
中文简介正在准备中。当前显示原文说明。
Maintain optional cross-device portal login, its directive parser, QR and polling UI, approving-browser binding, single-use transfers, MFA and provider evidence, logout invalidation, and TLS/browser tests.
中文简介正在准备中。当前显示原文说明。