From 0e3bf36cedabc11e0d0ef6f6a0d396a851b6f4bf Mon Sep 17 00:00:00 2001 From: adeelehsan Date: Tue, 7 Apr 2020 16:22:09 +0500 Subject: [PATCH] Verification enabled for the software secure PROD-1395 --- lms/djangoapps/verify_student/tasks.py | 3 ++- lms/djangoapps/verify_student/tests/test_models.py | 1 + lms/djangoapps/verify_student/tests/test_views.py | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lms/djangoapps/verify_student/tasks.py b/lms/djangoapps/verify_student/tasks.py index 168c4e8f4e..cee2c0838d 100644 --- a/lms/djangoapps/verify_student/tasks.py +++ b/lms/djangoapps/verify_student/tasks.py @@ -114,11 +114,12 @@ def send_request_to_ss_for_user(self, user_verification_id, copy_id_photo_from): log.info('=>New Verification Task Received %r', user_verification.user.username) try: headers, body = user_verification.create_request(copy_id_photo_from) + # checkout PROD-1395 for detail why we are adding system certificate paths for verification. response = requests.post( settings.VERIFY_STUDENT["SOFTWARE_SECURE"]["API_URL"], headers=headers, data=simplejson.dumps(body, indent=2, sort_keys=True, ensure_ascii=False).encode('utf-8'), - verify=False + verify=settings.VERIFY_STUDENT["SOFTWARE_SECURE"]['CERT_VERIFICATION_PATH'] ) return { 'response_ok': getattr(response, 'ok', False), diff --git a/lms/djangoapps/verify_student/tests/test_models.py b/lms/djangoapps/verify_student/tests/test_models.py index c008b01386..d71bbc4ff7 100644 --- a/lms/djangoapps/verify_student/tests/test_models.py +++ b/lms/djangoapps/verify_student/tests/test_models.py @@ -43,6 +43,7 @@ iwIDAQAB "AWS_ACCESS_KEY": "FAKEACCESSKEY", "AWS_SECRET_KEY": "FAKESECRETKEY", "S3_BUCKET": "fake-bucket", + "CERT_VERIFICATION_PATH": False, }, "DAYS_GOOD_FOR": 10, } diff --git a/lms/djangoapps/verify_student/tests/test_views.py b/lms/djangoapps/verify_student/tests/test_views.py index 6e4b3ce3a0..c4219bc3cf 100644 --- a/lms/djangoapps/verify_student/tests/test_views.py +++ b/lms/djangoapps/verify_student/tests/test_views.py @@ -1489,6 +1489,7 @@ class TestSubmitPhotosForVerification(MockS3BotoMixin, TestVerificationBase): "AWS_ACCESS_KEY": "c987c7efe35c403caa821f7328febfa1", "AWS_SECRET_KEY": "fc595fc657c04437bb23495d8fe64881", "S3_BUCKET": "test.example.com", + "CERT_VERIFICATION_PATH": False, }, "DAYS_GOOD_FOR": 10, })