Skip to main content

AD_4nXfzlv5MR0UUPyR6zXCDrewdhpQynDexm84m7ESKkiGlM_SP9cqi4klqpxCxgY8w4-hGKUZFSfv8PSkAmmAE98AbmNau1MDz3Ghl0rwdGox4cpFx09OP4nQoBIUoeCMhGfOblACB?key=lvvGJqFTNayAcC-35E9fHw

Netskope Global Technical Success (GTS)

Using AWS CLI with Netskope: Handling SSL Certificate Errors in Windows 11 with AWS CLI V2
 

Netskope Cloud Version - 126


 

Objective

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

 

Prerequisite

Use AWS CLI V2 through CMD and PowerShell on Windows 11. 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_4nXdQkmywOJMOSsAr_uqxcRFkVOmdWWJo9h4g6DmNKqVdQpAzpNYCNPlSKnA0vJYa0Mm8UI2nmoK4xSl4KxgqXXe9GS--L6qZrbTmbaFXE1NU6osxdjOVGT9ySNEzKXr0UbzCRzwvZw?key=lvvGJqFTNayAcC-35E9fHw

If the agent is disabled, the errors disappear and the tool works correctly. The process is based on the Netskope documentation article: 

https://docs.netskope.com/en/addressing-ssl-error-while-accessing-aws-services-via-the-aws-cli-with-the-netskope-client-enabled/

The first step is to download the scripts that generate the .PEM file required to load the certificate into AWS CLI. To do this, please visit the following support link and download the necessary files.

  • https://support.netskope.com/s/login/?ec=302&startURL=%2Fs%2Farticle%2FAddressing-SSL-error-while-accessing-AWS-services-via-the-AWS-CLI-with-the-Netskope-Client-encryption-enabled

For this specific case, download the ns_certbundle_aws_cli_v2.bat file and place it in any location on the test device:

AD_4nXfgYLqKYA2kpA_dC22Yj1Qf-CbgFS7vA30hvEqEiXg1VXVpZS1qKVO1ADbjkzPhf_I8H3Gkf7sd1mCSx8PdIfnFpWzqfbE4UrEuvMTsSyCa9Sn1QzZfvB344-Tqthh3oTJdNLK7fg?key=lvvGJqFTNayAcC-35E9fHw

The next step is to navigate to the path C:\Program Files\Amazon\AWSCLIV2\ and create a new directory using the command: mkdir nskp_config

AD_4nXdKGDWpJyTkdJCrUiGz72kMlYqiogTcmQcPQqu1z5pNs5Vd7wqiJV3N1w6_eCmnlaelnZ8abE_i4ttt-ZUW7iRA7jYb8IKbWm-YHnjAzRvgGOINOsVny43zDc1k21jUzfUkjZXKmQ?key=lvvGJqFTNayAcC-35E9fHw

 

Next, the previously referenced script should be placed in this new directory:

C:\Program Files\Amazon\AWSCLIV2\nskp_config


 

AD_4nXeNTA_tWgd4hfQgwGnA6nuxACTvVnNMKfRBkg5CVxZrm6nUgPkGNPmECd-K0qNIrBGI4RmqY9-ESkbGPkdEwztQkCrZvVr64KbZvF7cVSnsnZUYHJUiq8ICHyjmPNB6-yImVdb8RA?key=lvvGJqFTNayAcC-35E9fHw

The next step is to run the script. It is important to note that the “Protect Client configuration and resources” option under the tamperproof settings must be disabled for this step.

This is necessary because the script references files that are protected by that specific setting.

To do this, go to your tenant:

  • Settings > Security Cloud Platform > Client Configuration,
  • Open the Client Configuration associated with the device you are working on,
  • and under the TAMPERPROOF tab, disable the option:
  • “Protect Client configuration and resources”.


 

AD_4nXe-YcN0UxRxhXUgesPxQF6GlRcYWWfVPuCCEkrWS8nVwPUn6SgiKwQ0d0k4C5KV48rgMSu7Cm6mD6aW7EHrMLchC5z9G2mLpX5o1WJq2R8HnHzJgpLub9oVbaOmrPJ3I7gLo-z7?key=lvvGJqFTNayAcC-35E9fHw

 

After disabling this option, make sure the client updates its configuration. Once that’s confirmed, proceed to run the script in the current directory.

 

This will generate a .pem file in the same location, as shown below:

 

AD_4nXeUlebl8JUC_FY2iy2B_X9s3QPxendTxboVxn04ZArYDnldlafXplYs4r92gYgW7TtQe9cVxNo7PB1CjTtbK7deGN1zoZXtA2v-zxtx4PMqB6m2SHZ7jQ26IrkmEVoSer_AWKcN8w?key=lvvGJqFTNayAcC-35E9fHw

 

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 "C:\Program Files\Amazon\AWSCLIV2\nskp_config\netskope-cert-bundle.pem"

 

AD_4nXerQ_tv-S40WfSAv9NfZZZSNdXhaEJLKFwqtQu557BCqckUUlaJA1jLGuKPOlrKlbDc1-Ko4M3ZDFPl_Emerfd_eraA4d-Z4FK5Tk6qaGTSoen8P0KHDuaQUAFxYGNTSq_2-ZUs6g?key=lvvGJqFTNayAcC-35E9fHw

 

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

 

AD_4nXfFurRCGciqJ_D9bd6Tx4tjjLP8ynwSaFz1jK07yI5PcAcGBPvepABD3BXsdwIXCJ692VXcMMF52iQn4xg9FkIIXPwo_AQ38tzXrUrYJ86k9IdSWma9rsE6x6dm9STAyYUM-A0RGQ?key=lvvGJqFTNayAcC-35E9fHw

 

Test from PowerShell:

AD_4nXc_6MT1o5s0s4SLTtwOvU8vYHDIxd40Kd1aPJi5AYnywONFaL4s8j0JnSjo_ctuHfzrvwT8S-jxQKErny0mRTEKCGTyZNGlOBOzLqf8oBzZlpqH0HelZbinl3YCvuCwx0kxoNX5SA?key=lvvGJqFTNayAcC-35E9fHw

 

Note: Once the configuration is complete and functionality is confirmed, it is highly recommended to re-enable the “Protect Client configuration and resources” option under the Tamperproof settings to maintain the security posture of the Netskope Client.

 

Terms and Conditions

  • All documented information undergoes testing and verification to ensure accuracy.
  • In the future, it is possible that the application's functionality may be altered by the vendor. If any such changes are brought to our attention, we will promptly update the documentation to reflect them.

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!