This article is based on commentary originally published on devops.com, inspired by Postman’s annual State of the API survey findings.
The Comfort Problem
Postman’s annual developer survey has consistently found that developers feel broadly comfortable with the level of API security their organization has implemented. On the surface, that sounds reassuring. In practice, it should set off alarm bells.
The core issue is structural: most organizations place API security and management responsibilities squarely in the hands of developers. In a fast-moving Agile or DevOps environment — where code ships continuously, infrastructure changes daily, and complexity compounds at every layer — that sense of comfort can become a liability. Feeling secure is not the same as being secure.
You Are Only as Secure as Your Weakest Link
API security does not exist in isolation. A modern API-driven system involves a long chain of components, each of which can become a point of failure:
- User credentials and session tokens
- TLS/SSL configuration and certificate management
- Authentication and authorization logic in client applications
- Server-side credential storage and secret management
- Third-party APIs and external service integrations
- Code injection and input validation weaknesses
- Access control policies in API gateways
It only takes one vulnerable code iteration in one client instance to expose every API that instance has access to — regardless of how robust your access control layer appears to be at a higher level.
The Trust Problem: APIs Have to Trust Someone
Every API, by design, must trust something — or it becomes useless. In most production systems, that trusted entity is a server-side application running on an instance that end users connect to. That application typically holds its own credentials to call downstream APIs. This raises a set of critical questions that teams rarely ask explicitly:
- How are server-side credentials stored? Are they hardcoded, injected via environment variables, or managed through a secrets manager?
- How are they rotated and audited?
- What happens to security posture when that instance receives an update?
A Concrete Attack Scenario
Consider this realistic scenario:
- User A has permission to call a
ShowMeCriticalDataAPI. - That API is invoked from a server application running on Instance B.
- The server app authenticates User A and then calls the API — either passing through the user’s own credentials (preferable for auditability) or using its own application-level credentials (problematic for tracking).
- An update is deployed to Instance B that introduces a vulnerability.
Best case: The API still requires User A’s credentials. As long as User A protects those credentials, the API remains relatively secure — though the compromised instance is still a risk vector.
Worst case: The server app on Instance B is proxying requests using its own credentials. A successful exploit of the instance vulnerability allows an attacker to call the API without authenticating as any user at all. If User A is also careless with their authentication information, there is very little the organization can do to prevent misuse.
This is not a hypothetical edge case — it is a pattern that plays out regularly in dynamic DevOps environments where deployment velocity outpaces security review.
What Controls Actually Help
API Gateways and Management Tools
API gateways — when properly configured — provide meaningful protection: rate limiting, authentication enforcement, request validation, and centralized logging. However, they are not a silver bullet. Because incoming connections must be trusted at some point, and outgoing connections are assumed clean, the gateway’s effectiveness depends entirely on the correctness of its configuration and the integrity of the infrastructure behind it.
API Logging and Anomaly Detection
Logging API activity by username and flagging anomalous behavior can serve as an early warning system when a user’s credentials have been compromised. This will catch many issues — but not all. It is a detection control, not a prevention control, and it requires someone to act on the signals it generates.
Rate Limiting Third-Party API Calls
Rate limiting is not just a cost-control mechanism — it is a security control. Consider an application that calls a third-party API such as Google Places. Your application may never approach the provider’s usage caps under normal conditions. But if a portion of your infrastructure is compromised, an attacker could trigger an enormous number of API calls in a short window, resulting in significant unexpected costs or service disruption. A few lines of rate-limiting code can take that scenario from possible to mitigated.
Key Security Controls Every DevOps Team Should Have in Place
- Secrets management: Use a dedicated secrets manager (such as HashiCorp Vault, AWS Secrets Manager, or Azure Key Vault) rather than storing credentials in environment variables, config files, or source code.
- Least-privilege access: Service accounts and application credentials should have the minimum permissions required. Avoid using shared or overly broad credentials.
- Credential pass-through where possible: Prefer passing authenticated user credentials through to downstream APIs rather than using application-level credentials. This preserves auditability and limits blast radius.
- Dependency and patch management: In fast-moving DevOps pipelines, instance updates can introduce vulnerabilities as easily as they fix them. Automated vulnerability scanning of dependencies and container images should be integrated into CI/CD pipelines.
- TLS everywhere: Enforce TLS on all internal and external API traffic. Regularly audit certificate configurations and stay current on known TLS weaknesses.
- Input validation and output encoding: Injection attacks and cross-site scripting remain relevant API attack vectors. Validate all inputs server-side and encode outputs appropriately.
- Rate limiting on all endpoints: Apply rate limits to both inbound and outbound API calls to limit the impact of compromised instances or credential abuse.
- Centralized logging and alerting: Aggregate API logs into a central platform and set up alerts for anomalous usage patterns, not just errors.
Assume a Fatal Flaw — Then Work to Reduce It
The most dangerous posture in API security is assuming your current implementation is adequate. In a DevOps environment — where code ships continuously, infrastructure is ephemeral, and teams move fast — the attack surface evolves with every deployment.
For public APIs especially, risk cannot be fully eliminated. The entire purpose of a public API is to be used — and that exposure is inherently a vector for abuse. The goal is not zero risk; it is minimized, well-understood, and actively monitored risk.
Operate with the assumption that there is a flaw somewhere in your system. Then systematically identify and reduce vulnerabilities at each access point. Review your credential management. Audit your gateway configurations. Challenge your logging coverage. Ask what would happen if Instance B were compromised tomorrow.
Comfort is not a security posture. Vigilance is.