Hey Jacob,
sorry for the long delay here. This was mainly because the problem turned out to be much harder, and then I was on vacation until September 1st. Sorry for not getting back to your earlier.
The problem here is that we cannot simply add it to the assembly status JSON. That would open a big security hole, as 3rd parties could just submit an assembly on your site, then check the status JSON of that failed assembly, read out the expected_signature field and resubmit the same assemblies with the same params and the proper signature. That would make the signature authentication useless.
What we could do is we add a new field to our assemblies table that saves the expected_signature. Then we can display it on assembly detail pages on our website. Via that we can assure that only people knowing your account (and thus they know your secret anyway) can see expected signatures. This would unfortunately mean a database migration with downtime, since adding new fields blocks table writes (we need to upgrade MySQL to prevent that).
Another option that I see is that we just calculate the signature on-the-fly in the website code and display it there. However, there are differences between NodeJS and PHP signature calculations as you and Kevin found out. Also, this would mean that the calculation logic is both in the website code and in the API code.
The last option I see is that we could make a secret API endpoint that allows you to calculate signatures for assemblies. It requires an admin account id (for example my account), and the request must be signed (with the admin account’s secret). That should work fine in theory, but feels a little bad as well.
Not saying we don’t want to solve this - we totally do. Just letting you know why this has taken so long and asking if you still need help here. We are still figuring what the best move here would be.
Kind regards,
Tim
Co-Founder Transloadit
@tim_kos