3GPP TS 29.500

5G System — Technical Realization of Service Based Architecture — Stage 3
V18.6.0 (2024-06) 29-Series Protocol

1. Scope

▶

Defines the technical framework for the 5G Service-Based Interface (SBI) — the HTTP/2 API layer that interconnects all 5G Core Network Functions. SBI replaces the point-to-point reference point model (N-interfaces) with a service-oriented approach where NFs expose services consumed by other NFs.

Security impact: SBI is the attack surface for the entire 5G core. Every NF-to-NF communication traverses SBI — making its security framework (TLS, OAuth 2.0, SCP) critical. See TS 33.501 §13 for security requirements.

2. SBI Architecture

▶
5G Core SBI Architecture: ┌─────────── SBI (HTTP/2) ───────────┐ │ │ ┌──────┤ ┌─────┐ ┌─────┐ ┌─────┐ │ │ NRF ├─────┤ AMF ├───┤ SMF ├───┤ UDM │ │ │ │ └──┬──┘ └──┬──┘ └─────┘ │ └──────┤ │ │ │ │ ┌──┴──┐ ┌──┴──┐ ┌─────┐ │ │ │ PCF ├───┤ NEF ├───┤ NSSF│ │ │ └─────┘ └─────┘ └─────┘ │ │ │ │ ┌─────┐ ┌─────┐ ┌─────┐ │ │ │ AUSF├───┤ UDR ├───┤ CHF │ │ │ └─────┘ └─────┘ └─────┘ │ └──────────────────────────────────────┘ All NFs connect to the common SBI bus NRF provides discovery and authorization Each NF exposes services as RESTful APIs
NF ServiceAPI PrefixKey Operations
Namf/namf-comm/N1N2 message transfer, EBI assignment
Nsmf/nsmf-pdusession/PDU session create/update/release
Nudm/nudm-sdm/Subscriber data management
Nausf/nausf-auth/UE authentication
Nnrf/nnrf-disc/NF discovery, access token
Npcf/npcf-smpolicycontrol/SM policy create/update/delete
Nnef/nnef-eventexposure/Event subscription, monitoring

3. HTTP/2 Transport Layer

▶
ParameterSBI RequirementSecurity Relevance
ProtocolHTTP/2 (RFC 7540) mandatoryMultiplexing reduces connection overhead
TLS VersionTLS 1.2+ mandatory, TLS 1.3 recommendedChannel encryption for all SBI traffic
Content Typeapplication/json (primary)JSON parsing vulnerabilities apply
EncodingTransfer-Encoding: chunked supportedChunked encoding attacks possible
StreamingServer-sent events for notificationsLong-lived connections need monitoring
URI Schemehttps:// mandatory for productionCertificate validation required
SBI Request/Response Flow: NF Consumer NF Producer ────────── ────────── │ │ │──── HTTP/2 POST /nsmf-pdusession/v1/... ────▷│ │ Headers: │ │ :method = POST │ │ :path = /nsmf-pdusession/v1/... │ │ content-type: application/json │ │ 3gpp-Sbi-Target-apiRoot: ... │ │ Authorization: Bearer <token> │ │ │ │◁──── 201 Created ────────────────────────────│ │ Location: /nsmf-pdusession/v1/.../123 │ │ Body: { smContextRef: "..." } │ │ │

4. Service Discovery (NRF)

▶

The NRF (NF Repository Function) is the central registry for all NF service instances. NFs register their profiles and discover other NFs through NRF APIs.

NF Registration & Discovery: ┌───────┐ ┌───────┐ ┌───────┐ │ AMF │ │ NRF │ │ SMF │ └───┬───┘ └───┬───┘ └───┬───┘ │ │ │ │── PUT /nnrf-nfm/v1/nf-instances/{id} ▷│ NF Registration │◁──── 201 Created ─│ │ │ │ │ │ │◁── PUT /nnrf-nfm/ ──│ NF Registration │ │──── 201 Created ──▷│ │ │ │ │── GET /nnrf-disc/v1/nf-instances? ────▷│ Discovery Query │ service-names=nsmf-pdusession │ (find SMF) │◁──── 200 OK ──────│ │ │ { nfInstances: [ │ │ { nfInstanceId: "smf-01", │ │ ipv4Addresses: ["10.0.1.5"], │ │ nfServices: [...] } │ │ ]} │ │ │ │
Discovery ParameterDescriptionSecurity Note
service-namesFilter by NF service namePrevent enumeration of all services
target-nf-typeFilter by NF type (AMF, SMF, etc.)Scope results to authorized types
requester-nf-typeIdentify requesting NF typeNRF enforces access policy per type
target-plmn-listFilter by PLMN for roamingPrevent cross-PLMN discovery leaks
snssaisFilter by network sliceEnforce slice-level isolation

5. Service Authorization (OAuth 2.0)

▶
OAuth 2.0 Token Flow for SBI: NF Consumer NRF (Auth Server) NF Producer ────────── ───────────────── ────────── │ │ │ │── POST /oauth2/token ─▷│ │ │ grant_type= │ │ │ client_credentials │ │ │ scope=nsmf-pdusession │ │ │ target_nf_instance_id │ │ │ │ │ │◁── 200 OK ────────────│ │ │ { access_token: JWT, │ │ │ token_type: Bearer,│ │ │ expires_in: 3600 } │ │ │ │ │ │── POST /nsmf-pdusession ──────────────────────▷│ │ Authorization: Bearer <JWT> │ │ │ │ │ │ NF Producer │ │ │ validates JWT: │ │ │ - signature │ │ │ - expiry │ │ │ - scope │ │ │ - audience │ │◁── 201 Created ───────────────────────────────│ │ │ │
JWT ClaimContentVerification
issNRF NF Instance IDMust match known NRF
subConsumer NF Instance IDMust match TLS client cert
audProducer NF Instance ID or typeMust match receiving NF
scopeAuthorized service namesMust include requested service
expToken expiration timestampMust not be expired

6. Communication Models

▶

6.1 Direct Communication

▶
Model A — Direct with Discovery: Consumer ──discover──▷ NRF ──response──▷ Consumer ──call──▷ Producer Model B — Direct with Local Cache: Consumer uses cached NF profiles (from previous discovery) Consumer ──call──▷ Producer (no NRF query)

TLS: mTLS between Consumer and Producer. Each NF validates the other's certificate.

6.2 Indirect Communication (via SCP)

▶
Model C — Indirect with Delegated Discovery: Consumer ──call──▷ SCP ──discover──▷ NRF SCP ──forward──▷ Producer SCP ◁── response ── Producer Consumer ◁──response── SCP Model D — Indirect without Delegated Discovery: Consumer ──discover──▷ NRF Consumer ──call──▷ SCP ──forward──▷ Producer Consumer ◁──response── SCP
SCP Security: SCP sees all traffic → potential single point of compromise. mTLS required on both hops (Consumer↔SCP and SCP↔Producer). OAuth tokens validated at both SCP and Producer. See TS 33.527 (SCP SCAS).

7. Custom 3GPP SBI Headers

▶
HeaderPurposeSecurity Concern
3gpp-Sbi-Target-apiRootTarget NF API root (for SCP routing)Spoofing → route to rogue NF
3gpp-Sbi-CallbackCallback URI for async responsesSSRF via crafted callback URI
3gpp-Sbi-Routing-BindingBind requests to specific NF instanceSession fixation if manipulated
3gpp-Sbi-Discovery-*Delegated discovery parametersNF enumeration via broad queries
3gpp-Sbi-OciOverload Control InformationFake congestion → DoS redirection
3gpp-Sbi-Max-Forward-HopsPrevent routing loopsSet to 0 → immediate rejection
3gpp-Sbi-Producer-IdIdentify producing NFMust match TLS cert identity

8. Error Handling & Resilience

▶
HTTP Status3GPP UsageProblemDetails cause
307 / 308NF redirect (temporary/permanent)TARGET_NF_MOVED
400Malformed request / invalid IEMANDATORY_IE_INCORRECT
401Authentication failureAuthentication credential missing/invalid
403Authorization failureUNAUTHORIZED_NF, SLICE_NOT_ALLOWED
404Resource not foundCONTEXT_NOT_FOUND, SUBSCRIPTION_NOT_FOUND
429Rate limiting / overloadNF_CONGESTION, Retry-After header
503Service unavailableNF_CONGESTION_RISK, Retry-After header
504Upstream NF timeoutUPSTREAM_CONNECTION_TIMEOUT

9. Security Considerations

▶
Attack VectorMechanismMitigation
Rogue NF Registration Attacker registers fake NF in NRF → receives redirected traffic mTLS for NF registration, NRF validates NF type against cert
OAuth Token Theft Stolen JWT used to impersonate consumer NF Token binding to TLS cert, short expiry, audience validation
API Parameter Injection Crafted JSON payloads exploit NF parsing Strict OpenAPI schema validation, input sanitization
SSRF via Callbacks Malicious callback URI targets internal services Allowlist callback domains, validate against NF profile
Header Spoofing Forged 3gpp-Sbi-* headers alter routing/identity SCP/Producer must validate headers against TLS identity
Discovery Enumeration Broad NRF queries reveal network topology NRF enforces per-NF-type access policies on discovery