Skip to content

Draft: Resolve "Audit Events: Log feature flag change if actor is present"

CLOSED: See !105631 (closed)

What does this MR do and why?

Creates audit events for feature flag changes initiated from Rails console or Ruby scripts.

How to set up and validate locally

  1. In Rails console, enable or disable any feature using Feature.enable(feature, actor) or Feature.enable(feature, actor). actor is any User, Group or Project.
  2. Check audit events in local instance for Rails Console record.
  3. Verify that calling enable/disable without passing an actor does not generate an audit event.

Outstanding issues

The target of the audit event is currently undefined. Feature::FlipperGate is created on feature enable but is not exposed by Flipper itself. Is there a better way to query for it, or another object that can be used as target?

Other questions:

  • Does the new audit event type belong in root or EE config?

TODO:

  • Add specs
  • Update docs

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #378075

Edited by Aaron Huntsman

Merge request reports