Skip to content

fix(server)!: drop generated root passwords, journal root, gate snapshots - #4585

Merged
spetz merged 10 commits into
masterfrom
no_more_random_root_creds
Oct 20, 2026
Merged

spetz merged 10 commits into
masterfrom
no_more_random_root_creds

Conversation

@spetz

@spetz spetz commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

A server started without IGGY_ROOT_USERNAME and IGGY_ROOT_PASSWORD generated a root password and wrote it to stdout and the log file, so anything that could read either stream owned the server. Root was also created in local memory only: a restart before a checkpoint rebuilt it from the environment, and each replica minted its own.

Remove the generator. Fresh root initialization requires both variables or --with-default-root-credentials, and neither value is ever logged. Create root once through the standard metadata replication path: the leader journals the username and password hash, replicas apply the committed account, and restarts recover it without bootstrap credentials.

Require manage_servers for diagnostic snapshots, since the archive carries raw server logs and host diagnostics, and redact the legacy generated-password line from the server-log section. Render readable startup errors and keep launcher guidance consistent.

Recovery keeps disconnected WAL chunks out of replay and commit-watermark calculation. Root validation treats checkpoints at op 0 as uninitialized. Checkpointing skips completed frontiers while preserving retries after a persistence failure.

BREAKING CHANGE: the server no longer generates a root password. Fresh root initialization requires explicit credentials or the development flag. Diagnostic snapshots require manage_servers. Storage format IGGY-BOUND-GRANTS-4 is incompatible with earlier data directories. All existing data directories must be wiped before upgrading. There is no in-place upgrade or automatic migration.

@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label Oct 19, 2026
@spetz spetz added the server iggy-server related change label Oct 19, 2026
@codecov

codecov Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.47713% with 57 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.74%. Comparing base (cd5f531) to head (ec3876d).
⚠️ Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
core/server/src/boot/credentials.rs 95.85% 7 Missing and 6 partials ⚠️
core/metadata/src/impls/metadata.rs 96.41% 7 Missing and 3 partials ⚠️
core/metadata/src/impls/recovery.rs 94.92% 9 Missing and 1 partial ⚠️
core/journal/src/prepare_journal.rs 95.34% 5 Missing and 1 partial ⚠️
core/simulator/src/lib.rs 98.66% 0 Missing and 6 partials ⚠️
core/server/src/main.rs 71.42% 3 Missing and 1 partial ⚠️
core/server/src/boot/listeners.rs 86.95% 1 Missing and 2 partials ⚠️
...data/src/permissioner/permissioner_rules/system.rs 95.55% 0 Missing and 2 partials ⚠️
core/server/src/dispatch/session_ops.rs 95.00% 0 Missing and 1 partial ⚠️
core/server/src/http/reply.rs 85.71% 0 Missing and 1 partial ⚠️
... and 1 more
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #4585      +/-   ##
============================================
+ Coverage     89.70%   89.74%   +0.03%     
+ Complexity     2146     2145       -1     
============================================
  Files          1343     1343              
  Lines        289988   291385    +1397     
  Branches     246223   247622    +1399     
============================================
+ Hits         260137   261498    +1361     
- Misses        24140    24157      +17     
- Partials       5711     5730      +19     
Components Coverage Δ
Rust Core 90.99% <96.47%> (+0.04%) ⬆️
Java SDK 73.17% <ø> (-0.02%) ⬇️
C# SDK 81.26% <ø> (-0.09%) ⬇️
Python SDK 90.71% <ø> (ø)
PHP SDK 87.87% <ø> (ø)
Node SDK 95.23% <ø> (-0.01%) ⬇️
Go SDK 71.82% <ø> (-0.02%) ⬇️
C++ SDK 84.69% <ø> (ø)
Files with missing lines Coverage Δ
core/metadata/src/stm/authz.rs 93.30% <ø> (ø)
core/metadata/src/stm/user.rs 95.36% <ø> (ø)
core/server/src/args.rs 100.00% <ø> (ø)
core/server/src/boot/handoff.rs 90.05% <ø> (ø)
core/server/src/boot/mod.rs 86.42% <100.00%> (-0.49%) ⬇️
core/server/src/dispatch/reads.rs 92.27% <ø> (ø)
core/server/src/http/handlers.rs 84.42% <ø> (ø)
core/server/src/server_error.rs 83.87% <100.00%> (+6.09%) ⬆️
core/simulator/src/deps.rs 87.42% <100.00%> (+2.55%) ⬆️
core/simulator/src/replica.rs 96.51% <100.00%> (+0.18%) ⬆️
... and 11 more

... and 24 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

hubcio added a commit that referenced this pull request Oct 20, 2026
The dashboard can accept logins before authentication is ready.
Retry user creation and accept conflicts from completed attempts.

Port Spetz's exact MQTT fixture fix from #4585
(3cd8e1f).
Comment thread core/server/src/boot/credentials.rs Resolved
Comment thread core/server/src/boot/credentials.rs Resolved
Comment thread core/server/src/server_error.rs Resolved
Comment thread core/server/src/boot/credentials.rs Resolved
Comment thread core/server/src/boot/credentials.rs Resolved
Comment thread helm/charts/iggy/README.md Resolved
Comment thread core/server/src/boot/mod.rs Resolved
@spetz

spetz commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

/ready

@hubcio hubcio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simplification: get_env_vars always returns root credentials, so remove the unreachable empty-environment fallbacks at scripts/performance/run-standard-performance-suite.sh:178 and scripts/performance/run-standard-performance-suite.sh:232.

Comment thread core/server/src/boot/mod.rs Resolved
Comment thread core/server/tests/sdk_e2e.rs Resolved
Comment thread core/server/src/boot/credentials.rs Resolved
Comment thread core/server/src/server_error.rs Resolved
Comment thread core/server/src/boot/credentials.rs Resolved
@github-actions github-actions Bot added S-waiting-on-author PR is waiting on author response and removed S-waiting-on-review PR is waiting on a reviewer labels Oct 20, 2026
@spetz

spetz commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

@hubcio Removed both empty-environment fallbacks from the performance script, as requested in the review summary. get_env_vars always supplies root credentials.

@spetz

spetz commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

/ready

@github-actions github-actions Bot added S-waiting-on-review PR is waiting on a reviewer and removed S-waiting-on-author PR is waiting on author response labels Oct 20, 2026
Comment thread core/metadata/src/impls/recovery.rs Resolved
Comment thread core/server/src/boot/credentials.rs Resolved
Comment thread core/server/src/boot/mod.rs Resolved
@spetz spetz added the breaking:storage On-disk data format change - skips backwards compat CI label Oct 20, 2026
@spetz

spetz commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

/ready

hubcio
hubcio previously approved these changes Oct 20, 2026
mmodzelewski
mmodzelewski previously approved these changes Oct 20, 2026
Comment thread core/metadata/src/impls/recovery.rs Resolved
@spetz

spetz commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

/ready

@spetz
spetz merged commit 49a831f into master Oct 20, 2026
90 checks passed
@spetz
spetz deleted the no_more_random_root_creds branch October 20, 2026 14:04
@github-actions github-actions Bot removed the S-waiting-on-review PR is waiting on a reviewer label Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking:storage On-disk data format change - skips backwards compat CI server iggy-server related change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants