# Default Admin Credentials ## ๐Ÿ” Default Admin User **Username**: `admin` **Password**: `admin123` **Email**: `admin@calypso.local` --- ## โš ๏ธ Important Notes ### Password Hashing After implementing security hardening (Phase D), the backend now uses **Argon2id** password hashing. This means: 1. **If the admin user was created BEFORE security hardening**: - The password in the database might still be plaintext - You need to update it with an Argon2id hash - Use: `./scripts/update-admin-password.sh` 2. **If the admin user was created AFTER security hardening**: - The password should already be hashed - Login should work with `admin123` ### Check Password Status To check if the password is properly hashed: ```bash sudo -u postgres psql calypso -c "SELECT username, CASE WHEN password_hash LIKE '\$argon2id%' THEN 'Argon2id (secure)' ELSE 'Plaintext (needs update)' END as password_type FROM users WHERE username = 'admin';" ``` If it shows "Plaintext (needs update)", run: ```bash ./scripts/update-admin-password.sh ``` --- ## ๐Ÿš€ Quick Setup ### Create Admin User (if not exists) ```bash ./scripts/setup-test-user.sh ``` This script will: - Create the admin user with username: `admin` - Set password to: `admin123` - Assign admin role - **Note**: If created before security hardening, password will be plaintext ### Update Password to Argon2id (if needed) If the password is still plaintext, update it: ```bash ./scripts/update-admin-password.sh ``` This will: - Generate an Argon2id hash for `admin123` - Update the database - Allow login with the new secure hash --- ## ๐Ÿงช Testing Login ### Via Frontend 1. Open `http://localhost:3000` 2. Enter credentials: - Username: `admin` - Password: `admin123` 3. Click "Sign in" ### Via API ```bash curl -X POST http://localhost:8080/api/v1/auth/login \ -H "Content-Type: application/json" \ -d '{"username":"admin","password":"admin123"}' ``` --- ## ๐Ÿ”’ Security Note **For Production**: - Change the default password immediately - Use a strong password - Consider implementing password policies - Enable additional security features **For Testing/Development**: - The default `admin123` password is acceptable - Ensure it's properly hashed with Argon2id --- ## ๐Ÿ“ Summary **Default Credentials**: - Username: `admin` - Password: `admin123` - **Status**: โœ… Password is now properly hashed with Argon2id **To Use**: 1. Ensure admin user exists: `./scripts/setup-test-user.sh` 2. If password is plaintext, update it: `go run ./backend/cmd/hash-password/main.go "admin123"` then update database 3. Login with the credentials above **Current Status**: โœ… Admin user exists and password is securely hashed