-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[fix][test] ProxyWithoutServiceDiscoveryTest should enable authz #20348
[fix][test] ProxyWithoutServiceDiscoveryTest should enable authz #20348
Conversation
@@ -198,10 +196,10 @@ public void testDiscoveryService() throws Exception { | |||
} | |||
|
|||
protected final PulsarClient createPulsarClient(Authentication auth, String lookupUrl) throws Exception { | |||
admin = spy(PulsarAdmin.builder().serviceHttpUrl(brokerUrlTls.toString()).tlsTrustCertsFilePath(TLS_TRUST_CERT_FILE_PATH) | |||
.allowTlsInsecureConnection(true).authentication(auth).build()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove allowTlsInsecureConnection(true)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test is documented as verifying end to end TLS, but this setting disables verification of the TLS certificate, which defeats the purpose of testing TLS.
Codecov Report
@@ Coverage Diff @@
## master #20348 +/- ##
=============================================
+ Coverage 34.55% 72.90% +38.34%
- Complexity 12631 31828 +19197
=============================================
Files 1614 1864 +250
Lines 126234 138281 +12047
Branches 13779 15172 +1393
=============================================
+ Hits 43622 100812 +57190
+ Misses 76999 29455 -47544
- Partials 5613 8014 +2401
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
) (cherry picked from commit 2ebb379)
Motivation
The
ProxyWithoutServiceDiscoveryTest
is documented to verifye2e tls + Authentication + Authorization (client -> proxy -> broker)
. However, the TLS is insecure and authorization is disabled. This PR cleans up that test.Modifications
proxyRoles
so authorization will pass.superUserRoles
because the different certs have different CNs.Verifying this change
The test passes locally and the logs look right.
Documentation
doc-not-needed