PostgreSQL backup tool with Point-In-Time-Recovery and restore verification
TypeScript backupbackupsdatabasedatabase-backupdevopsdockergolangkubernetesmariadbmongodbmysqlpgpostgrespostgresqls3self-hostedsystem-administrationtoolsweb-ui
1. Password minimum
- 1.1 Add the eight-character minimum as a named constant in the users feature, make
ChangeUserPasswordrefuse a shorter password by rune count with a sentinel error fromusers/errors/errors.go, and add service tests for a seven-character console reset that leaves the old password working and a reset of the placeholder accountadminthat still succeeds; verify withjust test-package ./internal/features/users/...inbackend/
2. Shared empty-instance claim
- 2.1 Give
createAccountClaimingEmptyInstancethe ordinary-account check as an argument, passcheckExternalRegistrationAllowedfromSignUpand the OAuth path, and verify that the existing registration, OAuth, closed-registration and concurrent-registration tests still pass withjust test-package ./internal/features/users/...inbackend/
3. Console account creation
- 3.1 Add the refusal sentinels to
users/errors/errors.go: an invalid address, an invalid role, a member as the first account, and an address held by an account in another state. AddCreateUserFromConsoleand the function that renders its outcome line inusers/services/console_account.go. The method validates with the Gin validator, defaults the name to the address's local part, and refuses a member on an empty instance. An active account with the requested role and a password counts as an exact match and is reported as existing without any write; any other existing account is refused. Otherwise the method creates the account through the shared claim with an always-allowing check and writes the console audit entry. It writes no log line. Verify withgo build ./...inbackend/ - 3.2 Add
users/services/console_account_test.gofor the empty-instance cases, usingusers_testing.DeleteAllUsersand the audit recorder. Cover these scenarios: on an empty instance, the first console administrator becomes the bootstrap administrator with both audit entries,RenderAdminListingmarks it as the bootstrap administrator, and a later registration gets the member role; a member on an empty instance is refused and the instance stays empty;CreateUserFromConsolewith the administrator role, run concurrently withSignUpon an emptied instance, leaves exactly one bootstrap administrator while the console account exists with the administrator role, flagged only if it won. Verify withjust test-package ./internal/features/users/...inbackend/ - 3.3 Extend
console_account_test.gowith the non-empty-instance cases. Cover these scenarios: a console administrator is ordinary; creation succeeds with open registration off; the account signs in right away throughSignIn; a console reset rotates the password and the old one is refused; the name defaults to the local part; an invalid address, a seven-character password, a missing role and the roleownerare each refused with no account created. Verify withjust test-package ./internal/features/users/...inbackend/ - 3.4 Extend
console_account_test.gowith the existing-address cases: a rerun with a different password reports no change, its rendered line says the password was not changed, and the first password still signs in. A member, a deactivated account, an invited account and a password-less OAuth administrator at that address are each refused and left unchanged; the invited account stays invited without a password. Add one test that creates an account, reruns it and runs a refused input, then asserts that no rendered line and no returned error contains the password or the stored hash. Verify withjust test-package ./internal/features/users/...inbackend/
4. Console wiring
- 4.1 Add
--create-user,--password,--roleand--nametoparseCommandLineOptions, and addcreateUserIfRequestedtobackend/cmd/main.goahead ofresetPasswordIfRequested. It refuses a combination with--new-passwordor a missing--email, installs the audit writer, prints the line the service renders, and on failure logs only the returned error. Verify withgo build ./...andjust lintinbackend/, and withgrep -n "Password" backend/cmd/main.go, which must show the password reaching only the service call and the flag definitions, neverfmt.Print*orlog.*
5. Documentation
- 5.1 Add a section on creating an account from the console to
website/app/(en)/password/page.tsx, placed after the administrator listing. It gives the command, its parameters, the first-account rule, the no-change rerun and rotation with--new-password, and the eight-character minimum under the reset parameters. Extend the page's metadata description to mention account creation. Verify withpnpm lintandpnpm buildinwebsite/ - 5.2 Apply the same section, parameter note and metadata change to
website/app/[lang]/password/content/{ru,es,pt,zh,fr}.tsx, keeping commands byte-identical to English. Verify withpnpm lintandpnpm buildinwebsite/, and withgrep -c -- "--create-user"andgrep -c -- "--new-password"overwebsite/app/(en)/password/page.tsxandwebsite/app/[lang]/password/content/*.tsx, each of which must report the same non-zero count for all six files - 5.3 Add the create command with a short explanation to the
### π Resetting passwordsection ofREADME.mdand to all five copies inassets/readme/, keeping code blocks byte-identical, and verify withgrep -c -- "--create-user" README.md assets/readme/README.*.md, which must report the same non-zero count for all six files
6. Verification
- 6.1 Run
just test-package ./internal/features/users/... ./internal/features/audit_logs/...inbackend/andjust lintat the repository root - 6.2 Run
openspec validate add-console-user-creation --strict