API Security Checklist

This API Security Checklist will help you close the gaps in your API security strategy. Each item in the API Security Checklist is arguably just as critical as the next, but don’t get overwhelmed. This API Security Checklist is provided to help you navigate through the top items in area of best practices, and you may opt to emphasize sets of best practices where you already have technology investments or manpower. Here are some suggestions on how to scope the problem and prioritize activities:

  • Security test your APIs, but know that you will also need runtime protection to catch changes that don’t go through standard build process and abuses that testing tools aren’t designed to find.
  • Ensure that you are covering all of your environments and your digital supply chain, which is more than just the APIs mediated by your API gateways or API management suite.
  • If you do nothing else, focus on runtime protection as a way to “stop the bleeding,” slow down attackers, and buy time for application and API teams.

1: API secure design and development

You don’t need to reinvent the wheel with security requirements. The OWASP Application Security Verification Standard (ASVS) is a good source that is useful for all types of application designs. For this part of the API Security Checklist, be sure to include API integration, and streamline threat modeling of APIs.

  • 1A – Draft security requirements for building and integrating APIs
  • 1B– Include business logic in design reviews
  • 1C – Draft secure coding and configuration practices relevant to your technology stacks

2: API documentation

Documentation is useful for the application and API teams that are building or integrating APIs. Adequate documentation also provides benefits to a range of activities including design reviews, security testing, operations, and protection.

  • 2A – Use machine formats like OpenAPI Specification (OAS)
  • 2B – Repurpose API schema as a basic testing approach and protection approach
  • 2C – Have a contingency plan for documentation discrepancies and API drift

3: API discovery and cataloging

API documentation, while a best practice in itself, might not be done consistently. Automated discovery of API endpoints, parameters and data types is crucial for all organizations. This section of the API Security Checklist focuses on created an accurate API inventory to serve many IT needs within your organization.

  • 3A – Discover APIs in lower environments and not just production
  • 3B – Include API dependencies, or third-party APIs
  • 3C – Tag and label APIs and microservices as a DevOps best practice

4: API security testing

Use traditional security testing tools to verify certain elements of an API implementation such as well-known misconfigurations or vulnerabilities, but realize these tools have limitations. No scanner is adept at parsing business logic, which also leaves organizations exposed to major forms of API abuse.

  • 4A – Statically analyze API code automatically as part of version control and CI/CD
  • 4B – Check for known vulnerable dependencies in your API code
  • 4C – Dynamically analyze and fuzz deployed APIs to identify exploitable code in runtime

5: Front end security

Securing the front-end application, or the API client, that depends on back-end APIs for functionality and data can be useful as part of a layered security approach. This API Security Checklist includes some key elements for protecting the front end, but be aware of the pitfalls of client-side approaches. such as client-side behavior analytics and machine tracking that inadvertently create privacy concerns.

  • 5A – Draft security requirements for front-end code including JavaScript, Android, and iOS
  • 5B – Store minimal or no data client-side since it is prone to attack and reverse engineering
  • 5C – Explore client-side code protections if you’ve secured back-end APIs

6: Logging and monitoring

All of the telemetry you collect ultimately informs detection, incident response, and runtime protection. This logging and monitoring data is also useful for constructing baselines of what constitutes “normal” so that any outlier events can be quickly identified and resolved.

  • 6A – Define all the infrastructure, application, and API elements that must be logged
  • 6B – Factor in non-security use cases such as API performance and uptime measures
  • 6C – Allocate enough storage for API telemetry, which will lead you to cloud

7: API mediation and architecture

Any good API Security Checklist must include steps to follow for API mediation. Mediation will help you achieve improved visibility, accelerated delivery, increased operational flexibility, and improved enforcement capabilities, particularly when it comes to API access control.

  • 7A – Mediate APIs to improve observability and monitoring capabilities
  • 7B – Use mediation mechanisms like API gateways to enforce access control
  • 7C – Augment your mediation mechanisms with API security tooling that can provide deeper context

8: Network security

A primary goal of zero trust architecture is to enforce concepts of least privilege and restrict network access dynamically. However, connectivity must be present for APIs to function, and many API attacks still occur in trusted channels and authenticated sessions.

  • 8A – Enable encrypted transport to protect the data your APIs transmit
  • 8B – Use IP address allow and deny lists if you have small numbers of API consumers
  • 8C – Look to dynamic rate limiting and rely on static rate limiting as a last resort

9: Data security

Data security approaches aim to provide confidentiality, integrity, and authenticity of data, but 85% of organizations lack confidence that they know which APIs expose sensitive data (see the Q3 2021 State of API Security report). Use this API Security Checklist to reduce exposures of sensitive data, which can lead to significant regulatory penalties, large-scale privacy impacts, and brand damage.

  • 9A – Use encryption selectively, knowing that transport protection suffices for most use cases
  • 9B – Avoid sending too much data to clients and relying on the client to filter data
  • 9C – Adjust for threats like scraping or data inference where encryption is not a mitigation

10: Authentication and authorization

When considering API security best practices for authentication and authorization, remember that you must account for both user and machine identities. Externalize your access controls and identity stores wherever possible, which includes mediation mechanisms like API gateways, user and machine identity stores, IAM solutions, key management services, public key infrastructure, and secrets management.

  • 10A – Continuously authenticate and authorize API consumers
  • 10B – Avoid the use of API keys as a means of authentication
  • 10C – Use modern authorization protocols such as OAuth2 with security extensions

11: Runtime protection

Any runtime protection you consider deploying should be dynamic and learn continuously. Use this API Security Checklist to enforce protections that identify misconfigurations in API infrastructure as well as behavior anomalies such as credential stuffing, brute forcing, or scraping attempts.

  • 11A – Enable threat protection features of your API gateways and APIM if available
  • 11B – Ensure that DoS and DDoS mitigation is part of your API protection approach
  • 11C – Go beyond traditional runtime controls that are dependent on rules, and make use of AI/ML and behavior analysis engines to detect API attacks

12: Security operations

SOC analysts must often depend on application development and API project teams who best know the application architecture and logic of APIs. That details application and business logic are critical in digital forensics and incident response. You will need to emphasize the people and process aspects of SecOps more than technology, and don’t just approach the exercise as “get a feed into Splunk.”

  • 12A – Account for the non-security and security personas involved in the complete API stack
  • 12B – Create API-centric incident response playbooks
  • 12C – Spare your SOC from burnout by surfacing actionable API events and not dumping data

API Security Checklist Summary

Making your way through this entire API Security Checklist may feel overwhelming. Start by picking a few best practices areas as a starting point that are most familiar. Expand over time and adopt additional best practices to avoid leaving gaps in your API security strategy. You can get more details on how to implement these tactics in the Salt API Security Best Practices guide. You can also get an Excel worksheet that summarizes these best practices and gives you a way to track your priorities, action items, and status information.

In many cases, purpose-built API security tooling can make it easier and more automatic to address the many elements of API security. Such platforms support a range of capabilities throughout the API lifecycle and provide the necessary context to stop attacks and data exposures for your organization’s unique API business logic.

*** This is a Security Bloggers Network syndicated blog from Salt Security blog authored by Michael Isbitski. Read the original post at: