Configuración de proxy en el complemento Prisma Cloud IDE
751
Created On 10/31/24 14:27 PM - Last Modified 03/02/26 19:31 PM
Symptom
- El cliente tiene problemas con los complementos IntelliJ IDEA y VS Code 1. Cuando se configuran para usar un proxy, los complementos no se conectan al punto terminal. Parece que los complementos no están utilizando la configuración de proxy del IDE o el proxy de todo el sistema.
- Al utilizar el complemento IntellijIDEA, que está configurado para utilizar un proxy, el complemento no puede conectarse al punto terminal. Parece que el complemento no utiliza el proxy configurado en el IDE o el proxy de todo el sistema.
2024-10-08 12:14:40,284 [MainThread ] [WARNI] An unexpected error occurred getting the run configuration from <https://<FQDN>>/bridgecrew/api/v2/checkov/runConfiguration after multiple retries. Please verify your API key and Prisma API URL, and retry. If the problem persists, please enable debug logs and contact support. The error is: HTTPSConnectionPool(host='api.eu.prismacloud.io', port=443): Max retries exceeded with url: /login (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x148affc80>, 'Connection to api.eu.prismacloud.io timed out. (connect timeout=3.1)')) Traceback (most recent call last): File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/connection.py", line 203, in _new_conn sock = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/util/connection.py", line 85, in create_connection raise err File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/util/connection.py", line 73, in create_connection sock.connect(sa) TimeoutError: timed out
Proxy settings:
Visual Studio Code el mismo problema cuando uso el proxy (http).
-
export proxy setting via command
export HTTPS_PROXY="http://:@:" -
start Visual Studio Code via command
code -
configurar el complemento Prisma Cloud y probar la conexión. Está OK.
-
Iniciar escaneo completo
Registros de la "Ejecución de escaneo completo":
2024-10-11 09:55:35 [info]: Initiating Prisma Cloud VS Code extension version 1.0.21 2024-10-11 09:55:35 [info]: Plugin path: /Users/amusarra/.vscode/extensions/prismacloud.prisma-cloud-1.0.21 2024-10-11 09:55:35 [info]: customer is not supporting SAST 2024-10-11 09:55:35 [error]: Failed fetching a new JWT token, authorization on prisma failed: Request failed with status code 500 2024-10-11 09:55:35 [error]: CustomersModulesService is not enabled Or token not exists {"isEnabled":true} 2024-10-11 09:55:35 [info]: customer is not supporting SAST 2024-10-11 09:55:35 [info]: Installing Checkov with Docker 2024-10-11 09:55:35 [error]: The Checkov installation with Docker was failed {"error":{"name":"Error","message":"Command failed: docker pull bridgecrew/checkov:latest\nCannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?\n","stack":"Error: Command failed: docker pull bridgecrew/checkov:latest\nCannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?\n\n at genericNodeError (node:internal/errors:984:15)\n at wrappedFn (node:internal/errors:538:14)\n at ChildProcess.exithandler (node:child_process:423:12)\n at ChildProcess.emit (node:events:519:28)\n at ChildProcess.emit (node:domain:488:12)\n at maybeClose (node:internal/child_process:1105:16)\n at Socket.<anonymous> (node:internal/child_process:457:11)\n at Socket.emit (node:events:519:28)\n at Socket.emit (node:domain:488:12)\n at Pipe.<anonymous> (node:net:339:12)"}} 2024-10-11 09:55:35 [info]: Installing Checkov with Pip3 2024-10-11 09:55:35 [info]: Checking the Python version 2024-10-11 09:55:37 [error]: No executor found for undefined, aborting scan operation 2024-10-11 09:55:37 [info]: There are no installationId or jwtToken for sending analytics data 2024-10-11 09:55:49 [info]: Successfully installed Checkov using pip3 {"type":"pip3","entrypoint":"checkov"} 2024-10-11 09:55:54 [info]: proxy settings: "" 2024-10-11 09:55:54 [warn]: There are files opened from outside the workspace that won't be scanned in these directories: "/Users/amusarra/Library/Application Support/Code/logs/20241011T095522/window1/exthost/PrismaCloud.prisma-cloud" 2024-10-11 09:55:54 [info]: checkov --repo-id vscode/extension --quiet --soft-fail --output json --bc-api-key --directory "/Users/amusarra/dev/github/amusarra/tls-mutual-auth" 2024-10-11 09:56:20 [info]: Full error checkov process output: 2024-10-11 09:56:20,092 [MainThread ] [WARNI] An unexpected error occurred getting the run configuration from https://api.eu.prismacloud.io/bridgecrew/api/v2/checkov/runConfiguration after multiple retries. Please verify your API key and Prisma API URL, and retry. If the problem persists, please enable debug logs and contact support. The error is: HTTPSConnectionPool(host='api.eu.prismacloud.io', port=443): Max retries exceeded with url: /login (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x1493f79e0>, 'Connection to api.eu.prismacloud.io timed out. (connect timeout=3.1)')) Traceback (most recent call last): File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/connection.py", line 203, in _new_conn sock = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/util/connection.py", line 85, in create_connection raise err File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/util/connection.py", line 73, in create_connection sock.connect(sa) TimeoutError: timed out The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/connectionpool.py", line 791, in urlopen response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/connectionpool.py", line 492, in _make_request raise new_e File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/connectionpool.py", line 468, in _make_request self._validate_conn(conn) File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/connectionpool.py", line 1097, in _validate_conn conn.connect() File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/connection.py", line 611, in connect self.sock = sock = self._new_conn() ^^^^^^^^^^^^^^^^ File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/connection.py", line 212, in _new_conn raise ConnectTimeoutError( urllib3.exceptions.ConnectTimeoutError: (<urllib3.connection.HTTPSConnection object at 0x1493f79e0>, 'Connection to api.eu.prismacloud.io timed out. (connect timeout=3.1)') The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/checkov/common/bridgecrew/platform_integration.py", line 1021, in get_customer_run_config token = self.get_auth_token() ^^^^^^^^^^^^^^^^^^^^^ File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/cachetools/init.py", line 752, in wrapper v = func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/checkov/common/bridgecrew/platform_integration.py", line 300, in get_auth_token request = self.http.request("POST", f"{self.prisma_api_url}/login", # type:ignore[no-untyped-call] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/_request_methods.py", line 118, in request return self.request_encode_body( ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/_request_methods.py", line 217, in request_encode_body return self.urlopen(method, url, **extra_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/poolmanager.py", line 443, in urlopen response = conn.urlopen(method, u.request_uri, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/connectionpool.py", line 875, in urlopen return self.urlopen( ^^^^^^^^^^^^^ File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/connectionpool.py", line 875, in urlopen return self.urlopen( ^^^^^^^^^^^^^ File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/connectionpool.py", line 875, in urlopen return self.urlopen( ^^^^^^^^^^^^^ File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/connectionpool.py", line 845, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "/Users/amusarra/Library/Python/3.12/lib/python/site-packages/urllib3/util/retry.py", line 515, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.eu.prismacloud.io', port=443): Max retries exceeded with url: /login (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x1493f79e0>, 'Connection to api.eu.prismacloud.io timed out. (connect timeout=3.1)')) An error occurred getting data from the platform, including policy metadata. Because --include-all-checkov-policies was not used, Checkov cannot differentiate Checkov-only policies from platform policies, and no policies will get evaluated. Please resolve the error above or re-run with the --include-all-checkov-policies argument (but note that this will not include any custom platform configurations or policy metadata).
Configurar el proxy directamente en VS Code funciona, a diferencia de configurarlo a través del entorno del sistema.
Environment
- Entorno : macOS 24.0.0 Versión del kernel Darwin 24.0.0
- Python : 3.12
- IDE : IntelliJ IDEA 2024.2.3 (edición definitiva)
- Complemento Prisma:1.0.21
Cause
- Configuración de proxy eliminada.
Resolution
- La compatibilidad con la configuración de proxy de usuario en Configuración | Apariencia y comportamiento | Configuración del sistema | Proxy HTTP se introdujo en las siguientes versiones:
Versión 1.0.23 para productos JetBrains versión 2024.2.* y posteriores
Versión 1.0.23-203.241 para productos JetBrains versiones 2020.3.* a 2024.1.*
Para VS Code, el soporte de proxy ya estaba disponible, como se hace referencia en este problema de Github