Home / Planning / Zero trust for applications and APIs: what changes in development

Zero trust for applications and APIs: what changes in development

For developers, zero trust means that no call is trusted just because it comes from the internal network: every request to an application or API must prove who it is, receive only the permission it needs, and leave a trace. In practice, security moves from the perimeter into the code, and that is where the development team comes in.

If leadership asked for “zero trust” and your engineering team replied “so what do we do differently on Monday?”, this text is for you. Most of the content available on the topic explains the concept from the point of view of networks, user access and vendor tools. Here the focus is different: what changes in authentication, authorization, tokens, service-to-service communication, secrets, pipelines and the use of AI to write code. At the end, you will find a phased adoption roadmap and answers to the most common questions.

A note on method: where there is a standard, study or survey, the text names the source, the year and the caveats. Tables, phases and criteria that do not come from a standard are identified as an editorial proposal by NextAge.

Person touching the "Zero Trust" button on a digital interface, surrounded by icons of a key, a checkmark, a fingerprint, a shield with a padlock, a user and a connected network.

What zero trust is 

Zero trust is a set of security principles in which trust is never assumed: every access to a resource is evaluated individually, with least privilege and continuous verification. It is not a product, a certification, or a project with an end date.

The most widely used reference is NIST SP 800-207, Zero Trust Architecture, published in 2020. The document states that network location alone does not imply trust, and describes zero trust as a set of guiding principles rather than a single architecture or a product. That distinction matters: no tool, on its own, “implements” zero trust. Tools help execute decisions; deciding what is allowed, for whom and under which conditions is the organization’s job.

NIST organizes the architecture into components worth knowing by name, because they come up in any conversation with the security team:

  • Policy Engine (PE): makes the final decision to grant, deny or revoke access, and logs it.
  • Policy Administrator (PA): opens or closes the communication path and generates the session credentials.
  • Policy Enforcement Point (PEP): enables, monitors and terminates connections between the requester and the resource. In applications, it is usually an API gateway, a service proxy or the code itself.
  • Policy Decision Point (PDP): in the document, it is the combination of the PE and the PA.

Another frequent confusion is with ZTNA (Zero Trust Network Access). ZTNA is a remote-access technology that applies the principle to users reaching applications over the network. It is a useful piece, but it does not answer questions such as “can this authenticated user see this specific order?”, which is decided inside the application. This text is about that layer.

Why applications and APIs change the game

Applications and APIs change the game because the perimeter is no longer a trustworthy boundary: services run in the cloud, talk to each other constantly, expose interfaces to partners, mobile apps and other systems, and any call can come from anywhere. The internal network has stopped being a criterion of trust.

In the traditional model, development teams assumed that what was “inside” was safe: one service called another with little verification because both sat on the same network. In microservices architectures, that assumption is fragile. A single compromised service, a leaked credential or a wrong setting can open lateral access to everything else. NIST SP 800-204A (May 2020), a guide to microservices-based applications using a service mesh, starts from a similar premise: all microservices must be treated as untrustworthy. The document does not use the term “zero trust,” but its logic is compatible with it.

Adoption data shows a broad but incomplete movement. In a Gartner survey (303 security leaders, fourth quarter of 2023), 63% of organizations said they had fully or partially implemented a zero trust strategy. The same research notes that the strategy typically covers half or less of the organization’s environment. The figures are self-reported and the sample is small; they indicate that the idea is already common, but does not always reach the code. Details are in Gartner’s press release (April 2024).

On the API side, a survey by Kong (an API platform vendor), API Security Perspectives 2025, polled 700 IT leaders: 55% had experienced an API security incident in the previous 12 months, even though 85% said they were confident in their ability to secure their APIs. Because it is vendor research, it should be read with caution, but the gap between stated confidence and actual incidents deserves attention.

The seven NIST principles translated into code

The seven principles of NIST SP 800-207 can be read as design decisions: treat everything as a resource, secure all communication, grant access per session with least privilege, decide by dynamic policy, monitor assets, re-evaluate continuously and collect telemetry. The table below translates each one into day-to-day development.

The principles come from NIST (paraphrased from section 2.1 of the document); the right-hand column is an editorial proposal by NextAge and is not part of the standard.

