← Book home
Part 3 · Core Network and SBA Security
10

Service-Based Architecture Security

When the core became a web application — and had to be secured like one

“The 5G core speaks HTTP. That sentence is the best and the most dangerous thing about it.” — EVERY CLOUD-NATIVE TELECOM ARCHITECT

The 5G core abandoned rigid point-to-point telecom interfaces for a web-style Service-Based Architecture: network functions are services that discover each other and call REST APIs over HTTP/2. This buys agility and cloud-native deployment — and inherits the entire threat model of web applications. This chapter covers the three pillars that secure the SBA: mutual TLS for authentication, OAuth 2.0 for authorization, and the NRF as the trust hub.

🎯 Learning objectives
📘 Standards reference box — Chapter 10
SpecificationTitleRelease / version verified
TS 33.5015G security — SBA security (clause 13)Rel-18, v18.11.0 (2026-04)
TS 29.500 / 29.510SBI general / NRF servicesRel-18/19 edition
TS 33.310PKI / certificate enrollmentRel-18 edition
RFC 6749 / 8725OAuth 2.0 / JWT best practicescurrent

Checked June 2026 — verify against the latest 3GPP version.

10.1 The SBA Security Stack

Every inter-NF call is a layered object. From the bottom: IP transport, then TLS (mutual) for confidentiality and peer authentication, then HTTP/2 carrying RESTful requests, then an OAuth 2.0 access token authorizing the specific operation, then the JSON payload. Each layer answers a different question.

FIGURE 10.1The SBA Security Stack — Five Layers, Five Questions
JSON payload“what is the actual data?” OAuth 2.0 access token“is this caller ALLOWED to do this?” HTTP/2 (REST)“what operation, on what resource?” TLS (mutual)“who are both ends, and is it private?” IP transport“how do the bytes get there?” authentication (TLS) and authorization (OAuth) are SEPARATE layers — a valid certificate does NOT grant access (Chapter 1’s distinction, made concrete)
Purpose: the mental model for the whole chapter. Note the two security layers are distinct: TLS proves who, OAuth proves allowed — conflating them is the root of real NRF misconfigurations (Chapter 25).

10.2 Mutual TLS Between Network Functions

In the SBA, both ends of every connection present certificates: the client NF and the server NF authenticate each other with mutual TLS (mTLS). This means a rogue process cannot impersonate an NF without a valid operator-issued certificate, and traffic is encrypted in transit. The certificates chain to an operator PKI (TS 33.310).

FIGURE 10.2mTLS — Both Ends Prove Themselves
Consumer NF Producer NF ① ClientHello + client certificate ② ServerHello + server certificate ③ consumer verifies server cert vs operator CA + name ③ producer verifies client cert vs operator CA + name ④ encrypted session — BOTH authenticated rogue process without a valid cert cannot connect
Purpose: the authentication pillar. Unlike web one-way TLS (only the server proves itself), SBA mTLS requires both — so an NF can trust who is calling it before it even reads the request.
FIGURE 10.3The NF Certificate Trust Chain
Operator Root CA offline, tightly guarded Intermediate CA issues NF certs AMF leaf certsubject: NF type + instance ID+ SANs (FQDN) UDM leaf certsubject: NF type + instance IDproducer identity NRF leaf certthe trust hub itselfmust be impeccable
Purpose: where NF identity comes from. The certificate’s subject encodes the NF type and instance — so mTLS doesn’t just say “a valid NF,” it says “this specific NF.”

10.3 NF Registration with the NRF

The NRF (Network Repository Function) is the SBA’s directory. Every NF, on startup, registers its profile — type, instance ID, services offered, addresses, supported slices — via Nnrf_NFManagement. The NRF authenticates the registration (mTLS) and stores the profile. This is also where rogue-NF registration must be prevented.

FIGURE 10.4NF Registration (Nnrf_NFManagement)
new NF (e.g. SMF) NRF ① NFRegister (profile: type, instance ID, services, slices) over mTLS 🔒 ② authenticate cert,validate & store profile ③ 201 Created — NF now discoverable ④ periodic heartbeat (NFUpdate) keeps registration alive ⑤ NFDeregister on graceful shutdown
Purpose: how the SBA learns what exists. The NRF must authenticate registrations — an unauthenticated registration endpoint would let an attacker advertise a rogue UDM (Chapter 11/25).
FIGURE 10.5NF Discovery — With an Authorization Decision
Consumer (AMF) NRF Producer (UDM) ① NFDiscover (target type=UDM, slice, …) ② is this consumer ALLOWEDto discover this producer? ③ matching UDM instance(s) + (optional) token ④ consumer calls the discovered UDM directly (mTLS + access token) discovery is itself an authorization point — not every NF should see every producer
Purpose: discovery is a security decision, not just a lookup. Restricting who can discover what limits an attacker’s map of the core even before authorization.

