APIs Are Now the Attack Surface
Most of a modern system's real business logic sits behind an API. A banking customer moving money, a telecom platform provisioning a SIM, a wallet service signing a transaction: every one of those actions is an authenticated HTTP call to an endpoint somebody wrote. That is exactly why attackers have shifted their attention there. The front-end login page gets the security budget and the penetration test, while the API it talks to quietly exposes the same data with weaker checks.
We have spent years hardening APIs for banks, telecom SaaS providers, and regulated crypto platforms, and the pattern repeats. The breaches almost never come from exotic zero-days. They come from an endpoint that trusts an ID in the URL, a token that never really expired, or a rate limit that was never configured. This article walks through the failures we see most often in production and the controls that actually prevent them, mapped to the frameworks that auditors and regulators expect.
The Authorization Gap Behind Most API Breaches
The single most common serious flaw we find is Broken Object Level Authorization, listed as API1 in the OWASP API Security Top 10. The idea is simple and the impact is severe. An endpoint like GET /api/accounts/1042/statements checks that you are logged in, then returns account 1042's statements without checking that account 1042 belongs to you. Change the number to 1043 and you are reading someone else's data.
Authentication answers "who are you." Authorization answers "are you allowed to touch this specific object." A lot of teams build the first and assume the second follows from it. It does not. On one internet-banking estate we assessed, roughly a third of the read endpoints authenticated the caller correctly but derived the target account from a client-supplied identifier with no ownership check on the server. The fix is unglamorous and mandatory: every request that references an object must verify, server-side, that the authenticated principal owns or has been granted access to that exact object. Never trust an ID, a tenant name, or a role claim that arrived from the client without re-checking it against your own authorization store.
The same flaw has a sibling at the field level. An endpoint may correctly return your user record but include fields the client should never see or be able to change, such as isAdmin or accountBalance. Validate which properties a caller can read and write per role, rather than serializing your whole database object and hoping the client behaves.
Authentication: Tokens Are Only As Good As Their Lifecycle
OAuth 2.0 and OpenID Connect are the right foundation for most APIs, and JWTs are a reasonable way to carry claims. The problems start with how tokens are issued, validated, and retired.
A JWT is signed, not encrypted, so anyone who intercepts it can read its contents. More importantly, a stateless JWT is valid until it expires, which means a leaked token is a working key until that moment arrives. We have seen access tokens issued with 24-hour lifetimes and no revocation path, so a token stolen through a logging mistake stayed usable for a full day. Keep access-token lifetimes short, minutes rather than hours, and pair them with refresh tokens you can actually revoke. Validate the signature, the issuer, the audience, and the expiry on every request, and reject the alg: none trick and algorithm-confusion attacks by pinning the expected algorithm.
For service-to-service traffic inside regulated environments, we lean on mutual TLS rather than bearer tokens alone. On the banking and critical-infrastructure work we do, a service presenting a client certificate issued by an internal CA is far harder to impersonate than a service carrying a token that might have leaked into a log aggregator. Store the signing keys and client certificates in an HSM or a managed KMS, not in application config.
Rate Limits, Quotas, and the Cost of Doing Nothing
Unrestricted resource consumption is API4 in the OWASP list, and it is the control most often missing entirely. An endpoint with no rate limit is an invitation to credential stuffing, data scraping, and denial-of-service that costs you real money on a metered cloud bill. A login endpoint with no throttle lets an attacker try millions of password combinations. A search endpoint with no pagination cap lets one caller pull your entire dataset in a loop.
Rate limiting belongs at more than one layer. The API gateway or load balancer should enforce coarse per-client and per-IP limits and absorb volumetric abuse, and it can offload TLS termination and DDoS mitigation at the same time. The application should enforce finer business-level quotas, such as how many transfers an account can initiate per minute. On the multi-tenant telecom SaaS platform we scaled across three clouds, per-tenant quotas were what stopped one noisy customer from degrading service for everyone else. Design the limits before launch; retrofitting them under load is painful.
Choosing the API Style Without Losing the Security Model
REST, GraphQL, and gRPC each carry different security considerations, and the choice affects how you defend the surface. The table below reflects how we weigh them on client work.
| API style | Where it fits | Primary security consideration |
|---|---|---|
| REST | Public and partner APIs, broad client compatibility | Per-endpoint object-level authorization; consistent error handling; versioning |
| GraphQL | Flexible client-driven queries over many resources | Query depth and complexity limits to prevent expensive nested queries; field-level authorization |
| gRPC | Internal, high-throughput service-to-service traffic | Mutual TLS between services; schema-enforced contracts; not exposed directly to untrusted clients |
| Webhooks | Event notifications to third parties | Signed payloads and signature verification; replay protection; egress allow-listing |
GraphQL deserves a specific warning. Its flexibility is the risk. A single crafted query can nest relationships deep enough to pull enormous result sets or exhaust the database. Enforce query depth limits, complexity scoring, and timeouts, and apply authorization at the field resolver, not just at the entry point.
Defense in Depth at the Gateway
No single control secures an API. The durable pattern is a layered request path where each stage does one job and fails closed. The diagram below shows the flow we deploy for regulated clients.
Reading it left to right: the gateway terminates TLS and applies coarse rate limiting, so volumetric abuse never reaches your code. Authentication verifies the token or client certificate. Schema validation rejects malformed or oversized payloads before they hit business logic, which closes off a large class of injection and parser attacks. Object-level authorization confirms the caller may act on the specific resource. Only then does the request reach the backend service and data store. Every stage writes structured logs to a central SIEM, because you cannot investigate what you did not record.
Treat Logging as a Security Control
When a client asks us to investigate suspected API abuse, the first question is always whether the logs exist. Too often the answer is that the gateway logged 200s and 500s but not who called what, or that authentication failures were dropped to keep log volume down. That is the opposite of what you want.
Log every authentication and authorization decision, including the denials, with the principal, the target object, the source, and the outcome. Feed those events into a SIEM or SOAR pipeline so that a spike in authorization failures from one token, or one client walking sequential object IDs, raises an alert instead of sitting unnoticed until a customer complains. Enumeration attacks against BOLA-style flaws are noisy by nature; they only succeed when nobody is watching. Correlating API telemetry with the rest of your estate is where a monitored detection and response capability earns its cost.
A Practical API Security Checklist
This is the baseline we hold production APIs to before they go live, drawn from the ISO 27001, PCI-DSS, and NIST CSF controls our regulated clients answer to:
- Enforce object-level authorization on every endpoint that references a resource, checked server-side against your own store.
- Apply field-level authorization so responses and updates expose only what the caller's role permits.
- Issue short-lived access tokens with a working revocation path, and validate signature, issuer, audience, algorithm, and expiry on every request.
- Use mutual TLS for internal service-to-service calls, with keys and certificates held in an HSM or KMS.
- Rate-limit and quota every endpoint at both the gateway and the application, with tenant isolation on multi-tenant systems.
- Validate every request against a strict schema and reject anything that does not match, including size and depth limits for GraphQL.
- Sign and verify webhook payloads, and protect against replay.
- Log every authentication and authorization event, denials included, into a central SIEM with alerting on abuse patterns.
- Version your API and maintain a documented deprecation path so security fixes do not break integrations silently.
- Test authorization logic explicitly, including attempts to access objects the test principal does not own.
None of these controls is expensive on its own. The expensive part is discovering, after an incident, that the endpoint everyone assumed was safe never checked ownership at all.
How Aydahwa Enterprise Can Help
Securing an API estate is work we do regularly, and we do it against the standards regulators and auditors expect. Our engagements span banking platforms under Qatar Central Bank and PCI-DSS oversight, multi-tenant telecom SaaS scaled across AWS, GCP, and Azure, and regulated blockchain platforms with isolated signing infrastructure. That experience is built on real credentials, including Microsoft Certified: Cybersecurity Architect Expert certification and delivery aligned to ISO 27001, PCI-DSS, SOC 2, NIST CSF, and CIS Benchmarks.
If you want to know where your APIs actually stand, our cybersecurity services cover API and application security assessments, gateway and authorization architecture, and SOC-oriented monitoring. For teams migrating APIs to the cloud or hardening cloud-native services, our cloud security and migration practice designs the gateway, identity, and segmentation layers described above. You can start with our free cybersecurity self-assessment or work through the cybersecurity readiness checklist to gauge your current posture. When you are ready to talk through a specific API estate, contact us and we will scope it with you.



