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
Our service
- Shares the minimum data
- Validates everything it receives
- calls through
API gateway
- Strong authentication
- Rate limits and timeouts
- Logs every call
- encrypted, mutually authenticated
Supplier's service
- Their API
- Their data handling
- held to account by
Assurance and contract
- Supplier questionnaire
- Security clauses
- Exit plan
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
- CAF A4 Supply chain (opens in a new tab)
- CAF B2 Identity and access control (opens in a new tab)
- CAF B3 Data security (opens in a new tab)
- CAF B5 Resilient networks and systems (opens in a new tab)
NCSC guidance
- NCSC supply chain security guidance (opens in a new tab)
- NCSC securing HTTP-based APIs (opens in a new tab)
- NCSC Cloud Security Principles (opens in a new tab)
- NCSC cyber security design principles (opens in a new tab)
Related templates and tools
Templates
GOV Assured tools
- API Security Controls Matrix
- Penetration Test Scoping Tool
- Secure by Design Statement of Applicability
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.