dolt.user in config is ignored, so any caller without BEADS_DOLT_SERVER_USER authenticates as root
Summary
dolt.user in the global configuration is read and then ignored, so a client authenticates as root whenever BEADS_DOLT_SERVER_USER is absent from the environment. On a server where root is disabled, every command fails with an access denial that names a user the configuration never asked for.
Client version 1.3.0 (f45b249ce), macOS arm64, shared server on 127.0.0.1:3308.
Configuration in place
~/.config/bd/config.yaml:
dolt:
shared-server: true
auto-start: false
user: beadsThe server accepts user beads and has root disabled through a privileges file.
Reproduction
Same command, same working directory, same configuration, four environments. Only the variable changes.
| Environment | Result |
|---|---|
| nothing set | Error: failed to open database: failed to check if database "omp_orchestrate" exists |
BEADS_CREDENTIALS_FILE set |
same failure |
BEADS_DOLT_SERVER_USER=beads |
succeeds |
| both set | succeeds |
bd list --limit 1 --jsonUnderlying server error, seen where the client surfaces it: Access denied for user 'root' (1045).
So the variable is load-bearing and dolt.user contributes nothing. BEADS_CREDENTIALS_FILE alone does not help either, which suggests the credentials file is consulted for a password but not for a user name.
Why it is worth fixing rather than documenting
The failure lands on callers who never see a shell. A profile that exports the variable makes every interactive command work, so the configuration looks correct while any caller with a pruned environment — an editor plugin, a scheduled job, an agent harness's non-shell surface — authenticates as root and fails. Two surfaces of the same tool then disagree about whether the store is reachable, and the natural reading of Access denied for user 'root' is that the server broke, not that a configured user was dropped.
Measured here: one surface passed 150 variables and worked, another passed 55 and failed, with identical arguments and configuration.
Requests
Honour dolt.user from the configuration file, with the environment variable overriding it.
Failing that, name the user and its source in the error, for example access denied for user 'root' (from default; config dolt.user=beads was not applied). That single line turns a server-fault reading into a configuration reading.
Source: gastownhall/beads