# openairinterface/oai-cn5g-sepp architecture

> Architecture diagram of the GitHub repository openairinterface/oai-cn5g-sepp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/openairinterface/oai-cn5g-sepp
- Repository: https://github.com/openairinterface/oai-cn5g-sepp

## Overview

This repository implements the OpenAirInterface Security Edge Protection Proxy (SEPP), a 5G Core network element. Its main workflow is to accept N32-c handshake and N32-f forwarding requests over its SBI/NBI HTTP servers, dispatch them through the SEPP application, and perform handshake, forwarding, or mapping work; it also maintains SEPP profile/NRF lifecycle functions. Startup wiring and key API dispatch are visible in excerpts, while several capability links rely on documented handlers or remain unverified because their implementations were not sampled.

Main entry points: [`src/sepp_app/sepp_app.cpp`](https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/sepp_app/sepp_app.cpp) (Application dispatch), [`src/api-server/sepp-http2-nbi-server.cpp`](https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/api-server/sepp-http2-nbi-server.cpp) (NBI HTTP/2), [`src/oai_sepp/main.cpp`](https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/oai_sepp/main.cpp) (Process startup), [`src/api-server/sepp-http2-sbi-server.cpp`](https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/api-server/sepp-http2-sbi-server.cpp) (SBI HTTP/2)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime and HTTP"]
  node_entry["Process startup<br/>[main.cpp]"]
  node_config["SEPP configuration<br/>[sepp_config.hpp]"]
  node_nbi["NBI HTTP/2"]
  node_sbi["SBI HTTP/2"]
  node_http1["HTTP/1 API"]
  node_app["Application dispatch<br/>[sepp_app.cpp]"]
  node_events["Event handling<br/>[sepp_event.cpp]"]
  node_tasks["Task scheduler<br/>[task_manager.cpp]"]
  node_settings["Runtime options<br/>[options.cpp]"]
end

subgraph group_protocol["N32 Procedures"]
  node_handshake["N32-c handshake"]
  node_forward["N32-f forwarding"]
  node_jose["JOSE security<br/>[sepp_JOSE.cpp]"]
  node_terminate["Context termination API"]
  node_error["Error reporting API"]
  node_capability["Capability exchange API"]
  node_parameters["Parameter exchange API"]
  node_mapping_api["Mapping document API"]
end

subgraph group_operations["SEPP Operations"]
  node_nrf["NRF integration<br/>[sepp_nrf.cpp]"]
  node_profile["SEPP profile<br/>[sepp_profile.cpp]"]
  node_mapping["Telescopic FQDN mapping"]
end

node_peer(("Network peer"))

node_peer -.->|"sends requests"| node_nbi
node_peer -.->|"sends requests"| node_sbi
node_entry -->|"parses options"| node_settings
node_entry -->|"initializes"| node_config
node_entry -->|"creates"| node_app
node_entry -->|"starts"| node_nbi
node_entry -->|"starts"| node_sbi
node_entry -->|"starts when HTTP/1"| node_http1
node_entry -->|"starts"| node_tasks
node_nbi -->|"dispatches handlers"| node_app
node_sbi -->|"dispatches handlers"| node_app
node_http1 -.->|"uses application"| node_app
node_app -.->|"delegates handshake"| node_handshake
node_app -.->|"delegates forwarding"| node_forward
node_app -.->|"uses NRF lifecycle"| node_nrf
node_app -.->|"maintains profile"| node_profile
node_app -.->|"queries mappings"| node_mapping
node_forward -->|"uses JOSE"| node_jose
node_tasks -->|"ticks events"| node_events
node_nbi -.->|"handles termination"| node_terminate
node_nbi -.->|"handles error reports"| node_error
node_nbi -.->|"handles capability exchange"| node_capability
node_nbi -.->|"handles parameter exchange"| node_parameters
node_nbi -.->|"serves mapping document"| node_mapping_api
node_terminate -.->|"invokes operation"| node_app
node_mapping_api -.->|"requests mapping"| node_app

