Skip to content

Commit

Permalink
Have VaultDep depend explicitly on secrets_path.
Browse files Browse the repository at this point in the history
  • Loading branch information
aekblad committed Aug 7, 2024
1 parent fc0bb1d commit 22e2c96
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,13 +501,13 @@ def start() -> None:
uvicorn.run(app, host=args.host, port=args.port)


def get_vault(request: Request) -> Vault:
def get_vault(request: Request, secrets_path: str) -> Vault:
"""Return vault instance for use as a FastAPI dependency."""
vault = Vault.from_coerced_attrs(
vault_url=request.app.state.vault_url,
mount_point=request.app.state.mount_point,
chunk_size=request.app.state.chunk_size,
secrets_path=request.path_params["secrets_path"],
secrets_path=secrets_path,
)
return vault

Expand Down

0 comments on commit 22e2c96

Please sign in to comment.