Audit duo feature access rule updates

What does this MR do and why?

Audit duo feature access rule updates

Logs an audit event when instance Duo feature access rules are updated

This feature is currently behind a feature flag

EE: true

Changelog: added

References

Screenshots or screen recordings

Screenshot_2026-01-05_at_6.43.04_PM

How to set up and validate locally

  1. Run GDK in self-managed mode export GITLAB_SIMULATE_SAAS=0

  2. Enable feature flag for the instance: Feature.enabled?(:duo_access_through_namespaces, :instance)

  3. Create feature access rules via Application Settings API

    curl 'http://gdk.test:3000/api/v4/application/settings' \
      -X 'PUT' \
      -H "Authorization: Bearer $GITLAB_TOKEN" \
      -H 'Content-Type: application/json' \
      --data-raw '{
        "duo_namespace_access_rules": [
          { "through_namespace": { "id": 1000000 }, "features": ["duo_classic", "duo_agent_platform"] }
        ]
      }'
  4. Check Audit events to verify event is created, information is correct

    AuditEvent.last

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #584380

Edited by Katherine Richards

Merge request reports

Loading