Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update info.description #228

Merged
merged 20 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
c724e59
Update device-reachability-status.yaml
eric-murray Dec 4, 2024
524f3b2
Update device-reachability-status.yaml
eric-murray Dec 4, 2024
35d4d3d
Update device-roaming-status.yaml
eric-murray Dec 18, 2024
4d6f930
Update device-reachability-status-subscriptions.yaml
eric-murray Dec 18, 2024
ed52987
Update device-roaming-status-subscriptions.yaml
eric-murray Dec 18, 2024
4ddb39b
Merge branch 'camaraproject:main' into eric-murray-patch-1
eric-murray Dec 18, 2024
e22b75a
Update connected-network-type.yaml
eric-murray Dec 18, 2024
492c352
Update connected-network-type.yaml
eric-murray Dec 18, 2024
c2a3968
Merge branch 'camaraproject:main' into eric-murray-patch-1
eric-murray Jan 15, 2025
8cb4bec
Update connected-network-type-subscriptions.yaml
eric-murray Jan 15, 2025
558fe92
Update connected-network-type.yaml
eric-murray Jan 15, 2025
19c1cca
Update device-reachability-status-subscriptions.yaml
eric-murray Jan 15, 2025
2de6941
Update device-reachability-status.yaml
eric-murray Jan 15, 2025
848c8d7
Update device-roaming-status-subscriptions.yaml
eric-murray Jan 15, 2025
c40567e
Update device-roaming-status.yaml
eric-murray Jan 15, 2025
8d69a85
Update connected-network-type-subscriptions.yaml
eric-murray Jan 15, 2025
6fc0bd9
Update connected-network-type.yaml
eric-murray Jan 15, 2025
73e2169
Update device-reachability-status-subscriptions.yaml
eric-murray Jan 15, 2025
012ca07
Update device-reachability-status.yaml
eric-murray Jan 15, 2025
d37c3b3
Update device-roaming-status-subscriptions.yaml
eric-murray Jan 15, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 28 additions & 4 deletions code/API_definitions/connected-network-type-subscriptions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,40 @@ info:
Developers may provide a callback URL on which notifications regarding connected network type can be received from the service provider.
If an event occurs the application will send events to the provided webhook - 'sink'._

# Authorization and authentication
# Further info and support