10.4 OAuth 2.0 — Authorizing the Operation

mTLS proves who is calling; OAuth 2.0 proves they’re allowed. The NRF acts as the authorization server: a consumer NF requests an access token (client-credentials grant) scoped to a service and a target; the producer validates the token before serving. This is what stops a compromised-but-authenticated NF from doing anything it likes.

FIGURE 10.6OAuth 2.0 Client-Credentials Grant in the 5G Core
Consumer NF NRF (auth server) Producer NF ① AccessToken request (scope = service, audience = producer) ② check entitlement,SIGN a JWT access token ③ signed access token (short-lived) ④ service request + Authorization: Bearer ⟨token⟩ (over mTLS) ⑤ producer VALIDATES token signature · scope · audience · expiry no valid token → 401/403, even over a perfect mTLS session
Purpose: the authorization pillar. The token is signed by the NRF and checked by the producer — so authorization is verifiable end-to-end, not assumed from network position.
FIGURE 10.7Anatomy of an Access Token
OAuth access token (JWT claims) iss = NRF instance (who issued it) sub = consumer NF instance ID (who it’s for) scope = allowed services (e.g. nudm-sdm, namf-comm) aud = audience: target NF type/instance (where it’s valid) exp = expiry — short-lived; + NRF signature the two that stop lateral movement: SCOPE limits WHICH services; AUDIENCE stops a token for UDM-A being replayed at UDM-B
Purpose: the claims that matter for security. Scope and audience are the difference between “authenticated NF” and “NF allowed to do exactly this, here, until expiry.”
FIGURE 10.8Producer-Side Token Validation
request + token signature valid (NRF key)? scope covers this service? audience == me? not expired? ALL pass → serve200 OK ANY fail → reject401 / 403 the classic misconfig (Ch 25): producer accepts the request on mTLS alone and SKIPS token validation → authorization bypassed
Purpose: what the producer must actually check. Skipping any of these — especially audience — turns OAuth into theater; the token must be validated, not merely present.

10.5 Direct and Indirect Communication

3GPP defines four communication models. A/B are direct (NF-to-NF); C/D route through the SCP (Service Communication Proxy). The security question is always: where is the token obtained, and who can be impersonated?

FIGURE 10.9Communication Models A–D
A / B — DIRECT Consumer Producer A: no NRF discovery · B: with discovery consumer fetches its own token C — INDIRECT (via SCP) Consumer SCP Producer consumer still fetches its OWN token; SCP just routes D — INDIRECT WITH DELEGATION Consumer SCP 🎫discovers + fetches token Producer NRF discovery + token in Model D the SCP holds the token-acquisition power for many consumers → it becomes a high-value target (Chapter 11)
Purpose: the four models and their trust implications. The further right you go, the more the SCP concentrates — discovery, routing, and (Model D) token acquisition — which is convenient and risky in equal measure.
FIGURE 10.10The SCP in the Token Flow (Model D)
Consumerdelegates to SCP SCP 🎫discovery + token brokerfor many consumers NRFissues tokens Producervalidates token get token forward + token SECURITY NOTE SCP must be hardened, authorized, and audited
Purpose: why Model D needs extra care. A broker that fetches tokens for many consumers is a concentration of authority — protect and monitor it like the NRF itself.

10.6 Certificate Lifecycle and the SBA PKI

