Skip to content

Commit

Permalink
fix: Disable cert verification in httpx Asyncclient for AutoCNV issue (
Browse files Browse the repository at this point in the history
  • Loading branch information
gromdimon authored Apr 4, 2024
1 parent c8a8056 commit b984ce1
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 5 deletions.
1 change: 1 addition & 0 deletions backend/alembic/versions/27c3977494f7_init_bookmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2023-10-27 09:40:49.740067+02:00
"""

import fastapi_users_db_sqlalchemy.generics # noqa
import sqlalchemy as sa

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2024-02-14 12:42:36.371531+01:00
"""

import sqlalchemy as sa

from alembic import op
Expand Down
1 change: 1 addition & 0 deletions backend/alembic/versions/4f3b20f156c1_init_caseinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2023-11-03 17:43:45.776515+01:00
"""

import fastapi_users_db_sqlalchemy.generics # noqa
import sqlalchemy as sa

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2024-02-19 17:43:45.473226+01:00
"""

import fastapi_users_db_sqlalchemy.generics # noqa
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
Expand Down
1 change: 1 addition & 0 deletions backend/alembic/versions/850ccab0221d_init_clinvarsub.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2023-12-15 12:32:49.537941+01:00
"""

import fastapi_users_db_sqlalchemy.generics # noqa
import sqlalchemy as sa

Expand Down
1 change: 1 addition & 0 deletions backend/alembic/versions/8ccd31a4f116_init_adminmsgs.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2023-09-28 10:41:57.671434+02:00
"""

import fastapi_users_db_sqlalchemy.generics # noqa
import sqlalchemy as sa

Expand Down
1 change: 1 addition & 0 deletions backend/alembic/versions/c8009ed33089_init_users.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
Create Date: 2023-09-28 10:41:24.861855+02:00
"""

import fastapi_users_db_sqlalchemy.generics # noqa
import sqlalchemy as sa

Expand Down
1 change: 1 addition & 0 deletions backend/alembic/versions/d10fec1c88fc_init_acmgseqvar.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
Create Date: 2023-11-29 11:16:25.636296+01:00
"""

import fastapi_users_db_sqlalchemy.generics # noqa
import sqlalchemy as sa

Expand Down
8 changes: 6 additions & 2 deletions backend/app/api/internal/endpoints/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,13 @@ class HTTPXClientWrapper:
async_client: httpx.AsyncClient | None = None

def start(self):
self.transport = httpx.AsyncHTTPTransport(retries=1)
self.transport = httpx.AsyncHTTPTransport(
retries=1, verify=False
) # Disabling cert verification for AutCNV
self.transport._pool._ssl_context.options |= 0x4 # OP_LEGACY_SERVER_CONNECT
self.async_client = httpx.AsyncClient(timeout=httpx.Timeout(60.0), transport=self.transport)
self.async_client = httpx.AsyncClient(
timeout=httpx.Timeout(60.0), transport=self.transport, verify=False
) # Disablinng cert verification for AutoCNV

async def stop(self):
await self.async_client.aclose()
Expand Down
8 changes: 5 additions & 3 deletions backend/tests/app/test_clinvarsub.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,11 @@ async def test_handler_with_session_update_status_in_progress_then_run(
db_session,
db_obj=submissionactivity,
obj_in={
"kind": SubmissionActivityKind.CREATE
if kind == "create"
else SubmissionActivityKind.RETRIEVE,
"kind": (
SubmissionActivityKind.CREATE
if kind == "create"
else SubmissionActivityKind.RETRIEVE
),
"status": SubmissionActivityStatus.WAITING,
},
)
Expand Down

0 comments on commit b984ce1

Please sign in to comment.