feat(rc-admin)!: add safe server configuration management - #299
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issues
Closes rustfs/backlog#1375
Replaces closed PR #283 after its stacked base was removed. Server-side safety limitations remain tracked in rustfs/backlog#1398 and rustfs/backlog#1399.
Background and user impact
RustFS beta.10 exposes server configuration reads, mutations, history, restore, help, and module-switch routes, but
rclacked a safe workflow around them. Raw server documents may contain credentials, destructive replacements can remove unrelated settings, and the service does not expose revision or ETag tokens for optimistic concurrency.Solution
rc admin config get|set|delete|help|history|restore|export|importand module-switch support.KEY=@PATHvalues with a 1 MiB limit, one-line UTF-8 validation, and Unix regular-file, non-symlink, private-permission checks.Review follow-up from #283
All requested changes from
overtrueare addressed:KEY=@PATHwith bounded and permission-checked file input.diff unavailableresult; dry-run refuses unsafe previewless restore.BREAKING contract note
BREAKING: This PR updates the protected
docs/reference/rc/admin.mdcommand behavior contract. It does not change output v1/v2/v3 schemas, local config schema, or exit-code definitions. The new commands are additive and do not require data migration.Validation
Exact head:
ceb905dcargo fmt --all --checkCARGO_BUILD_JOBS=2 cargo clippy --workspace -- -D warningsCARGO_BUILD_JOBS=2 cargo test --workspaceLimitations
diff unavailablewarning before confirmation.