Repository navigation
feat(auth): support federated credentials (OIDC client assertion) - #1953
radu-mocanu wants to merge 1 commit into
Conversation
a93c92c to
15c0584
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Incomplete CLI credentials select interactive authentication, and sample scopes and workflow triggers conflict with the documented setup.
3 open issues
What changed in this PR
Adds OIDC federated authentication to the UiPath SDK and CLI, enabling CI pipelines to authenticate without stored client secrets.
Changes:
- Supports JWT client assertions across CLI, SDK, and Identity services.
- Adds authentication tests and a GitHub Actions sample.
- Updates package versions and dependency requirements.
| File | Description |
|---|---|
| packages/uipath/uv.lock | Updates locked package versions. |
| packages/uipath/tests/cli/test_auth.py | Tests assertion-based CLI login. |
| packages/uipath/src/uipath/_cli/cli_auth.py | Adds assertion option and environment variable. |
| packages/uipath/src/uipath/_cli/_auth/_auth_service.py | Routes assertions through client credentials authentication. |
| packages/uipath/samples/federated-credentials-ci/tests/test_orchestrator.py | Demonstrates authenticated Orchestrator access. |
| packages/uipath/samples/federated-credentials-ci/README.md | Documents federated authentication setup. |
| packages/uipath/samples/federated-credentials-ci/pyproject.toml | Defines sample dependencies. |
| packages/uipath/samples/federated-credentials-ci/github-workflow.yml | Demonstrates GitHub Actions OIDC login. |
| packages/uipath/pyproject.toml | Bumps SDK version and platform requirement. |
| packages/uipath-platform/uv.lock | Updates platform version. |
| packages/uipath-platform/tests/test_uipath_client_credentials.py | Tests SDK credential handling. |
| packages/uipath-platform/tests/services/test_identity_service.py | Tests assertion payloads and validation. |
| packages/uipath-platform/tests/services/test_external_application_service.py | Updates delegation expectations. |
| packages/uipath-platform/src/uipath/platform/identity/_identity_service.py | Builds JWT assertion token requests. |
| packages/uipath-platform/src/uipath/platform/external_applications/_external_application_service.py | Forwards assertions to Identity. |
| packages/uipath-platform/src/uipath/platform/_uipath.py | Accepts and validates SDK assertions. |
| packages/uipath-platform/pyproject.toml | Bumps platform version. |
Review effort: Balanced
| UiPath( | ||
| base_url=os.environ["UIPATH_URL"], | ||
| client_id=os.environ["UIPATH_CLIENT_ID"], | ||
| client_assertion=os.environ["UIPATH_CLIENT_ASSERTION"], |
|
|
||
| async def authenticate(self) -> None: | ||
| if self._client_id and self._client_secret: | ||
| if self._client_id and (self._client_secret or self._client_assertion): |
54876ef to
2f58979
Compare
|
2f58979 to
697b2a0
Compare
🚨 Heads up:
|
🚨 Heads up:
|




Summary
uipath auth --client-id ... --client-assertion <oidc-token>logs in with an OIDC token from the CI provider instead of a client secret (also read fromUIPATH_CLIENT_ASSERTION)UiPath(client_id=..., client_assertion=...)does the same from code, e.g. in tests that call Orchestratoruip login --client-assertionmakesfederated-credentials-cisample with a GitHub Actions workflowWhy
Fixes #1944. CI pipelines had to store a long-lived client secret to use the SDK.