agentleFS
0xErwin10xErwin1/dbflux/skills/dbflux-builtin-auth-provider/SKILL.md

dbflux-builtin-auth-provider

Skill526 starsChanged 6 months agoApache-2.0View on GitHub

Add native DBFlux auth providers and credential resolvers using the core auth-provider contracts. Trigger: When adding a built-in auth provider, credential provider, SSO provider, OAuth provider, or secret/parameter value provider.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Prefer implementing DynAuthProvider when the provider needs a form definition, login URL callback, dynamic options, value-provider …

    line 26
  2. Distinctive:

    Add tests for form parsing, session states, credential resolution, and secret redaction expectations.

    line 42
  3. Distinctive:

    Do not log tokens, passwords, session tokens, access keys, or secret fields.

    line 46
  4. Distinctive:

    Do not add auth-provider-specific UI branches unless the existing generic form seam is insufficient and the user approves a new generic …

    line 47
  5. Distinctive:

    Do not persist opaque session/provider data.

    line 48

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

When to Use

  • The auth provider should be compiled into DBFlux.
  • The provider should appear in Settings → Auth Profiles without configuring an RPC service.
  • The provider resolves credentials or registers secret/parameter value providers.

Source of Truth

  • crates/dbflux_core/src/auth/mod.rs
  • crates/dbflux_core/src/auth/types.rs
  • crates/dbflux_app/src/auth_provider_registry.rs
  • crates/dbflux_app/src/app_state.rs
  • crates/dbflux_aws/src/auth.rs for built-in examples
  • crates/dbflux_ui/src/ui/windows/settings/auth_profiles_section.rs for generic form behavior

Critical Patterns

  • Prefer implementing DynAuthProvider when the provider needs a form definition, login URL callback, dynamic options, value-provider registration, or import/write-back hooks.
  • AuthFormDef reuses DriverFormDef; do not create provider-specific UI rendering.
  • Return secrets through ResolvedCredentials.secret_fields, never regular fields or logs.
  • AuthSession.data and ResolvedCredentials.provider_data are opaque runtime data, not persisted config.
  • Capability flags must describe real behavior, especially login support and verification URL progress.

Checklist

  1. Define a stable provider_id() and display name.
  2. Return an auth form definition for Settings → Auth Profiles.
  3. Implement validate_session().
  4. Implement login() and call the URL callback when interactive login exposes a verification URL.
  5. Implement resolve_credentials() with clear separation between plain fields and secret fields.
  6. Override register_value_providers() only for real secret/parameter backends.
  7. Override import/write-back hooks only when the provider owns external profiles.
  8. Register the provider in AuthProviderRegistry in AppState behind the correct feature gate.
  9. Add tests for form parsing, session states, credential resolution, and secret redaction expectations.

Boundaries

  • Do not log tokens, passwords, session tokens, access keys, or secret fields.
  • Do not add auth-provider-specific UI branches unless the existing generic form seam is insufficient and the user approves a new generic seam.
  • Do not persist opaque session/provider data.

Commands

python3 scripts/lint.py fmt --check
cargo test -p <provider-crate-or-dbflux_aws>
cargo check --workspace

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.