Even if the default configuration file/environment indicates a local
cluster that doesn't need verification, a program like arv-copy can
also connect to a remote cluster using a settings/config file that has
verification enabled. In this case, TLS verification should be
enabled.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg@veritasgenetics.com>
if local_store is None:
local_store = os.environ.get('KEEP_LOCAL_STORE')
- if config.flag_is_true('ARVADOS_API_HOST_INSECURE'):
- self.insecure = True
+ if api_client is None:
+ self.insecure = config.flag_is_true('ARVADOS_API_HOST_INSECURE')
else:
- self.insecure = False
-
- if api_client is not None:
- if not self.insecure and api_client.insecure:
- self.insecure = True
+ self.insecure = api_client.insecure
self.block_cache = block_cache if block_cache else KeepBlockCache()
self.timeout = timeout
def __getattr__(self, r):
if r == "api_token":
return "abc"
+ elif r == "insecure":
+ return False
else:
raise arvados.errors.KeepReadError()
keep_client = arvados.KeepClient(api_client=ApiMock(),