1 Commits
Author SHA1 Message Date
Bobby Ho 3248dc073e fix: generate per-instance dev passwords and remove the shared default (#32283)
CORE-784: Generate unique passwords for development environments

Replace the shared, publicly documented default password with randomly generated credentials for admin and member users across `scripts/develop.sh`, Docker Compose, and ephemeral deployments.

- Generate separate 32-character passwords, stored in permission-restricted files (`0600`) and reused across restarts and database resets.
- Automatically replace legacy default passwords on existing instances without overwriting passwords changed manually.
- Reject the old default as an override. Limit `--password` and `CODER_DEV_ADMIN_PASSWORD` to the admin user and persist successful overrides.
- Improve login banners, password recovery errors, and Compose bootstrap token recovery.
- Update ephemeral deployment tooling and documentation to use stored credentials instead of hardcoded passwords.
- Add Go tests covering password generation, migration, persistence, overrides, and error handling.

**Validation:** Go tests, linting, and shell checks pass. All 20 original manual scenarios passed, although several were run before subsequent changes. Additional unit, stub, and integration tests cover the updated behavior; some final Compose changes have not been retested against a live environment.

Refs CORE-784
2026-11-19 23:55:06 +00:00