FIGURE 10.11Certificate Lifecycle in the Core
① enrollCMPv2 (TS 33.310) ② issue + deployCA signs NF cert ③ operatemTLS, tokens ④ rotatebefore expiry — automate! ⑤ revokeon compromise (CRL/OCSP) manual cert management does not scale to hundreds of CNF instances — expired certs cause outages; un-rotated certs cause breaches. Automate enrollment + rotation.
Purpose: the operational reality of SBA security. The cryptography is easy; the lifecycle — enroll, rotate, revoke across hundreds of instances — is where operators succeed or fail (Chapter 29).
FIGURE 10.12Why OAuth Matters — Blast Radius of a Compromised NF
mTLS only (no token check) ☠ NF UDM (read all) AMF (control) PCF (policy) authenticated = trusted everywhere → full lateral movement mTLS + OAuth scope/audience ☠ NF UDM ✗ no token only its scope ✓ PCF ✗ no token damage contained to the NF’s legitimate scope
Purpose: the case for OAuth in one image. Without per-operation authorization, one compromised NF owns the core; with scope/audience, it can only do what it was already allowed to do.
FIGURE 10.13An Operator’s SBA PKI Architecture
Root CA (offline)air-gapped Intermediate / issuing CAs + RA automated enrollment (CMPv2) + rotation service AMF/SMF/UPF… UDM/AUSF/NRF SCP / SEPP every NF instance gets an auto-rotated cert
Purpose: what a real SBA PKI looks like. The root stays offline; an automated service handles the volume — because manual PKI at CNF scale is itself a security risk.
FIGURE 10.14SBI Threat Map — Where Attacks Land on the Stack
JSONinjection / over-permissive schemas OAuth tokentheft · replay · missing audience check HTTP/2request smuggling · resource abuse TLSdowngrade · plaintext fallback · weak cert mgmt IP / NRFrogue NF registration · NRF compromise (Ch 11) defense in depth: each layer has its own attacks and its own controls — securing only TLS leaves the OAuth and JSON layers exposed
Purpose: the consolidated threat view, mapped to the stack of Figure 10.1. Every layer needs its own control; an attacker only needs the weakest one.

10.7 The Practical Operator View

Common misconfiguration risks

10.8 Threats and Mitigations

ThreatVectorDefense
NF impersonationrogue process joins SBAmTLS with operator-issued certs
Authorization bypasstoken not validatedproducer-side signature/scope/audience/expiry check
Lateral movementcompromised NFOAuth scope + audience (least privilege)
Token replaycaptured token reusedshort expiry, audience binding, TLS channel
Rogue NF registrationfake profile to NRFauthenticated registration, NRF hardening
Cert outage / breachexpired/un-rotated certsautomated lifecycle (CMPv2), revocation

10.9 Terminology, Example, Checklist

TermMeaning
SBA / SBIService-Based Architecture / Interface — HTTP/2 REST core
mTLSMutual TLS — both ends authenticate by certificate
NRFNetwork Repository Function — directory + OAuth authorization server
access token / scope / audienceOAuth authorization grant / allowed services / valid target
SCPService Communication Proxy — indirect-communication fabric (models C/D)
CMPv2Certificate Management Protocol for automated enrollment (TS 33.310)

Real network example. A penetration test of a 5G core found that while mTLS was correctly enforced everywhere, one vendor’s producer NF accepted any syntactically valid token without checking the audience claim. The testers obtained a legitimate token issued for a different producer (scope was correct, audience was not) and replayed it successfully — reading subscription data they had no business accessing. The cryptography was flawless; the validation logic was incomplete. Fix: enable strict audience checking (a configuration flag the vendor shipped off by default) and add a producer-side test to the acceptance suite. OAuth only authorizes if the producer actually validates every claim.

Chapter Summary

? Review Questions

  1. Map each SBA stack layer to the security question it answers.
  2. Why is mTLS (not one-way TLS) required between NFs, and what does the certificate subject tell a producer?
  3. An NF presents a valid certificate and a syntactically valid token. List every check the producer must still perform before serving.
  4. Explain how scope and audience together limit a compromised NF — and what goes wrong if audience is unchecked.
  5. Compare communication models B and D from a security standpoint. What new risk does D introduce?
  6. Why is the NRF the SBA’s crown jewel? Name two distinct powers it holds.
  7. Why is automated certificate lifecycle a security requirement, not just an operations convenience?
  8. Diagnose: mTLS is enforced everywhere, but a token issued for UDM-A works at UDM-B. What is misconfigured and how do you fix it?
🧪 Mini lab — inspect SBA security in flight

With Open5GS (which uses SBI between NFs): (1) Capture inter-NF traffic and confirm whether TLS is in use; if running plaintext for the lab, observe the HTTP/2 requests and the Authorization: Bearer headers. (2) Decode an access token (it’s a JWT) and read its scope and audience claims — relate them to the call being made. (3) Find an NF discovery exchange to the NRF and a registration. (4) As a thought test, identify which single check, if skipped at the producer, would let a token for one NF be replayed at another (answer: audience). You have now seen the three SBA pillars — mTLS, OAuth, NRF — as real packets.