Thank you for helping improve RustyAuth. Authentication code has a larger blast radius than an ordinary application feature, so changes are reviewed for failure behavior as well as the happy path.
- Search existing issues and pull requests.
- For a new public endpoint, stored record, token claim, authentication method or recovery path, open a design issue first.
- Report vulnerabilities privately according to SECURITY.md.
- Never include credentials, cookies, passkey assertions, real account data or private deployment addresses in an issue, fixture, commit or test output.
Clone the repository with its pinned SableDB source:
git clone --recurse-submodules https://github.com/rusty-auth/rustyauth.git
cd rustyauthFor an existing clone, run git submodule update --init --recursive. See Vendored source
when changing SableDB itself; the submodule's origin is the RustyAuth fork, while RustyAuth's gitlink keeps
every parent commit reproducible.
Requirements:
- Rust
1.94.1; - Deno
2.9.3; - Go
1.25for the Cloudflare control plane; - Docker with Compose; and
curlfor health checks.
Run the service and its private SableDB dependency:
cargo run -- config validate rustyauth.example.yaml
scripts/local-stack standalone upThe launcher generates ignored local secrets and configuration, then starts the Dioxus dashboard, private Rust
backend and private SableDB. Use scripts/local-stack fleet up for the central Fleet topology. See the
documentation index for the correct guide by task.
Run Rust checks directly:
cargo fmt --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test
cargo build --locked --releaseRun the complete repository gates before opening a pull request:
deno install --frozen
deno task check
deno task testdeno task docs:check validates local Markdown links. The static-site tests separately prove that every
documented site route renders.
See Engineering for module ownership and review rules.
The VTR integration can be exercised from the repository root with deno task dev:v2. That path must remain
independent of the legacy Go/PostgreSQL application.
- Fail closed. Missing identity, ceremony, session, credential, tenant, authorization or configuration is an error.
- Keep bearer material out of durable output. Never log or emit cookies, assertions, JWTs, handoff codes, backup keys or bootstrap tokens.
- The browser is not an authorization boundary. Enforce access in RustyAuth or the downstream service.
- Preserve exact origin policy. Do not relax RP ID or origin checks to solve deployment convenience.
- Keep SableDB private. A public database port is not an acceptable configuration workaround.
- Make one-time state atomically one-time. Ceremony and handoff consumption must resist replay.
- Document persistence changes. Stored-record or key-layout changes need compatibility and rollback notes.
- Do not overclaim. A primitive is not a complete recovery, email or streaming system.
- Keep docs and contracts atomic. Update OpenAPI, Protobuf, configuration schemas and the closest normative guide in the same pull request as behavior changes.
| Change | Minimum additional coverage |
|---|---|
| Ceremony or WebAuthn flow | success, expiry, replay, origin and account mismatch |
| Session behavior | fixation, idle expiry, absolute expiry, logout and invalidation |
| Credential management | wrong account, duplicate, final credential and recent-auth requirement |
| Token or key behavior | signature, kid, issuer, audience, expiry and rotation compatibility |
| Tenant/event behavior | cross-tenant denial, cursor resume, redaction and ordering |
| Storage change | atomicity, existing-record compatibility and failed partial write |
| Backup/recovery | corruption, wrong key, wrong tenant, interrupted upload and full restore |
Use table-driven tests where they improve reviewability. A test that proves a security boundary rejects invalid input is usually more valuable than another happy-path assertion.
Keep pull requests focused and explain:
- the user or threat-model problem;
- the security invariants affected;
- public API, token or persistence changes;
- tests performed; and
- rollout, compatibility and rollback considerations.
Use conventional commit subjects such as feat(auth):, fix(session):, docs: and security:.
Generated or formatted changes should be reproducible. Do not commit local .env files, database volumes,
build targets or real credentials.
Unless you explicitly state otherwise before submission, an intentional contribution submitted for inclusion in RustyAuth is provided under the Apache License 2.0, consistent with section 5 of the project licence. The project does not currently require a separate contributor licence agreement.
The Apache licence covers code and documentation. It does not grant rights to the RustyAuth name or logos; see TRADEMARKS.md.