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

[ENHANCE] Re-evaluate using hashes to store secrets for comparisons during upgrade #608

Open
MuneebAijaz opened this issue Jan 31, 2024 · 1 comment
Labels
kind/enhancement New feature or request

Comments

@MuneebAijaz
Copy link
Contributor

Is your feature request related to a problem? Please describe.
As of now, reloader converts secrets into a hash, and stores it in a deployment as an env variable, which then triggers an upgrade in underlying pods.

This causes two concerns

  1. for normal usecases of upgrades, we dont need to compare the hashes, informers can directly watch the secrets and do the comparison for us
  2. currently, sha1 is used, which becomes a security concern
  3. upgrading to a safer encryption might bring reloader under more computational load

Describe the solution you'd like
For the solution,
We can use informers for simple comparison usecases when both old and new instances of secrets are available.

For edge cases,

  • when the watched secret is recreated, we want to compare the old instance and new instance to see if the secret has been changed, and only then we will trigger upgrades. For this, we can use a safer hashing algorithm, and since this edge case will rarely hit, we wont have additional computational load most of the time because of this.

Describe alternatives you've considered
Not yet, open for discussion

Additional context
Add any other context or screenshots about the feature request here.

@MuneebAijaz MuneebAijaz added the kind/enhancement New feature or request label Jan 31, 2024
@fdberlking
Copy link
Contributor

Related issues regarding SHA1: #594

Related PR: #527

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants