Daily Shaarli

All links of one day in a single page.

September 30, 2024

Overview | Casbin

Casbin is a powerful and efficient open-source access control library that supports various access control models for enforcing authorization across the board.

Enforcing a set of rules is as simple as listing subjects, objects, and the desired allowed action (or any other format as per your needs) in a policy file. This is synonymous across all flows in which Casbin is used. The developer/administrator has complete control over the layout, execution, and conditions for authorization, which are set via the model file. Casbin provides an Enforcer for validating an incoming request based on the policy and model files given to the Enforcer.

Best Practices for Authorization in Python
thumbnail

Authorization plays a vital role in building secure and robust applications, ensuring that users possess the necessary permissions to access resources or perform particular actions.
In Python, developers often follow authorization anti-patterns that can potentially lead to security vulnerabilities, needless code complexity, and significant maintenance difficulties. This article examines various best practices to avoid these anti-patterns and provides strategies to implement more effective authorization in your Python applications.