--- title: UDM and UDR disqus: hackmd --- UDR and UDM === ![image](https://hackmd.io/_uploads/SkMD9emEC.png) ![image](https://hackmd.io/_uploads/SkaSGGXVA.png) [TOC] ## UDR Function Unified Data Management (UDM) is a core component in the 5G network architecture, playing a crucial role in managing subscription data and user profiles. In the context of Free5GC, an open-source implementation of the 5G core network, here is how UDM operates within Free5GC: ### Key Functions of UDM 1. **Subscription Data Management** - UDM stores and manages user subscription data, including authentication information, service profiles, and user policies. 2. **Authentication and Authorization** - UDM participates in the user authentication and authorization process, working with components like the Authentication Server Function (AUSF) and the Access and Mobility Management Function (AMF). 3. **User Profile Provisioning** - When a user registers with the network, UDM provides the necessary user profile information to other 5G network components to deliver appropriate services. 4. **Mobility Management** - UDM contributes to mobility management by providing the information needed by components such as the AMF to handle user movement between cells. ### UDM Operation Process in Free5GC 1. **Registration Process** - When a 5G device (UE - User Equipment) registers with the network, the registration request is sent to the AMF. - The AMF forwards the authentication request to the AUSF. - The AUSF then interacts with the UDM to verify the user's credentials. - UDM sends the authentication response back to the AUSF, which then forwards it to the AMF and finally to the UE. 2. **Subscription Data Provisioning** - Once authentication is successful, UDM provides the subscription data and service profile to the AMF. - The AMF uses this information to set up network sessions and Quality of Service (QoS) policies. 3. **Mobility and Session Management** - UDM provides the necessary information for mobility management, including user location and connection status. - UDM also assists in maintaining active sessions as users move between different cells. ### Communication Between Components - **Interface N10**: UDM communicates with the AMF through the N10 interface to provide and manage subscription information. - **Interface N12**: UDM communicates with the AUSF through the N12 interface for user authentication. - **Interface N13**: UDM interacts with the Policy Control Function (PCF) through the N13 interface to manage user policies. ### Implementing UDM in Free5GC Free5GC provides a UDM module that can be configured and used in a 5G network setup. Here are some basic steps to configure UDM in Free5GC: 1. **UDM Configuration File** - The UDM configuration file is customized with network parameters and user subscription information. 2. **Running UDM** - After configuration, UDM is run as part of the Free5GC core network. - UDM listens for requests from other components and interacts as per the functions described. 3. **Monitoring and Logs** - Free5GC provides logs and monitoring tools to track the performance and activities of UDM. By understanding the operation of UDM in Free5GC, we can optimize subscription data management and enhance the performance and security of the 5G network. In the 5G network architecture, Unified Data Repository (UDR) and Unified Data Management (UDM) are two key components that work together to manage subscriber data and user profiles. Free5GC, as an open-source implementation of the 5G core network, follows this concept as well. Here is an explanation of the relationship between UDR and UDM in Free5GC: ### Unified Data Repository (UDR) UDR is a component that stores all subscriber data and user profiles in a structured format. Its functions include: 1. **Subscriber Data Storage** - Storing information such as user identities, authentication parameters, and service profiles. 2. **Data Management** - Managing access to and maintenance of the data required by other network components. 3. **Data Consistency** - Ensuring the consistency of subscriber data across the network, so all components have access to accurate and up-to-date information. ### Unified Data Management (UDM) UDM is a component that manages access to and manipulation of subscriber data stored in UDR. Its functions include: 1. **Authentication and Authorization** - Providing user authentication and authorization services by accessing data stored in UDR. 2. **User Profile Provisioning** - Supplying user profile information required by other network components such as AMF (Access and Mobility Management Function) and SMF (Session Management Function). 3. **Policy Management** - Interacting with PCF (Policy Control Function) to manage user policies. ### Relationship between UDR and UDM 1. **Data Interaction and Management** - UDM acts as a data manager that retrieves, manipulates, and updates subscriber data stored in UDR. UDM does not store data itself but accesses data from UDR as needed. 2. **Data Consistency and Synchronization** - UDM ensures that any changes or updates to subscriber data are immediately applied to UDR, maintaining data consistency across the network. 3. **Authentication Process** - During the user authentication process, UDM retrieves authentication parameters from UDR to verify user credentials and provides the appropriate response to AUSF (Authentication Server Function). 4. **User Profile Provisioning** - When other network components, such as AMF or SMF, need user profile information, UDM accesses UDR to retrieve the data and then provides it to the requesting components. ### Implementation in Free5GC In Free5GC, UDR and UDM are implemented as separate but integrated services. Here's how they work specifically: 1. **Configuration and Setup** - Both components are configured through configuration files that specify network parameters and subscriber data. 2. **Interaction via API** - UDM and UDR communicate via predefined APIs, allowing UDM to access and update data stored in UDR. 3. **Data Processing** - When there is a request for subscriber data from other components, UDM processes the request by accessing data from UDR and sending the appropriate response. 4. **Logging and Monitoring** - Free5GC provides logging and monitoring tools to oversee the interactions between UDM and UDR and ensure they are functioning correctly. But, UDR and UDM work together in Free5GC to ensure efficient and consistent management of subscriber data, supporting various 5G network functions effectively. ![image](https://hackmd.io/_uploads/ByLUT-74C.png) The provided log is the output from the Unified Data Repository (UDR) within the Free5GC system, which is part of the 5G core network. This log provides information about the version, configuration, and operational status of the UDR at a specific time. Here is a detailed explanation of each log entry: ### Log Explanation #### Version and Build Information ```plaintext 2024-05-28T07:44:45.465309376Z [INFO][UDR][Main] UDR version: free5GC version: v3.3.0 build time: 2024-03-01T08:01:16Z commit hash: a8ef9d9f commit time: 2023-05-11T08:26:37Z go version: go1.18.10 linux/amd64 ``` - **Timestamp**: 2024-05-28T07:44:45.465309376Z - Indicates the time the log entry was recorded. - **UDR version**: The UDR version is not specified, possibly a placeholder. - **free5GC version**: v3.3.0 - The version of Free5GC being used. - **build time**: 2024-03-01T08:01:16Z - The build time of the UDR. - **commit hash**: a8ef9d9f - The commit hash of the source code used for this build. - **commit time**: 2023-05-11T08:26:37Z - The time the source code commit was made. - **go version**: go1.18.10 linux/amd64 - The version of the Go programming language and platform used for the build. #### Reading Configuration ```plaintext 2024-05-28T07:44:45.465622335Z [INFO][UDR][CFG] Read config from [./config/udrcfg.yaml] ``` - **Read config from [./config/udrcfg.yaml]** - The UDR reads its configuration from the `udrcfg.yaml` file located in the `./config` directory. #### Creating NF Profile ```plaintext 2024-05-28T07:44:45.466630665Z [INFO][NRF][NFM] Create NF Profile ``` - **Create NF Profile** - The Network Function Repository Function (NRF) creates a Network Function (NF) profile for the UDR. This means the UDR is registering itself with the NRF. #### Log Information ```plaintext 2024-05-28T07:44:45.467263494Z [INFO][UDR][Main] Log enable is set to [true] 2024-05-28T07:44:45.467369489Z [INFO][UDR][Main] Log level is set to [info] 2024-05-28T07:44:45.467433634Z [INFO][UDR][Main] Report Caller is set to [false] ``` - **Log enable is set to [true]** - Logging is enabled. - **Log level is set to [info]** - The log level is set to `info`, meaning the log will record general information about normal operations. - **Report Caller is set to [false]** - The log will not record information about the caller of functions. #### UDR Configuration Information ```plaintext 2024-05-28T07:44:45.467554201Z [INFO][UDR][Init] UDR Config Info: Version[1.0.2] Description[UDR initial local configuration] ``` - **Version[1.0.2]** - The version of the UDR configuration. - **Description[UDR initial local configuration]** - Description of the UDR configuration as the initial local configuration. #### Server Started ```plaintext 2024-05-28T07:44:45.467973038Z [INFO][UDR][Init] Server started ``` - **Server started** - The UDR server has started and is ready to receive requests. ![image](https://hackmd.io/_uploads/ByXlJM7VR.png) The provided log output is from the Unified Data Management (UDM) component within the Free5GC system, which is part of the 5G core network. This log provides information about the version, configuration, and operational status of the UDM at a specific time. Here is a detailed explanation of each log entry: ### Log Explanation #### Version and Build Information ```plaintext 2024-05-28T07:44:45.669169012Z [INFO][UDM][Main] UDM version: free5GC version: v3.3.0 build time: 2024-03-01T08:01:12Z commit hash: f9aad0ef commit time: 2023-05-11T08:24:25Z go version: go1.18.10 linux/amd64 ``` - **Timestamp**: 2024-05-28T07:44:45.669169012Z - Indicates the time the log entry was recorded. - **UDM version**: The UDM version is not specified, possibly a placeholder. - **free5GC version**: v3.3.0 - The version of Free5GC being used. - **build time**: 2024-03-01T08:01:12Z - The build time of the UDM. - **commit hash**: f9aad0ef - The commit hash of the source code used for this build. - **commit time**: 2023-05-11T08:24:25Z - The time the source code commit was made. - **go version**: go1.18.10 linux/amd64 - The version of the Go programming language and platform used for the build. #### Reading Configuration ```plaintext 2024-05-28T07:44:45.669403999Z [INFO][UDM][CFG] Read config from [./config/udmcfg.yaml] ``` - **Read config from [./config/udmcfg.yaml]** - The UDM reads its configuration from the `udmcfg.yaml` file located in the `./config` directory. #### Log Information ```plaintext 2024-05-28T07:44:45.671171733Z [INFO][UDM][Main] Log enable is set to [true] 2024-05-28T07:44:45.671245633Z [INFO][UDM][Main] Log level is set to [info] 2024-05-28T07:44:45.671297320Z [INFO][UDM][Main] Report Caller is set to [false] ``` - **Log enable is set to [true]** - Logging is enabled. - **Log level is set to [info]** - The log level is set to `info`, meaning the log will record general information about normal operations. - **Report Caller is set to [false]** - The log will not record information about the caller of functions. #### UDM Configuration Information ```plaintext 2024-05-28T07:44:45.671372406Z [INFO][UDM][Init] UDM Config Info: Version[1.0.3] Description[UDM initial local configuration] ``` - **Version[1.0.3]** - The version of the UDM configuration. - **Description[UDM initial local configuration]** - Description of the UDM configuration as the initial local configuration. #### Server Started ```plaintext 2024-05-28T07:44:45.671422161Z [INFO][UDM][Init] Server started ``` - **Server started** - The UDM server has started and is ready to receive requests. #### Utility Configuration Information ```plaintext 2024-05-28T07:44:45.671699748Z [INFO][UDM][Util] udmconfig Info: Version[1.0.3] Description[UDM initial local configuration] ``` - **udmconfig Info: Version[1.0.3] Description[UDM initial local configuration]** - Provides additional configuration information specific to the utility functions of UDM. It reiterates the version and description of the initial local configuration. ![image](https://hackmd.io/_uploads/r15wkf7E0.png) The provided log entries are from the Unified Data Management (UDM) component within the Free5GC system, specifically related to handling authentication data requests and processing Subscription Concealed Identifier (SUCI) information. Here is a detailed explanation of each log entry: ### Log Explanation #### Handling GenerateAuthDataRequest ```plaintext [INFO][UDM][UEAU] Handle GenerateAuthDataRequest ``` - **[INFO]**: Indicates the log level as informational. - **[UDM]**: The component generating the log, which is the Unified Data Management. - **[UEAU]**: The sub-module within UDM handling User Equipment Authentication. - **Handle GenerateAuthDataRequest**: Indicates that the UDM is processing a request to generate authentication data for a user. #### Processing SUCI Information ```plaintext 2024-05-28T07:45:17.007735469Z [INFO][UDM][Suci] suciPart: [suci 0 208 93 0000 0 0 0000000003] ``` - **Timestamp**: 2024-05-28T07:45:17.007735469Z - The time the log entry was recorded. - **[INFO]**: Indicates the log level as informational. - **[UDM]**: The component generating the log, which is the Unified Data Management. - **[Suci]**: The sub-module within UDM handling SUCI (Subscription Concealed Identifier). - **suciPart: [suci 0 208 93 0000 0 0 0000000003]** - The SUCI part being processed. SUCI is used to protect the SUPI (Subscription Permanent Identifier, like IMSI) during transmission to prevent eavesdropping. The SUCI format is broken down as follows: - **suci**: The identifier prefix. - **0**: Protection scheme identifier. - **208**: Mobile Country Code (MCC). - **93**: Mobile Network Code (MNC). - **0000**: Routing Indicator. - **0**: Home Network Public Key Identifier. - **0**: Scheme Output. - **0000000003**: Protection scheme-specific data (e.g., concealed SUPI). ```plaintext 2024-05-28T07:45:17.007846700Z [INFO][UDM][Suci] scheme 0 ``` - **Timestamp**: 2024-05-28T07:45:17.007846700Z - The time the log entry was recorded. - **[INFO]**: Indicates the log level as informational. - **[UDM]**: The component generating the log, which is the Unified Data Management. - **[Suci]**: The sub-module within UDM handling SUCI. - **scheme 0** - The protection scheme used for the SUCI. Scheme 0 typically indicates that no protection scheme is applied (plaintext transmission), though this can vary by configuration. ```plaintext 2024-05-28T07:45:17.007952754Z [INFO][UDM][Suci] SUPI type is IMSI ``` - **Timestamp**: 2024-05-28T07:45:17.007952754Z - The time the log entry was recorded. - **[INFO]**: Indicates the log level as informational. - **[UDM]**: The component generating the log, which is the Unified Data Management. - **[Suci]**: The sub-module within UDM handling SUCI. - **SUPI type is IMSI** - The type of Subscription Permanent Identifier (SUPI) being processed is an International Mobile Subscriber Identity (IMSI). #### Additional Information ```plaintext http://127.0.0.10:8000 ``` - This URL is likely included for reference or debugging purposes. It points to a local server at IP address `127.0.0.10` on port `8000`, which might be used for internal communication or accessing some part of the UDM service. ![image](https://hackmd.io/_uploads/HJPEbG7NA.png) The provided log entries detail interactions between the Unified Data Management (UDM) and Unified Data Repository (UDR) components within the Free5GC system, focusing on authentication data handling. Here's a breakdown of each log entry: ### Log Explanation #### UDR Handling Authentication Subscription Data Query ```plaintext 2024-05-28T07:45:17.041631378Z [INFO][UDR][DataRepo] Handle QueryAuthSubsData ``` - **Timestamp**: 2024-05-28T07:45:17.041631378Z - Indicates the time the log entry was recorded. - **[INFO]**: Log level is informational. - **[UDR]**: The Unified Data Repository component. - **[DataRepo]**: The sub-module handling the data repository. - **Handle QueryAuthSubsData** - Indicates that the UDR is handling a query for authentication subscription data. #### UDR Responding to GET Request ```plaintext 2024-05-28T07:45:17.046778636Z [INFO][UDR][GIN] | 200 | 127.0.0.1 | GET | /nudr-dr/v1/subscription-data/imsi-208930000000003/authentication-data/authentication-subscription | ``` - **Timestamp**: 2024-05-28T07:45:17.046778636Z - Indicates the time the log entry was recorded. - **[INFO]**: Log level is informational. - **[UDR]**: The Unified Data Repository component. - **[GIN]**: Indicates that this log entry is produced by the GIN web framework, which is used in Free5GC. - **| 200 |**: HTTP status code 200, indicating a successful response. - **127.0.0.1**: The IP address of the requester (localhost). - **GET**: The HTTP method used. - **/nudr-dr/v1/subscription-data/imsi-208930000000003/authentication-data/authentication-subscription** - The endpoint being accessed, which retrieves authentication subscription data for the IMSI 208930000000003. #### UDM Handling Nil Opc ```plaintext 2024-05-28T07:45:17.049129322Z [INFO][UDM][UEAU] Nil Opc ``` - **Timestamp**: 2024-05-28T07:45:17.049129322Z - Indicates the time the log entry was recorded. - **[INFO]**: Log level is informational. - **[UDM]**: The Unified Data Management component. - **[UEAU]**: The sub-module handling User Equipment Authentication. - **Nil Opc** - Indicates that the Operator Code (Opc) used for generating authentication vectors is nil or not provided. Opc is crucial in the authentication process. #### UDR Handling Modify Authentication Request ```plaintext 2024-05-28T07:45:17.052396625Z [INFO][UDR][DataRepo] Handle ModifyAuthentication ``` - **Timestamp**: 2024-05-28T07:45:17.052396625Z - Indicates the time the log entry was recorded. - **[INFO]**: Log level is informational. - **[UDR]**: The Unified Data Repository component. - **[DataRepo]**: The sub-module handling the data repository. - **Handle ModifyAuthentication** - Indicates that the UDR is processing a request to modify authentication data. #### UDR Responding to PATCH Request ```plaintext 2024-05-28T07:45:17.076870163Z [INFO][UDR][GIN] | 204 | 127.0.0.1 | PATCH | /nudr-dr/v1/subscription-data/imsi-208930000000003/authentication-data/authentication-subscription | ``` - **Timestamp**: 2024-05-28T07:45:17.076870163Z - Indicates the time the log entry was recorded. - **[INFO]**: Log level is informational. - **[UDR]**: The Unified Data Repository component. - **[GIN]**: Indicates that this log entry is produced by the GIN web framework. - **| 204 |**: HTTP status code 204, indicating a successful request with no content returned. - **127.0.0.1**: The IP address of the requester (localhost). - **PATCH**: The HTTP method used. - **/nudr-dr/v1/subscription-data/imsi-208930000000003/authentication-data/authentication-subscription** - The endpoint being accessed, which modifies authentication subscription data for the IMSI 208930000000003. #### UDM Responding to POST Request ```plaintext 2024-05-28T07:45:17.078131316Z [INFO][UDM][GIN] | 200 | 127.0.0.1 | POST | /nudm-ueau/v1/suci-0-208-93-0000-0-0-0000000003/security-information/generate-auth-data | ``` - **Timestamp**: 2024-05-28T07:45:17.078131316Z - Indicates the time the log entry was recorded. - **[INFO]**: Log level is informational. - **[UDM]**: The Unified Data Management component. - **[GIN]**: Indicates that this log entry is produced by the GIN web framework. - **| 200 |**: HTTP status code 200, indicating a successful response. - **127.0.0.1**: The IP address of the requester (localhost). - **POST**: The HTTP method used. - **/nudm-ueau/v1/suci-0-208-93-0000-0-0-0000000003/security-information/generate-auth-data** - The endpoint being accessed, which generates authentication data based on the SUCI (Subscription Concealed Identifier). 1. **UDR** is handling a query for authentication subscription data and responding successfully. 2. **UDM** is processing a GenerateAuthDataRequest and logs that the Operator Code (Opc) is nil. 3. **UDR** is processing a request to modify authentication data and responds successfully with a 204 status code. 4. **UDM** generates authentication data based on the SUCI and responds successfully with a 200 status code. These log entries show the interaction between UDM and UDR components in handling user authentication, specifically dealing with subscription data and generating authentication vectors based on SUCI. ![image](https://hackmd.io/_uploads/SkbmzfQN0.png) The provided log entries detail a specific interaction involving the Unified Data Repository (UDR) component within the Free5GC system, focusing on handling and logging of application data influence notifications. Here's a breakdown of each log entry: ### Log Explanation #### UDR Handling Application Data Influence Subscription Notification ```plaintext 2024-05-28T07:45:17.607632420Z [INFO][UDR][DataRepo] Handle ApplicationDataInfluenceDataSubsToNotifyPost ``` - **Timestamp**: 2024-05-28T07:45:17.607632420Z - Indicates the precise time the log entry was recorded. - **[INFO]**: Log level is informational. - **[UDR]**: The Unified Data Repository component. - **[DataRepo]**: The sub-module handling the data repository. - **Handle ApplicationDataInfluenceDataSubsToNotifyPost** - Indicates that the UDR is handling a POST request related to application data influence data subscriptions to notify. #### UDR Responding to POST Request ```plaintext 2024-05-28T07:45:17.607885850Z [INFO][UDR][GIN] | 201 | 127.0.0.1 | POST | /nudr-dr/v1/application-data/influenceData/subs-to-notify | ``` - **Timestamp**: 2024-05-28T07:45:17.607885850Z - Indicates the precise time the log entry was recorded. - **[INFO]**: Log level is informational. - **[UDR]**: The Unified Data Repository component. - **[GIN]**: Indicates that this log entry is produced by the GIN web framework, which is used in Free5GC. - **| 201 |**: HTTP status code 201, indicating a successful creation of a resource. - **127.0.0.1**: The IP address of the requester (localhost). - **POST**: The HTTP method used. - **/nudr-dr/v1/application-data/influenceData/subs-to-notify** - The endpoint being accessed, which is used to post application data influence data subscriptions to notify. 1. **UDR Handling**: The log entry shows that the UDR component is handling a POST request related to "application data influence data subscriptions to notify". This means that the UDR is managing a subscription where certain applications or services have requested to be notified about specific data influences or changes. 2. **HTTP Status Code 201**: The second log entry indicates that the UDR successfully processed the POST request and created the necessary resource. A status code of 201 means the request has been fulfilled and has resulted in one or more new resources being created. This response confirms that the UDR has successfully registered the new subscription. 3. **Endpoint Accessed**: The endpoint `/nudr-dr/v1/application-data/influenceData/subs-to-notify` is specifically designed for posting subscriptions that require notifications on data influences. This can be related to various network influences such as changes in user data, session information, or other application-specific data points that need to be tracked. These log entries demonstrate a successful interaction where the UDR component handles and logs the creation of a new subscription for application data influence notifications, ensuring that relevant applications or services are informed of necessary data changes.