question
In this scenario, where the service account isn't coupled with the user's permission scope, are there risks of the agents escalating privileges or accessing data beyond necessary? If so, should we consider implementing guardrails to mitigate this?
Thanks! I think the second suggestion (mix of propagate non-propagated claims) might have been missed in the addition: a92b2835
But in the interest of moving the MR along, I'm happy to approve and we could add the additional test later!
@eduardobonet could you take over the maintainer review for this, please?
GitLab team members using IDE plugins to trigger Duo Workflows via the direct_access endpoint intermittently have skip_usage_cutoff set to false, despite being valid team members. The same users show true on other requests milliseconds apart.
The direct_access endpoint flow involves two tokens:
Rails → AIGW/DWS (gRPC GenerateToken): Rails sends a Cloud Connector token containing skip_usage_cutoff: true as an extra claim
AIGW/DWS → Rails → IDE Plugin: DWS generates a new workflow token and returns itIDE Plugin → AIGW/DWS → AIGW (LLM calls): The IDE uses the DWS-generated token, which AIGW checks for skip_usage_cutoff
In step 2, the GenerateToken handler was building extra_claims with only gitlab_instance_uid, discarding all other incoming claims including skip_usage_cutoff.
Propagate skip_usage_cutoff extra claim from user.claims.extra into the DWS-generated token
Numbered steps to set up and validate the change are strongly suggested.
Closing this - complete with gitlab-com/runbooks!10247 (merged)
cc: @mnohr @changzhengliu
@vij thanks for your work on this! I left a comment for your consideration! Have a look and let me know what you think!
suggestion
I'm not deeply familiar w/ the cloud connector domain but looking at the code, we iterate over the _PROPAGATED_EXTRA_CLAIMS rather than incoming_extra, which means non-propagated keys are silently excluded. Two gaps I think are worth covering in the tests:
_PROPAGATED_EXTRA_CLAIMS are explicitly excluded from the outputextra contains a mix of propagated and non-propagated claims, only the allowed claims are propagatedI think right now, the behaviour is implicitly tested through what is present but not through what shouldn't be and testing these edge cases more explicitly could help us guard against regressions if the iteration logic changes.
WDYT?
Progress & Status: What progress have you made? What's the current state?
item_id to duo_workflows_workflows merged.Next Steps: What are your planned next actions?
Blockers: Are you blocked or need assistance with this?
@wanpol for the feature implementation is on PTO until next Wednesday (18th April). Since there's ongoing discussions from the initial review, I think it makes sense to wait until their return but this means, this Issue won't make it into 18.10 as I was hoping for.How confident are you that this will make it to the current milestone?
/cc @mnohr @jordanjanes
@igor.drozdov thanks for the context. Looks like the MWPS failed due to a pipeline failure, I've rebased. Hopefully that should fix it!
Could you reset MWPS when the pipeline passes?
Shola Quadri (3e091b63) at 12 Mar 13:21
chore(deps): update dependency gitmatch to ^0.3.0
... and 370 more commits
Shola Quadri (7efa1fc4) at 12 Mar 13:13
chore(deps): update dependency gitmatch to ^0.3.0
@hsilva5 thanks, lgtm!
Removes the feature flag `additional_snowplow_tracking`. Feature was never enabled in any environment, so default behaviour is set to false.
| Before | After |
|---|---|
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 #510635
Shola Quadri (95602408) at 12 Mar 12:35
Updates query to match foundational workflows via reference
... and 1324 more commits
Shola Quadri (a053b70a) at 12 Mar 11:19
Removes current_user fallback and renames methods arg
... and 720 more commits
Shola Quadri (306588c4) at 12 Mar 11:01
Removes current_user fallback and renames methods arg
... and 2 more commits
Shola Quadri (e9a4d2ca) at 11 Mar 18:02
Removes current_user fallback and renames methods arg
... and 484 more commits
Hi @reprazent following this discussion, would you mind reviewing this, please?
Progress & Status: What progress have you made? What's the current state?
Next Steps: What are your planned next actions?
Blockers: Are you blocked or need assistance with this?
How confident are you that this will make it to the current milestone?
/cc @mnohr @jordanjanes