Introduction
Authfil is an open-source authentication and authorization library. Its security logic is written once, in Rust, and you use it from your own language through a thin adapter.
Why Authfil
Section titled “Why Authfil”Authentication and authorization are where one small mistake costs the most. Right now every language ecosystem rebuilds them from scratch, and each rebuild brings its own session fixation bugs, timing leaks, weak token handling and OAuth mistakes.
Authfil takes a different approach:
- The security logic is written once. A single Rust core holds every security decision: password hashing, session rules, token validation, OAuth state, multi-factor authentication (MFA) enforcement and access checks.
- Every language can use it. Thin adapters for Node.js, Python, Go, Java and Rust expose that core through each language’s own idioms and web frameworks.
- Adapters can’t weaken it. The core makes the decisions itself, and adapters only move bytes. A shared conformance suite checks that every adapter behaves the same way on security.
Principles
Section titled “Principles”- Secure by default. The safe choice needs no configuration. Any setting that weakens security has to be turned on explicitly and says so in its name.
- Checked against standards. Acceptance criteria come from the OWASP ASVS, NIST SP 800-63B and the relevant RFCs, not from our own opinions.
- Threat-modelled first. Every security-relevant feature gets a threat model before it’s built, and each threat becomes a test.
About the name
Section titled “About the name”Fil is French for thread: the core’s security logic runs through every adapter.
Next steps
Section titled “Next steps”- Set up a development environment.
- Read how the architecture fits together.
- See how to contribute.
