Part of preparing the app for hosting many customers as one container per customer.
Problem
On first start create_admin (src/backend/user.rs) creates the user admin with the password admin whenever no admin exists. Every new customer instance is therefore reachable from the internet with known credentials until somebody changes the password.
Suggested fix
One of:
take the initial admin password (or its hash) from the configuration or an environment variable and refuse to start without it when no admin exists, or
generate a random password on first start and write it to the log once, or
keep a default but force a password change on first login.
The first option fits automated provisioning best.
Done when
A fresh instance cannot be logged into with admin / admin.
README describes how the first admin account is set up.
Part of preparing the app for hosting many customers as one container per customer.
## Problem
On first start `create_admin` (`src/backend/user.rs`) creates the user `admin` with the password `admin` whenever no admin exists. Every new customer instance is therefore reachable from the internet with known credentials until somebody changes the password.
## Suggested fix
One of:
- take the initial admin password (or its hash) from the configuration or an environment variable and refuse to start without it when no admin exists, or
- generate a random password on first start and write it to the log once, or
- keep a default but force a password change on first login.
The first option fits automated provisioning best.
## Done when
- A fresh instance cannot be logged into with `admin` / `admin`.
- README describes how the first admin account is set up.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Part of preparing the app for hosting many customers as one container per customer.
Problem
On first start
create_admin(src/backend/user.rs) creates the useradminwith the passwordadminwhenever no admin exists. Every new customer instance is therefore reachable from the internet with known credentials until somebody changes the password.Suggested fix
One of:
The first option fits automated provisioning best.
Done when
admin/admin.