But with powerful APIs come serious risks. APIs are direct pathways to the internals of applications. They are usually developed assuming that only friendly and authorized developers will be using them, and they often short-circuit normal access controls or other security features. In the hands of a malicious actor, a poorly designed API may allow for massive levels of data exfiltration, unauthorized updates and improper viewing of sensitive data.
In the world of cloud computing, APIs present additional risks, with data flying between data centers, subject to monitoring and man-in-the-middle attacks. Securing APIs can be a delicate balancing act, with developers insisting on a minimum of requirements and lowest overhead while security teams want heavyweight protections. Here are five guidelines for keeping APIs useful and secure in higher education environments.
RELATED: Higher education institutions can create a seamless learning experience.
1. Require Authentication and Implement Strong Authorization Access Controls
Every API must use authentication, preferably based on standards such as SAML or OAuth (depending on the authentication model) for all queries. Once authenticated, the API should have a robust role-based access control system to ensure that users don’t see data beyond their level of authorization. An API shouldn’t talk to anyone without knowing who they are, even if the developer is sure that the data affected is nonsensitive or public information.
Why protect public data? Two reasons: first, just because data is public doesn’t mean that it’s in the interest of the university to have the entire database exported by a third party and lose control of the information. Second, APIs can have bugs in them. By requiring anyone using the API to be authenticated and authorized, you reduce the risk of unintended consequences from opening things up.
Authorization can be tricky with APIs because an API is program-to-program communication. This means that the application providing the API doesn’t obviously know who it is that is requesting data. Implementing authorization can take several paths. It may mean using OAuth 2.0’s On-Behalf-Of flows, which pass access tokens to the APIs or by simply passing the user information in the API call. These let the receiving API can make its own authorization decisions. Alternatively, some type of centralized policy enforcement tool, filter or a dedicated authorization microservice can be used to help APIs return only authorized results.
Even in cases where an API is published on the internet for anyone to use, it’s desirable to have an additional offline step that mandates anyone who wants to use it to register and agree to an acceptable use policy first. This requirement can rub some people the wrong way in a higher ed environment, but it’s always a question of balancing security and privacy against open access. Making an initial bid for more security helps protect not only the institution but also the student, faculty and research data you may be delivering via API.
Finally, if your developers are using API keys for authentication between services, make sure that these aren’t hard coded in source code or Git repositories, that they have a finite life, can be revoked if compromised and are rotated at least annually. For larger services, require that different API keys are used for different environments, such as development, test and production.
Click the banner for more security insights from leaders throughout higher education.