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

Rejected messages written out raw #54

Closed
tofu-rocketry opened this issue Jan 23, 2018 · 3 comments
Closed

Rejected messages written out raw #54

tofu-rocketry opened this issue Jan 23, 2018 · 3 comments
Assignees
Labels
Milestone

Comments

@tofu-rocketry
Copy link
Member

When a message is rejected by SSM for having an invalid signer, rather that saving the extracted body to the body part of the dirq schema it writes out the whole raw message to body. See here. This makes it difficult to reload messages rejected by SSM as they are the raw MIME message.

So long as this won't cause other problems, this should be changed. This should be ok as this change seems to have been brought about by the change that allowed the signing errors to propagate up. See here. This gave another path to rejecting a message that didn't just involve an empty raw_msg.

N.B. raw_msg is actually the extracted message body. These variable names could possibly do with swapping as currently the body argument to the function is the more "raw" version.

@tofu-rocketry tofu-rocketry added this to the 2.2.1 milestone Jan 23, 2018
@tofu-rocketry tofu-rocketry self-assigned this Apr 30, 2018
@tofu-rocketry
Copy link
Member Author

tofu-rocketry commented May 9, 2018

Types of SSM rejected message:

  1. Signer not in valid DNs list (has extracted msg, has signer, error says ...not in valid DNs list)
  2. Encrypted with random/expired cert (no extracted msg, no signer, error just says Failed to verify message: Unverified signer)
  3. Cert has expired (appears same as previous, but can see difference in log)
  4. Generally malformed? (not sure if happens or if it would be caught by something else)
  5. Special case: ValueError leading to no message being saved.

I think that it is mainly the first type, with an invalid signer, that it would be useful to write out neatly. The others should possibly still write out the whole message so that as much information as possible is available for debugging purposes.

@gregcorbett
Copy link
Member

N.B. raw_msg is actually the extracted message body. These variable names could possibly do with swapping as currently the body argument to the function is the more "raw" version.

maybe variables like extracted_message_body and received_message_body are more clear? To me, there's an argument for both the extracted body and the received body being the more "raw" version

@tofu-rocketry
Copy link
Member Author

tofu-rocketry commented May 9, 2018

Yeah, I was leaning towards just renaming raw_msg to something like extracted_msg. Might reserve body for the STOMP side as it has a particular meaning there.

Also, do you think my rejected message list is correct?

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

No branches or pull requests

2 participants