Repository navigation
feat(connections): send the access policy executable headers from a deployed job - #2043
Draft
jianjunwang2 wants to merge 1 commit into
Draft
jianjunwang2 wants to merge 1 commit into
jianjunwang2 wants to merge 1 commit into
Conversation
…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]>
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



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-typeandx-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-idandx-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_activityandexecute_httpsendx-uipath-is-executable-type: Agentandx-uipath-is-executable-id: <process key>. The process key isUIPATH_PROCESS_UUID, sent in the canonical GUID form.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.execute_httpstill goes to the vendor in the proxy body.uipath-platformto 0.3.24.Status: draft. The design prefers signed claims in the job token (IdentityServer #12753): Identity signs
aut_typeandaut_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
Agentfor each deployed job that uses it. A coded function (entry point typefunction) also getsAgent. The token claims do not have this limit, because Orchestrator knows the process type.How was this tested?
test_connections_service.pyandtest_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 OrchestratorisDebug), and an activity input that tries to set the headers. 10 of them fail onmain. 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 --checkandmypypass foruipath-platform.uipath_platform0.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 theAgenttype). A full agent job on that image has not run yet.🤖 Generated with Claude Code