feat: add independent Bell authentication and RBAC (#12)
This commit is contained in:
@@ -16,6 +16,8 @@ Exact upstream sources and retained MIT notices are in `LICENSES/`.
|
||||
|
||||
Copy variable names from `.env.example` into the process environment. Replace every placeholder at deployment time. Bell intentionally has no built-in database password, session secret or administrator password.
|
||||
|
||||
`BELL_SESSION_SECRET` is mandatory, must be at least 32 characters, and must be generated independently from Sense. In production Bell marks its `bell_session` cookie as Secure, HttpOnly and SameSite=Strict.
|
||||
|
||||
The PostgreSQL role used by `BELL_DATABASE_URL` must be dedicated to Bell. Do not reuse a Sense role or database.
|
||||
|
||||
## Backend
|
||||
@@ -27,6 +29,16 @@ go run . migrate
|
||||
go run . serve
|
||||
```
|
||||
|
||||
Create the first administrator only through a one-time process environment value; do not place the password in shell history, source files or command arguments:
|
||||
|
||||
```powershell
|
||||
$env:BELL_BOOTSTRAP_PASSWORD = Read-Host -AsSecureString | ConvertFrom-SecureString -AsPlainText
|
||||
go run . create-admin --username bell-admin --display-name "Bell 管理员"
|
||||
Remove-Item Env:BELL_BOOTSTRAP_PASSWORD
|
||||
```
|
||||
|
||||
Passwords require at least 12 characters with upper-case, lower-case and numeric characters. Bell ships no user or default password. Administrator, operator and viewer roles are seeded with least-privilege permissions; only an administrator can read user and authentication-audit pages.
|
||||
|
||||
Health endpoints:
|
||||
|
||||
```powershell
|
||||
|
||||
Reference in New Issue
Block a user