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_workflowslicense and the user canadmin_group(Owner or administrator). This matches the project entity'sai_workflowsgate and the existingduo_features_enabledexposure. - Field names: the
enabled/lockpair matches the instance settings API.duo_remote_flows_availabilityis a setter-only alias that just returnsduo_remote_flows_enabled, so it isn't exposed. - Why
GroupDetailand notGroup:API::Entities::Groupis 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_enabledreports the effective lock. It'struewhen this group, a parent group, or the instance locks the setting, so it matches whenPUT duo_remote_flows_availabilityis ignored.
Also updates doc/api/groups.md (response attributes) and regenerates openapi_v3.yaml.
References
- #585775
- Parent epic: gitlab-org#21082
- Companion docs MR (request attributes and instance settings): !269539 (merged)
- Follow-up for the instance lock in
GET /application/settings: #639586
Screenshots or screen recordings
Not applicable. API-only change.
How to set up and validate locally
-
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" -
Confirm that the response includes
"duo_remote_flows_enabled": falseand"lock_duo_remote_flows_enabled": true. -
Call
GET /api/v4/groups/<id>for a subgroup of that group and confirm that it also returns"lock_duo_remote_flows_enabled": true. -
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.