This clause defines procedures by which a 5GMSd Application Provider authorises a 5GMSd-Aware Application to invoke media session handling operations on the 5GMSd AF at reference point M5d.
The 5GMSd Application Provider provides a different access token (e.g. a random string) via M8 to each 5GMSd-Aware Application, so that each application instance can identify itself uniquely to the 5GMSd AF. The access token is provided, for example, during the login procedure or is requested at a later stage. The validity of access tokens is often limited in time. The 5GMSd-Aware Application may need to refresh the access token depending on the token validity.
The 5GMSd-Aware Application passes the access token (via an M6 API call) to the Media Session Handler. When the Media Session Handler invokes a media session handling operation at reference point M5, it presents the access token to the 5GMSd AF. Upon receipt of such an access token, the 5GMSd AF verifies whether the access token is valid. If the token is valid, the 5GMSd-Aware Application is authorised to invoke the operation.
When the OAuth 2.0 architecture RFC 6749 is used, the 5GMSd Application Provider acts as authorization server, the 5GMSd-Aware Application acts as client and the 5GMSd AF acts as resource server.
The call flow is depicted below.
When the user wants to use the 5GMSd-Aware Application to consume e.g. video content, the user needs to authenticate with the application and the 5GMSd Application Provider at reference point M8. (In some cases, this authorisation may be cached/stored by the application, so that the user is not always challenged to provide the login credentials.)
Based on the login credentials supplied in the previous step, the 5GMSd Application Provider determines the policy rights to which this application service subscription is entitled (e.g. the user may have subscribed to an SD quality video service or a 4K quality video service). According to the subscription entitlement level, the 5GMSd Application Provider creates an access token and passes this token back to the application with the login response.
When the 5GMSd-Aware Application (immediately or later) invokes the Media Session Handler to activate media session handling for a media delivery session, the application passes the access token to the Media Session Handler. The access token may embed a user identifier, or the user identifier may be passed as separate (anonymised) parameter.
When the Media Session Handler invokes a media session handling operation on the 5GMSd AF at reference point M5, it provides the the access token, e.g. as an HTTP request header.
If the 5GMSd AF has verified that the 5GMSd-Aware Application is authorised to invoke the media session handling operation (based on the token), the 5GMSd AF carries out the requested operation. (This may involve further interaction with the PCF or NEF.)
When the OAuth 2.0 RFC 6749 Authorization Code grant type is used, either the 5GMSd Application Provider or the 5GMSd AF acts as authorization server, as shown in Figure 5.2.5.3-1. The Media Session Handler acts as client and the 5GMSd AF acts as resource server.
When the 5GMSd-Aware Application (immediately or later) invokes the Media Session Handler to activate media session handling for a media delivery session, the application passes only the session access information.
...the 5GMSd AF identifies that authorisation is required for accessing the requested service. The 5GMSd AF sends a redirect to the Media Session Handler, which is forwarded to the 5GMSd-Aware Application.
The 5GMSd-Aware Application requests an access token from the authorization server, which is realised either by the 5GMSd Application Provider (at reference point M8u) or by the 5GMSd AF (at reference point M5u).
After determining the policy rights of the requesting 5GMSd-Aware Application, the Authorization Service creates an access token and provides it to the 5GMSd-Aware Application.
The 5GMSd-Aware Application attempts to activate the media session handling operation again, this time providing the access token obtained in the previous step as an additional input paramrter.
If the 5GMSd AF is satisfied that the 5GMSd-Aware Application is authorised to invoke the media session handling operation (based on the presented access token), the 5GMSd AF carries out the requested operation. (This may involve further interaction with the PCF or NEF.)