5G-MAG / rt-5gms-application-function

5G Media Streaming - Application Function
https://www.5g-mag.com/streaming
Other
11 stars 6 forks source link

Application Function accepts Policy Templates when it is not configured to integrate with the 5G core #126

Closed davidjwbbc closed 10 months ago

davidjwbbc commented 10 months ago

Description

In the msaf.yaml configuration file, when open5gsIntegration is false the AF cannot communicate with the NRF, BSF and PCF. Since the AF cannot use the PCF, it cannot use Dynamic Policies or Policy Templates.

If the AF were to refuse to accept PolicyTemplates when open5gsIntegration is false then it would never advertise Dynamic Policies in the Service Access Information.

The AF should therefore refuse to create Policy Templates within a Provisioning Session whenopen5gsIntegration is false to disable both Policy Templates and Dynamic Policies. The AF should respond with a 403 Forbidden to indicate that the request itself is ok, but that it is denied due to the 5G core integration not being available.

dsilhavy commented 10 months ago

Confirmed that requests to create a policy template with open5gsIntegration set to false fail with a 400 error code and the following payload in #130

{
    "type": "/3gpp-m1/v2",
    "title": "Problem adding the policy template.",
    "status": 400,
    "detail": "Policy Templates are not available on this instance of the 5GMS Application Function.",
    "instance": "/provisioning-sessions/25e4c11c-b9c3-41ee-adc8-adc92c8cb4cd/policy-templates"
}
davidjwbbc commented 10 months ago

Closed by PR #130