Patterns library

Safe third-party integration

Connect your service to a supplier's system without giving them more access or data than they need.

When to use it

  • Your service sends data to, or receives data from, a supplier's system or API.
  • A supplier needs access to your systems to provide a service.
  • You are adding a payment, messaging, identity or analytics provider.

How it fits together

  1. Our service

    • Shares the minimum data
    • Validates everything it receives
  2. API gateway

    • Strong authentication
    • Rate limits and timeouts
    • Logs every call
  3. Supplier's service

    • Their API
    • Their data handling
  4. Assurance and contract

    • Supplier questionnaire
    • Security clauses
    • Exit plan
What the diagram shows: Our service sends only the data that is needed through an integration layer and an API gateway, which authenticates, limits and logs every call. Calls travel over encrypted, mutually authenticated connections to the supplier's service. Supplier assurance and the contract set what the supplier must do with the data.

The parts

Integration layer
The part of your service that talks to the supplier, kept separate from the rest.
API gateway
Handles authentication, rate limits, input checks and logging for every call.
Credentials
Separate, strong credentials for each integration and environment, kept in a secrets vault.
Supplier's service
The external system, with its own security that you need assurance about.
Assurance and contract
What you checked, what the supplier has agreed to and how you would leave.

Main risks

  • A compromised supplier being used as a route into your service.
  • Sharing more data than the integration needs.
  • Weak or shared credentials, such as one API key for every environment.
  • Trusting data from the supplier without checking it.
  • A supplier outage taking your service down.
  • Data stored or processed somewhere you did not agree to.

Usual controls

  • Share the minimum data, and record what is shared and why.
  • Strong authentication for each integration, such as mutual TLS or short-lived tokens.
  • Credentials in a secrets vault, rotated regularly.
  • Validate data in both directions, with rate limits and timeouts.
  • Supplier assurance before go-live and at renewal, with security clauses in the contract.
  • Monitoring, and a plan for supplier outages and exit.

What it maps to

NCSC Cyber Assessment Framework principles

NCSC guidance

Templates

GOV Assured tools

Common mistakes

  • Trusting supplier data without validating it.
  • Using one shared API key across all environments.
  • Having no list of which suppliers are connected to what.
  • Doing supplier assurance once and never again.
  • Having no plan for when the supplier is unavailable.

All patterns