Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot exchange encrypted data with some AS2 solutions: missing signature. #5

Closed
chadgates opened this issue May 29, 2019 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@chadgates
Copy link
Contributor

Problem with sending AS2 messages to solution like rssbus.
With rssbus, cannot send messages anymore and error "[2019-05-29T10:35:37] [Error] [ReceiveFile - TestAS2] Error: A signature was expected and not provided." is thrown if signature is mandatory. (LoggingExample.zip)
When requirements for signature is removed, it seems the file is received but the file is the Mime instead of the file. (attachment AS21.zip)

In pyas2, sending as base64 (did not try updated version with binary content), the exchange had no problems.

LoggingExample.zip
AS21.zip

@abhishek-ram
Copy link
Owner

We could give the option of encoding as base64 or binary but first we need to make sure that is the issue. Can you try switching to base 64 and see what happens?

@chadgates
Copy link
Contributor Author

Have "reverted" changes in pyas2lib.as2 and pyas2lib.utils to version 1.0.4 (everything that was "binary"), and messages were processed afterwards correctly by rssbus as well AxWay B2Bi.

Both of these systems could not identify that there was a signature in the the content submitted, so suggest to reimplement non-binary transfer as default and make binary optional in the pyas2lib.

@abhishek-ram
Copy link
Owner

Great, i will make updates to make this configurable at the partner level. But it will be binary that is default as it takes up less space.

@abhishek-ram abhishek-ram added the enhancement New feature or request label Jun 1, 2019
@abhishek-ram abhishek-ram self-assigned this Jun 1, 2019
@chadgates
Copy link
Contributor Author

Have looked into this further and realized it was not a problem with binary particularly, but with the ay pyas2lib is replacing line endings. The testfile has line endings with "\n" only, which ByteGenerator uses by default. However, if the incoming file actually has ”\r\n", then the signature will be invalid causing all kinds of issues.
I am updating the pullrequest on pyas2lib to that will also fix this issues.

@abhishek-ram
Copy link
Owner

@chadgates the signatures were always and still send as base64... Do you mean that encrypted data needs to be sent as base64 instead of binary?

@chadgates
Copy link
Contributor Author

@abhishek-ram : If abhishek-ram/pyas2-lib#9 is accepted/merged , this issue is closed for me. Route cause was not "binary" but the signatures that were not consistently working in version 1.1 .

@abhishek-ram
Copy link
Owner

Handled in v1.1.0. @chadgates we now use the new version of pyas2lib. Thanks for you work on this, the solution is much cleaner now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants