,

Who Is Calling Your E-Invoicing API? OAuth 2.0, Certificate-Bound Tokens and Mutual TLS Explained

Nikhil Avatar

·

,

·

When an ERP calls an e invoicing solution provider API at three in the morning to submit a batch of invoices, nobody is typing a password. The credential lives in a configuration file, a secrets vault or someone’s laptop. How that credential is issued, stored and proven determines whether a stolen copy is harmless or a skeleton key.

This article compares the main ways of authenticating system-to-system calls, explains what mutual TLS and certificate-bound tokens add, and sets out the operating habits that matter. The UAE rules do not prescribe an authentication method for taxpayers, so these are recommended practices drawn from IETF standards and OWASP guidance.

Three questions every API call answers

  • Who is calling? The identity of the client system, not a person.
  • What may it do? Submit invoices, read statuses, or something more powerful such as issuing credit notes.
  • Can the proof be stolen and reused? A bearer credential works for whoever holds it.

The main options compared

Method How it works Strength Weakness
Static API key A long-lived secret sent with each request Simple to adopt If copied from a log or repository, it works for anyone until someone notices
OAuth 2.0 client credentials The client authenticates and receives a short-lived access token Short-lived tokens and scoped permissions A stolen token still works for its lifetime if it is a bearer token
Mutual TLS client authentication The client proves itself with an X.509 certificate during the TLS handshake Authentication that does not rely on a shared secret Certificates must be issued, rotated and revoked with discipline
Certificate-bound access tokens The token is tied to the client’s certificate A stolen token is useless without the matching private key Needs support at both the authorisation server and the API

OAuth 2.0 is defined in RFC 6749, and the IETF’s best current practice for it was published in January 2025 as RFC 9700. RFC 8705 specifies two mechanisms that suit high-value integrations: mutual TLS client authentication to the authorisation server, and binding access tokens to a client certificate so that the API can confirm the token was issued to the party presenting it. OWASP’s REST Security Cheat Sheet recommends serving only HTTPS and considering mutual TLS for highly privileged services, and, where JWT access tokens are used, validating the signature, issuer, audience and expiry.

A scenario: the token in the log file

A manufacturing group in Sharjah enables verbose logging during testing. The integration service writes full request headers to a log shared with a support contractor. The headers contain a bearer token. The token expires in an hour, but the contractor’s log viewer keeps data for ninety days. With bearer tokens alone, anyone with log access could replay a token while it is valid. With certificate-bound tokens, a copied token is useless without the private key held by the integration host.

Operating habits that matter more than the protocol

  • Keep secrets out of code and logs. Use a vault, rotate on a schedule and rotate immediately after staff or contractor changes.
  • Separate identities per entity and per environment, so a leaked test credential cannot touch production.
  • Scope tightly. A job that submits invoices should not be able to issue credit notes.
  • Manage certificates as assets. Track owners and expiry dates, and automate renewal. NIST SP 800-57 Part 1 Revision 5 is the standard reference for key management.
  • Monitor use. Alert on a new source address, an unusual hour or a sudden change in volume.

Security implications and recommendations

Ask your provider which authentication methods its API supports, how tokens and certificates are issued and revoked, and how quickly access can be cut off after an incident. Ministerial Decision 168 of 2026 requires Accredited Service Providers to secure user access with multifactor authentication and to encrypt data in transit and at rest, but it does not specify how machine-to-machine access must be authenticated. That is a design decision between you and your provider, and it is worth making deliberately.

  1. Choose the strongest method both sides support, preferring certificate-bound or mutually authenticated connections for anything that can issue or change documents.
  2. Write down the owner, rotation interval and revocation procedure for every credential.
  3. Test revocation: can you disable an integration account within minutes, and what happens to queued invoices when you do?

Common mistakes to avoid

  • Using one credential for test and production, so a leak in a test tool exposes live invoicing.
  • Letting tokens or private keys appear in logs, tickets or chat messages.
  • Having no alert for certificate expiry, so the first sign of trouble is a failed batch.
  • Granting broad scopes by default because narrow ones were never defined.

Conclusion

System-to-system authentication is invisible when it works and catastrophic when it does not. Short-lived, narrowly scoped and ideally certificate-bound credentials turn a stolen secret from a disaster into an inconvenience.

The standards are mature. The differentiator is the operational discipline around them.

Marmin AI Software Design LLC appears on the UAE Ministry of Finance’s published list of Accredited Service Providers. If you would like an independent look at how your e-invoicing connections handle security, speak to Marmin’s UAE team about a technical review.

SOURCES AND REFERENCES

Regulatory content reflects UAE Ministry of Finance, Federal Tax Authority and OpenPeppol documents as of 10 November 2026. Where this piece describes the PDPL, the cybercrime law or sector rules, it relies on secondary commentary because the official text could not be retrieved; please have UAE counsel confirm before external publication.

Leave a Reply

Your email address will not be published. Required fields are marked *