camaraproject / QualityOnDemand

Repository to describe, develop, document and test the QualityOnDemand API family
https://wiki.camaraproject.org/x/zwOeAQ
Apache License 2.0
38 stars 60 forks source link

Discussion paper for Issue#34 and PR#123 #127

Closed emil-cheung closed 1 year ago

eric-murray commented 1 year ago

The discussion paper raises two separate topics:

Terminology

The paper proposes to replace the terms public and private used in PR #123 with observed and local. I make the following observations:

API Design and Constraints on API Caller Input Options

Good API design not only allows the API caller to specify the parameters required, but also places logical (i.e. machine enforceable) constraints on the values and combinations of parameters that can be specified.

Required Parameter Combinations The discussion in Issue #34 showed that the following parameter combinations are required if the API caller wishes to identify the UE using its IPv4 address:

The proposal on Page 9 of the discussion document does not help to enforce these requirements

Much of the discussion in Issue #34 and the associated PR #123 was about trying to enforce these requirements on the API caller, who may not understand why they need to additionally provide public_address if they want to identify the UE by private_address, but must understand that they have to do it.

Additional observations

I will shortly make an alternative proposal in the original Issue #34 which deals with using the API design to constrain allowed API caller input parameter options.

eric-murray commented 1 year ago

@emil-cheung As discussed during the meeting, the discussion paper omits the scenario that Issue #34 was originally created for, which is where the device (i.e. UE) or, more specifically, an application running on the device directly requests the QoD service.

In this case, the device can easily find its private (local) IPv4 address if it does not know or have other parameters (external identifier, msisdn, etc.) but, as discussed in Issue #34, this is insufficient to identify the device uniquely. Hence the proposal is that the device obtain its public (observed) IPv4 address and then provide both parameters to the QoD service.

How does the device obtain its public IPv4 address? By using DNS, as follows:

dig @resolver1.opendns.com A myip.opendns.com +short -4

Try it - it really works. It works for any DNS client (e.g. nslookup) with suitable syntax changes, but you have to use the opendns resolver (or another resolver that supports this functionality). There are also HTTP APIs that can be used to obtain this information.

So a mobile app can obtain sufficient information to identify itself by IPv4 address to the QoD service without involving the application server, and the proposed API changes in Issue #34 were designed to address this scenario.