IBM Security QRadar SOAR

 View Only
  • 1.  Offline installing resilient-sdk

    Posted Thu June 02, 2022 08:18 AM
    Hello,

    How I can offline installing resilient-sdk? When I do command "pip install resilient-sdk" I got an error:

    DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
    WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', error(104))': /simple/resilient-sdk/
    ERROR: Could not find a version that satisfies the requirement resilient-sdk (from versions: none)
    ERROR: No matching distribution found for resilient-sdk

    ------------------------------
    Alexey Fedorov
    ------------------------------


  • 2.  RE: Offline installing resilient-sdk

    Posted Fri June 03, 2022 08:53 AM

    Hi Alexey,

    Air-gapped environments introduce challenges for installing packages and their dependencies. To collect resilient-sdk and all it's dependencies, you'll need to start with a computer system which can access the Internet. Keep in mind that the computer system you use should be the same type of environment as your air-gapped machine (linux, windows, maxOS, etc.) as the .whl files downloaded are specific to that environment. There are parameters in pip download to specify different environments but I find them difficult to get correct.

    Follow this procedure of using pip download to download your original package along with all its dependencies.

    $ mkdir output-sdk
    $ cd output-sdk/
    $ pip download resilient-sdk

    Collecting resilient-sdk
    Collecting resilient>=45.0
      ...
    Saved ./resilient_sdk-45.0.3150.tar.gz
    Saved ./genson-1.2.2.tar.gz
    Saved ./Jinja2-3.1.2-py3-none-any.whl
    Saved ./resilient-45.0.3150.tar.gz
    Saved ./cachetools-5.2.0-py3-none-any.whl
    Saved ./keyring-23.5.1-py3-none-any.whl
    Saved ./MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_x86_64.whl
    Saved ./requests-2.27.1-py2.py3-none-any.whl
    Saved ./requests_toolbelt-0.9.1-py2.py3-none-any.whl
    Saved ./six-1.16.0-py2.py3-none-any.whl
    Saved ./certifi-2022.5.18.1-py3-none-any.whl
    Saved ./charset_normalizer-2.0.12-py3-none-any.whl
    Saved ./idna-3.3-py3-none-any.whl
    Saved ./importlib_metadata-4.11.4-py3-none-any.whl
    Saved ./urllib3-1.26.9-py2.py3-none-any.whl
    Saved ./zipp-3.8.0-py3-none-any.whl
    Saved ./setuptools-62.3.2-py3-none-any.whl
    Successfully downloaded resilient-sdk genson jinja2 resilient cachetools keyring MarkupSafe requests requests-toolbelt six certifi charset-normalizer idna importlib-metadata urllib3 zipp setuptools
    You can see there are quite a number of dependencies. All these files need to be copied to your air-gapped machine. Then you can install resilient-sdk with all the dependencies from a similar folder:
    $ pip install resilient_sdk-45.0.3150.tar.gz --find-links .

    Good luck



    ------------------------------
    Mark Scherfling
    ------------------------------



  • 3.  RE: Offline installing resilient-sdk

    Posted Mon June 06, 2022 03:01 AM
    Hello Mark,

    Looks like my issue related to Python version. I have Python 2.7.18 at main host and 2.7.5 at App Host.
    Is it a proper way to update Python on SOAR hosts?

    ------------------------------
    Alexey Fedorov
    ------------------------------



  • 4.  RE: Offline installing resilient-sdk

    Posted Mon June 06, 2022 07:50 AM
    Hi Alexey,

    I believe it's a difficult task to upgrade python on the SOAR platform. Part of this is due OS libraries removed or locked down. As an alternative, you can install another python version in a user environment using pyenv. This tool is very useful as it allows one to install multiple versions of python and switch among them. There are many Internet articles on how to configure pyenv, including the source here: https://github.com/pyenv/pyenv.

    Good luck,
    Mark

    ------------------------------
    Mark Scherfling
    ------------------------------



  • 5.  RE: Offline installing resilient-sdk

    Posted Mon June 06, 2022 10:05 AM
    Hello Mark,

    I done a command:

    scl enable rh-python38 bash

    It activated Python 3 in SOAR, but I still not have an ability to download or install pip packages.

    ------------------------------
    Alexey Fedorov
    ------------------------------