galaxyproject / ephemeris

Library for managing Galaxy plugins - tools, index data, and workflows.
https://ephemeris.readthedocs.org/
Other
28 stars 38 forks source link

Add flag to skip verification of SSL certificate #205

Open tflowers15 opened 9 months ago

tflowers15 commented 9 months ago

Within the Galaxy connection object (gi) created using bioblend, there is an attribute the turn verification of the SSL certificate on/off: gi.verify. The default is gi.verify=True. There are some circumstances when there may be issues with verifying the SSL certificate, which results in the Galaxy connection failing. If this happens it is useful to be able to set gi.verify=False so as to still connect to the Galaxy instance.

This pull request updates the common_parser to include an optional flag to skip verification of the SSL certificate when connecting to a Galaxy instance. The default value is False when not included in a function call (the SSL certificate will be verified). Including the flag in the function call sets the flag to True (the SSL certificate will NOT be verified).

Added check of the skip_verify flag to python scripts that connect to a Galaxy instance after the line of main() that makes the Galaxy connections, gi=get_galaxy_connection(). SSL certificate verification is skipped if the skip_verify flag is True (default is False): if args.skip_verify: gi.verify = False.