php-tenant/Models
Snider a35cbc9306 security: encrypt 2FA secrets and hash invitation tokens
- Add encrypted cast to UserTwoFactorAuth secret and recovery_codes
- Hash invitation tokens on creation using Hash::make()
- Update token verification to use Hash::check()
- Add migration commands for existing data:
  - security:encrypt-2fa-secrets
  - security:hash-invitation-tokens
- Add tests for encryption and hashing

Fixes SEC-003, SEC-004 from security audit.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 12:20:53 +00:00
..
AccountDeletionRequest.php refactor: rename namespace from Core\Mod\Tenant to Core\Tenant 2026-01-27 16:30:46 +00:00
AgentReferralBonus.php refactor: rename namespace from Core\Mod\Tenant to Core\Tenant 2026-01-27 16:30:46 +00:00
Boost.php refactor: rename namespace from Core\Mod\Tenant to Core\Tenant 2026-01-27 16:30:46 +00:00
EntitlementLog.php refactor: rename namespace from Core\Mod\Tenant to Core\Tenant 2026-01-27 16:30:46 +00:00
EntitlementWebhook.php refactor: rename namespace from Core\Mod\Tenant to Core\Tenant 2026-01-27 16:30:46 +00:00
EntitlementWebhookDelivery.php refactor: rename namespace from Core\Mod\Tenant to Core\Tenant 2026-01-27 16:30:46 +00:00
Feature.php refactor: rename namespace from Core\Mod\Tenant to Core\Tenant 2026-01-27 16:30:46 +00:00
Namespace_.php refactor: rename namespace from Core\Mod\Tenant to Core\Tenant 2026-01-27 16:30:46 +00:00
NamespacePackage.php refactor: rename namespace from Core\Mod\Tenant to Core\Tenant 2026-01-27 16:30:46 +00:00
Package.php refactor: rename namespace from Core\Mod\Tenant to Core\Tenant 2026-01-27 16:30:46 +00:00
UsageAlertHistory.php refactor: rename namespace from Core\Mod\Tenant to Core\Tenant 2026-01-27 16:30:46 +00:00
UsageRecord.php refactor: rename namespace from Core\Mod\Tenant to Core\Tenant 2026-01-27 16:30:46 +00:00
User.php refactor: rename namespace from Core\Mod\Tenant to Core\Tenant 2026-01-27 16:30:46 +00:00
UserToken.php refactor: rename namespace from Core\Mod\Tenant to Core\Tenant 2026-01-27 16:30:46 +00:00
UserTwoFactorAuth.php security: encrypt 2FA secrets and hash invitation tokens 2026-01-29 12:20:53 +00:00
WaitlistEntry.php refactor: rename namespace from Core\Mod\Tenant to Core\Tenant 2026-01-27 16:30:46 +00:00
Workspace.php security: encrypt 2FA secrets and hash invitation tokens 2026-01-29 12:20:53 +00:00
WorkspaceInvitation.php security: encrypt 2FA secrets and hash invitation tokens 2026-01-29 12:20:53 +00:00
WorkspaceMember.php refactor: rename namespace from Core\Mod\Tenant to Core\Tenant 2026-01-27 16:30:46 +00:00
WorkspacePackage.php refactor: rename namespace from Core\Mod\Tenant to Core\Tenant 2026-01-27 16:30:46 +00:00
WorkspaceTeam.php refactor: rename namespace from Core\Mod\Tenant to Core\Tenant 2026-01-27 16:30:46 +00:00