How to secure API endpoints for an app that doesn't have a login?
I'm not sure what to use to secure my API endpoints so not everybody can post or get data without authorization. The app will have no login and registration it will be used in-house. What should I use? JWT? How would I incorporate JWTs without login?
The front end of the app is angular2. There are only two routes. One GET route that pulls data from the database, and one POST route for file upload.
Like @gustav1105 said, setup some IP restrictions. I did the same thing for my laravel app. I didn't know how to use passport but I did want to leverage Vue with ajax functionality. I basically just hosted it locally without any API protection at all.
However I don't know if it's the safest thing ever as I'm not an expert when it's about security, though I think you should be fine if the information displayed in the app itself isn't very confidential.
@derrickrozay Yes, I imagine that would be the easies, so you don't have to code in authentication just set it on your server to allow ip's
But I have just read the thread from @bashy he does make a very valid point, I haven't dug this deep into passport so can't really be opinionated but I imagine you could set the bearer token on the request... That will generate the token you need, but as the execution thereof ask @bashy.