Code Monkey home page Code Monkey logo

Comments (14)

phax avatar phax commented on June 5, 2024

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.

phax avatar phax commented on June 5, 2024

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.

phax avatar phax commented on June 5, 2024

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.

patrickvanamstel avatar patrickvanamstel commented on June 5, 2024

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.

patrickvanamstel avatar patrickvanamstel commented on June 5, 2024

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.

phax avatar phax commented on June 5, 2024

If this works and you need a new release, just let me know!

from as2-lib.

patrickvanamstel avatar patrickvanamstel commented on June 5, 2024

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.

patrickvanamstel avatar patrickvanamstel commented on June 5, 2024

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.

phax avatar phax commented on June 5, 2024

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.

phax avatar phax commented on June 5, 2024

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.

patrickvanamstel avatar patrickvanamstel commented on June 5, 2024

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.

phax avatar phax commented on June 5, 2024

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.

patrickvanamstel avatar patrickvanamstel commented on June 5, 2024

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.

phax avatar phax commented on June 5, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.