From 71272b07c73a7124360af0f571ad69e1c928736e Mon Sep 17 00:00:00 2001 From: Arpitha Date: Fri, 12 Jul 2024 19:01:19 +0530 Subject: [PATCH] enrollment api added --- ansible/roles/kong-api/defaults/main.yml | 57 ++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/ansible/roles/kong-api/defaults/main.yml b/ansible/roles/kong-api/defaults/main.yml index 2ef12e87d4..d432783464 100644 --- a/ansible/roles/kong-api/defaults/main.yml +++ b/ansible/roles/kong-api/defaults/main.yml @@ -126,6 +126,7 @@ tenders_prefix: /tenders mentoring_prefix : /mentoring mentoring_interface_prefix : /interface designation_prefix: /designation +external_enrollment_prefix: /cios-enroll # Service URLs @@ -168,6 +169,7 @@ ml_core_private_url: "http://{{private_ingressgateway_ip}}/ml-core" cb_pores_service_url : "http://cb-pores-service:7001" cios_content_service_url : "http://cios-content-service:7001" mentoring_interface_service_url: "http://mentoring-interface-service:3567" +cb_external_enrollment_service_url: "http://cb-enrollment-service:7002" premium_consumer_rate_limits: - api: createContent @@ -15827,4 +15829,59 @@ kong_apis: - name: request-size-limiting config.allowed_payload_size: "{{ medium_request_size_limit }}" + - name: extEnrollmentCreate + uris: "{{ external_enrollment_prefix }}/v1/create" + upstream_url: "{{ cb_external_enrollment_service_url }}/cios-enroll/v1/create" + strip_uri: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: + - 'courseAccess' + - 'contentUpdate' + - name: rate-limiting + config.policy: local + config.hour: "{{ large_rate_limit_per_hour }}" + config.hour: "{{ medium_rate_limit_per_hour }}" + config.limit_by: credential + - name: request-size-limiting + config.allowed_payload_size: "{{ small_request_size_limit }}" + config.allowed_payload_size: "{{ medium_request_size_limit }}" + + - name: extEnrollmentReadByUserId + uris: "{{ external_enrollment_prefix }}/v1/listbyuserid" + upstream_url: "{{ cb_external_enrollment_service_url }}/cios-enroll/v1/listbyuserid" + strip_uri: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: + - 'contentUpdate' + - 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: "{{ medium_request_size_limit }}" + - name: extEnrollmentReadByUserIdAndCourseId + uris: "{{ external_enrollment_prefix }}/v1/readby/useridcourseId" + upstream_url: "{{ cb_external_enrollment_service_url }}/cios-enroll/v1/readby/useridcourseId" + strip_uri: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: + - 'contentUpdate' + - 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: "{{ medium_request_size_limit }}"