Skip to content

Commit

Permalink
feat: add TLS verification
Browse files Browse the repository at this point in the history
Signed-off-by: Guilhem Barthés <guilhem.barthes@owkin.com>
  • Loading branch information
guilhem-barthes committed Mar 26, 2024
1 parent 908957c commit 2e22c07
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 9 deletions.
3 changes: 0 additions & 3 deletions backend/builder/image_builder/image_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,9 +311,6 @@ def _build_container_args(dockerfile_mount_path: str, image_tag: str) -> list[st

if REGISTRY_SCHEME == "http":
args.append("--insecure")
# TODO: add verification before release
else:
args.append("--skip-tls-verify")

if KANIKO_MIRROR:
args.append(f"--registry-mirror={REGISTRY}")
Expand Down
3 changes: 1 addition & 2 deletions backend/image_transfer/decoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ def push_payload(
"""
authenticator = Authenticator()

# TODO: add verification before release
with DXFBase(host=registry, auth=authenticator.auth, tlsverify=False, insecure=not secure) as dxf_base:
with DXFBase(host=registry, auth=authenticator.auth, insecure=not secure) as dxf_base:
with safezip.ZipFile(zip_file, "r") as zip_file:
return list(load_zip_images_in_registry(dxf_base, zip_file, strict))

Expand Down
3 changes: 1 addition & 2 deletions backend/image_transfer/encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,7 @@ def make_payload(

authenticator = Authenticator()

# TODO: add verification before release
with DXFBase(host=registry, auth=authenticator.auth, tlsverify=False, insecure=not secure) as dxf_base:
with DXFBase(host=registry, auth=authenticator.auth, insecure=not secure) as dxf_base:
with safezip.ZipFile(zip_file, "w") as zip_file_opened:
create_zip_from_docker_images(
dxf_base,
Expand Down
2 changes: 0 additions & 2 deletions backend/substrapp/docker_registry.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ def get_request_docker_api(
f"{REGISTRY_SCHEME}://{REGISTRY}/v2/{path}",
headers=headers,
timeout=HTTP_CLIENT_TIMEOUT_SECONDS,
# TODO: add verification before release
verify=False, # nosec B501
)

response.raise_for_status()
Expand Down

0 comments on commit 2e22c07

Please sign in to comment.