liveBook · Manning

Internal API

As explained in Secure APIs

An internal API is an API intended for use within an organization or its private infrastructure rather than for public access.

An internal API is intended for employees, internal services, or private infrastructure rather than public users. It commonly automates back-office work such as staff and payroll management, sales forecasting, project management, customer management, and inventory operations. Because these APIs handle sensitive employee, customer, and business data, they often run in private networks—but private placement does not make them trustworthy by default. section 3.4

Treat every internal API as though it were public. Internal APIs are often given less design attention, documentation, authorization, and access control than public APIs. A deployment or network-configuration mistake can expose them externally, while excessive data exposure or leaked credentials can turn that mistake into a breach. section 3.4 section 5.4

A private endpoint becomes a public incident

An internal customer-identity API created for two-factor authentication was expected to run only inside a private network. If deployment or configuration exposes such an endpoint publicly, attackers may reach sensitive operations that were protected only by network location. A similar misconfiguration can expose employee information, credentials, or other confidential business data. section 3.4 section 5.4

Protect internal APIs with layered controls:

  • Require authentication, authorization checks, and appropriate access controls on every API call. section 3.4 section 5.4
  • Deploy internal endpoints in private subnets so external access is disabled by design. section 9.2
  • Use a hardened bastion server when controlled external access to private APIs is necessary. section 9.2
  • Expose only documented and tested endpoints through an API gateway, and keep development or internal endpoints inaccessible to the internet. section 9.2
  • Check deployments for public-network exposure, leaked secrets, debug responses, excessive data, and missing authorization. section 5.4
Figure 9.11 A bastion server gives us access to an internal network. We use bastion servers to access internal or private APIs and databases. The bastion server sits in the DMZ and is hardened to allow traffic only from certain origins.
figure

Use the network diagram to see how a hardened bastion server in the DMZ controls access to internal APIs and databases. section 9.2

How Secure APIs covers it

How deep it goes
Explains uses, failure modes, incidents, and layered network controls, but stops short of implementation code.
Examples
Uses back-office operations, a customer-identity API, public exposure mistakes, and bastion-server network diagrams as concrete examples.
What it assumes
Assumes basic API and network concepts while defining private networks, network segmentation, bastion servers, and reverse proxies.
What you can do after
Operate and configure internal APIs with authentication, authorization, private subnets, bastion access, and controlled gateway exposure.
How it connects
Connects internal APIs with authorization, access control, network segmentation, zero-trust architecture, API gateways, bastion servers, and reverse proxies.

Also explained in

Compare how 3 books explain internal API →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Secure APIs. The section links point to the parts of the book it draws on.