-
Notifications
You must be signed in to change notification settings - Fork 23
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
Error handling fixes #203
Closed
Closed
Error handling fixes #203
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
6e02325
Cacnel ACH transaction fixes
jasonbornsteinMOOV bd59984
return error after failing to read
jasonbornsteinMOOV de1b774
fix flow
jasonbornsteinMOOV 030137b
add test for produce-consume CancelACHFile event
jasonbornsteinMOOV cbcd94a
fix test
jasonbornsteinMOOV 4598ce8
fix test
jasonbornsteinMOOV 4b57503
fix test
jasonbornsteinMOOV cb4d6a6
Add test coverage
jasonbornsteinMOOV File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if this is going to be a workaround or a hack to get past where the event used in cancelling a transfer comes in without needing to be decrypted, or if this is going to be a permanent solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like there are different event types for ACHFile and CancelACHFile. Wouldn't it be better to check the type, and not trying to decrypt CancelACHFile events. That way true decryption errors could fail as they should. You could just move the decryption down to line 307 or 315.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could try to check the event type. it would require reading first (to get the event type), possibly failing because it needs to be revealed, an(d then reading again). but it shouldn't depend on the event type. it should just be that what we got was either encrypted or it wasn't, and we have to either reveal it or read it first to find out.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, I did not notice that. If we need to get something working soon, I am ok with this approach. However, I think that we should create a ticket to fix this in a better way. It looks to me like the achgateway can receive events over http and over kafka. The kafka events come from ach-orchestrator and are encrypted, the http events are in the clear. After receiving the event, they are passed to code that processes both types and trys to decrypt them. The decryption always fails for the events received over http.
The decryption should be moved into the kafka specific components (configurable) so that decrypted events get delivered to the common code in all cases. This would fix the achgateway correctly in all cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, I did not notice that. If we need to get something working soon, I am ok with this approach. However, I think that we should create a ticket to fix this in a better way. It looks to me like the achgateway can receive events over http and over kafka. The kafka events come from ach-orchestrator and are encrypted, the http events are in the clear. After receiving the event, they are passed to code that processes both types and trys to decrypt them. The decryption always fails for the events received over http.
The decryption should be moved into the kafka specific components (configurable) so that decrypted events get delivered to the common code in all cases. This would fix the achgateway correctly in all cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's a good point. Can you raise a Linear card for that change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://linear.app/moov/issue/BNK-388/[achgateway]-move-decryption-into-kafka-component-to-fix-http-channel