-
Notifications
You must be signed in to change notification settings - Fork 278
Closed
Description
Issue
The --with-default-root-credentials flag only works on first server start. (when no local_data directory exists)
On subsequent starts, the flag is ignored but the server still logs:
INFO iggy_server: Using default root credentials (username: iggy, password: iggy) - FOR DEVELOPMENT ONLY!
This misleads users into thinking the credentials are active when they're not.
This also affects users who manually set IGGY_ROOT_USERNAME and IGGY_ROOT_PASSWORD environment variables after the server has already created a root user.
Steps to Reproduce
# First run - creates root user with random password
cargo run --bin iggy-server
# Stop and restart with flag
cargo run --bin iggy-server -- --with-default-root-credentials
# Authentication fails
cargo run --example getting-started-producerRoot Cause
The flag sets IGGY_ROOT_USERNAME=iggy and IGGY_ROOT_PASSWORD=iggy environment variables, but load_users() in core/server/src/streaming/systems/users.rs only creates a new root user when users.is_empty().
Since local_data already contains the user from the first run, the flag is silently ignored.
Proposed Fix
- Add warning log when flag/environment variables are used but users already exist
- Add information in README that existing user data persists across restarts
Update CLI help text to clarify this behavior(CLI help already mentions this)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels