From bad72c8969b34846b4c5c7b9d01fbd759238b23f Mon Sep 17 00:00:00 2001 From: Allain Legacy Date: Wed, 14 May 2025 09:32:52 -0400 Subject: [PATCH] Fix session create for mTLS This adds the client certificate and key to the RequestLibrary session so that mTLS enforcements at the API works as expected. Change-Id: Ie889b0312b0fc05fe92002a3fb9680367b910ad1 Signed-off-by: Allain Legacy --- ....11_SMO_gets_400_when_issuing_APIs_with_unsupported_data.robot | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test_scripts/O2IMS_Compliance_Test/o2ims_compliance/7.3.11_SMO_gets_400_when_issuing_APIs_with_unsupported_data.robot b/test_scripts/O2IMS_Compliance_Test/o2ims_compliance/7.3.11_SMO_gets_400_when_issuing_APIs_with_unsupported_data.robot index 62a902c..d82c9ac 100644 --- a/test_scripts/O2IMS_Compliance_Test/o2ims_compliance/7.3.11_SMO_gets_400_when_issuing_APIs_with_unsupported_data.robot +++ b/test_scripts/O2IMS_Compliance_Test/o2ims_compliance/7.3.11_SMO_gets_400_when_issuing_APIs_with_unsupported_data.robot @@ -12,7 +12,11 @@ ${SMO_TOKEN_DATA} ${ocloud.oran_o2_app.smo_token_data} ${globalLocationId} ${ocloud.oran_o2_app.g_location_id} ${ORAN_O2IMS_ENDPOINT} ${ocloud.oran_o2_app.api.protocol}://${ORAN_HOST_EXTERNAL_IP}:${ORAN_SERVICE_NODE_PORT} -${o2ims_observer} https://10.6.85.1:1080/smo/v1/consumer +${o2ims_observer} ${smo.service.protocol}://${smo.service.host}:${smo.service.port}${smo.o2ims_inventory_observer.path} + +${CLIENT_CERT_PATH} ${CURDIR}/../certs/client-cert.pem +${CLIENT_KEY_PATH} ${CURDIR}/../certs/client-key.pem +@{CERT_INFO} ${CLIENT_CERT_PATH} ${CLIENT_KEY_PATH} *** Test Cases *** s1, Verify create inventory subscription with junk data gets 400 error. @@ -21,7 +25,7 @@ s1, Verify create inventory subscription with junk data gets 400 error. ${tokenHeader}= Create Dictionary Authorization=Bearer ${SMO_TOKEN_DATA} Content-Type=application/json Set Suite Variable ${tokenHeader} - Create Session o2ims ${ORAN_O2IMS_ENDPOINT} verify=False debug=1 headers=${tokenHeader} + Create Client Cert Session o2ims ${ORAN_O2IMS_ENDPOINT} verify=False debug=1 headers=${tokenHeader} client_certs=${CERT_INFO} # Improperly formatted JSON subscriptionRequest ${subscriptionRequest} Set Variable {"consumerSubscriptionId" "69253c4b-8398-4602-855d-783865f5f25c","filter" "(eq,extensions/country,US);","callback" ${o2ims_observer}} -- 2.16.6