Skip to content

feat(aiguard): add optional user to resolve_and_execute_policy - #587

Merged
willguibr merged 1 commit into
zscaler:masterfrom
z-anvesha:ECS-4553-resolve-and-execute-user
Sep 18, 2026
Merged

willguibr merged 1 commit into
zscaler:masterfrom
z-anvesha:ECS-4553-resolve-and-execute-user

Conversation

@z-anvesha

Copy link
Copy Markdown
Contributor

What

Add an optional user argument to PolicyDetectionAPI.resolve_and_execute_policy(...) so callers can forward the end-user identity to the AI Guard DAS resolve-and-execute endpoint. When provided it is sent as body["user"]; DasResolveAndExecuteDetectionsPolicyRequest is kept in sync.

Why

The TrueFoundry guardrail wrapper needs to attribute traffic to the end user on the AI Guard dashboard. The wrapper pulls the user from TrueFoundry's context.user and passes it here; the AI Guard DAS API records it on the detection event.

Compatibility

Optional / nullable — existing callers are unaffected (no user sent when omitted).

Related

Forward an optional end-user identity to the AI Guard DAS
resolve-and-execute endpoint so the user is recorded on the detection
event and surfaces on the dashboard. Adds a `user` param to
PolicyDetectionAPI.resolve_and_execute_policy (sent as body["user"] when
provided) and keeps DasResolveAndExecuteDetectionsPolicyRequest in sync.

Optional/nullable, so existing callers are unaffected. Enables the
TrueFoundry guardrail wrapper (ECS-4551) to attribute traffic to the end
user; pairs with the platform DAS change (ECS-4552).

ECS-4553
@willguibr
willguibr merged commit aef6d24 into zscaler:master Sep 18, 2026
github-actions Bot pushed a commit that referenced this pull request Sep 18, 2026
## [1.10.0](v1.9.44...v1.10.0) (2026-09-18)

### Features

* **aiguard:** add optional user to resolve_and_execute_policy ([#587](#587)) ([aef6d24](aef6d24))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants