Reputation: 1579
i'm going to use JAVA to create a system, and in our system we will use an API. the API is going to be accessed via the internet as it always is. my question here is that how can i secure their connection to prevent any snooping around, i know that the data will be safe in the API but it could be prone to danger during transmission. could this be network security?
Upvotes: 0
Views: 2344
Reputation: 3673
You need to define "security" better. There are several concerns usually related to API security and handling one is different. For example common APIs need to deal with network traffic security (i.e. encryption, verification etc.), authentication and authorization - each one is an aspect of security that you may or may not care about and have different requirements for each.
For network traffic encryption if we're talking an HTTP based API - the almost-always-correct answer is stick to HTTPS - so the encryption problem is a solved one as long as you keep the server / client properly configured (enable peer verification, stick to secure and up-to-date TLS implementations and cyphers etc.). It is most likely already supported by your API client and server - just make sure the server doesn't accept any cleartext HTTP.
For authentication and authorization there are some common standards (like OAuth) but this really depends on your business logic needs.
Upvotes: 2