## Authorization and authentication
The "Camara Security and Interoperability Profile" provides details on how a client requests an access token. Please refer to Identify and Consent Management (https://github.com/camaraproject/IdentityAndConsentManagement/) for the released version of the Profile.

Which specific authorization flows are to be used will be determined during onboarding process, happening between the API Client and the API Provider, taking into account the declared purpose for accessing the API, while also being subject to the prevailing legal framework dictated by local legislation.

It is important to remark that in cases where personal user data is processed by the API, and users can exercise their rights through mechanisms such as opt-in and/or opt-out, the use of 3-legged access tokens becomes mandatory. This measure ensures that the API remains in strict compliance with user privacy preferences and regulatory obligations, upholding the principles of transparency and user-centric data control.

# Further info and support
## Identifying the device from the access token

This API requires the API consumer to identify a device as the subject of the API as follows:
- When the API is invoked using a two-legged access token, the subject will be identified from the optional `device` object, which therefore MUST be provided.

- When a three-legged access token is used however, this optional identifier MUST NOT be provided, as the subject will be uniquely identified from the access token.

This approach simplifies API usage for API consumers using a three-legged access token to invoke the API by relying on the information that is associated with the access token and was identified during the authentication process.

### Error handling:
- If the subject cannot be identified from the access token and the optional `device` object is not included in the request, then the server will return an error with the `422 MISSING_IDENTIFIER` error code.

- If the subject can be identified from the access token and the optional `device` object is also included in the request, then the server will return an error with the `422 UNNECESSARY_IDENTIFIER` error code. This will be the case even if the same device is identified by these two methods, as the server is unable to make this comparison.

## Multi-SIM scenario handling

In multi-SIM scenarios where more than one mobile device is associated with a phone number (e.g. a smartphone with an associated smartwatch), it might not be possible to uniquely identify from that phone number the device for which connected network type notifications should be generated. If the phone number is used as the device identifier when creating a subscription in a multi-SIM scenario, the API may:
- respond with an error, or
- generate network type change notifications for the multi-SIM group as a whole, or
- generate network type change notifications for a single device in the multi-SIM group, which may not be the intended device.

(FAQs will be added in a later version of the documentation)
Possible solutions in such a scenario include:
- Using the authorisation code flow to obtain an access token, which will automatically identify the intended device
- Identifying the intended device from a unique identifier for that device, such as its source IP address and port
- Check with the SIM provider whether a unique "secondary" phone number is already associated with each device, and use the secondary phone number to identify the intended device if available.

termsOfService: https://swagger.io/terms/
contact:
Expand All @@ -71,7 +95,7 @@ info:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
version: wip
x-camara-commonalities: 0.4.0
x-camara-commonalities: 0.5

externalDocs:
description: Product documentation at Camara
Expand Down
29 changes: 24 additions & 5 deletions code/API_definitions/connected-network-type.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ info:
- `5G`, if device is connected to the 5G network technology
- `UNKNOWN` if connection [technology] can not be determined


* **LastStatusTime** : This property specifies the time when the status was last updated. Its presence in the response indicates the freshness of the information, while its absence implies the information may be outdated or its freshness is uncertain.

# API Functionality
Expand All @@ -33,7 +32,16 @@ info:

The endpoint `POST /retrieve` allows to get connected Network Type.

# Identifying the device from the access token
# Further info and support

## Authorization and authentication
The "Camara Security and Interoperability Profile" provides details on how a client requests an access token. Please refer to Identify and Consent Management (https://github.com/camaraproject/IdentityAndConsentManagement/) for the released version of the Profile.

Which specific authorization flows are to be used will be determined during onboarding process, happening between the API Client and the API Provider, taking into account the declared purpose for accessing the API, while also being subject to the prevailing legal framework dictated by local legislation.

It is important to remark that in cases where personal user data is processed by the API, and users can exercise their rights through mechanisms such as opt-in and/or opt-out, the use of 3-legged access tokens becomes mandatory. This measure ensures that the API remains in strict compliance with user privacy preferences and regulatory obligations, upholding the principles of transparency and user-centric data control.

## Identifying the device from the access token

This API requires the API consumer to identify a device as the subject of the API as follows:
- When the API is invoked using a two-legged access token, the subject will be identified from the optional `device` object, which therefore MUST be provided.
Expand All @@ -42,13 +50,22 @@ info:

This approach simplifies API usage for API consumers using a three-legged access token to invoke the API by relying on the information that is associated with the access token and was identified during the authentication process.

## Error handling:
### Error handling:
- If the subject cannot be identified from the access token and the optional `device` object is not included in the request, then the server will return an error with the `422 MISSING_IDENTIFIER` error code.

- If the subject can be identified from the access token and the optional `device` object is also included in the request, then the server will return an error with the `422 UNNECESSARY_IDENTIFIER` error code. This will be the case even if the same device is identified by these two methods, as the server is unable to make this comparison.
## Further info and support

(FAQs will be added in a later version of the documentation)
## Multi-SIM scenario handling

In multi-SIM scenarios where more than one mobile device is associated with a phone number (e.g. a smartphone with an associated smartwatch), it might not be possible to uniquely identify from that phone number the device for which the connected network type should be returned. If the phone number is used as the device identifier when querying in a multi-SIM scenario, the API may:
- respond with an error, or
- return a common connected network type for the multi-SIM group as a whole, or
- return the connected network type for a single device in the multi-SIM group, which may not be the intended device.

Possible solutions in such a scenario include:
- Using the authorisation code flow to obtain an access token, which will automatically identify the intended device
- Identifying the intended device from a unique identifier for that device, such as its source IP address and port
- Check with the SIM provider whether a unique "secondary" phone number is already associated with each device, and use the secondary phone number to identify the intended device if available.

termsOfService: http://swagger.io/terms/
contact:
Expand All @@ -57,6 +74,8 @@ info:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
version: wip
x-camara-commonalities: 0.5

externalDocs:
description: Product documentation at CAMARA
url: https://github.com/camaraproject/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ info:
API consumer is able to be notified whether the reachability status of a certain user device has changed to either data- or sms-usage.
This capability is provided via a subscription request - in this case the reachability situation is part of the event notification, which is sent back to the event subscriber when reachability situation has changed.


# Relevant terms and definitions

* **Device**: A device refers to any physical entity that can connect to a network and participate in network communication.
Expand Down Expand Up @@ -53,23 +52,48 @@ info:
Developers may provide a callback URL on which notifications regarding reachability-status can be received from the service provider.
If an event occurs the application will send events to the provided webhook - `sink`._

## Further info and support

(FAQs will be added in a later version of the documentation)
# Further info and support

### Authorization and authentication
## Authorization and authentication

The "Camara Security and Interoperability Profile" provides details on how a client requests an access token. Please refer to Identify and Consent Management (https://github.com/camaraproject/IdentityAndConsentManagement/) for the released version of the Profile.

Which specific authorization flows are to be used will be determined during onboarding process, happening between the API Client and the Telco Operator exposing the API, taking into account the declared purpose for accessing the API, while also being subject to the prevailing legal framework dictated by local legislation.

It is important to remark that in cases where personal user data is processed by the API, and users can exercise their rights through mechanisms such as opt-in and/or opt-out, the use of 3-legged access tokens becomes mandatory. This measure ensures that the API remains in strict compliance with user privacy preferences and regulatory obligations, upholding the principles of transparency and user-centric data control.

## Identifying the device from the access token

This API requires the API consumer to identify a device as the subject of the API as follows:
- When the API is invoked using a two-legged access token, the subject will be identified from the optional `device` object, which therefore MUST be provided.

- When a three-legged access token is used however, this optional identifier MUST NOT be provided, as the subject will be uniquely identified from the access token.

This approach simplifies API usage for API consumers using a three-legged access token to invoke the API by relying on the information that is associated with the access token and was identified during the authentication process.

### Error handling:
- If the subject cannot be identified from the access token and the optional `device` object is not included in the request, then the server will return an error with the `422 MISSING_IDENTIFIER` error code.

- If the subject can be identified from the access token and the optional `device` object is also included in the request, then the server will return an error with the `422 UNNECESSARY_IDENTIFIER` error code. This will be the case even if the same device is identified by these two methods, as the server is unable to make this comparison.

## Multi-SIM scenario handling

In multi-SIM scenarios where more than one mobile device is associated with a phone number (e.g. a smartphone with an associated smartwatch), it might not be possible to uniquely identify from that phone number the device for which reachability status notifications should be provided. If the phone number is used as the device identifier when creating a subscription for a multi-SIM scenario, the API may:
- respond with an error, or
- provide reachability status update notifications for the multi-SIM group as a whole, or
- provide reachability status update notifications only for a single device in the multi-SIM group, which may not be the intended device.

Possible solutions in such a scenario include:
- Using the authorisation code flow to obtain an access token, which will automatically identify the intended device
- Identifying the intended device from a unique identifier for that device, such as its source IP address and port
- Check with the SIM provider whether a unique "secondary" phone number is already associated with each device, and use the secondary phone number to identify the intended device if available.

license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
version: wip
x-camara-commonalities: 0.4.0
x-camara-commonalities: 0.5

externalDocs:
description: Product documentation at CAMARA
url: https://github.com/camaraproject/DeviceStatus
Expand Down
43 changes: 22 additions & 21 deletions code/API_definitions/device-reachability-status.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,47 +29,48 @@ info:

The endpoint `POST /retrieve` allows to get current connectivity status information synchronously.

### Authorization and authentication
# Further info and support

## Authorization and authentication

The "Camara Security and Interoperability Profile" provides details on how a client requests an access token. Please refer to Identify and Consent Management (https://github.com/camaraproject/IdentityAndConsentManagement/) for the released version of the Profile.

Which specific authorization flows are to be used will be determined during onboarding process, happening between the API Client and the Telco Operator exposing the API, taking into account the declared purpose for accessing the API, while also being subject to the prevailing legal framework dictated by local legislation.

It is important to remark that in cases where personal user data is processed by the API, and users can exercise their rights through mechanisms such as opt-in and/or opt-out, the use of 3-legged access tokens becomes mandatory. This measure ensures that the API remains in strict compliance with user privacy preferences and regulatory obligations, upholding the principles of transparency and user-centric data control.

# Identifying a device from the access token

This specification defines the `device` object field as optional in API requests, specifically in cases where the API is accessed using a 3-legged access token, and the device can be uniquely identified by the token. This approach simplifies API usage for API consumers by relying on the device information associated with the access token used to invoke the API.

## Handling of device information:
## Identifying the device from the access token

### Optional device object for 3-legged tokens:
This API requires the API consumer to identify a device as the subject of the API as follows:
- When the API is invoked using a two-legged access token, the subject will be identified from the optional `device` object, which therefore MUST be provided.

- When using a 3-legged access token, the device associated with the access token must be considered as the device for the API request. This means that the device object is not required in the request, and if included it must identify the same device, therefore **it is recommended NOT to include it in these scenarios** to simplify the API usage and avoid additional validations.
- When a three-legged access token is used however, this optional identifier MUST NOT be provided, as the subject will be uniquely identified from the access token.

### Validation mechanism:
This approach simplifies API usage for API consumers using a three-legged access token to invoke the API by relying on the information that is associated with the access token and was identified during the authentication process.

- The server will extract the device identification from the access token, if available.
- If the API request additionally includes a `device` object when using a 3-legged access token, the API will validate that the device identifier provided matches the one associated with the access token.
- If there is a mismatch, the API will respond with a 403 - INVALID_TOKEN_CONTEXT error, indicating that the device information in the request does not match the token.
### Error handling:
- If the subject cannot be identified from the access token and the optional `device` object is not included in the request, then the server will return an error with the `422 MISSING_IDENTIFIER` error code.

### Error handling for unidentifiable devices:
- If the subject can be identified from the access token and the optional `device` object is also included in the request, then the server will return an error with the `422 UNNECESSARY_IDENTIFIER` error code. This will be the case even if the same device is identified by these two methods, as the server is unable to make this comparison.

- If the `device` object is not included in the request and the device information cannot be derived from the 3-legged access token, the server will return a 422 `UNIDENTIFIABLE_DEVICE` error.
## Multi-SIM scenario handling

### Restrictions for tokens without an associated authenticated identifier:
In multi-SIM scenarios where more than one mobile device is associated with a phone number (e.g. a smartphone with an associated smartwatch), it might not be possible to uniquely identify the device for which the reachability status should be returned from that phone number. If the phone number is used as the device identifier when querying in a multi-SIM scenario, the API may:
- respond with an error, or
- return a combined reachability status for the multi-SIM group as a whole, or
- return the reachability status for a single device in the multi-SIM group, which may not be the intended device.

- For scenarios which do not have a single device identifier associated to the token during the authentication flow, e.g. 2-legged access tokens, the `device` object MUST be provided in the API request. This ensures that the device identification is explicit and valid for each API call made with these tokens.

# Further info and support

(FAQs will be added in a later version of the documentation)
Possible solutions in such a scenario include:
- Using the authorisation code flow to obtain an access token, which will automatically identify the intended device
- Identifying the intended device from a unique identifier for that device, such as its source IP address and port
- Check with the SIM provider whether a unique "secondary" phone number is already associated with each device, and use the secondary phone number to identify the intended device if available.

license:
name: Apache 2.0
url: https://www.apache.org/licenses/LICENSE-2.0.html
version: wip
x-camara-commonalities: 0.4.0
x-camara-commonalities: 0.5

externalDocs:
description: Product documentation at CAMARA
url: https://github.com/camaraproject/DeviceStatus
Expand Down
Loading
Loading