Skip to content

gcp_authn: simplify crypto utils#45385

Merged
yanavlasov merged 1 commit into
envoyproxy:mainfrom
antoniovleonti:crypto-util-refactor
Jun 2, 2026
Merged

gcp_authn: simplify crypto utils#45385
yanavlasov merged 1 commit into
envoyproxy:mainfrom
antoniovleonti:crypto-util-refactor

Conversation

@antoniovleonti
Copy link
Copy Markdown
Contributor

@antoniovleonti antoniovleonti commented Jun 2, 2026

Commit Message: gcp_authn: simplify crypto utils
Additional Description:

Previously my understanding was that the gcp authn filter was going to have its own sds config to specify a certificate for generating bound tokens. However, due to incompatibility with grpc, this design was scrapped in favor of just directly the cluster's client certificate.

This makes the job of the crypto util simpler since it no longer needs to resolve SDS config or verify the resulting cert. Instead it trusts that the cluster is configured correctly (otherwise the connection will likely fail anyway--so the token wont matter), so all it needs to do is generate a fingerprint.

The san matching functionality has been removed. The SDS resolution functionality has also been removed. Now it just takes a PEM cert string and returns a fingerprint.

Finally, I put the whole util behind an interface so I can mock it in unit tests.

Risk Level: none (changing unused code)
Testing: unit tests updated
Docs Changes: none needed
Release Notes: none needed

I used generative AI to create this change.

Signed-off-by: antoniovleonti <leonti@google.com>
@repokitteh-read-only
Copy link
Copy Markdown

As a reminder, PRs marked as draft will not be automatically assigned reviewers,
or be handled by maintainer-oncall triage.

Please mark your PR as ready when you want it to be reviewed!

🐱

Caused by: #45385 was opened by antoniovleonti.

see: more, trace.

@antoniovleonti
Copy link
Copy Markdown
Contributor Author

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the GCP authentication filter's crypto utilities by replacing the getBase64EncodedCertificateFingerprint function with a new CertFingerprinter interface and its implementation CertFingerprinterImpl. The new implementation simplifies certificate fingerprinting by extracting it directly from a PEM-formatted string, removing the dependency on TLS certificate providers and Subject Alternative Name (SAN) validation within this utility. Tests and build dependencies have been updated accordingly. There are no review comments to address, and I have no feedback to provide.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

@antoniovleonti antoniovleonti marked this pull request as ready for review June 2, 2026 16:32
@antoniovleonti
Copy link
Copy Markdown
Contributor Author

/assign @tyxia

@antoniovleonti
Copy link
Copy Markdown
Contributor Author

/assign @yanavlasov

@yanavlasov yanavlasov merged commit af5b6f3 into envoyproxy:main Jun 2, 2026
29 checks passed
@antoniovleonti antoniovleonti deleted the crypto-util-refactor branch June 3, 2026 00:23
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.

3 participants