Skip to content

feat(temporal): add workload identity authentication - #562

Merged
declan-scale merged 4 commits into
mainfrom
declan-scale/temporal-workload-identity-auth
Nov 2, 2026
Merged

declan-scale merged 4 commits into
mainfrom
declan-scale/temporal-workload-identity-auth

Conversation

@declan-scale

@declan-scale declan-scale commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

What

This PR has the same commits as #560, on a branch in this repository instead of a fork.

Add renewable Azure Workload Identity authentication to the ADK Temporal client.

How

TEMPORAL_AUTH_SCOPE opts in. Tokens are acquired and refreshed through Azure Identity. Initial or expired credentials fail closed, while a transient refresh failure keeps the current valid token and retries once after the retry delay. Authenticated in-cluster connections set tls=False so Istio remains the transport-security layer. Explicit TLS configuration and the scope-unset path are unchanged. The change is limited to hand-written code under src/agentex/lib/.

Verification

tests/lib/test_temporal_auth.py passes 10/10. Removing the plaintext TLS guard, reverting the single-retry delay, or dropping the CancelledError cleanup makes the matching test fail.

Cluster impact

None until an agent is released with this ADK version and deployed with TEMPORAL_AUTH_SCOPE.

🤖 Generated with Claude Code

RetriggerView in GreptileConfidence Score: 5/5

The changes since the previous review appear safe to merge.

Summary

Adds opt-in Azure Workload Identity authentication and token renewal for Temporal clients.

  • Temporal clients use renewable Azure tokens when a scope is set.

Reviews (2) · Last reviewed commit: "fix(temporal): close credential when sta..." · Reviewed by Greptile

@socket-security

socket-security Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addedpypi/​azure-identity@​1.27.097100100100100

View full report

asyncio.CancelledError is not an Exception, so a cancelled get_token or
Client.connect skipped credential.close() and left the credential's HTTP
resources open. Catch it with Exception, close the credential, and
re-raise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@declan-scale
declan-scale merged commit 02e58d0 into main Nov 2, 2026
83 of 85 checks passed
@declan-scale
declan-scale deleted the declan-scale/temporal-workload-identity-auth branch November 2, 2026 21:12
@agentex-sdk-release agentex-sdk-release Bot mentioned this pull request Nov 2, 2026
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.

5 participants