Skip to content

Commit

Permalink
Feature/auth addon (#87)
Browse files Browse the repository at this point in the history
* x509 cert auth
  • Loading branch information
dbernaciak authored Nov 22, 2024
1 parent d27e6c0 commit 2b80f67
Show file tree
Hide file tree
Showing 6 changed files with 288 additions and 53 deletions.
137 changes: 127 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ crate-type = ["cdylib", "rlib"]


[dependencies]
pyo3 = { version = "0.22.1" }
pyo3 = { version = "0.22.4"}
pyo3-log = { version = "0.11.0" }
log = { version = "~0.4.4", default-features = false, features = ["std"] }
serde = { version = "1.0", features = ["derive"] }
Expand All @@ -23,6 +23,7 @@ reqwest = { version = "0.12.7", features = ["json", "rustls-tls", "rustls-tls-na
tokio = { version = "1.40", features = ["rt-multi-thread", "full"] }
url = { version = "2.5", features = [] }
json = { version = "0.12" }
jsonwebtoken = {version = "9.3.0"}
state = { version = "0.6"}


Expand Down
5 changes: 4 additions & 1 deletion py_src/fusion/fusion_filesystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -697,10 +697,13 @@ async def _meth(url: Any, kw: Any) -> None:
await self._async_raise_not_found_for_status(resp, url)
return await resp.json() # type: ignore
except Exception as ex: # noqa: BLE001
# wait 3 seconds before retrying
await asyncio.sleep(3 * (ex_cnt + 1))
logger.debug(f"Failed to upload file: {ex}")
ex_cnt += 1
last_ex = ex

raise Exception(f"Failed to upload file: {last_ex}, failed after {ex_cnt} exceptions.")
raise Exception(f"Failed to upload file: {last_ex}, failed after {ex_cnt} exceptions. {last_ex}")

context = nullcontext(lpath)

Expand Down
14 changes: 12 additions & 2 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ annotated-types==0.6.0
# via pydantic
anyio==4.3.0
# via jupyter-server
appnope==0.1.4
# via ipykernel
argcomplete==3.3.0
# via nox
argon2-cffi==23.1.0
Expand All @@ -55,6 +53,7 @@ attrs==23.2.0
# via aiohttp-sse-client
# via jsonschema
# via referencing
auditwheel==6.1.0
azure-core==1.30.1
# via adlfs
# via azure-identity
Expand Down Expand Up @@ -120,6 +119,7 @@ cryptography==42.0.5
# via moto
# via msal
# via pyjwt
# via secretstorage
debugpy==1.8.1
# via ipykernel
decorator==5.1.1
Expand Down Expand Up @@ -228,6 +228,9 @@ jaraco-functools==4.0.1
# via keyring
jedi==0.19.1
# via ipython
jeepney==0.8.0
# via keyring
# via secretstorage
jinja2==3.1.4
# via jupyter-server
# via mike
Expand Down Expand Up @@ -414,6 +417,7 @@ oauthlib==3.2.2
overrides==7.7.0
# via jupyter-server
packaging==24.0
# via auditwheel
# via ipykernel
# via jupyter-server
# via jupytext
Expand All @@ -434,6 +438,7 @@ pandocfilters==1.5.1
# via nbconvert
parso==0.8.4
# via jedi
patchelf==0.17.2.1
pathspec==0.12.1
# via mkdocs
pexpect==4.9.0
Expand Down Expand Up @@ -494,6 +499,8 @@ pydantic-core==2.18.2
# via pydantic
pydantic-settings==2.2.1
# via bump-my-version
pyelftools==0.31
# via auditwheel
pygments==2.17.2
# via ipython
# via mkdocs-jupyter
Expand Down Expand Up @@ -621,6 +628,8 @@ s3fs==2024.3.1
# via pyfusion
s3transfer==0.10.1
# via boto3
secretstorage==3.3.3
# via keyring
send2trash==1.8.3
# via jupyter-server
# via nbclassic
Expand Down Expand Up @@ -767,6 +776,7 @@ xmltodict==0.13.0
yarl==1.9.4
# via aiohttp
# via aiohttp-sse-client
ziglang==0.13.0
zipp==3.18.1
# via importlib-metadata
# via importlib-resources
2 changes: 0 additions & 2 deletions requirements.lock
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ aiosignal==1.3.1
# via aiohttp
anyio==4.3.0
# via jupyter-server
appnope==0.1.4
# via ipykernel
argon2-cffi==23.1.0
# via jupyter-server
# via nbclassic
Expand Down
Loading

0 comments on commit 2b80f67

Please sign in to comment.