[SOLVED] Master key with streamsSync parse server

I have setup a parse server accepting streams from Moralis.
I have cloned the parse server migration files and am adding stream data to the parse server database using the streamsSync middleware from @moralisweb3/parse-server
I would like to know how this can be secured because as I understand it its writing to the database as a public user. I need to lock this down so that it can write only if it has a master key. Otherwise anyone can simply write inputs to the database which is very unsecure.
So my question is, can someone please let me know how I can add a parse server master key as an input to the streamsSync middleware?

Thank you

Hi @phyx1u5

Parse server internally uses the signature found in the streams webhook to verify the sender of the streams. If the sender of the streams is not moralis then it thrown invalid signature or unauthorised error. The stream endpoint is already secure by this so you dont have to make any additional changes.

You can find more details on stream signature verification on the below docs.

thank you for the link and additional information

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.