Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

preflight check for password_secret #21491

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

todvora
Copy link
Contributor

@todvora todvora commented Jan 30, 2025

Description

This PR adds a preflight check for both server and data node. Each side verifies if the cluster_config collection contains a predefined and encrypted value. If not, then it will be created. If yes, then the check will try to read and decrypt it. The value is known and easy to verify. So if the decrypting fails, we know that this node uses a different password than the one that originally encrypted the value. That leads to a controlled stop of the startup and proper error message. Rather fail early and explicitly than wait till a problem occurs later, during normal operation. Failing early means fixing the problem early, before it can cause big troubles.

Motivation and Context

Fixes #21504

How Has This Been Tested?

Manually and with a unit test

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.

@todvora todvora marked this pull request as ready for review January 31, 2025 08:41
@todvora todvora requested review from bernd and moesterheld January 31, 2025 08:41
@bernd bernd requested review from a team and removed request for bernd February 3, 2025 09:24
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.

Preflight check for password_secret
2 participants