Skip to content

Conversation

@agrawalradhika-cell
Copy link
Contributor

@agrawalradhika-cell agrawalradhika-cell commented Oct 16, 2025

feat: Add retry logic when certificate mismatch for existing credentials & Agent Identity workloads

This change introduces retry support when requests are created for existing credentials and Agent Identities on GKE and Cloud Run Workloads. When 401(Unauthorized) error is created, due to certificate at time of configuration of mTLS channel being different from the current certificate, a retry is added to the request by configuring the mTLS channel with the current certificate.

@agrawalradhika-cell agrawalradhika-cell changed the title Cert rotation x509 feat: Add retry logic when certificate mismatch for Agent Identity Oct 16, 2025
@agrawalradhika-cell agrawalradhika-cell marked this pull request as ready for review October 17, 2025 01:17
@agrawalradhika-cell agrawalradhika-cell requested review from a team as code owners October 17, 2025 01:17
@agrawalradhika-cell agrawalradhika-cell marked this pull request as draft October 17, 2025 01:17
@agrawalradhika-cell agrawalradhika-cell marked this pull request as ready for review October 17, 2025 19:54
@lsirac
Copy link
Contributor

lsirac commented Oct 18, 2025

Is the description accurate? This will apply to existing X509 workloads too?

@agrawalradhika-cell agrawalradhika-cell changed the title feat: Add retry logic when certificate mismatch for Agent Identity feat: Add retry logic when certificate mismatch for existing credentials & Agent Identity workloads Oct 20, 2025
@agrawalradhika-cell
Copy link
Contributor Author

Is the description accurate? This will apply to existing X509 workloads too?

Updated the description

@@ -0,0 +1,188 @@
# Copyright 2025 Google LLC
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leaving a comment here so we won't forget to wait for the PR #1821 to merge first and do a rebase to ensure we don't have duplicated or conflicting code.

@nbayati nbayati added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Oct 28, 2025
sai-sunder-s
sai-sunder-s previously approved these changes Oct 30, 2025
Copy link
Collaborator

@daniel-sanche daniel-sanche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let a few small comments, but nothing major. I avoided _agent_identity_utils entirely because of conflicts with #1821

I'll take another look when #1821 is merged

@daniel-sanche
Copy link
Collaborator

My main points are to add the raise from, and mark that public accessor as internal if we can. My other comments are suggestions, but non-blocking

The main blocker left is getting the tests to pass

@agrawalradhika-cell agrawalradhika-cell self-assigned this Dec 10, 2025
@nbayati nbayati changed the base branch from main to agent_identity_staging December 11, 2025 19:42
This change introduces retry support when requests are created for AgentIdentities on GKE and Cloud Run Workloads.

Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>
…ion and request

Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>
… from mTLS configuration

Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>
Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>
Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>
Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>
Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>
Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>
Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>
Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>
Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>
Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>
… and fix the test mock

Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>
Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>
@nbayati nbayati removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Dec 11, 2025
@daniel-sanche daniel-sanche added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 15, 2025
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Dec 15, 2025
@daniel-sanche daniel-sanche merged commit 8a9cb7b into googleapis:agent_identity_staging Dec 15, 2025
5 checks passed
daniel-sanche added a commit that referenced this pull request Dec 15, 2025
…ate mismatches with retries (#1890)

This PR includes adding changes which are for - 
- Adding support for Agent Identity bound tokens which will be used for
Agent Identity
(#1821)
- Adding the retry logic when certificates mismatch for credentials used
for Agent Identities on GKE and Cloud Run Workloads.
(#1841)

---------

Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>
Co-authored-by: nbayati <99771966+nbayati@users.noreply.github.com>
Co-authored-by: Andy Zhao <andyzhao@google.com>
Co-authored-by: Daniel Sanche <d.sanche14@gmail.com>
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.

7 participants