Skip to content

feat(connections): send the access policy executable headers from a deployed job - #2043

Draft
jianjunwang2 wants to merge 1 commit into
mainfrom
feat/is-access-policy-executable-headers
Draft

jianjunwang2 wants to merge 1 commit into
mainfrom
feat/is-access-policy-executable-headers

Conversation

@jianjunwang2

Copy link
Copy Markdown

What and why

Integration Service (IS) applies its access policies to the automation that makes a call. The Element Service (udon) reads the automation from two headers: x-uipath-is-executable-type and x-uipath-is-executable-id. Maestro and API Workflow already send them. agents-api sends them for the old Temporal runtime.

In prd, almost all low-code agents run on the unified runtime. The agent runs as an Orchestrator job on a serverless robot, and this SDK calls IS directly with the job token. The SDK sends x-uipath-job-id and x-uipath-folderkey, but not the executable headers. So udon treats each agent tool call as "not governed", and no access policy applies.

This PR makes the SDK send the two headers from a deployed job:

  • invoke_activity, invoke_activity_async, execute_activity and execute_http send x-uipath-is-executable-type: Agent and x-uipath-is-executable-id: <process key>. The process key is UIPATH_PROCESS_UUID, sent in the canonical GUID form.
  • The SDK sends both headers or neither. It sends them only when the run has a job key, is not a debug run (resolve_execution_type()), and has a GUID process key. A local run or a debug run sends no headers, as Maestro and agents-api do.
  • The values come only from the job's environment. An activity input can no longer set or replace these two headers, in any letter case. A vendor header of execute_http still goes to the vendor in the proxy body.
  • Bumps uipath-platform to 0.3.24.

Status: draft. The design prefers signed claims in the job token (IdentityServer #12753): Identity signs aut_type and aut_id, so code in the job cannot change them. This PR is the fallback if the claims are late. The design page, "Design: Access Policy for Integration Service" in Confluence (CLD space), has the comparison. Please do not merge before that decision.

Known limit

The SDK cannot see the process type, so it sends Agent for each deployed job that uses it. A coded function (entry point type function) also gets Agent. The token claims do not have this limit, because Orchestrator knows the process type.

How was this tested?

  • 17 new tests in test_connections_service.py and test_connections_execution.py: a deployed job, the async path, the canonical form, a local run, no or a bad process key, a debug run (environment and Orchestrator isDebug), and an activity input that tries to set the headers. 10 of them fail on main. The other 7 check that no header is sent, so they pass on both.
  • uipath-platform: 2914 passed, 8 skipped. uipath: 2928 passed.
  • ruff check, ruff format --check and mypy pass for uipath-platform.
  • In a CETE env, the same change on uipath_platform 0.2.36 ran in the serverless Python robot image. With the two headers, udon asked the AuthZ engine, and allow and deny by agent process key worked (direct API tests with the Agent type). A full agent job on that image has not run yet.
  • The Epixa pre-PR review found no issues.

🤖 Generated with Claude Code

…eployed job

Integration Service applies its access policies to the automation that makes a
call. It reads the automation from x-uipath-is-executable-type and
x-uipath-is-executable-id. A low-code agent on the unified runtime calls
Integration Service through this SDK, so without these headers its tool calls
are not governed.

- invoke_activity, execute_activity and execute_http now send Agent and the
  process key (UIPATH_PROCESS_UUID, in the canonical GUID form) from a
  deployed job.
- The SDK sends both headers or neither. A local run, a debug run, or a job
  without a GUID process key sends no headers, as Maestro and agents-api do.
- An activity input cannot set or replace the two headers, in any letter case.
- Bumps uipath-platform to 0.3.24.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions github-actions Bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-integrations labels Dec 4, 2026
@sonarqubecloud

sonarqubecloud Bot commented Dec 4, 2026

Copy link
Copy Markdown

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:uipath-integrations test:uipath-langchain Triggers tests in the uipath-langchain-python repository

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant