7 tips for building an API-secure architecture

 

Connecting state and local government leaders

An API gateway gives agencies a way to address security challenges specific to data and applications that require open, public access.

Application programming interfaces are a common tool for powering public sector engagement, but when APIs are underprotected, agencies leave themselves vulnerable to attack. The risk is so acute that the Open Web Application Security Project added Underprotected APIs to its OWASP Top 10 security risks of 2017.

Because APIs expose systems of record that typically reside within an agency’s trusted network, additional considerations must be made to avoid security risks that exposure can create. Organizations can mitigate many of the risks by using an API gateway to facilitate these requests. 

API gateways act as a specialized proxy server that controls the requested traffic, detects and defends against distributed denial-of-service attacks and leverages existing investments in malware/antivirus scanners.  Below are seven key best practices to consider when designing a secure architecture needed to implement a trusted API gateway:

1. Control requests into the agency’s trusted network. The API gateway should not permit connections directly into the ATN that originate from the network’s demilitarized zone. Instead, an internal gateway component in the ATN should connect outward to the API gateway in a tunneled fashion. This approach removes the need to open incoming firewall ports from the DMZ into the ATN, preventing any connections from servers in the DMZ should they become compromised. Additionally, connections from the ATN to the API gateway should be persistent, so that encryption handshakes are not continually re-established, which can negatively impact performance.

2. Establish filtering rules and alerts. The API gateway should be configurable to actively filter requests based on agency security and operating policies. Filters should include the ability to block specific IP address ranges and to act dynamically based on request type, endpoint name, request payload size and authentication. Automated alerts should be sent to system administrators and management dashboards when requests violate filter rules.

3. Implement protective caching. Depending on the data and use case, the API gateway should be employed to store and serve frequently accessed data directly from caches of random-access memory. This provides a high-performance buffering layer that can insulate the internal endpoint from spikes in volume. In addition to protecting the internal endpoint, this technique increases API service performance, facilitates scalability and decreases internal network traffic. For example, a weather API might only deliver updated data every five minutes, but during a hurricane the API might be inundated with concurrent requests. In this use case, protective caching could provide an extremely affordable scaling mechanism that helps the data provider avoid sizing its architecture to accommodate unpredictable spikes in utilization. 

4. Operationalize cyber threat information. The API gateway itself should provide flexible administrative APIs to allow for fast, automated and scripted configuration. With a dynamically configurable API gateway, agencies can quickly operationalize actionable threat indicators from the National Cybersecurity and Communications Integration Center. Additionally, certain rule violations or alerts triggered on an agency’s API gateway may reveal threats that should be shared with the cyber community through the Department of Homeland Security’s Automated Indicator Sharing service.

5. Manage identity and access. The API gateway should provide a robust policy action to effectively identify and validate clients, with the ability to support a wide variety of identification and authorization options. This gives agencies flexibility to identify clients who are trying to access the APIs. At a minimum, the gateway’s supported identification options should include: hostname address, API key, IP address change, SSL certificate, OAuth2 token, XPath expression, WSS username token and WSS X.509 certificate. 

6. Protect against payload threats. Another important factor is how the API gateway blocks attacks coming through JSON or XML string lengths and payloads by setting:

  • Maximum number of entries allowed in an object.
  • Maximum string length allowed for a property name within an object.
  • Maximum number of elements allowed in an array.

It should also specify XML attributes such as:

  • Maximum number of characters permitted in the namespace prefix.
  • Character limit for any namespace universal resource identifiers present in the XML document.
  • Maximum number of child elements allowed for any element.
  • Maximum node depth allowed in the XML.

7. Deploy SQL injection filters. The API gateway should include the ability to block SQL query requests based on custom blacklisted items, such as invalid special characters. The ability to dynamically configure rules gives agencies maximum flexibility to adjust as new threats are identified.

Employing an API gateway and following these steps is a proactive way for agencies to address specific security challenges to data and applications that require open, public access. Although no security solution is ever complete, agencies must deploy the latest security techniques to reduce their risk profile. An API that fails to deliver the expected level of security, reliability and performance can have tremendous mission impacts -- to both the organization producing it and those consuming it. 

X
This website uses cookies to enhance user experience and to analyze performance and traffic on our website. We also share information about your use of our site with our social media, advertising and analytics partners. Learn More / Do Not Sell My Personal Information
Accept Cookies
X
Cookie Preferences Cookie List

Do Not Sell My Personal Information

When you visit our website, we store cookies on your browser to collect information. The information collected might relate to you, your preferences or your device, and is mostly used to make the site work as you expect it to and to provide a more personalized web experience. However, you can choose not to allow certain types of cookies, which may impact your experience of the site and the services we are able to offer. Click on the different category headings to find out more and change our default settings according to your preference. You cannot opt-out of our First Party Strictly Necessary Cookies as they are deployed in order to ensure the proper functioning of our website (such as prompting the cookie banner and remembering your settings, to log into your account, to redirect you when you log out, etc.). For more information about the First and Third Party Cookies used please follow this link.

Allow All Cookies

Manage Consent Preferences

Strictly Necessary Cookies - Always Active

We do not allow you to opt-out of our certain cookies, as they are necessary to ensure the proper functioning of our website (such as prompting our cookie banner and remembering your privacy choices) and/or to monitor site performance. These cookies are not used in a way that constitutes a “sale” of your data under the CCPA. You can set your browser to block or alert you about these cookies, but some parts of the site will not work as intended if you do so. You can usually find these settings in the Options or Preferences menu of your browser. Visit www.allaboutcookies.org to learn more.

Sale of Personal Data, Targeting & Social Media Cookies

Under the California Consumer Privacy Act, you have the right to opt-out of the sale of your personal information to third parties. These cookies collect information for analytics and to personalize your experience with targeted ads. You may exercise your right to opt out of the sale of personal information by using this toggle switch. If you opt out we will not be able to offer you personalised ads and will not hand over your personal information to any third parties. Additionally, you may contact our legal department for further clarification about your rights as a California consumer by using this Exercise My Rights link

If you have enabled privacy controls on your browser (such as a plugin), we have to take that as a valid request to opt-out. Therefore we would not be able to track your activity through the web. This may affect our ability to personalize ads according to your preferences.

Targeting cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising.

Social media cookies are set by a range of social media services that we have added to the site to enable you to share our content with your friends and networks. They are capable of tracking your browser across other sites and building up a profile of your interests. This may impact the content and messages you see on other websites you visit. If you do not allow these cookies you may not be able to use or see these sharing tools.

If you want to opt out of all of our lead reports and lists, please submit a privacy request at our Do Not Sell page.

Save Settings
Cookie Preferences Cookie List

Cookie List

A cookie is a small piece of data (text file) that a website – when visited by a user – asks your browser to store on your device in order to remember information about you, such as your language preference or login information. Those cookies are set by us and called first-party cookies. We also use third-party cookies – which are cookies from a domain different than the domain of the website you are visiting – for our advertising and marketing efforts. More specifically, we use cookies and other tracking technologies for the following purposes:

Strictly Necessary Cookies

We do not allow you to opt-out of our certain cookies, as they are necessary to ensure the proper functioning of our website (such as prompting our cookie banner and remembering your privacy choices) and/or to monitor site performance. These cookies are not used in a way that constitutes a “sale” of your data under the CCPA. You can set your browser to block or alert you about these cookies, but some parts of the site will not work as intended if you do so. You can usually find these settings in the Options or Preferences menu of your browser. Visit www.allaboutcookies.org to learn more.

Functional Cookies

We do not allow you to opt-out of our certain cookies, as they are necessary to ensure the proper functioning of our website (such as prompting our cookie banner and remembering your privacy choices) and/or to monitor site performance. These cookies are not used in a way that constitutes a “sale” of your data under the CCPA. You can set your browser to block or alert you about these cookies, but some parts of the site will not work as intended if you do so. You can usually find these settings in the Options or Preferences menu of your browser. Visit www.allaboutcookies.org to learn more.

Performance Cookies

We do not allow you to opt-out of our certain cookies, as they are necessary to ensure the proper functioning of our website (such as prompting our cookie banner and remembering your privacy choices) and/or to monitor site performance. These cookies are not used in a way that constitutes a “sale” of your data under the CCPA. You can set your browser to block or alert you about these cookies, but some parts of the site will not work as intended if you do so. You can usually find these settings in the Options or Preferences menu of your browser. Visit www.allaboutcookies.org to learn more.

Sale of Personal Data

We also use cookies to personalize your experience on our websites, including by determining the most relevant content and advertisements to show you, and to monitor site traffic and performance, so that we may improve our websites and your experience. You may opt out of our use of such cookies (and the associated “sale” of your Personal Information) by using this toggle switch. You will still see some advertising, regardless of your selection. Because we do not track you across different devices, browsers and GEMG properties, your selection will take effect only on this browser, this device and this website.

Social Media Cookies

We also use cookies to personalize your experience on our websites, including by determining the most relevant content and advertisements to show you, and to monitor site traffic and performance, so that we may improve our websites and your experience. You may opt out of our use of such cookies (and the associated “sale” of your Personal Information) by using this toggle switch. You will still see some advertising, regardless of your selection. Because we do not track you across different devices, browsers and GEMG properties, your selection will take effect only on this browser, this device and this website.

Targeting Cookies

We also use cookies to personalize your experience on our websites, including by determining the most relevant content and advertisements to show you, and to monitor site traffic and performance, so that we may improve our websites and your experience. You may opt out of our use of such cookies (and the associated “sale” of your Personal Information) by using this toggle switch. You will still see some advertising, regardless of your selection. Because we do not track you across different devices, browsers and GEMG properties, your selection will take effect only on this browser, this device and this website.