Skip to content

credentials/alts: avoid SRV and TXT lookups for handshaker service#7861

Merged
dfawley merged 4 commits intogrpc:masterfrom
townba:avoid-cloud-dns-timeout
Nov 22, 2024
Merged

credentials/alts: avoid SRV and TXT lookups for handshaker service#7861
dfawley merged 4 commits intogrpc:masterfrom
townba:avoid-cloud-dns-timeout

Conversation

@townba
Copy link
Copy Markdown
Contributor

@townba townba commented Nov 20, 2024

When dialing the handshake service, disable the service config to ignore any provided by the resolver.

When doing a DNS resolver lookup, don't do an SRV record lookup for the metadata service.

This is a similar approach implemented in grpc/grpc-java#9897.

RELEASE NOTES: none

@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.92%. Comparing base (66385b2) to head (7d7352a).
Report is 14 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7861      +/-   ##
==========================================
+ Coverage   81.84%   81.92%   +0.07%     
==========================================
  Files         374      375       +1     
  Lines       37993    37982      -11     
==========================================
+ Hits        31096    31115      +19     
+ Misses       5598     5567      -31     
- Partials     1299     1300       +1     
Files with missing lines Coverage Δ
...ntials/alts/internal/handshaker/service/service.go 69.23% <100.00%> (+2.56%) ⬆️
internal/resolver/dns/dns_resolver.go 89.47% <100.00%> (+0.07%) ⬆️

... and 31 files with indirect coverage changes

---- 🚨 Try these New Features:

Copy link
Copy Markdown
Member

@dfawley dfawley left a comment

Choose a reason for hiding this comment

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

Please add comments in both places explaining why we're doing these things. Otherwise LGTM, thanks.

@townba
Copy link
Copy Markdown
Contributor Author

townba commented Nov 21, 2024

PTAL

@dfawley dfawley changed the title credentials/alts/internal/handshaker: avoid looking up SRV and TXT records for handshaker service credentials/alts: avoid SRV and TXT lookups for handshaker service Nov 22, 2024
@dfawley dfawley added this to the 1.69 Release milestone Nov 22, 2024
@dfawley dfawley merged commit 93f1cc1 into grpc:master Nov 22, 2024
1 check passed
dfawley pushed a commit to dfawley/grpc-go that referenced this pull request Nov 25, 2024
purnesh42H pushed a commit that referenced this pull request Nov 26, 2024
…7861) (#7873)

Co-authored-by: Brad Town <townba@users.noreply.github.com>
dfawley pushed a commit to dfawley/grpc-go that referenced this pull request Nov 26, 2024
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators May 25, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants