This document outlines the security architecture, token handling policies, and vulnerability reporting procedures for the Expense Tracker application.
- Token Security: JWT tokens are stored exclusively in encrypted storage using
flutter_secure_storage(iOS Keychain / Android EncryptedSharedPreferences). Tokens are never written toshared_preferencesor plain text files. - Transport Security: All API communications require HTTPS.
- Log Sanitization:
DioClientlogs strictly inkDebugModeand redacts JWT tokens, authorization headers, passwords, and sensitive response bodies. - Backend Ownership Enforcement: Spring Security validates JWT signatures. JPA database queries enforce
WHERE user.id = :authUserIdto ensure complete data isolation between users. - Role Security: Administrative actions (
POST /api/categories) returnHTTP 403 Forbiddenfor non-ADMIN user roles.
If you discover a security vulnerability or credential exposure risk:
- Do NOT open a public issue on GitHub.
- Send a security report to the repository maintainer.
- Never include real production JWT tokens, passwords, or live user credentials in your report.
- Include steps to reproduce the issue using synthetic test data.
- Token Expiration: The current API implementation does not issue refresh tokens. Upon token expiration (HTTP 401), the application revokes local session tokens and prompts the user to re-authenticate.
- Biometrics: Biometric unlock (FaceID/TouchID) is currently on the roadmap and not yet enabled in v1.0.0.