We have two servers running. One is typical webserver running our Laravel based website.
The other one is a machine that runs constantly as well and works on repeated tasks. Once it finishes a task, it sends resulting data to webserver endpoint via POST request, which takes the data and stores it in database.
My question is, how would you secure the endpoint? We are using Passport for our API routes, but this one is different purpose - no user authentication and it's not a public endpoint. It would be nice to have just two keys on the machine that would allow webserver to authenticate its requests. Is there any package that would make a good fit for such a use case?
If you wanted a simpler approach, send the second server a secure URL for the endpoint, with it set to expire after n hours. Before it expires, send it another.
Then on the end point, just check the url signature is still valid.
@rudexpunx It's easy to miss in the documentation because it exists in the table of contents at the bold title level... so your eye naturally scans to the smaller sub-item text in the TOC list. I can never find it when I'm looking either, so I usually just search the page for "machine-to-machine". lol