-
Notifications
You must be signed in to change notification settings - Fork 311
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 HttpClient 5.0 followup #1357
Conversation
caused by #1164 |
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.
We aren't adopting this plugin. Essentially, I am using https://github.com/spring-projects/spring-data-build/tree/main/etc/ide as the basis for any/all polishing going forwarda.
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.
On top of the specific comments, in general we try to keep polishing commits separate from actual coded commits. It makes it easier to sort through real changes while still making format changes that meets our standards.
pom.xml
Outdated
<groupId>io.spring.javaformat</groupId> | ||
<artifactId>spring-javaformat-maven-plugin</artifactId> | ||
<version>0.0.38</version> | ||
</plugin> |
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.
We aren't adopting this plugin. Essentially, I am using https://github.com/spring-projects/spring-data-build/tree/main/etc/ide as the basis for any/all polishing going forward.
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.
No offense, I just accidentally committed the pom ...
...s-core/src/main/java/org/springframework/ws/transport/http/HttpComponents5MessageSender.java
Show resolved
Hide resolved
...s-core/src/main/java/org/springframework/ws/transport/http/HttpComponents5MessageSender.java
Outdated
Show resolved
Hide resolved
I would favor this approach. If we can make security a separate task, I think that would simplify this part. |
This reverts commit 1c7d2de.
How to proceed? Should we supply/sketch an Interceptor as a documentation snippet? Oder provide actual Code?
|
Instead of coming up with something more to maintain, I'd rather point them toward https://docs.spring.io/spring-ws/docs/current/reference/html/#security-wss4j-security-interceptor as well as https://github.com/spring-projects/spring-ws-samples/blob/main/airline/client/spring-ws/src/main/java/org/springframework/ws/samples/airline/client/sws/WsConfiguration.java#L51, an example we already maintain, that illustrates how to secure things using Wss4j. (And...I'd rather use existing interceptors so we don't hand roll it). |
Full blown Wss is a different kind of story IMO. I was thinking about this section in the client documentation: how to use Apache HfttpClient to authenticate with HTTP authentication. This might no longer work as documented using HttpClient 5. So unfortunately spring-ws would loose the ability to do simple http basic auth. If you don't want to add new code, let's just add a snippet to the documentation or add it to some example project or even release notes. |
I just checked the AuthScope source code and api doc. Another possibility would be to set the default AuthScope in |
This reverts commit 76ea687.
My last commit redefines AuthScope.ANY in |
I like that approach over simply using a Only thing I'd suggest is including a little extra in the JavaDocs explaining that HttpClient dropped |
Regarding docs, I think a simple example of using it for Basic Auth in the client-side is fine. |
I pushed a draft. |
Thanks @cachescrubber. I squashed your changes, polished, and merged to |
* The clientFactory could be null, so this must be handled. * AuthScope.ANY no longer exists, so we need a suitable value object to take its place. * Polish documentation and javadocs to support the community. Resolves spring-projects#1357.
@gregturn Thanks for the quick merge of #1356. There are some issued we need to address. I already spotted a Bug in
HttpComponents5MessageSender#afterPropertiesSet
. This is fixed in this MR.In my original MR I noted incompatibilities in the HttpClient Api regarding configuring Authentication on the HttpClient.
Previously, AuthScope has been
AuthScope.ANY
which is removed in httpclient 5.x. So basically this way to configure preemptive http authentication will no longer work as before (or at all, not sure). At least I updated the Javadoc to reflect the change.Another Idea would be to remove credentials and authScope altogether and guide users to handle authentication in a client interceptor. WDYT?