-
Notifications
You must be signed in to change notification settings - Fork 16
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
Apache channel supports proxy credentials #383
Conversation
Generate changelog in
|
@@ -97,4 +128,64 @@ private static URL url(String uri) { | |||
throw new SafeIllegalArgumentException("Failed to parse URL", e); | |||
} | |||
} | |||
|
|||
private enum NullCredentialsProvider implements CredentialsProvider { |
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.
oh my boilerplate. Why do we need to provide null implementations?
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.
I want to avoid dealing with credentials in all possible cases so we don't have to deal with folks getting used to client-specific behavior.
When proxy credentials are provided I want to make sure they can only be used by proxies by disabling the target auth impl, and all schemes except basic to match okhttp.
.setProxyAuthenticationStrategy(NullAuthenticationStrategy.INSTANCE) | ||
.setDefaultAuthSchemeRegistry( | ||
RegistryBuilder.<AuthSchemeProvider>create().build()); | ||
conf.proxyCredentials().ifPresent(credentials -> builder.setDefaultCredentialsProvider( |
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.
could you add {}
I think it makes it much more readable
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.
ack
|
||
protected static final UserAgent AGENT = UserAgent.of(UserAgent.Agent.of("test", "0.0.1")); | ||
private static final SslConfiguration SSL_CONFIG = SslConfiguration.of( | ||
Paths.get("../dialogue-client-test-lib/src/main/resources/trustStore.jks"), |
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.
these paths seem a little off
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.
I'd like to reuse this config in other tests too, but avoided modifying them here. It's a bit odd, but it would allow us to check in a single ssl config with our abstract tests and reuse it in all client implementations. We have a lot of boilerplate to implement a test.
👍 |
==COMMIT_MSG==
Apache channel supports proxy credentials
==COMMIT_MSG==
mesh proxy is still a todo.