OxalisCommunity / oxalis

Oxalis - PEPPOL Access Point open source implementation - Core component
Other
119 stars 89 forks source link

DK ERST Nemhandel eDelivery: Expand transport profiles detection with a filtering by modes #623

Closed dladlk closed 7 months ago

dladlk commented 1 year ago

In May 2023 Danish digitization organization ERST released a first version of the Oxalis customization, modified to be used as a reference implementation of the new Nemhandel standard, based on eDelivery and AS4. It supposes to use a custom transport profile and custom certification authority (MitID-based). In the reference implementation it is done so that Oxalis on the start basing on configured certificate can detect, that it works in "NEMHANDEL" mode - and use another transport profile for lookups. But this change was implemented in a "forked" version of Oxalis only - although it looks like it has sense to integrate it to mainstream branch here e.g. to avoid future needs to introduce FRTEST modes to be hardcoded in Mode.java of peppol-mode project.

The change is very simple and local - also as covered by unit tests, implemented by ERST in their Oxalis copy.

Modified classes: https://rep.erst.dk/git/openebusiness/nemhandeledelivery/oxalis/-/blob/51b4dff8b9ed9d69d72b3ecbbcaf5aaf846eafcb/oxalis-outbound/src/main/java/network/oxalis/outbound/transmission/MessageSenderFactory.java#L79

https://rep.erst.dk/git/openebusiness/nemhandeledelivery/oxalis/-/blob/51b4dff8b9ed9d69d72b3ecbbcaf5aaf846eafcb/oxalis-outbound/src/test/java/network/oxalis/outbound/transmission/MessageSenderFactoryTest.java#L59

Example of configuration can be found in modified reference.conf in tests.

All what is changed - it is possible to configure list of modes on transport definition:

defaults.transport.foo_mode_transport = {
    profile: foo-mode-transport
    sender: invalid
    weight: 0
    modes: [foo, foo_test]
}

defaults.transport.dummy_mode_transport = {
    profile: dummy-mode-transport
    sender: invalid
    weight: -1
    modes: [DUMMY]
}

There are several other changes in ERST Oxalis, which have sense to incorporate into main Oxalis branch.

dladlk commented 1 year ago

Other DK ERST Nemhandel eDelivery related ticket: https://github.com/OxalisCommunity/Oxalis-AS4/issues/206

aaron-kumar commented 7 months ago

Closing this as it will taken care of as part of EPIC: https://github.com/OxalisCommunity/Oxalis-Public-Roadmap/issues/23