elastic / elastic-agent

Elastic Agent - single, unified way to add monitoring for logs, metrics, and other types of data to a host.
Other
115 stars 129 forks source link

[Elastic Agent] edit values in state.enc #4837

Open leehinman opened 1 month ago

leehinman commented 1 month ago

Describe the enhancement:

Allow reading and updating of values in state.enc file

Describe a specific use case for the enhancement or feature:

During enrollment setting like the path to the CA files is stored in the state.enc file. If something changes there is currently no way to update these values. This can lead to a broken installation, with only re-enrolling as a way to fix.

What is the definition of done?

  1. Determine what values are stored in state.enc, and which ones should be modified by a user after install
  2. Add interface to dump current values, can't depend on state.enc
  3. Add interface to edit values, can't depend on state.enc
  4. Permissions on edited state.enc must be maintained
  5. Integration test showing working install, change a parameter that causes working installation to fail, edit state.enc, show restored install
  6. Integration test that shows reading and updating of state.enc, even when state.enc has values that prevent normal operation.
elasticmachine commented 1 month ago

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)