We currently provide security updates for the following versions of Two Fast Auth:
| Version | Supported |
|---|---|
| 1.1.x | ✅ |
| 1.0.x | ✅ |
| < 1.0 | ❌ |
We take the security of Two Fast Auth seriously. If you believe you've found a security vulnerability, please follow these steps:
-
Do not disclose the vulnerability publicly until it has been addressed by the maintainers.
-
Report the vulnerability through GitHub's security advisory feature:
- Go to the Security tab of the Two Fast Auth repository
- Click on "New draft security advisory"
- Fill in the details of the vulnerability
- Submit the advisory
Alternatively, you can report vulnerabilities through GitHub's private vulnerability reporting feature.
-
Include the following information in your report:
- A description of the vulnerability and its potential impact
- Steps to reproduce the issue
- Affected versions
- Any potential mitigations or workarounds
The maintainers will acknowledge your report within 48 hours and provide a detailed response within 7 days, including the next steps in handling the vulnerability.
When using Two Fast Auth in your applications, consider the following security best practices:
-
Encryption Key: Always use a strong, unique encryption key when enabling secret encryption. Store this key securely using environment variables or a secure secrets management system, not hardcoded in your application.
-
Excluded Paths: Carefully consider which paths to exclude from 2FA verification. Only exclude essential paths like login, setup, and public documentation.
-
Custom Header Name: Consider changing the default header name (
X-2FA-Code) to a custom value in production environments to make it less predictable. -
Secret Storage: Implement secure storage for user 2FA secrets, preferably using the encryption feature provided by Two Fast Auth.
-
Recovery Codes: Implement a secure system for generating, storing, and validating recovery codes.
-
Rate Limiting: Implement rate limiting on 2FA verification attempts to prevent brute force attacks.
-
Secure Communication: Always use HTTPS in production to protect 2FA codes in transit.
-
Session Management: Implement proper session management and invalidate sessions appropriately.
-
Audit Logging: Log 2FA-related events (setup, verification attempts, recovery code usage) for security monitoring.
- Regularly update Two Fast Auth and its dependencies to the latest versions.
- Use a dependency scanning tool to identify and address vulnerabilities in your dependency tree.
Two Fast Auth provides several security features to protect your FastAPI applications:
- Time-based One-Time Password (TOTP) verification
- QR code generation for authenticator apps
- Optional secret encryption using Fernet
- Recovery code generation and management
- Middleware integration with FastAPI
For detailed information on configuring these features, refer to the documentation.
Two Fast Auth is designed to protect against common authentication threats, including:
- Credential theft and account takeover
- Brute force attacks against authentication
- Man-in-the-middle attacks (when used with HTTPS)
- Phishing attacks (mitigated by time-based codes)
Note that Two Fast Auth should be used alongside other security controls such as proper password management, session handling, and input validation.
Security updates will be released as needed. We recommend subscribing to GitHub releases or regularly checking for updates to ensure you're using the most secure version.
We follow responsible disclosure principles. If you report a vulnerability to us:
- We will confirm receipt of your vulnerability report
- We will provide an estimated timeline for a fix
- We will notify you when the vulnerability is fixed
- We will publicly acknowledge your responsible disclosure (unless you prefer to remain anonymous)
Two Fast Auth is licensed under the MIT License. See the LICENSE file for details.