Home › Cybersecurity wiki › What is API security?

Wiki

What is API security?

API security is the protection of programmatic interfaces so only the right clients, with the right permissions, can call each offered function.

The interface is how a shop app, a partner, or a script talks to payment and inventory without using the human checkout page.

How it works

Each call should prove which client is speaking and whether that client may refund an order or only read a catalog.
A public test key left in a mobile app can let a stranger issue refunds if the interface trusts anyone who presents that key.

A weak interface can expose customer orders or move money even when the website pages look locked.
A strong one lets the mobile shop work for customers while a partner can see only the stock fields they were granted.

Concrete examples

  • A payment interface accepts a refund call from a partner key that was meant only to read the status of an order.
  • A mobile shop app contains a key that anyone can extract, and that key can list every customer's recent purchases.
  • An inventory call from a warehouse partner is refused when it asks for home addresses the partner was never granted.

Protective measures

  • Give each partner its own credential and the smallest set of functions that partner actually needs.
  • Refuse calls that do not authenticate, and do not leave a test credential in the app you ship to customers.
  • Log refunds and other sensitive calls with the client identity so a surprise refund can be traced the same day.
  • Rotate a credential when a partner contract ends, and check that the old credential can no longer call the payment interface.