From 04145ac4bc493d727d723e695c3766583bb27897 Mon Sep 17 00:00:00 2001 From: yravinderkumar33 Date: Mon, 30 May 2022 11:11:31 +0530 Subject: [PATCH 1/4] Issue #SB-29454 feat: report service env var added --- .../templates/sunbird_report-service.env | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/ansible/roles/stack-sunbird/templates/sunbird_report-service.env b/ansible/roles/stack-sunbird/templates/sunbird_report-service.env index 9d609a0cc4..b4602e70bb 100644 --- a/ansible/roles/stack-sunbird/templates/sunbird_report-service.env +++ b/ansible/roles/stack-sunbird/templates/sunbird_report-service.env @@ -9,4 +9,22 @@ SUNBIRD_REPORTS_TABLE_NAME=report SUNBIRD_REPORT_SUMMARY_TABLE_NAME={{sunbird_report_summary_table_name}} SUNBIRD_ENV="https://{{domain_name}}" DEACTIVATE_JOB_API_HOST=http://kong:8000/data/v1/report/jobs/deactivate -DEACTIVATE_JOB_API_KEY={{sunbird_api_auth_token}} \ No newline at end of file +DEACTIVATE_JOB_API_KEY={{sunbird_api_auth_token}} + +# 4.10.0 +sunbird_azure_report_container_name={{sunbird_azure_report_container_name}} +sunbird_azure_account_name={{sunbird_private_storage_account_name}} +sunbird_azure_account_key={{sunbird_private_storage_account_key}} +sunbird_api_auth_token={{sunbird_api_auth_token}} +sunbird_super_admin_slug={{sunbird_super_admin_slug|default('sunbird')}} +sunbird_portal_auth_server_url={{keycloak_auth_server_url}} +sunbird_keycloak_public_key={{core_vault_sunbird_sso_publickey}} +sunbird_portal_auth_server_client={{sunbird_portal_auth_server_client}} +sunbird_keycloak_public_key={{core_vault_sunbird_sso_publickey}} +sunbird_learner_player_url={{sunbird_learner_player_url}} +sunbird_content_proxy_url=http://knowledge-mw-service:5000 +sunbird_keycloak_realm={{keycloak_realm}} +sunbird_cache_store={{sunbird_cache_store}} +sunbird_cache_ttl={{sunbird_cache_ttl}} +sunbird_report_sas_expiry_in_minutes=3600 + From c0ba605d6dd580a05e1ca54d04387553023d461f Mon Sep 17 00:00:00 2001 From: yravinderkumar33 Date: Mon, 30 May 2022 11:19:13 +0530 Subject: [PATCH 2/4] Issue #SB-29454 feat: report service env vars added --- .../roles/stack-sunbird/templates/sunbird_report-service.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/stack-sunbird/templates/sunbird_report-service.env b/ansible/roles/stack-sunbird/templates/sunbird_report-service.env index b4602e70bb..c42848cf71 100644 --- a/ansible/roles/stack-sunbird/templates/sunbird_report-service.env +++ b/ansible/roles/stack-sunbird/templates/sunbird_report-service.env @@ -20,7 +20,7 @@ sunbird_super_admin_slug={{sunbird_super_admin_slug|default('sunbird')}} sunbird_portal_auth_server_url={{keycloak_auth_server_url}} sunbird_keycloak_public_key={{core_vault_sunbird_sso_publickey}} sunbird_portal_auth_server_client={{sunbird_portal_auth_server_client}} -sunbird_keycloak_public_key={{core_vault_sunbird_sso_publickey}} +sunbird_keycloak_public={{sunbird_keycloak_public}} sunbird_learner_player_url={{sunbird_learner_player_url}} sunbird_content_proxy_url=http://knowledge-mw-service:5000 sunbird_keycloak_realm={{keycloak_realm}} From c4458df30e03a15a6db2e4bdccd984ab6e272749 Mon Sep 17 00:00:00 2001 From: yravinderkumar33 Date: Wed, 1 Jun 2022 16:24:51 +0530 Subject: [PATCH 3/4] Issue #SB-29454 fix: sunbird_dataservice_url var added to report service --- ansible/roles/stack-sunbird/templates/sunbird_report-service.env | 1 + 1 file changed, 1 insertion(+) diff --git a/ansible/roles/stack-sunbird/templates/sunbird_report-service.env b/ansible/roles/stack-sunbird/templates/sunbird_report-service.env index c42848cf71..a2ebfce02a 100644 --- a/ansible/roles/stack-sunbird/templates/sunbird_report-service.env +++ b/ansible/roles/stack-sunbird/templates/sunbird_report-service.env @@ -27,4 +27,5 @@ sunbird_keycloak_realm={{keycloak_realm}} sunbird_cache_store={{sunbird_cache_store}} sunbird_cache_ttl={{sunbird_cache_ttl}} sunbird_report_sas_expiry_in_minutes=3600 +sunbird_dataservice_url={{sunbird_dataservice_url}} From f304d27616c6b0f78d2e04df08c055b34250b197 Mon Sep 17 00:00:00 2001 From: yravinderkumar33 Date: Thu, 2 Jun 2022 15:03:52 +0530 Subject: [PATCH 4/4] Issue #SB-29454 feat: onboarding new report service api --- ansible/roles/kong-api/defaults/main.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/ansible/roles/kong-api/defaults/main.yml b/ansible/roles/kong-api/defaults/main.yml index b9443194f2..3ae6e47417 100644 --- a/ansible/roles/kong-api/defaults/main.yml +++ b/ansible/roles/kong-api/defaults/main.yml @@ -9573,3 +9573,24 @@ kong_apis: - name: opa-checks config.required: true config.enabled: true + +- name: getReportDatasets + uris: "{{ report_service_prefix }}/report/datasets/get" + upstream_url: "{{ report_service_url }}/report/datasets/get" + strip_uri: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: + - reportsAccess + - name: rate-limiting + config.policy: local + config.hour: "{{ medium_rate_limit_per_hour }}" + config.limit_by: credential + - name: request-size-limiting + config.allowed_payload_size: "{{ small_request_size_limit }}" + - name: opa-checks + config.required: true + config.enabled: true