Skip to content

Commit

Permalink
Very bad (insecure!) workaround for certificate issues on HTCondor
Browse files Browse the repository at this point in the history
Since we don't have the correct root CA, skip verification altogether. Should monitor certificate availability and switch back ASAP.
  • Loading branch information
lmoureaux authored Apr 25, 2023
1 parent e9b6a7e commit ba922dc
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions remote/cmswebwrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import logging
import json
import os
import ssl
import time
try:
from http.client import HTTPSConnection
Expand All @@ -31,11 +32,15 @@ def __get_connection(self):
if self.cert_file is None or self.key_file is None:
raise Exception('Missing user certificate or user key')

# BUG: HTCondor nodes are missing the latest CA certificate
# See https://cern.service-now.com/service-portal?id=outage&n=OTG0076975
#context = ssl.create_default_context()
context = ssl._create_unverified_context()
context.load_cert_chain(self.cert_file)
return HTTPSConnection('cmsweb.cern.ch',
port=443,
cert_file=self.cert_file,
key_file=self.key_file,
timeout=120)
timeout=120,
context=context)

def get(self, path, cache=True):
"""
Expand Down

0 comments on commit ba922dc

Please sign in to comment.