Expose GitLab Duo remote flows settings in Groups API

What does this MR do and why?

PUT /groups/:id accepts duo_remote_flows_availability, but the Groups API never returned the resulting value. Customers could set GitLab Duo remote flows on a group but couldn't read the value back or audit it.

This MR exposes duo_remote_flows_enabled and lock_duo_remote_flows_enabled on API::Entities::GroupDetail, which backs GET, POST, and PUT /groups/:id:

  • Who sees them: the fields appear only when the group has the ai_workflows license and the user can admin_group (Owner or administrator). This matches the project entity's ai_workflows gate and the existing duo_features_enabled exposure.
  • Field names: the enabled/lock pair matches the instance settings API. duo_remote_flows_availability is a setter-only alias that just returns duo_remote_flows_enabled, so it isn't exposed.
  • Why GroupDetail and not Group: API::Entities::Group is a high-impact entity (usage_radius: 33). It's used by list endpoints, where the cascading reader would add one or two queries per row.
  • Lock: lock_duo_remote_flows_enabled reports the effective lock. It's true when this group, a parent group, or the instance locks the setting, so it matches when PUT duo_remote_flows_availability is ignored.

Also updates doc/api/groups.md (response attributes) and regenerates openapi_v3.yaml.

References

Screenshots or screen recordings

Not applicable. API-only change.

How to set up and validate locally

  1. On a GDK with a Premium or Ultimate license, as a group Owner:

    curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" \
      --url "http://gdk.test:3000/api/v4/groups/<id>?duo_remote_flows_availability=false"
  2. Confirm that the response includes "duo_remote_flows_enabled": false and "lock_duo_remote_flows_enabled": true.

  3. Call GET /api/v4/groups/<id> for a subgroup of that group and confirm that it also returns "lock_duo_remote_flows_enabled": true.

  4. Call GET /api/v4/groups/<id> as a Developer of the group and confirm that neither attribute is returned.

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.

Edited by Sebastian Rehm

Merge request reports

Loading
Loading