# Default User Credentials untuk Calypso Appliance
**Tanggal:** 2025-01-09  
**Status:** ✅ **READY**

## 🔐 Default Admin User

### Credentials
- **Username:** `admin`
- **Password:** `admin123`
- **Email:** `admin@calypso.local`
- **Role:** `admin` (Full system access)

## 📋 Informasi User

- **Full Name:** Administrator
- **Status:** Active
- **Permissions:** All permissions (admin role)
- **Access Level:** Full system access and configuration

## 🚀 Cara Login

### Via Frontend Portal
1. Buka browser dan akses: **http://localhost/** atau **http://10.10.14.18/**
2. Masuk ke halaman login (akan redirect otomatis jika belum login)
3. Masukkan credentials:
   - **Username:** `admin`
   - **Password:** `admin123`
4. Klik "Sign In"

### Via API
```bash
curl -X POST http://localhost/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{"username":"admin","password":"admin123"}'
```

## ⚠️ Security Notes

### Untuk Development/Testing
- ✅ Password `admin123` dapat digunakan
- ✅ User sudah dibuat dengan role admin
- ✅ Password sudah di-hash dengan Argon2id (secure)

### Untuk Production
- ⚠️ **WAJIB** ubah password default setelah first login
- ⚠️ Gunakan password yang kuat (minimal 12 karakter, kombinasi huruf, angka, simbol)
- ⚠️ Pertimbangkan untuk disable user default dan buat user baru
- ⚠️ Enable 2FA jika tersedia

## 🔧 Membuat/Update Admin User

### Jika User Belum Ada
```bash
cd /src/calypso
bash scripts/setup-test-user.sh
```

Script ini akan:
- Membuat user `admin` dengan password `admin123`
- Assign role `admin`
- Set email ke `admin@calypso.local`

### Update Password (jika perlu)
```bash
cd /src/calypso
bash scripts/update-admin-password.sh
```

## ✅ Verifikasi User

### Cek User di Database
```bash
sudo -u postgres psql -d calypso -c "SELECT username, email, is_active FROM users WHERE username = 'admin';"
```

### Cek Role Assignment
```bash
sudo -u postgres psql -d calypso -c "SELECT u.username, r.name as role FROM users u JOIN user_roles ur ON u.id = ur.user_id JOIN roles r ON ur.role_id = r.id WHERE u.username = 'admin';"
```

### Test Login
```bash
curl -X POST http://localhost/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{"username":"admin","password":"admin123"}' | jq .
```

## 📝 Summary

**Default Credentials:**
- Username: `admin`
- Password: `admin123`
- Role: `admin` (Full access)

**Access URLs:**
- Frontend: http://localhost/ atau http://10.10.14.18/
- API: http://localhost/api/v1/

**Status:** ✅ User sudah dibuat dan siap digunakan

---

**⚠️ REMEMBER:** Ubah password default untuk production environment!
