ruby
May 17, 2021

Casbin-Ruby: an authorization library supporting distributed role-based access control (RBAC)

Our KFC project employs a microservice architecture, with components written in various languages and runtime environments, ​​such as .NET, Ruby, and Go. Many of these components need to be able to make decisions based upon the authorization status of a user: who are they, what roles do they belong to, what actions are they able to perform, and to what?

We needed a consistent way to use role-based access control between multiple independent languages, and we also needed a way to manage the permissions and access control lists (ACLs). We discovered Casbin, an authorization library that was implemented in a variety of different languages. But there was one snag: we needed a Ruby implementation, and Casbin had not yet been ported to Ruby. So, we decided to do it ourselves, and the result is Casbin-Ruby. Read more about the Casbin-Ruby open-source project.