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

SNS Message Manager #1302

Open
zoewangg opened this issue Jun 20, 2019 · 24 comments
Open

SNS Message Manager #1302

zoewangg opened this issue Jun 20, 2019 · 24 comments
Labels
1.x Parity feature-request A feature should be added or improved. p1 This is a high priority issue

Comments

@zoewangg
Copy link
Contributor

This issue tracks the 2.x implementation of equivalent functionality to the 1.11.x SnsMessageManager

@zoewangg zoewangg added 1.x Parity feature-request A feature should be added or improved. labels Jun 20, 2019
@millems millems changed the title Support SnsMessageManager SNS Message Manager Jul 8, 2019
@henricook
Copy link

I wanted to use a library to validate incoming SNS messages (notifications received from an SES ConfigurationSet) and had to use v1 because of the lack of Message Manager. As i'm on a Scala project after validating i just parse it off into a case class and don't really make use of the rest of the library.

If it sounds like i've done the right thing for now, great and 👍 for future V2 integration of a validator of some sort. If you think i could have done the validation with V2 please do let me know!

@debora-ito
Copy link
Member

Request from Java SDK v1:

A way to access the optional Message Attributes in the SnsMessage.

@debora-ito
Copy link
Member

Request from Java SDK v1:

Ability to set a custom httpClient, so I can set proxy config.

For more context: aws/aws-sdk-java#2710

@Saberos
Copy link

Saberos commented Feb 28, 2022

Any chance to also resolve this issue in the SDK v2 implementation: aws/aws-sdk-net#1104?

Just ran into the same issue in the Java SDK v1 implementation. SNS->Lambda contains field SignatureCertUrl (docs) while SignatureChecker expects SignatureCertURL.

@lpellegr
Copy link

3 years after the initial report there is still no equivalent for a basic security check that I guess most SNS users should make...

@ryanthon
Copy link

ryanthon commented Oct 5, 2022

Is there any update on implementing this?

@yasminetalby yasminetalby added the p1 This is a high priority issue label Nov 12, 2022
@henricook
Copy link

henricook commented Feb 7, 2023

Three years on and I'm still using V1 as in my original comment. If you want to provide a migration path off using SnsMessageManager instead of migrating it to V2 in code that could also be helpful

@kazaff
Copy link

kazaff commented Feb 20, 2023

Can't believe this problom is still existing.
How can I verify the sns message by spring-cloud-aws-sns?
Does anyone solve this issue?

@kazaff
Copy link

kazaff commented Feb 20, 2023

Three years on and I'm still using V1 as in my original comment. If you want to provide a migration path off using SnsMessageManager instead of migrating it to V2 in code that could also be helpful

Hi @henricook , I wonder that how you can still using V1? I mean the SNS service had been updated, but you can still use Public Key method to verfiy message? I have try to create a new topic and found that no where to get the public key ...

@henricook
Copy link

  private val messageManager = new SnsMessageManager(Regions.EU_WEST_1.getName)

  def parseMessage(messageBody: InputStream): Try[Unit] = Try(messageManager.parseMessage(messageBody))

Takes care of everything for you 🤷🏻 - this is what you can't do in V2 (it seems) currently

@kazaff
Copy link

kazaff commented Feb 20, 2023

  private val messageManager = new SnsMessageManager(Regions.EU_WEST_1.getName)

  def parseMessage(messageBody: InputStream): Try[Unit] = Try(messageManager.parseMessage(messageBody))

Takes care of everything for you 🤷🏻 - this is what you can't do in V2 (it seems) currently

Sorry, I can't understand your code... it's scala?
I want make sure that you mixed use V1 (only for verification) and V2 (for rest of stuff) in your project?
As far as I know, V1 verifies the message by Public Key, but this method don't support V2(at least I can't find the Public Key signature or something like that on V2 documents)..

@henricook
Copy link

henricook commented Feb 20, 2023

No, i'm only using V1 in my project. I'm blocked from using V2 because I want the ability to verify received messages from SES/SNS-JSON-HTTP callbacks using the library, like I do in V1 with SnsMessageManager.

@kazaff
Copy link

kazaff commented Feb 20, 2023

No, i'm only using V1 in my project. I'm blocked from using V2 because I want the ability to verify received messages from SES/SNS-JSON-HTTP callbacks using the library, like I do in V1 with SnsMessageManager.

oh.. Got it. Thank you for your help, my bro.

@kazaff
Copy link

kazaff commented Feb 22, 2023

I have pushed some code to spring-cloud-aws(awspring/spring-cloud-aws#684) which base on V2.
It can verify the message by sns signingCertUrl.

Hope will help you guys.

@sindhu-cbs
Copy link

Hi All, any update on this issue? I'm using v1 for parseMessage() in SnsMessageManager.java. Is there an equivalent method in v2 to validate the authenticity of an incoming SNS message?

@StephanWels
Copy link

@sindhu-cbs - same here! Can't find the equivalent in v2. Guess we haver to stick to v1 for now?

@henricook
Copy link

henricook commented Jul 18, 2024

Missing SnsMessageManager::parseMessage is the only reason we've been on V1 for the last four years+

@lpellegr
Copy link

lpellegr commented Aug 1, 2024

As of July 31, 2024 v1 is deprecated but still no migration path for SnsMessageManager::parseMessage...

@henricook
Copy link

Is there some other way to parse a message/check its signature that I don't know about? It seems like such a bizarre gap 😅

@pbartoszek
Copy link

I am shocked it's not in v2 too...

@detinho
Copy link

detinho commented Aug 14, 2024

Is there some other way to parse a message/check its signature that I don't know about? It seems like such a bizarre gap 😅

@henricook you have to do it manually as my current understanding. I seems to me that they are pushing to use SQS or other AWS services as a target endpoint.

@efenderbosch-atg
Copy link

When this gets implemented, please support signature verification when using LocalStack for local development and testing. The current verification enforces https.
Example SigningCertURL for LocalStack: http://localhost.localstack.cloud:4566/_aws/sns/SimpleNotificationService-6c6f63616c737461636b69736e696365.pem

@lpellegr
Copy link

Since this issue has persisted since 2019, it seems unlikely it will ever be resolved or implemented. It would be highly appreciated to have an official response outlining the recommended alternative.

@lpellegr
Copy link

@debora-ito any chance to get your thoughts on this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x Parity feature-request A feature should be added or improved. p1 This is a high priority issue
Projects
None yet
Development

No branches or pull requests