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

Don't duplicate user-provided Enterprise Search encryption keys when reusing them #4052

Merged
merged 2 commits into from
Dec 21, 2020

Commits on Dec 17, 2020

  1. Don't duplicate user-provided encryption keys when reusing them

    This commit fixes a bug in the operator when users provide their own
    encryption keys.
    
    When we retrieved existing encryption keys (to ensure we don't generate a new
    one), we retrieved *all of them* including user-provided ones.
    We then merge the user-provided configuration, which also includes user-provided
    encryption keys. So everytime we reconcile the configuration, we duplicate
    the user-provided encryption keys into the reconciled config secret. Because this
    secret changes, all Pods get rotated automatically.
    This results in a never-ending config update (growing forever) and pod rotation.
    
    This commit fixes it by ensuring the operator always manages the first encryption key.
    This first key is the only one that gets reused. User-provided keys are then appended
    to the list of keys.
    
    This allows the following use case:
    - deploy ent search with no encryption key: you get a generated one
    - add your own custom encryption keys: it is appended to the array after
    the generated one. Transition is smooth. If we were to replace the generated
    one in that case, Enterprise Search would not be able to decrypt data.
    sebgl committed Dec 17, 2020
    Configuration menu
    Copy the full SHA
    7f0d9a9 View commit details
    Browse the repository at this point in the history

Commits on Dec 18, 2020

  1. better comment

    sebgl committed Dec 18, 2020
    Configuration menu
    Copy the full SHA
    3ccc223 View commit details
    Browse the repository at this point in the history