Authentication for APIs and integrations
OAuth 2.0, mutual TLS and secrets management for APIs: what stops credential sprawl before it becomes a breach. Talk to our team.
National Digital designs, builds, hosts and supports the platforms it delivers, with no reseller or integrator between the client and its engineers.
- API development and management
- platform engineering
- cloud engineering
- legacy system modernisation
Quick answer:API authentication should use OAuth 2.0 or mutual TLS with short-lived tokens and vaulted secrets, not static keys, to limit breach exposure across integrations.
Quick answer
How should authentication work for APIs and system integrations?
Use OAuth 2.0 client credentials or mutual TLS for machine-to-machine calls, short-lived tokens rather than static API keys, and store secrets in a managed vault, not integration code.
Additional Context
A static API key only proves possession; it can't prove recent consent or limit damage if leaked. Token-based and certificate-based schemes add expiry, scope and revocation that static keys lack.
Sources
- Essential Eight mitigation strategies
ACSC guidance lists multi-factor authentication among core strategies for limiting the impact of compromised credentials.
- Notifiable Data Breaches scheme
Organisations must assess and may need to notify when a compromised credential exposes personal information.
API Security
Why API authentication fails in practice
Most integration failures that get labelled a security issue actually start as an authentication shortcut taken under deadline pressure. A developer wires up a new partner feed, generates a static API key because it's the fastest path to a working demo, and ships it. Two years later nobody on the team knows which systems hold that key, whether it's still needed, or how to change it without breaking something downstream.
This is the single most common failure pattern across legacy integration estates: an API key gets hardcoded into an iPaaS connector or a scheduled script by a developer who has since left, and rotating it becomes a project in its own right rather than a routine task. Organisations end up choosing between an open-ended security exposure and an unplanned outage, because nobody budgeted for the discovery work credential rotation now requires.
Choosing the right authentication model
The fix starts at design time, not incident response. For machine-to-machine calls between internal systems, OAuth 2.0 client credentials or mutual TLS give short-lived, individually revocable tokens instead of one shared secret. For partner-facing APIs where a human delegates access, authorization code flow with refresh tokens is the standard most REST API security implementations should follow. Where a custom API development project connects several internal platforms, each integration should get its own credential and scope, so a single compromised connection doesn't expose every system behind it.
Questions buyers ask
How should an Australian business secure partner access to its APIs?
Give each partner its own credentials with the narrowest scope that works. Use OAuth 2.0 where a partner acts for a user. Use signed client credentials where one system calls another. Rotate secrets on a schedule and revoke them on the day a partner leaves. Log every call against its credential.
Platform Engineering
Authentication for APIs and Integrations
Problem
Many integration estates grow one connection at a time, each with its own authentication approach: a static API key here, a shared service account there, until nobody can say with confidence which credentials are still live or what they can access.
Common Pain Points
- Shared static API keys One key used across multiple integrations means a single leak exposes every connected system at once.
- No credential ownership Keys outlive the staff who created them, so rotation requires rediscovery before it can even start.
- Inconsistent token lifetimes Some integrations never expire a token, turning it into a permanent static secret by default.
Business Impact
- Time Wasted Recurring hours spent tracing failed calls back to an expired or revoked credential
- Cost Implication Emergency rework when a credential must be rotated across every connected partner at once
- Opportunity Cost New integration requests stall in security review because nobody can confirm what existing credentials already expose
Solution
Map every existing credential to the system it authenticates, move machine-to-machine calls onto OAuth 2.0 or mutual TLS with short-lived tokens, and centralise secrets in a managed vault with scheduled rotation.
Our Approach
- Credential audit Catalogue every API key, token and service account in use across current integrations, and map each to the system and owner it belongs to.
- Authentication redesign and rollout Replace static keys with OAuth 2.0 client credentials or mutual TLS where risk warrants it, move secrets into a managed vault, and stage rotation so no live integration breaks mid-cutover.
Expected Outcome
A credential inventory the team can act on, fewer integrations relying on long-lived static keys, and rotation that no longer requires emergency coordination.
Key Takeaways
Key takeaways on API authentication
- Static API keys scale poorly across integrationsCritical
A single shared key used by multiple partners means one leak forces coordinated rotation across every connected system simultaneously.
- OAuth 2.0 client credentials suit machine-to-machine callsImportant
Short-lived, individually scoped tokens replace one shared secret, so revoking access to a single integration doesn't require touching every other connection.
- Secrets belong in a managed vault, not in codeCritical
Hardcoded credentials in an iPaaS connector or script survive staff turnover and become untraceable, turning routine rotation into an unplanned discovery project.
- Token lifetime is a security control, not a convenience settingImportant
A token that never expires behaves like a static key the moment it's logged or cached, so shorter lifetimes with automatic refresh close that exposure window.
Authentication choices made at integration design time determine whether a future credential leak is a contained incident or an estate-wide emergency rotation.
Authentication and Compliance Benchmarks
Authentication failures in integrations intersect with Australian cyber security guidance and privacy law obligations when a compromised credential exposes personal information.
Essential mitigation
Multi-factor authentication
Significance: highThe Australian Cyber Security Centre lists multi-factor authentication among its core mitigation strategies for reducing the impact of cyber security incidents, including compromised integration credentials.
Source: cyber.gov.au Essential Eight
Mandatory notification
Data breach notification
Significance: highUnder the Notifiable Data Breaches scheme, organisations must notify affected individuals and the OAIC when a compromised API credential results in unauthorised access to personal information likely to cause serious harm.
Source: oaic.gov.au Notifiable Data Breaches
30 days (Office of the Australian Information Commissioner, 2024)
Breach assessment timeframe
Significance: mediumOnce an organisation suspects a data breach, including one triggered by a leaked integration credential, the Privacy Act requires an assessment of whether it is notifiable to be completed within this period.
Methodology
Figures drawn from the Australian Cyber Security Centre's Essential Eight guidance and the Office of the Australian Information Commissioner's Notifiable Data Breaches scheme requirements.
Integration Security
Securing integrations at scale
Once an integration estate passes a handful of connections, the real challenge shifts from whether a given call is authenticated to whether the team can see and control every credential in use. A secrets manager with programmatic rotation turns a one-off manual key change into a scheduled, auditable event. Pair that with an API gateway implementation that enforces token validation, rate limiting and scope checks in one place, rather than inside every individual service, and authentication logic stops being duplicated and drifting across each new integration.
Operational practices that hold up
Token lifetimes matter more than most teams assume at design time. A token that doesn't expire for a year behaves exactly like a static key the moment it's logged, cached or committed to a repository by mistake. Shorter-lived tokens with automatic refresh close that window without adding friction for legitimate calls. Teams following documented API integration standards typically log every token issuance and revocation event separately from application logs, because when a credential is suspected compromised, the first question is always which systems used it and when. For the broader architecture this sits inside, see API development and management.
Get your integration authentication reviewed
If your API estate has grown through one-off connections, a credential audit identifies which keys are still live, what they expose, and where OAuth 2.0 or a managed vault should replace a static secret.
Authentication for APIs and integrations: common questions
What's the difference between an API key and OAuth 2.0 for integrations?
An API key is a single static credential that proves nothing beyond possession: anyone holding it can act with full access until it's manually revoked. OAuth 2.0 issues short-lived tokens scoped to specific permissions, which expire automatically and can be revoked individually per integration, without affecting every other connection using the same flow.
Should every internal integration use OAuth 2.0?
Not necessarily. For low-risk, read-only internal calls between trusted systems on a private network, a scoped API key with IP restrictions can be proportionate. OAuth 2.0 client credentials earn their added complexity where integrations cross trust boundaries, handle personal information, or need individually revocable access without touching every other connected system.
How often should API credentials be rotated?
There's no universal schedule, but credentials with no planned rotation at all are the highest-risk category seen across legacy integration estates. A workable baseline rotates service-level keys on a defined, recurring cycle, while OAuth tokens expire automatically within hours and refresh without manual intervention.
What is mutual TLS and when does it matter for API authentication?
Mutual TLS has both the client and server present certificates to verify each other's identity, rather than relying on a single secret like a password or API key. It suits high-trust, machine-to-machine integrations, such as connections between core financial or operational systems, where certificate-based identity is harder to steal or replay than a bearer token alone.
How does API authentication affect privacy compliance?
A compromised integration credential that exposes personal information can trigger notification obligations under the Notifiable Data Breaches scheme, which requires an assessment within the period listed in the data points above. Strong authentication, scoped access and credential rotation reduce both the likelihood of a breach and its scope if one occurs.
What's the most common authentication mistake in legacy integrations?
A static API key gets hardcoded into an integration script or iPaaS connector, the developer who set it up leaves, and rotating it becomes a discovery project rather than a routine task. Teams then defer rotation indefinitely because nobody can confirm what will break, leaving a long-lived credential as a standing security exposure.
References
- Office of the Australian Information Commissioner. (2024). What is a notifiable data breach? https://www.oaic.gov.au/privacy/your-privacy-rights/data-breaches/what-is-a-notifiable-data-breach

