Comments (14)
Well there is currently no nice way to do it.
The question is, at what level do you want to specify the proxy.
Is the AS2Session instance a suitable place?
from as2-lib.
And should there be a difference between proxies for outbound messages and asynchronous MDNs (even if asyn MDNs are not used in PEPPOL)?
from as2-lib.
I just added support for setting the HTTP proxy in the AS2Session. This proxy is than used for AS2 message sending as well as for async MDN sending. hth
from as2-lib.
Philip,
I am investigating using this library instead of my customized Oxalis
implementation.
At our company we connect to many different endpoints with a lot of
different protocols.
Furthermore we need to communicate in our DMZ and to the outside world.
So for each connection we must be able to set the proxy used.
I hope this answers your question.
Greatings from Holland,
Patrick
On 06/10/2015 12:03 PM, Philip Helger wrote:
And should there be a difference between proxies for outbound messages
and asynchronous MDNs (even if asyn MDNs are not used in PEPPOL)?—
Reply to this email directly or view it on GitHub
#1 (comment).
from as2-lib.
Thx
On 06/10/2015 12:23 PM, Philip Helger wrote:
I just added support for setting the HTTP proxy in the AS2Session.
This proxy is than used for AS2 message sending as well as for async
MDN sending. hth—
Reply to this email directly or view it on GitHub
#1 (comment).
from as2-lib.
If this works and you need a new release, just let me know!
from as2-lib.
I will let you know.
I'm now going to test the implementation.
2 Tests:
- Test against the Austrian Peppol
- Test agains the Dutch SimplerInvoicing test tool
Regards
Patrick
On 06/10/2015 01:10 PM, Philip Helger wrote:
If this works and you need a new release, just let me know!
—
Reply to this email directly or view it on GitHub
#1 (comment).
from as2-lib.
Maybe you know the answer to this question
For the Dutch Peppol implementation (SimplerInvoicing) i have tu used
the ECryptoAlgorithm.DIGEST_SHA1 setting.
e.g.
aSettings.setPartnershipName (aSettings.getSenderAS2ID () + "_" +
aSettings.getReceiverAS2ID ());
aSettings.setMDNOptions (new DispositionOptions ().setMICAlg
(ECryptoAlgorithm.DIGEST_SHA1)
.setMICAlgImportance (DispositionOptions.IMPORTANCE_REQUIRED)
.setProtocol
(DispositionOptions.PROTOCOL_PKCS7_SIGNATURE)
.setProtocolImportance (DispositionOptions.IMPORTANCE_REQUIRED));
Is there am elegant way of a fallback mechanism to a less secure SHA
algoritm from the default SHA512.
P.S.
I did not test the new proxy addition, but sending without a proxy does
work to the Austrian Government
and to the Oxalis implementation of the Dutch TestTool.
Regards,
Patrick
On 06/10/2015 01:10 PM, Philip Helger wrote:
If this works and you need a new release, just let me know!
—
Reply to this email directly or view it on GitHub
#1 (comment).
from as2-lib.
According to the AS2 RFC, only MD5 and SHA1 are the MUST supported ones.
To use a fallback, use the DispositionOptions.setMICAlg
with a String, where each element is separated by a comma (like "sha1,md5").
See the RFC at https://www.ietf.org/rfc/rfc4130.txt and start reading at page 21 (you can search for "Disposition-Notification-Options"):
The "signed-receipt-micalg" parameter is a list of MIC algorithms
preferred by the requester for use in signing the returned
receipt. The list of MIC algorithms SHOULD be honored by the
recipient from left to right.
Unfortunately as2-lib does NOT yet honour the MIC algorithm list when receiving stuff.
from as2-lib.
I just extended the DispositionOptions
class so that it can handle multiple MIC algorithms.
(Because of a certain incompatibility the version of the project was changed to 1.1.0-SNAPSHOT)
from as2-lib.
Philip,
The solution of setting the proxy on the AS2Session works great for me.
Just a little feedback in making the proxy consitent.
The AS2session needs a java.net.Proxy.
The SMPClientReadonly needs a org.apache.http.HttpHost
I would change the code to setting the proxy with the HttpHost object.
When you see a change of releasing the all the changes that would be great.
thanks a lot
Patrick van Amstel
On 06/10/2015 01:10 PM, Philip Helger wrote:
If this works and you need a new release, just let me know!
—
Reply to this email directly or view it on GitHub
#1 (comment).
from as2-lib.
Hi!
As2-lib (unfortunately) still relies on the default Java HttpUrlConnection whereas smp-client already uses Apache http-client.
It is on my agenda to switch as2-lib also to http-client. If I would do this know, would you be willing to test this directly?
Than the proxy would also be consistent.
Thanks, Philip
from as2-lib.
That sounds like work.
I have a wrapper sender service that does the translation inside.
For me changing the Proxy to HttpHost is not important.
A release is ;)
Patrick
On 06/12/2015 08:52 AM, Philip Helger wrote:
Hi!
As2-lib (unfortunately) still relies on the default Java
HttpUrlConnection whereas smp-client already uses Apache http-client.
It is on my agenda to switch as2-lib also to http-client. If I would
do this know, would you be willing to test this directly?
Than the proxy would also be consistent.
Thanks, Philip—
Reply to this email directly or view it on GitHub
#1 (comment).
from as2-lib.
Hi Patrick!
Version 1.1.0 is on its way to Maven central and should be visible there within the next half hour.
Next steps will be to upgrade to http client in 1.2.0 :)
Have a nice WE!
from as2-lib.
Related Issues (20)
- Performance issues in AS2 servlet when transferring files HOT 2
- unable to send file to AS2 server from AS2-LIB HOT 5
- getting started HOT 9
- Can AS2DirectoryPollingModule run with as2-lib-spring-demo HOT 7
- Disposition isn't correct when using servlet HOT 14
- "Invalid HTTP Request" Error with Servlet-based Demo-Web-App HOT 8
- java.lang.IllegalStateException: unable to create shared stream: java.io.FileNotFoundException: /tmp/as2-lib-res-16551011638687829143.tmp (No such file or directory) HOT 7
- Spring boot: possible to make custom handler a spring managed bean? HOT 3
- partnership attribute: remove_cms_algorithm_protection_attrib HOT 2
- Error receiving from chunked transfer encoding HOT 11
- MIC calculation on outgoing AS2 is incorrect when using compress before signing HOT 9
- Question : Does AS2 includes standard HTTP headers and custom generated headers for communication between 2 systems interacting using AS2 protocol. HOT 1
- Cant' send files to distant client using "MainSendToMendelsonTestServer.java" HOT 2
- Trying to use RSASSA_PKCS1_V1_5_WITH_SHA3_256 signing alg results in IllegalArgumentException: Unknown signature type requested: RSASSAPSS HOT 13
- latest certificates from keystore is not fetching when service is running HOT 2
- Advice on creating documentation HOT 7
- Can't work with AS2 version 5.0 with bc-fips HOT 4
- NoClassDefFoundError: javax/mail/internet/MimeBodyPart HOT 2
- Private Key is Null for public key HOT 4
- bcMail temporary files not deleted when compression is used (as2-lib 5.1.2)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from as2-lib.