Skip to content

Partnership checks differs between Xml definition and DB definition #595

Description

@davideyeahsure

I've updated our production system to use the DbPartnershipFactory for partnership definition, I've created the database by importing the XML definition with a script. One of our partner has an "encrypt" option specified as "aes-256" ,this has been reported in the db as it was in the xml:

<partnership name="ECCGITEST-to-HMS">
   <sender name="ECCGITEST"/>
   <receiver name="HMS"/>
   <attribute name="protocol" value="as2"/>
   <attribute name="as2_url" value="https://xxxxxx:1443/"/>
   <attribute name="as2_mdn_to" value="team@xxxxx.net"/>
   <attribute name="as2_mdn_options" value="signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, SHA256"/>
   <attribute name="encrypt" value="aes-256"/>
   <attribute name="sign" value="SHA256"/>
</partnership>

In the db is:
select * from partnership_attribute where partnership_id=346;
+------+----------------+-----------+-----------------+-------------------------------------------------------------------------------------------+
| id | partnership_id | category | attribute_name | attribute_value |
+------+----------------+-----------+-----------------+-------------------------------------------------------------------------------------------+
| 2388 | 346 | attribute | as2_mdn_options | signed-receipt-protocol=optional, pkcs7-signature; signed-receipt-micalg=optional, SHA256 |
| 2387 | 346 | attribute | as2_mdn_to | team@xxxxxxnet |
| 2386 | 346 | attribute | as2_url | https://xxxxxx:1443/ |
| 2389 | 346 | attribute | encrypt | aes-256 |
| 2385 | 346 | attribute | protocol | as2 |
| 2390 | 346 | attribute | sign | SHA256 |
| 2391 | 346 | attribute | subject | File $attributes.filename$ sent from $sender.name$ to $receiver.name$ |

Both the XML and the db are loaded with no issues at startup, but when processing an AS2 message, with the xml file it works fine, but with the DB I get the error:

ERROR org.openas2.processor.sender.AS2SenderModule -- Unsupported or invalid algorithm: aes-256
java.security.NoSuchAlgorithmException: Unsupported or invalid algorithm: aes-256

Using AES256 it works.

Is the checking different betwen the two method? And why is not reported as an error during loading of the database?

Davide

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions