Comments (2)
Design doc: https://docs.google.com/document/d/1DVdzbXRBBkMCBZWB0BzS7AsRlCBSKJDaRkB294I_7T8/edit
from api.
Also there are different requrements for authorization changes.
Right now we are using class BroodAuthMiddleware(BaseHTTPMiddleware)
with whitelist: Optional[Dict[str, str]]
where you can specify what route Path could bypass middleware authentification check in FastAPI app. We found it not scalable, because it brings regexp logic if you need to apply it route Path like @app.get("/{leaderboard_id}/config")
where leaderboard_id
could uuid or number or any other string - depends on usecase.
Umfortunatly, FastAPI dunctionality does not provide this functionality and disscusion exists for 3 years already: tiangolo/fastapi#7691
After some investigation, there are some solutions:
- Continue modify
BroodAuthMiddleware
orAPIRouter
- Split authentificated routes to apps
- Migrate from middlewares to Dependencies.
From my point of view 1st
solution will bring to us overcomplicated authorization logic which better to avoid in such important parts of code. Another 2nd
solution split pathes in documentation and could make application not friendly for other developers who use our code from outside.
Preferable solution to migrate from middlewares to FastAPI Dependencies, same approach we are using in bugout-dev/brood like user_authorization = Depends(request_user_authorization)
. It will requires additional checks that all routes correctly set and also brings some code duplication. But we will have more granular set up.
from api.
Related Issues (20)
- Postgresql Blob block storage index schematic database schema.
- User RDS database schema. With tables synchronize possiblity.
- Database connections managment.
- Moonworm-crawler with schematic indexing with GCS integration.
- Blockstore -> RDS synchronizer.
- Blockstore -> RDS synchronizer.
- Subscriptions manager.
- Add raw transactions between timestamps
- Add score_changes leaderboard endpoint.
- Add search by leaderboard points data keys.
- We need add share leaderboard frontend.
- Add Xai testnet.
- Delete all unclamed drops.
- 0x3251535f48f6cABd97f5B5838703a1ffa75c9D0E is_contract return EOA on xai_sepolia
- Leaderboard unique addresses statistics.
- Summon team suggestion
- Leaderboard API endpoint to delete all unpublished versions
- Add leaderboard generator as RabitMQ.
- Delete dasboard generator workers.
- Leaderboard push diff. Leaderboard version will store config in which blocks_number version is generated.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from api.