Principle (NIST SP 800-207) What it means What the development team does (editorial proposal by NextAge)
Everything is a resource Every data source and computing service is a resource to protect Inventory APIs, databases, queues and functions; no endpoint without an owner
Communication is secured regardless of network The internal network does not remove the need for protection TLS on all traffic, including internal; mTLS where the risk justifies it
Access per session, with least privilege Each access is granted separately Narrow-scope, short-lived tokens; permissions per operation
Dynamic policy The decision considers identity, device and context Attribute- and role-based authorization, with policy kept outside the code when possible
Monitoring the integrity of assets No asset is trusted by default Verification of dependencies, images and configurations in the pipeline
Dynamic, re-evaluated authentication and authorization Trust is not granted once and forgotten Token renewal and revocation; re-authorization for sensitive operations
Collecting information to improve posture Telemetry feeds the policy Logs of access decisions (including denied ones), metrics and alerts

The practical effect is a change of question. Instead of “does this call come from inside?”, the code starts asking “who is calling, what can they do with this specific resource, and what happened before?”.

APIs and the OWASP API Security Top 10: authorization moves to the center

In zero trust applied to APIs, the most sensitive point is authorization: it is not enough to know who called; on every request you must verify whether that caller may access that object, that property and that function. It is no coincidence that the first items of the OWASP API Security Top 10 are about exactly this.

The OWASP API Security Top 10 (2023 edition) is the most widely used list to guide API security. Its ten items are: Broken Object Level Authorization (BOLA), Broken Authentication, Broken Object Property Level Authorization (BOPLA), Unrestricted Resource Consumption, Broken Function Level Authorization (BFLA), Unrestricted Access to Sensitive Business Flows, Server Side Request Forgery (SSRF), Security Misconfiguration, Improper Inventory Management and Unsafe Consumption of APIs. Three of them are variations of authorization, which shows why it sits at the center of the topic.

A hypothetical example helps illustrate. Imagine an orders API where the user’s token is validated correctly, but the system does not check whether the requested order belongs to that user. Authentication is right; authorization is not. In a perimeter model this goes unnoticed because “only logged-in users get here.” In zero trust, verifying the object is part of every call.

OWASP item (2023) In business terms Defensive practice (editorial proposal by NextAge)
API1 BOLA Accessing another user’s or customer’s data Verify ownership of the object on every operation, server-side
API2 Broken Authentication Poorly verified identity Established standards (OAuth 2.0, OIDC); no homegrown authentication
API3 BOPLA Seeing or changing fields one should not Control which properties each role can read and write
API5 BFLA Using administrative functions without permission Function-level authorization, deny by default
API9 Improper Inventory Management Old APIs, with no owner, forgotten Versioned catalog, with an owner and a retirement date
API10 Unsafe Consumption of APIs Trusting third-party data too much Validate and limit what comes from external integrations

This is a defensive, condensed reading; each item deserves dedicated treatment in the development lifecycle, and the official list is the reference for details.

Identity and tokens: who is calling and what they can do

In zero trust, both people and services have their own identity, and access is granted through short-lived tokens with restricted scope and a defined audience. Long, generic tokens reused across several services reproduce, at the API level, the problem of the open perimeter.

The dominant standard is OAuth 2.0, with OpenID Connect (OIDC) for user identity. The security practice around it was consolidated by the IETF in RFC 9700, Best Current Practice for OAuth 2.0 Security (BCP 240). The document was published in January 2025, updates the threat model and security advice of earlier OAuth RFCs, and deprecates some less secure modes of operation. For development teams, this means older OAuth implementations deserve review, not only new ones.

The most common points of attention, in practical terms:

  • Short lifetime: the shorter the token’s validity, the smaller the window of use if it leaks. The cost is renewing often, which requires a well-designed refresh flow.
  • Minimum scope: the token should allow only what the operation needs (for example, reading orders, not administering users).
  • Defined audience: a token issued for service A should not be accepted by service B.
  • Public clients with PKCE: mobile and single-page applications should use the flow with PKCE (Proof Key for Code Exchange), one of the practices reinforced by the RFC (check the details in the document).
  • Revocation: you need a way to invalidate access when a device is lost or an employee leaves.

The trade-off is real: more control means more operational complexity. That is why the suggestion is to start with the APIs that expose sensitive data or critical functions, not the entire portfolio at once.

Service-to-service communication: mTLS, gateway and service mesh

Between services, zero trust asks each side to prove who it is before exchanging data. The most common mechanism is mTLS (mutual TLS), in which client and server present certificates to each other; it can be applied at an API gateway or in a service mesh.

NIST SP 800-204A is direct on the subject. According to the document, each communicating party needs a distinct identity and mutual authentication, and mTLS is the de facto mechanism for it; identity certificates should be short-lived, preferably on the order of hours. The same publication recommends that the mesh control plane’s signing certificates be rooted in the enterprise PKI rather than self-signed. It complements NIST SP 800-204 (2019), on security strategies for microservices.

One distinction is often forgotten: mTLS proves who the service is, but does not decide what it can do. A service authenticated by certificate still needs per-operation authorization. Implementing mTLS and stopping there is a common mistake (we come back to it below).

On where to apply policy, there are two frequent approaches:

Approach Advantage Point of attention
API gateway Central point for inbound traffic; authentication and rate limits in one place Does not cover east-west traffic between services well
Service mesh Automatic identity and encryption between services; uniform policy Operational cost and learning curve; assess the benefit per service

A prudent recommendation, and an editorial proposal by NextAge: not every service needs the same level. Services that touch sensitive data or critical functions justify mTLS and granular policy; low-risk services can follow a simpler standard, as long as they do not go without authentication.

Secrets, pipeline and AI-generated code

Secrets (passwords, keys, tokens) should stay out of the repository and the code, be delivered at runtime and have a short lifetime; the CI/CD pipeline needs to follow the same logic, with temporary credentials and minimum permissions. With AI generating code, human review and access control carry even more weight.

In practice, the pipeline is a valuable target: it has access to the code, the secrets and the production environment. Zero trust applied to it means, for example, temporary credentials for each run, separate permissions per stage, and verification of the dependencies and images used. It is the same logic discussed in DevSecOps, which addresses the process; here the focus is the trust model that supports it. (If you have read our content on DevSecOps, it is worth connecting the two.)

Using AI to write code adds a new dimension. AI-generated code goes through the same access, secrets and review rules as any other; the risk appears when speed wins over verification, or when sensitive data ends up in prompts and tools without control. With NextFlow AI, NextAge describes a development model in which AI acts in every phase under the supervision of senior tech leads, with human review, and in which sensitive data is not exposed during AI-assisted development. The central point is that speeding up cannot mean giving up control.

Observability, logs and tests

Zero trust depends on evidence: you need to record access decisions (including denied ones), follow the telemetry, and automatically test whether the authorization rules really work. Without that, the policy exists on paper, but nobody knows whether it is being enforced.

A few habits that make a difference:

  • Decision logs: record who asked for what, which rule decided and what the result was, without storing secrets or unnecessary personal data.
  • Useful alerts: many denials in a row, use of a credential outside its pattern, or calls to rarely used endpoints deserve attention.
  • Authorization tests: besides testing the “happy path,” include denied-access cases (a user trying to read another user’s object, a regular role calling an administrative function).
  • Independent validation: application penetration tests help check, with an outside view, whether the defenses hold. They validate the design; they do not replace it.

A phased adoption roadmap

Adopting zero trust in applications works best in phases, starting with inventory and identity, moving to authorization on every call and service-to-service communication, and reaching the pipeline and telemetry. Trying to change everything at once tends to paralyze development.

The CISA Zero Trust Maturity Model, version 2.0 is a good structural reference. It defines five pillars (identity, devices, networks, applications and workloads, and data) and describes four maturity stages: traditional, initial, advanced and optimal. A caveat: the model is aimed at US federal agencies, but its logic of gradual evolution can inspire companies of any size. The roadmap below is an editorial proposal by NextAge, inspired by that logic; the “done” criteria are suggestions, not standard requirements.

Phase Focus “Done” criterion (editorial proposal by NextAge)
1. Visibility Inventory of APIs, services, identities and secrets Every endpoint has an owner, a version and a data classification
2. Authorization on every call Object, property and function checks on critical APIs Automated denied-access tests on the highest-risk APIs
3. Service to service TLS on all traffic; mTLS and policy on sensitive services No call between services without a verifiable identity
4. Pipeline and telemetry Temporary credentials, dependency checks, decision logs Active alerts and periodic policy review

Each phase delivers value on its own. Starting with visibility is useful even if the organization never moves on to a mesh.

Before and after: what changes for the development team

The table summarizes the shift in posture. It is an editorial proposal by NextAge, written to ease the conversation between leadership and engineering.

Practice Perimeter model Zero trust model
Authentication Done at the entrance; trust afterwards Verified on every relevant call
Authorization Broad roles, by screen or module By object, property and function
Internal network Considered safe Considered untrusted
Secrets In configuration files or the repository Delivered at runtime, short-lived
Service-to-service communication Free inside the network Authenticated and authorized
Logs Focus on errors Focus on access decisions and anomalies
Tests Happy path Includes denied access and business-logic abuse
Code review Functionality and style Includes access checks and data exposure

Common mistakes

The most frequent mistakes are treating zero trust as a tool purchase, implementing mTLS without authorization, keeping long-lived tokens, ignoring old APIs with no owner, trying to change everything at once, and designing policy without listening to the development team.

That last one is the quietest. Policies defined only by security and infrastructure, without the people who write the code, tend to create friction, exceptions and shortcuts. The conversation needs to be joint from the start.

Frequently asked questions (FAQ)

What is zero trust in software development?

It is the practice of designing applications and APIs without presuming trust based on network origin: every request is authenticated, authorized with least privilege and logged. For developers, this means verifying identity and permission in the code itself and in service-to-service communication, rather than relying only on firewalls and the perimeter.

Is zero trust a product I can buy?

No. According to NIST SP 800-207, zero trust is a set of principles and an architecture plan, not a single product. Tools help apply the decisions, but the strategy, the scope and the policies are the organization’s responsibility.

What is the difference between zero trust and ZTNA?

Zero trust is the overall strategy; ZTNA (Zero Trust Network Access) is a technology that applies the principle to users’ network access to applications. ZTNA reduces exposure, but it does not replace authorization inside the application, such as checking whether a user may see a specific object.

How do you apply zero trust to APIs and microservices?

Start with an API inventory and authorization on every call (object, property and function), following the OWASP API Security Top 10. Then adopt short-lived, narrow-scope tokens, secure service-to-service communication (TLS and, where justified, mTLS) and log access decisions for monitoring.

Are mTLS and short-lived tokens mandatory?

No standard requires both in every situation; they are recommended practices to apply according to risk. NIST SP 800-204A treats mTLS as the de facto mechanism for authenticating services, and RFC 9700 gathers current OAuth best practices. The intensity varies with criticality.

What is the relationship between zero trust and DevSecOps?

They are complementary. DevSecOps builds security into the development and delivery cycle; zero trust defines the trust model that cycle must respect. In practice, a pipeline with temporary credentials, dependency checks and automated tests is where the two meet.

Where do you start without stopping development?

With the APIs that expose sensitive data or critical functions. Take inventory, assign an owner to each endpoint and automate denied-access tests. Move forward in phases (visibility, authorization, service-to-service communication, pipeline), delivering improvements at each step, without rewriting everything at once.

Conclusion and next steps

Zero trust does not require the development team to rewrite the whole architecture; it requires a change of question, from “does this call come from inside?” to “who is calling and what can they do with this resource?”. That translates into inventory, authorization on every call, short-lived tokens, authenticated communication between services, well-handled secrets and useful telemetry.

The same care applies to AI-assisted development. On the NextFlow AI page, NextAge describes a “Zero Trust” rule for its own process: speeding up with AI without introducing vulnerabilities, with authenticated, monitored and restricted access points. This is a practice of NextAge’s development process; it does not replace zero trust design in your company’s systems.

If your team wants to gain speed with AI without giving up control, it is worth starting with a diagnostic conversation: the starting point of NextFlow AI is to map bottlenecks, assess scope and present the approach, at no cost. Get my free diagnostic.

As últimas novidades e tendências da tecnologia.

The latest technology news and trends.

Formulario EN

Newsletter NextAge
Get the best news from the world of technology in your email!

Formulario PT

Newsletter NextAge
Receba as melhores notícias do mundo da tecnologia em seu e-mail!