Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a reference JWT based authentication for FastAPI #49

Closed
devraj opened this issue Oct 15, 2022 · 2 comments
Closed

Implement a reference JWT based authentication for FastAPI #49

devraj opened this issue Oct 15, 2022 · 2 comments
Assignees

Comments

@devraj
Copy link
Member

devraj commented Oct 15, 2022

Initially we went down the path of using FastAPI JWT Auth a well implemented authentication layer for FastAPI, which also handles CSRF. Dependabot raised concerns around the version of PyJWT that's referenced by this project.

The project looks abandoned, with several pull requests that have been ignored for a while. To follow up I attempted to contact the maintainer of the project and did not hear back from him.

We had aspirations of standardising on this library with tickets to document the patterns in #34 #33 and #25

Given these facts it would be unwise to standardise on the library and revert back to implementing our own solution.

The team at Anomaly had used fastapi-csrf-protect in the past, it would also be recommended to study the relevance of this implementation before deciding to use it.

FastAPI docs have many guides around the security measures. As such at the moment we are closing the above tickets and continuing with our own implementation.

Resources:

@devraj devraj self-assigned this Oct 15, 2022
@devraj
Copy link
Member Author

devraj commented Oct 17, 2022

Upon review I found FastAPI Auth middleware with documentation. Basic evaluation:

  • Depends on the latest version of python-jose which was updated in June 2021 (other libraries were using pyjwt, haven't looked into the differences)
  • Project seems active with last release in April 2022
  • Has a consulting company that focuses on Python projects
  • Has multiple contributors
  • API looks nice and easy to work with

It's worth considering if we can depend on this project before we jump into writing our implementation.

Some other references documentation found:

@devraj
Copy link
Member Author

devraj commented Feb 15, 2023

Merging with #52

@devraj devraj closed this as completed Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant