Skip to content

Comments

[FIXED] Filestore with encryption may erroneously reset meta.key#7678

Merged
neilalexander merged 1 commit intomainfrom
maurice/fs-encrypt-reset
Jan 1, 2026
Merged

[FIXED] Filestore with encryption may erroneously reset meta.key#7678
neilalexander merged 1 commit intomainfrom
maurice/fs-encrypt-reset

Conversation

@MauriceVanVeen
Copy link
Member

If a server was hard killed and was not able to write the index.db file, or it was corrupted, it would allow the stream to be loaded but without initializing the keys used for encrypting the meta.inf and index.db files. The next graceful shutdown would generate the index.db file, but in so doing would regenerate the meta.key as well. On startup the stream would not be able to load since the meta.key was new, but the meta.inf was still encrypted with the old key.

This PR proposes to simply always recover the keys if the key file exists, and not rely on the index.db recovery path.

Signed-off-by: Maurice van Veen github@mauricevanveen.com

Signed-off-by: Maurice van Veen <github@mauricevanveen.com>
@MauriceVanVeen MauriceVanVeen requested a review from a team as a code owner December 24, 2025 10:06
Copy link
Member

@neilalexander neilalexander left a comment

Choose a reason for hiding this comment

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

LGTM

@neilalexander neilalexander merged commit ee1261a into main Jan 1, 2026
69 of 70 checks passed
@neilalexander neilalexander deleted the maurice/fs-encrypt-reset branch January 1, 2026 12:14
neilalexander added a commit that referenced this pull request Jan 6, 2026
Includes the following:

- #7565
- #7589
- #7600
- #7602
- #7609
- #7610
- #7632
- #7649
- #7642
- #7658
- #7659
- #7661
- #7662
- #7663
- #7668
- #7683
- #7685
- #7686
- #7678
- #7691
- #7696
- #7698
- #7699
- #7700

Signed-off-by: Neil Twigg <neil@nats.io>
neilalexander added a commit that referenced this pull request Jan 6, 2026
Includes the following:

- #7658
- #7659
- #7661
- #7662
- #7663
- #7642
- #7668
- #7683
- #7685
- #7686
- #7678
- #7691
- #7696
- #7697
- #7698
- #7699
- #7700

Signed-off-by: Neil Twigg <neil@nats.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants