# Security Policy
## Supported Versions
| 0.1.x | :white_check_mark: |
## Reporting a Vulnerability
If you discover a security vulnerability in authia, please report it by emailing the maintainers directly. **Do not open a public issue.**
### What to Include
When reporting a vulnerability, please include:
1. A description of the vulnerability
2. Steps to reproduce the issue
3. Potential impact
4. Any suggested fixes (if applicable)
### Response Time
- We will acknowledge receipt of your vulnerability report within 48 hours
- We will provide a detailed response within 7 days
- We will work on a fix and release a patch as soon as possible
## Security Considerations
### Algorithm Fixed to Ed25519
authia only supports Ed25519 signatures. This prevents algorithm confusion attacks where an attacker might try to use a different algorithm (e.g., "none" or "HS256") to bypass signature verification.
### No Dynamic Algorithm Selection
The library does not trust the `alg` field in the JWT header. It always verifies using Ed25519, regardless of what the token claims.
### Strict Claim Validation
All required claims (iss, aud, exp, iat, type) are validated. Missing or invalid claims result in verification failure.
### Constant-Time Operations
The ed25519-dalek library used for signature verification implements constant-time operations to prevent timing attacks.
## Best Practices
When using authia in your application:
1. **Store keys securely**: Never commit private keys to version control
2. **Use environment variables**: Store public keys in environment variables
3. **Validate all claims**: Always specify issuer and audience in verification options
4. **Handle errors properly**: Check error codes and respond appropriately
5. **Keep dependencies updated**: Regularly update authia and its dependencies
6. **Use HTTPS**: Always transmit JWTs over secure connections
7. **Implement token rotation**: Use refresh tokens and implement token versioning
## Known Limitations
- authia only verifies tokens; it does not issue them
- Only Ed25519 algorithm is supported (by design)
- Token revocation must be implemented at the application level