A demo of macaroon tokens, credentials with contextual caveats for decentralized authorization and delegation.
Demo available in following link
Have you ever wondered how cloud storage services like Google Drive or Microsoft OneDrive enable users to share files and resources with others while also managing permissions such as editing or viewing rights? These platforms often utilize advanced authorization mechanisms to control access, ensuring security and flexibility. How exactly do they achieve this intricate balance? Introducing macaroon tokens,a Google invention credential that incorporates contextual caveats for decentralized authorization and delegation!
Here's a demo highlighting the use of these tokens for authorization and delegation in decentralized environments implementing the use of first-party caveats and is built with NextJS and FastAPI frameworks. It's a great resource for tech enthusiasts keen on understanding this unique approach in a succinct and insightful manner.
The following technologies are used for the implementation of this project:
For the setup of this web application, the following prerequisites are required
- Frontend:
Node.js 18.7.0
or greater and(Node Package Manager) NPM
. - Backend:
Python 3.9
or greater andpip3
.
For easy management of Node.js environments, Node Version Manager (NVM) tool is recommended. Check installation instructions in website.
NOTE: At the time of the implementation of this project,
Node.js v18.17.1
,NPM 9.6.7
Python v3.10.11
,pip v23.2.1
were used.
To get a copy of this project and run it in your local environment, follow the steps listed below.
-
Clone the repo
git clone [email protected]:BigSamu/Macaroons_Demo.git
-
Go into the repository
cd Macaroons_Demo
-
Install required pyhon packages or dependencies
npm install
-
Create a .env file and update the enviromental variables that don't have values. Use as reference the
env.example
. For development, the enviromental variables that required an update are the following:NEXT_PUBLIC_CLIENT_DOMAIN_URL_PRODUCTION="<your-vercel-domain>" ENVIRONMENT = "<development-or-production>" # Change for "development" for this case MACAROON_SECRET_KEY="<your-very-strong-secret-key>"
-
Run appplication. Python packages will be installed automatically, because a script command has specifications for that.
npm run dev
After succesfull installation, you will be able to check the WebApp in any browser by visiting the following URL address: http://localhost:3000
Feel free to contact me if you have any doubt!
Samuel Valdes Gutierrez
Whether you use this work to learn something or if you just like my work, please 🙏 consider supporting it. This aid will help me to dedicate more time to create and developed well design open-source projects.
This project is licensed under the terms of the MIT license.
You can check out the full license here
Developed with ❤️ in Chile 🇨🇱