Skip to content
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

Add java.net.http.HttpClientHttpSigV4Signer #21

Open
magutierrm opened this issue Aug 14, 2023 · 3 comments
Open

Add java.net.http.HttpClientHttpSigV4Signer #21

magutierrm opened this issue Aug 14, 2023 · 3 comments

Comments

@magutierrm
Copy link

Hello,
Ever since Apache Jena SPARQL version 4.2.0, the default HttpClient in use has been java.net.http.HttpClient. However, there is currently no implementation of a Signer available for this specific HTTP client. Are there any plans on your end to provide support for it?
Thank you in advance.

See https://jena.apache.org/documentation/sparql-apis/

@MuhdSayeed
Copy link

Any updates ? :)

@Cameronjmayfield
Copy link

Looking for this as well.

spmallette added a commit that referenced this issue Aug 9, 2024
In support of #21 which is requesting a bump to the Jena version. Bumps to Java 11 as a minimum.
@spmallette
Copy link
Contributor

i spent a bit of time on this today thinking it would be relatively easy to do, but it didn't turn out the way. the progress went like this:

  • still building to jdk8 technically, so we'd have to make the decision to go to java11. trie a multi-release project to support 8 and 11+ and it might not be the right use case for this since the changes would require API level differences to work and that doesn't make sense really. also ran into problems with build tooling still not fully supporting the multi-release project style (particularly surefire).
  • certain test common to the test suite didn't make sense for Java HTTP and how it works...took a while to figure out what to do with those since i wasn't wholly familiar with this library.
  • unlike other http libraries, java HttpRequest is immutable, so the standard approach to modifying an existing request, which this whole library is based on, becomes problematic.
  • while looking at that issue, i realized that there's no interceptor for the Java 'HttpClient' so you can't modify requests given to it. For this to work with Jena's RDFConnectionRemoteBuilder i guess we'd have to extend the HttpClient to do any sort of manipulation of the request.

anyway, i need to step away from this for a bit and the change probably needs soem feedback, but it's a step in the direction to getting the Jena dependency upgraded. here's the branch that i've simplified to just use java 11: https://github.com/aws/amazon-neptune-sigv4-signer/compare/stepmall-java-http

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants