本文へ移動
cccskills
無料GitHub で公開

secrets-plugins

Integrate and develop AuthCrunch secrets plugins using the SQLite, static, and AWS Secrets Manager implementations. Covers exact APIs, resource binding, payload types, safe metadata, lifecycle, parser gaps, and consumer validation; excludes identity-store authentication and host-specific module implementation.

インストール方法を見る

含まれるファイル(5)

  • SKILL.md8.4 KB
  • agents/openai.yaml244 B
  • references/consumer-example.md6.0 KB
  • references/provider-contracts.md9.9 KB
  • references/sqlite.md4.0 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Secrets Plugins

Own retrieval and adaptation

A secrets plugin retrieves values for a consumer to use in configuration. It does not authenticate users, hash passwords, authorize requests, or install signing keys by itself. Backend credential acquisition is also distinct from the password, API key, or signing material contained in the retrieved record.

Read SQLite bound secrets to maintain the pure-Go local plugin, its public parser, provisioning API, and gatekeeper consumer tests.

The external reference modules are:

Read provider contracts when selecting, calling, troubleshooting, or changing compatibility with either implementation. It records exact signatures, source revisions, constructor behavior, payload shape, tests, and support limits. Read the consumer example when binding AWS paths, sharing the existing client safely, or building a plain Go adapter.

For a new standalone secrets repository, the repository bootstrap workflow provides an AGENTS.md template that routes to AuthCrunch guidance and the new repository's own implementation skill. A companion host plugin adds its host's plugin-development guidance and local adapter contracts. In-repository synthetic secrets plugins use plugins/secrets/<name> under the reference contract; the implemented SQLite reference is separate from the two external modules above.

Essential compatibility rules

The static client binds one record at construction. Its reads take only context and optionally a key. The AWS client takes a path on every read. They do not implement one identical Go interface. A consumer can bind the AWS path in an adapter and expose the same record-reader methods as the static client.

Keep these identities distinct:

IdentityMeaning
Module pathDependency imported by the consumer
Provider labelBackend kind reported by GetConfig
Instance IDConsumer-local name selecting a configured client/record
Resource pathBackend object selected for AWS retrieval; not the instance ID
Field keyExact top-level map key inside that object

Both implementations use map[string]interface{}. Preserve values exactly and check types at the consumer boundary. A retrieved bcrypt representation remains a string until the password owner imports it; key IDs such as "0" should stay strings when their consumer expects strings. Never stringify arbitrary values with fmt.Sprint, treat a JSON number as a credential, or traverse dotted keys as JSON paths without an explicitly implemented contract.

The reference clients expose metadata through GetConfig, not a serializable copy of the secret. Preserve that separation in new implementations: metadata is allowlisted identifiers/settings only. It can be logged by a consumer. Locators and IDs must not themselves contain credentials; deployments may also need to redact identifiers revealing account or tenant names.

Construction, lookup, and lifetime

  • Validate configuration and required consumer dependencies before publishing a client. Neither reference constructor proves the intended secret can be used by the final consumer; explicitly retrieve and validate required fields.
  • Bind resource paths once when adapting a path-addressed client. Missing ID, locator, record, key, or wrong value type must fail the requested operation; an error's accompanying zero value is never a credential fallback.
  • Retrieve a single record for a group of related fields that needs a coherent snapshot. Separate AWS field lookups can observe different secret versions.
  • The static client shares its input/output map. Treat it as immutable or copy the allowed value graph at the boundary; concurrent mutation is unsupported.
  • The AWS client lazily creates its SDK client without synchronization. Serialize access through a private adapter or complete initialization before concurrent publication. Configure test hooks before the first lookup and never mutate them during use. A mutex-free concurrent-start guarantee is not established.
  • Pass deadlines to remote work. The static methods ignore context; AWS forwards it to SDK configuration loading and retrieval. Neither defines an independent request timeout or background refresh worker.
  • The AWS library retrieves on each call and has no secret-value cache. A host adapter or the final AuthCrunch config can retain a snapshot. Determine freshness at the final consumer; AWSCURRENT is not automatic runtime rotation.
  • Neither reference client has Close. New workers/caches need explicit lifetime ownership; root Server.Close does not own an arbitrary embedding client.

Configuration support and future providers

Neither backend module exports a public typed configuration model or dedicated parser package. Their constructor arguments are the current configuration API; private clientConfig structs and GetConfig maps do not satisfy AuthCrunch's reusable-parser contract. This is a documented migration gap, not permission to invent a secrets directive or authcrunch.Config.Secrets field.

For new providers, use the development blueprint and the shared parser contract. Specify typed configuration, pure parsing, validation, exact output types, error behavior, transport limits, concurrency, and ownership. Keep old constructors compatible if evolving a reference module. Add tests for the new contract instead of copying legacy unchecked casts, mutable maps, mock-only production exports, or weak validation into a template.

The final consumer owns secret-reference syntax and resolution. Resolve once into a private configuration candidate before final validation and runtime construction. For directive input, replace complete argument tokens before encoding only when the resulting values satisfy that parser's grammar. Apply multiline or structured values through the owning typed configuration API; do not flatten PEM material or force raw CR/LF through single-line directives. Keep secret contents out of diagnostic metadata and administrative configuration snapshots. Reusable Go integration belongs here; host registration and host grammar belong to their adapters.

Password import and revocation are owned by local-password-authentication; key validation and issuance belong to the relevant KMS/portal consumer. Apply those contracts after retrieval rather than claiming the plugin guarantees them.

Acceptance scenarios

  • Static construction rejects nil/empty records and missing IDs; valid reads preserve exact values; absent keys return an error.
  • AWS sends the intended locator and current-version stage; a JSON object is decoded and a missing string payload, malformed payload, denied request, absent resource, timeout, and cancellation all prevent credential application.
  • String consumers reject numbers, booleans, objects, arrays, null, and empty strings where credentials must be nonempty; no unchecked type assertion panics.
  • A bound AWS reader and a static reader satisfy the same consumer interface; the direct AWS client does not. Metadata never includes retrieved values.
  • Concurrent first use and mutation isolation match the promised adapter contract; a race-free sequential test alone does not prove shared-client safety.
  • Rotation tests distinguish fresh backend retrieval from adoption by a cached adapter, runtime configuration, identity database, or signing-key store.
  • A consumer fixture exercises parsing, retrieval, typed application, and an observable result, with synthetic data and no live AWS account. Scope claims to the layers actually exercised.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

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月11日 更新

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月11日 更新

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月11日 更新

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月11日 更新

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月11日 更新

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月11日 更新

greenpau のスキルをすべて見る

このスキルの問題を報告する