Every cluster-synced settings key is catalogued and can be backfilled, secrets included #332
Labels
No labels
agent
api-regen
agent
architect
agent
coder
agent
console-coder
agent
docs-writer
agent
mechanic
agent
protocol-coder
agent
storage-coder
area/api
area/ci
area/console
area/dhcp
area/dns
area/docs
area/packaging
area/process
area/storage
area/windows
kind
bug
kind
chore
kind
docs
kind
epic
kind
feature
kind
performance
kind
security
kind
test
priority
high
priority
low
priority
medium
resolution
duplicate
resolution
not-a-bug
resolution
wontfix
status
blocked
status
in-progress
status
needs-decision
status
needs-design
status
ready
theme
ad-samba-dns
theme
alternatives-benchmark
theme
console-toolchain
theme
later
theme
parity-devices
theme
parity-query
theme
post-release-fixes
theme
tracker-setup
theme
valkey
theme
windows-installer
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Blocks
Depends on
Reference
lantea-one/ninlil#332
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of epic #59.
Why
A settings envelope carries only the keys a write patched, and nothing lists a section's synced keys. A backfill must send every key, and #192's RA prefixes must not be forgotten.
What changes
ClusterSyncedSettingsCatalog,SettingsClusterConfigSyncSource(reads the runtime file and decrypts with this node's key ring), andRuntimeConfigurationFileReader. The recorder refuses a section or key that is not in the catalogue. See the work package detail below (59-3.Acceptance
src/dotnet/tests/Ninlil.Web.Tests.Source
ClusterConfigSyncSettingsRecorder.cs:61-108,SettingsClusterConfigSyncApplier.cs:46-152,ConfigurationSecretSettings.cs:66-179,ConfigurationSecretMigrationService.cs:146, README:4200-4202, #192.Work package detail
Ninlil.Web/ClusterSync/):ClusterSyncedSettingsCatalog.cs(new, static):IReadOnlyList<ClusterSyncedSettingsSection> Sections, each withSectionNameandIReadOnlyList<(string SectionPath, string Key)> Keys, filled from the keys the six callers write:Transport, plus everyRabbitMqandActiveMqfieldAddBrokerFieldswrites.RateLimitingSettingsController.cs:105-306.Enable,Require,SecretRotationInterval.Enable,KnownProxies,KnownNetworks,SharedSecretHeaderName,SharedSecret, plusProxyProtocolEnable,KnownProxies,KnownNetworks.Enable,TimeToLiveSeconds.SettingsClusterConfigSyncSource.cs(new,IClusterConfigSyncSource, stage 2): for each catalogue section that has a state row, read the runtime file (RuntimeConfigurationOptions.ConfigurationFilePath) and add each catalogued key present as aSettingsSyncEntry. For aConfigurationSecretSettingsplain key, use a non-empty plain value from the file, or elseUnprotectthe encrypted sibling. On aCryptographicException, leave the key out and log a Warning. Stamp the envelope with the state row's time and origin.Startup/ConfigurationSecretMigrationService.cs:146into a sharedConfiguration/RuntimeConfigurationFileReader.cs.ClusterConfigSyncSettingsRecorder.RecordAndPublishAsyncthrowsInvalidOperationExceptionfor a section or key that is not in the catalogue.Program.csnext to the settings applier (:542-548).IConfigurationfor values (an environment variable pins a value only on its own node). Update the summaries: recorder:13-35, settings applier.src/dotnet/tests/Ninlil.Web.Tests, hostless likeSettingsClusterSyncRoundTripTests):ReadBackfillAsync_ForASectionWithAStateRow_SendsEveryCataloguedKeyTheFileHoldsReadBackfillAsync_ForASectionWithoutAStateRow_SendsNothingReadBackfillAsync_ForAnEncryptedSecret_SendsThePlaintextUnderThePlainKeyReadBackfillAsync_ForASecretThisKeyRingCannotOpen_LeavesTheKeyOutReadBackfillAsync_ForAValuePinnedByAnEnvironmentVariable_SendsTheFileValueReadBackfillAsync_ForReverseProxy_IncludesTheProxyProtocolKeysRecordAndPublishAsync_ForASectionMissingFromTheCatalog_ThrowsRecordAndPublishAsync_ForAKeyMissingFromTheCatalog_ThrowsPatch_OfEveryField_OnEachSyncedSettingsController_RecordsOnlyCataloguedKeys(Theory over the five controllers)Backfill_OfASection_ProducesThePeerFileLiveSyncProducesdotnet test src/dotnet/tests/Ninlil.Web.Tests.Ghost referenced this issue2026-11-05 20:49:02 -05:00
Done on
feature/59-cluster-join-backfill(fa731b9d,a7901b17,44789ae5); verified (Web.Tests 2313, ClusterSync 64, Cluster 40; live settings wire pinned and unchanged). Fix round: case-sensitive file reads restored, catalogue check before the file write, cleared secrets sent as null like live sync. Closes when the epic merges into develop.Ghost referenced this issue2026-11-06 01:41:02 -05:00