Business Requirement
Sunbird provides the capability to generate various datasets for reporting purposes. Some of these can be downloaded by users via the UI (the Course progress exhaust, for example), whereas others are used by the Sunbird portal to generate reports and charts, which can then be viewed by users.
...
In order to enable different types of access, SB will support configurations that can make the datasets ‘PUBLIC’ or ‘PRIVATE’. The type of access will determine whether a dataset can be accessed publicly using the API without any additional authorization, or whether it needs additional approval from admins for access.
...
Current Implementation
Currently, Sunbird Obsrv supports Reports Service API to list and access all published reports. However, only metadata of a report is accessible through the Report Service API. The data files and associated data are not currently accessible through the Report Service API.
The Sunbird portal allows access to the configured datasets using the Sunbird portal backend APIs. However, the APIs make use of the authorization through the Sunbird portal’s session logins with the access controls that are controlled by different roles in the Sunbird portal such as REPORT_ADMIN, REPORT_VIEWER and ORG_ADMIN.
Data isolation is supported by performing a slug or org based validation so that the access to a specific tenant’s data is controlled using the user’s login context.
The Sunbird user’s login context is used for parameterized reports where the parameters are injected from the user’s login context. The list of supported parameters are:
$slug
$channel
$state
$board
Below diagram explains the high level working flow on how the reports are rendered on the Portal Admin Dashboard.
...
Pages | REPORT_ADMIN <SUPER_ADMIN> | State REPORT_ADMIN | REPORT_VIEWER |
---|---|---|---|
List Page |
|
|
|
Report Detail Page |
|
|
|
...