-
Notifications
You must be signed in to change notification settings - Fork 3.9k
okhttp: Per-rpc call option authority verification #11754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
kannanjgithub
merged 48 commits into
grpc:master
from
kannanjgithub:authorityverifyokhttp
Apr 2, 2025
Merged
Changes from all commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
c31995e
In-progress changes for Authority verify in okhttp transport.
kannanjgithub dd95f8f
in-progress changes.
kannanjgithub 4d71cce
commit
kannanjgithub 909b863
Fixes.
kannanjgithub 24500f4
Changes.
kannanjgithub 60bfa06
In progress changes.
kannanjgithub 23a0822
in-progress changes.
kannanjgithub 0a9124c
in-progress changes.
kannanjgithub f9305e7
in-progress changes.
kannanjgithub 4af94ec
in-progress changes.
kannanjgithub ece5487
Merge branch 'grpc:master' into authorityverifyokhttp
kannanjgithub aa59965
Unit tests and using HostnameVerifier in per-rpc.
kannanjgithub 20fa07d
Merge remote-tracking branch 'origin/authorityverifyokhttp' into auth…
kannanjgithub 746717e
Revert unintended changes.
kannanjgithub 0d310b3
Revert unintended changes.
kannanjgithub 3e2ef72
Address review comments.
kannanjgithub 30b1e14
Address review comments.
kannanjgithub f996474
Added flag with default false for the per-rpc authority check and rem…
kannanjgithub f5b3614
Update README etc to reference 1.69.0
kannanjgithub 86b9529
:Revert "Update README etc to reference 1.69.0"
kannanjgithub 60b1ee0
Fix style.
kannanjgithub 89b24f2
Merge branch 'master' into authorityverifyokhttp
kannanjgithub ecbf7b7
Use reflection to access X509ExtendedTrustManager.
kannanjgithub 26a94c9
Merge remote-tracking branch 'origin/master' into authorityverifyokhttp
kannanjgithub ce800f7
Merge remote-tracking branch 'origin/authorityverifyokhttp' into auth…
kannanjgithub 649f53c
Some changes based on similar comments in the authority check for Net…
kannanjgithub 73bb42f
Animal sniffer suppress
kannanjgithub 2af1cca
Ignore animal sniffer errors via annotation in tests.
kannanjgithub fb0e733
Changes to move the authority verification logic to the stream creati…
kannanjgithub a8f696f
fix style
kannanjgithub 49f058d
Fix test
kannanjgithub 2a04f62
style checks.
kannanjgithub 8880733
Review comments
kannanjgithub 0c5f1af
Merge remote-tracking branch 'origin/master' into authorityverifyokhttp
kannanjgithub 671b6a7
Style fixes
kannanjgithub f820297
Review comments
kannanjgithub 53c962f
Review comments
kannanjgithub 5f8ca63
Review comments
kannanjgithub 40dda61
Move the authority verification logic using hostname verifier and tru…
kannanjgithub 1c9c3ac
Fix warning
kannanjgithub 8ff4431
Review comments and fix mistakes
kannanjgithub 0617fd0
Merge branch 'grpc:master' into authorityverifyokhttp
kannanjgithub be92f57
Unwrap line
ejona86 d362406
Remove HostnameVerifier overrides; use common channel creation
ejona86 2d8844c
In test, check session hostname instead of counting
ejona86 52f4a4a
Remove unnecessary uses of FakeX509ExtendedTrustManager
ejona86 8870995
Remove FakeX509ExtendedTrustManager and rename tests
ejona86 594d0ad
Max concurrent stream check should happen after authority verificatio…
kannanjgithub File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
/* | ||
* Copyright 2024 The gRPC Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.grpc.okhttp; | ||
|
||
import java.io.IOException; | ||
import javax.net.ssl.HandshakeCompletedListener; | ||
import javax.net.ssl.SSLSession; | ||
import javax.net.ssl.SSLSocket; | ||
|
||
/** A no-op ssl socket, to facilitate overriding only the required methods in specific | ||
* implementations. | ||
*/ | ||
class NoopSslSocket extends SSLSocket { | ||
@Override | ||
public String[] getSupportedCipherSuites() { | ||
return new String[0]; | ||
} | ||
|
||
@Override | ||
public String[] getEnabledCipherSuites() { | ||
return new String[0]; | ||
} | ||
|
||
@Override | ||
public void setEnabledCipherSuites(String[] suites) { | ||
|
||
} | ||
|
||
@Override | ||
public String[] getSupportedProtocols() { | ||
return new String[0]; | ||
} | ||
|
||
@Override | ||
public String[] getEnabledProtocols() { | ||
return new String[0]; | ||
} | ||
|
||
@Override | ||
public void setEnabledProtocols(String[] protocols) { | ||
|
||
} | ||
|
||
@Override | ||
public SSLSession getSession() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public void addHandshakeCompletedListener(HandshakeCompletedListener listener) { | ||
|
||
} | ||
|
||
@Override | ||
public void removeHandshakeCompletedListener(HandshakeCompletedListener listener) { | ||
|
||
} | ||
|
||
@Override | ||
public void startHandshake() throws IOException { | ||
|
||
} | ||
|
||
@Override | ||
public void setUseClientMode(boolean mode) { | ||
|
||
} | ||
|
||
@Override | ||
public boolean getUseClientMode() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public void setNeedClientAuth(boolean need) { | ||
|
||
} | ||
|
||
@Override | ||
public boolean getNeedClientAuth() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public void setWantClientAuth(boolean want) { | ||
|
||
} | ||
|
||
@Override | ||
public boolean getWantClientAuth() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public void setEnableSessionCreation(boolean flag) { | ||
|
||
} | ||
|
||
@Override | ||
public boolean getEnableSessionCreation() { | ||
return false; | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.