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.
In this repository8 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- branch-prSkill
- dbflux-builtin-driverSkill
- dbflux-releaseSkill
- dbflux-rpc-auth-providerSkill
- dbflux-rpc-driverSkill
- issue-creationSkill
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
- Very specific: line 26
Prefer implementing DynAuthProvider when the provider needs a form definition, login URL callback, dynamic options, value-provider …
- Distinctive: line 42
Add tests for form parsing, session states, credential resolution, and secret redaction expectations.
- Distinctive: line 46
Do not log tokens, passwords, session tokens, access keys, or secret fields.
- Distinctive: line 47
Do not add auth-provider-specific UI branches unless the existing generic form seam is insufficient and the user approves a new generic …
- Distinctive: line 48
Do not persist opaque session/provider data.
≈ “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.
Files
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.rscrates/dbflux_core/src/auth/types.rscrates/dbflux_app/src/auth_provider_registry.rscrates/dbflux_app/src/app_state.rscrates/dbflux_aws/src/auth.rsfor built-in examplescrates/dbflux_ui/src/ui/windows/settings/auth_profiles_section.rsfor generic form behavior
Critical Patterns
- Prefer implementing
DynAuthProviderwhen the provider needs a form definition, login URL callback, dynamic options, value-provider registration, or import/write-back hooks. AuthFormDefreusesDriverFormDef; do not create provider-specific UI rendering.- Return secrets through
ResolvedCredentials.secret_fields, never regular fields or logs. AuthSession.dataandResolvedCredentials.provider_dataare opaque runtime data, not persisted config.- Capability flags must describe real behavior, especially login support and verification URL progress.
Checklist
- Define a stable
provider_id()and display name. - Return an auth form definition for Settings → Auth Profiles.
- Implement
validate_session(). - Implement
login()and call the URL callback when interactive login exposes a verification URL. - Implement
resolve_credentials()with clear separation between plain fields and secret fields. - Override
register_value_providers()only for real secret/parameter backends. - Override import/write-back hooks only when the provider owns external profiles.
- Register the provider in
AuthProviderRegistryinAppStatebehind the correct feature gate. - 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 --workspaceDoes 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
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.

