camicroscope / Caracal

Conslidated Backend, Auth, and Security Services for caMicroscope
GNU General Public License v3.0
15 stars 94 forks source link

Role Based Access Control #119

Open YashKumarVerma opened 3 years ago

YashKumarVerma commented 3 years ago

Google Summer of Code 2021 Wrap-up

Objectives


Role Bases system

Services Logging their details at runtime https://i.imgur.com/WXgHA7D.png

Role definitons https://i.imgur.com/naJAKUf.png

Default role definitions: changes done here are hardcoded into the application, and are automatically seeded into the database at runtime. This allows deploying the same codebase to multiple clusters with similar configurations, even if all are running on different databases. use case: different branches of a pathology lab https://i.imgur.com/oLGcB6x.png note the hierarchy in the roles that are implemented. Each higher role automatically gets all rights of a lower one.

Documentation: all services written have extensive documentation that should aid developers working on the project. https://i.imgur.com/lTBnOUj.png

Middleware: since the routes are bound to the application during runtime based on the configurations defined in routes.json, middleware is used to enforce the rights access. https://i.imgur.com/gFnieXr.png

APIS

Architecture

There has been a fundamental change in the way the application is structured. Even when I was limited on time, I have tried to club together similar functionality in form of modules or services (located in /services). This allows easy testing and a single point of contact for all operations. Earlier there was a lot of redundancy in the codebase, which is now removed as all calls are made to a single service and code is not duplicated.

Dependency

In order for the cache system to work, a new dependency of redis had to be added. The changes in the deployment will be needed to include a redis container for the cache service.

Note

YashKumarVerma commented 2 years ago

@birm if you could review this, I would fix the conflicts at once and make it ready to merge