phax / phase4

phase4 - AS4 client and server for integration into existing systems. Specific support for Peppol and CEF eDelivery built-in.
Apache License 2.0
147 stars 48 forks source link

Returning AS4MessageProcessorResult.createFailure() in IAS4ServletMessageProcessorSPI#processAS4UserMessage returns unsinged error message #188

Closed problemzebra2 closed 8 months ago

problemzebra2 commented 10 months ago

Returning AS4MessageProcessorResult.createFailure() in a custom implementation of IAS4ServletMessageProcessorSPI#processAS4UserMessage returns a unsinged error message.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<S12:Envelope xmlns:S12=http://www.w3.org/2003/05/soap-envelope>
    <S12:Header>
        <eb:Messaging xmlns:ds=http://www.w3.org/2000/09/xmldsig#
            xmlns:eb=http://docs.oasis-open.org/ebxml-msg/ebms/v3.0/ns/core/200704/
            xmlns:ebbp=http://docs.oasis-open.org/ebxml-bp/ebbp-signals-2.0
            xmlns:ns2=http://schemas.xmlsoap.org/soap/envelope/
            xmlns:ns3=http://www.w3.org/2003/05/soap-envelope
            xmlns:wsu=http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd
            xmlns:xlink=http://www.w3.org/1999/xlink wsu:Id="xxxxxxxxxxxxxxxxxx">
            <eb:SignalMessage>
                <eb:MessageInfo>
                    <eb:Timestamp>2023-11-03T13:13:01.443+01:00</eb:Timestamp>
                    <eb:MessageId>xxxxxxxxxx</eb:MessageId>
                    <eb:RefToMessageId>xxxxxxxxxxxxxxxxxx</eb:RefToMessageId>
                </eb:MessageInfo>
                <eb:Error category="Processing" errorCode="EBMS:0103" refToMessageInError=xxxxxxxxxxxxxxxxxx severity="failure" shortDescription="PolicyNoncompliance">
                    <eb:Description xml:lang="en">PolicyNoncompliance</eb:Description>
                    <eb:ErrorDetail>The processor determined that the message's security methods, parameters, scope or other security policy-level requirements or agreements were not satisfied.</eb:ErrorDetail>
                </eb:Error>
            </eb:SignalMessage>
        </eb:Messaging>
    </S12:Header>
    <S12:Body/>
</S12:Envelope>

Is this behaviour somehow configurable? Or is this behaviour unexepected and we are doing something wrong in our implementation or Phase4 integration?

phax commented 10 months ago

Nope, currently not. In case of certificate issues, the error might always be unsigned ...

phax commented 8 months ago

This will be part of the 2.7.0 release