Skip to main content

AD_4nXd3ckHFfnxA131mFFy3Nxh2aHFnuT_H4kbKT8xaXsL42z9xx7gW9e6OsKnGFvJtCT70TGAUhdLfdXbUQ0LQVWVOUlfW05cshWViPGyJWQKV7MgEIFdRyw1mBJ89pZzaVHNZhsTy?key=ZMd9QAHscrHvobAUEk9nyw

Netskope Global Technical Success (GTS)

Using AWS CLI with Netskope: Handling SSL Certificate Errors in MacOS 15.5 with AWS CLI V2
 

Netskope Cloud Version - 126


 

Objective

Provide the necessary steps to resolve the SSL error when using AWS CLI V2 on MacOS 15.5 with the Netskope client enabled.

 

Prerequisite

Use AWS CLI V2 through terminal on MacOS 15.5. NGSWG must be enabled as part of the licensing. Netskope Client should be enabled.

 

Context

SSL certificate errors occur when running AWS CLI commands with the Netskope agent active.

Configuration

With the Netskope client enabled, certificate errors occur when using AWS CLI with certain commands, as shown below:

AD_4nXfLvKPTgyFzdASWAhl97jWt5tEM2_uFzo2TyZUgolZsc16IcL0VdD_nPuyo8Cqb3NNGF9LMOzdJR34geJFMPFaVOsmxH45eAlihF1_PdP7e9JjgSCMxfEw8t9tWAzwkbMYFEvxY-g?key=ZMd9QAHscrHvobAUEk9nyw

If the agent is disabled, the errors disappear and the tool works correctly. The process is based on the following Netskope documentation:
https://docs.netskope.com/en/addressing-ssl-error-while-accessing-aws-services-via-the-aws-cli-with-the-netskope-client-enabled/

 

Important: The AWS CLI V2 allows the installation either globally for all users or for the current user. Depending on the option selected, the path where the installation occurs differs. For global installation, the script assumes that the installation path is the default one which is: /usr/local/aws-cli

 

The next step is to create the folder that will contain the bundle certificate. Use the following command:

mkdir ~/.aws/nskp_config

AD_4nXdLLX1bb20t1SUcacQiwbzXYu8og-OMXOOmobWZngAM9Nom85lk0ZsrT6ZpoNcShVJsd7dXttjjM3PZiPy2E0w3aXI7Ysep_gLnMFRXwo-E5-1ni-U_ExnScyb8rNp5FjOby_EQHA?key=ZMd9QAHscrHvobAUEk9nyw

The next step is to move the script from its current location to the newly created folder.

In this example, the script is located on the Downloads folder (please change it in the command). You should move it using the following command:

 

mv ~/Downloads/ns_certbundle_aws_cli_v2.sh ~/.aws/nskp_config

 

AD_4nXezrwVEayB9zE2T-79d4ISBUvyUnUMDPTGr6UG6rBzDgKCRafuliq1Wl9jRp4Y-jHD3-KLwho4gra6I7IJtZPByvoznAetk3vH54DhihiLnkevdeQ5i0a5LXCMKYyoZYjeFsM-h?key=ZMd9QAHscrHvobAUEk9nyw

 

Then, please make sure to grant execution permissions to the script using the following command:

 

AD_4nXczdg6PRnzSh18HKBo-CBTgsTUT0kWKeftipeihZxiOyuJ_gbRcBFeFURRRBgRRdAeFbaLCaFvWx8mDlubM9OWBCyzVsMvq0aZ--KeF3IC0dGIP3hzef2rPRnjpknoZ9W2ic3mf?key=ZMd9QAHscrHvobAUEk9nyw

 

Finally, you need to run the script to generate the .PEM file:

 

AD_4nXcZQfLh-QwSY2-VgiTzDlg1DSzIGUa0Qg9hPD6D9XCHBfHYsK02MEHTo1Zu69dQrXHS0OdzZYG7maFWJiPscmVRpnCe-QcL5YCbQ_dqZXhR6nGt5wzQhNB20RmlrNMwnW6MbPw8bA?key=ZMd9QAHscrHvobAUEk9nyw

 

Once the file is in place, run the following command to load the certificate and ensure AWS CLI functions correctly:

 

aws configure set default.ca_bundle ~/.aws/nskp_config/netskope-cert-bundle.pem

 

AD_4nXfFiGR_qoOnAbN9VDR_C9UOKU--gcbJV7iD1SBcG9rYhROZy0nNYxZyAYt22vvftvaQkKVu8R2Cdp16npzRHFp0kRcasvPht-koyIZIzHcL6bQOg8MGrJBUdJkbWZclZr4NyNJYyw?key=ZMd9QAHscrHvobAUEk9nyw

 

Next, tests should be performed with the Netskope agent enabled to confirm that certificate errors no longer occur.

 

AD_4nXdeM5RAii2uC6y1ngvcTt6-e_WG9lzwjIOCazfVOMAPY5cVCHEvIFz0UMwc34rYO4fJr3fyWzxYNXSYFakrnBm_QxADFrKZYmDrlaWV-GaxNVr9lXe5A2EHqudPq6v57tGTgaF8hA?key=ZMd9QAHscrHvobAUEk9nyw

 

Terms and Conditions

Notes

  • This article is authored by Netskope Global Technical Success (GTS).
  • For any further inquiries related to this article, please contact Netskope GTS by submitting a support case with 'Case Type – How To Questions'.

 

Be the first to reply!