click node_entry "https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/oai_sepp/main.cpp"
click node_config "https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/sepp_app/sepp_config.hpp"
click node_nbi "https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/api-server/sepp-http2-nbi-server.cpp"
click node_sbi "https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/api-server/sepp-http2-sbi-server.cpp"
click node_http1 "https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/api-server/sepp-api-server.cpp"
click node_app "https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/sepp_app/sepp_app.cpp"
click node_events "https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/sepp_app/sepp_event.cpp"
click node_tasks "https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/sepp_app/task_manager.cpp"
click node_handshake "https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/sepp_app/sepp_n32c_handshake.cpp"
click node_forward "https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/sepp_app/sepp_n32f_forward.cpp"
click node_jose "https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/sepp_app/sepp_JOSE.cpp"
click node_terminate "https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/api-server/api/N32FContextTerminateApi.cpp"
click node_error "https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/api-server/api/N32FErrorReportApi.cpp"
click node_capability "https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/api-server/api/SecurityCapabilityNegotiationApi.cpp"
click node_parameters "https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/api-server/api/ParameterExchangeApi.cpp"
click node_mapping_api "https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/api-server/api/TelescopicMappingDocumentApi.cpp"
click node_nrf "https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/sepp_app/sepp_nrf.cpp"
click node_profile "https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/sepp_app/sepp_profile.cpp"
click node_mapping "https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/sepp_app/sepp_telescopic_fqdn_mapping.cpp"
click node_settings "https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/oai_sepp/options.cpp"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_entry,node_config,node_nbi,node_sbi,node_http1,node_app,node_events,node_tasks,node_settings toneBlue
class node_handshake,node_forward,node_jose,node_terminate,node_error,node_capability,node_parameters,node_mapping_api toneAmber
class node_nrf,node_profile,node_mapping toneMint
class node_peer toneIndigo
```

## Components

### Runtime and HTTP

- [Process startup](https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/oai_sepp/main.cpp): `src/oai_sepp/main.cpp`
- [SEPP configuration](https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/sepp_app/sepp_config.hpp): `src/sepp_app/sepp_config.hpp`
- [NBI HTTP/2](https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/api-server/sepp-http2-nbi-server.cpp): `src/api-server/sepp-http2-nbi-server.cpp`
- [SBI HTTP/2](https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/api-server/sepp-http2-sbi-server.cpp): `src/api-server/sepp-http2-sbi-server.cpp`
- [HTTP/1 API](https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/api-server/sepp-api-server.cpp): `src/api-server/sepp-api-server.cpp`
- [Application dispatch](https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/sepp_app/sepp_app.cpp): `src/sepp_app/sepp_app.cpp`
- [Event handling](https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/sepp_app/sepp_event.cpp): `src/sepp_app/sepp_event.cpp`
- [Task scheduler](https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/sepp_app/task_manager.cpp): `src/sepp_app/task_manager.cpp`
- [Runtime options](https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/oai_sepp/options.cpp): `src/oai_sepp/options.cpp`

### N32 Procedures

- [N32-c handshake](https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/sepp_app/sepp_n32c_handshake.cpp): `src/sepp_app/sepp_n32c_handshake.cpp`
- [N32-f forwarding](https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/sepp_app/sepp_n32f_forward.cpp): `src/sepp_app/sepp_n32f_forward.cpp`
- [JOSE security](https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/sepp_app/sepp_JOSE.cpp): `src/sepp_app/sepp_JOSE.cpp`
- [Context termination API](https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/api-server/api/N32FContextTerminateApi.cpp): `src/api-server/api/N32FContextTerminateApi.cpp`
- [Error reporting API](https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/api-server/api/N32FErrorReportApi.cpp): `src/api-server/api/N32FErrorReportApi.cpp`
- [Capability exchange API](https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/api-server/api/SecurityCapabilityNegotiationApi.cpp): `src/api-server/api/SecurityCapabilityNegotiationApi.cpp`
- [Parameter exchange API](https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/api-server/api/ParameterExchangeApi.cpp): `src/api-server/api/ParameterExchangeApi.cpp`
- [Mapping document API](https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/api-server/api/TelescopicMappingDocumentApi.cpp): `src/api-server/api/TelescopicMappingDocumentApi.cpp`

### SEPP Operations

- [NRF integration](https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/sepp_app/sepp_nrf.cpp): `src/sepp_app/sepp_nrf.cpp`
- [SEPP profile](https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/sepp_app/sepp_profile.cpp): `src/sepp_app/sepp_profile.cpp`
- [Telescopic FQDN mapping](https://github.com/openairinterface/oai-cn5g-sepp/blob/develop/src/sepp_app/sepp_telescopic_fqdn_mapping.cpp): `src/sepp_app/sepp_telescopic_fqdn_mapping.cpp`

### Other components

- **Network peer**

## Connections

- Network peer → NBI HTTP/2: sends requests
- Network peer → SBI HTTP/2: sends requests
- Process startup → Runtime options: parses options (evidence: `src/oai_sepp/main.cpp`)
- Process startup → SEPP configuration: initializes (evidence: `src/oai_sepp/main.cpp`)
- Process startup → Application dispatch: creates (evidence: `src/oai_sepp/main.cpp`)
- Process startup → NBI HTTP/2: starts (evidence: `src/oai_sepp/main.cpp`)
- Process startup → SBI HTTP/2: starts (evidence: `src/oai_sepp/main.cpp`)
- Process startup → HTTP/1 API: starts when HTTP/1 (evidence: `src/oai_sepp/main.cpp`)
- Process startup → Task scheduler: starts (evidence: `src/oai_sepp/main.cpp`)
- NBI HTTP/2 → Application dispatch: dispatches handlers (evidence: `src/api-server/sepp-http2-nbi-server.cpp`)
- SBI HTTP/2 → Application dispatch: dispatches handlers (evidence: `src/api-server/sepp-http2-sbi-server.cpp`)
- HTTP/1 API → Application dispatch: uses application
- Application dispatch → N32-c handshake: delegates handshake
- Application dispatch → N32-f forwarding: delegates forwarding
- Application dispatch → NRF integration: uses NRF lifecycle
- Application dispatch → SEPP profile: maintains profile
- Application dispatch → Telescopic FQDN mapping: queries mappings
- N32-f forwarding → JOSE security: uses JOSE (evidence: `src/sepp_app/sepp_n32f_forward.cpp`)
- Task scheduler → Event handling: ticks events (evidence: `src/sepp_app/task_manager.cpp`)
- NBI HTTP/2 → Context termination API: handles termination
- NBI HTTP/2 → Error reporting API: handles error reports
- NBI HTTP/2 → Capability exchange API: handles capability exchange
- NBI HTTP/2 → Parameter exchange API: handles parameter exchange
- NBI HTTP/2 → Mapping document API: serves mapping document
- Context termination API → Application dispatch: invokes operation
- Mapping document API → Application dispatch: requests mapping
