본문으로 건너뛰기
cccskills
무료GitHub에 공개

credential-authenticators

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.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(2)

  • SKILL.md4.6 KB
  • agents/openai.yaml249 B

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Credential Authenticators

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.

SQLite API keys

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.

Validation

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.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

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.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

greenpau/go-authcrunch602026년 10월 20일 업데이트

authdbctl

무료

Maintain cmd/authdbctl commands, flags, configuration, terminal input, management retries, output, and executable E2E tests. Use authentication-client for the reusable portal login protocol.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

greenpau/go-authcrunch602026년 10월 20일 업데이트

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.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

greenpau/go-authcrunch602026년 10월 20일 업데이트

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.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

greenpau/go-authcrunch602026년 10월 20일 업데이트

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.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

greenpau/go-authcrunch602026년 10월 20일 업데이트

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.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

greenpau/go-authcrunch602026년 10월 20일 업데이트

greenpau의 스킬 모두 보기

이 스킬의 문제 신고