• Stars
    star
    126
  • Rank 282,889 (Top 6 %)
  • Language
    Python
  • License
    Other
  • Created almost 11 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Django PRBAC

(Parameterized Role-Based Access Control)

https://github.com/dimagi/django-prbac

Build Status Test coverage PyPi version

About RBAC and PRBAC

Role-based access control (RBAC) is the standard method for access control in large systems. With RBAC, you grant privileges to roles. For example you might grant the privilege Reporting to the role Analyst. In most systems, you can nest roles as deeply as you want, and give users however many roles. A good example of this in practice is PostgreSQL roles and privileges.

The roles and privileges are whatever abstract concepts make sense for your system. It is up to application code to determine what actions to take based on the privileges granted. This can, of course, be implemented in terms of a lower-level permission system such as row-level or object-level access control lists (ACLs).

Parameterized role-based access control (PRBAC) adds parameters to roles and privileges. Now, for example, you might grant "Reporting(organization="Dimagi",area="Finance") to FinancialAnalyst(organization="Dimagi"). If you don't use parameters, then it is just RBAC. If you use parameters with finite sets of choice, then it is exponentially more powerful. If you use parameters with infinitely many choices (such as strings or integers) then it is infinitely more powerful. A good example of limited parameterization is how particular privileges (SELECT, UPDATE, etc) in PostgreSQL may be parameterized by an object. In PRBAC this parameterization is pervasive.

In-depth documentation

To learn more about parameterized role-based access control as implemented in this library, please visit http://django-prbac.readthedocs.org/

Access Control for Django

  • django.contrib.auth: This app, shipped with Django, provides unix-style access control (users, groups, permissions) with an extensible set of permissions that are implicitly parameterized by a content type. This is fundamentally different than role-based access control. It is only worth mentioning because it comes with Django and everyone is going to want to know "why did you reimplement the wheel?". If django.contrib.auth is the wheel, then RBAC is the car and PRBAC is a transformer. I leave it as an exercise to the reader to attempt to implement PRBAC using django.contrib.auth :-)
  • django-rbac: This project appears defunct and is not parameterized in any rate.
  • django-role-permissions: This app implements a sort of RBAC where roles are statically defined in code.
  • Others can be perused at https://www.djangopackages.com/grids/g/perms/. Many offer object-level permissions, which is as orthogonal to role-based access control as unix permissions. In fact, this is probably true of anything using the term "permissions".

Quick Start

To install, use pip:

$ pip install django-prbac

License

Django-prbac is distributed under the MIT license. (See the LICENSE file for details)

More Repositories

1

commcare-hq

CommCareHQ is the server backend for CommCare, the world's largest platform for designing, managing, and deploying robust, offline-first, mobile applications to frontline workers worldwide
Python
468
star
2

django-cte

Common Table Expressions (CTE) for Django
Python
235
star
3

jsonobject

A simple json-object mapping for Python
Python
233
star
4

Vellum

An XForms form designer written purely in Javascript
JavaScript
75
star
5

required-labels

🏷 Automated label checking for GitHub pull requests
Python
46
star
6

open-source

Dimagi's Open Source project standards and Code Review Policies
38
star
7

zebra-print-android

An Android application library which provides a one-shot intent for connecting to a Zebra printer and providing a ZPL file to be printed.
Java
34
star
8

gmail-filters

Tool for creating basic Gmail filters
Python
32
star
9

commcare-android

Offline First Android software client for CommCare, the world's largest platform for designing, managing, and deploying robust mobile applications to frontline workers worldwide
Java
32
star
10

commcare-cloud

Tools for standing up and managing a CommCare HQ server environment
Python
29
star
11

js-xpath

XPath Parser for Javascript
JavaScript
28
star
12

rapidandroid

A Java based RapidSMS port on the Android Platform
Java
20
star
13

AadharUID

Java
17
star
14

logistics

Python
15
star
15

datadog-checks

Custom Datadog checks
Python
14
star
16

couchforms

XForms processing engine in django and couchdb
Python
14
star
17

open-chat-studio

A web based platform for building Chatbots backed by Large Language Models
Python
13
star
18

data-hq

A domain management and xforms-processing application
Python
13
star
19

commcare-core

Core Java engine for CommCare, the world's largest platform for designing, managing, and deploying robust Offline First mobile applications to frontline workers worldwide
Java
12
star
20

rapidsms-logistics

an app to assist with logistics management using rapidsms
Python
10
star
21

touchforms

[deprecated] web-based javarosa xforms player built for touchscreen kiosks
JavaScript
9
star
22

quickcache

caching has never been easier
Python
8
star
23

commcare-j2me

J2ME-compatible CommCare. Includes the JavaRosa XForms engine
Java
8
star
24

python-digest

Python
7
star
25

commcare-export

A command-line tool and Python library to generate customized exports from CommCareHQ.
Python
7
star
26

dimagi-utils

Shared utility code used @ Dimagi
Python
6
star
27

tmobilescraper

Scraper for T-Mobile account info when running bulk accounts
Python
6
star
28

FormDesigner

Code for the HQ integrated Form Designer
Java
6
star
29

rd-toolkit

The Rapid Diagnostics Toolkit is a middleware layer for improving the consistency of vision based classifiers and accelerate their rollout
Kotlin
6
star
30

formplayer

Java Spring powered back-end web client for CommCare workflow and persistence engine. Backs "Live Preview" and "Web Apps" features of HQ
Java
6
star
31

sql-agg

Basic framework for doing simple SQL aggregation queries
Python
5
star
32

django-digest

Python
4
star
33

cushions

Collecting XForms data in Couch(DB)
Python
4
star
34

couchdbkit

CouchDB python framework
Python
4
star
35

rapidsms-decisiontree-app

Python
4
star
36

formtranslate

A small django web-api wrapper for JavaRosa's XForm Jar tools
CSS
4
star
37

django-datawarehouse

Simple utility wrapper for doing data warehousing in django
Python
4
star
38

openclinica-xforms

utility code for integrating OpenClinica CRFs and xforms
Python
3
star
39

jmeter

Ansible setup for Jmeter with collectd, InfluxDB and Grafana
Ruby
3
star
40

code-pairing

Python
3
star
41

gpg-scripts

Scripts for managing gpg keyrings and performing common operations
Python
3
star
42

django-soil

An asynchronous downloader for django. Plant your seeds and wait for them to grow!
Python
3
star
43

rapidsms-smscouchforms

Python
3
star
44

commcare-hq-api

Work-in-progress Python library for accessing CommCare HQ API end-points.
Python
3
star
45

couchdb-cluster-admin

utility for managing multi-node couchdb 2.x clusters
Python
3
star
46

pillowtop

A couchdb listening framework to transform and process changes.
Python
2
star
47

dimagi.com

Dimagi.com
HTML
2
star
48

rapidsms-ilsgateway-app

Python
2
star
49

fakecouch

Faster than real couch
Python
2
star
50

couchexport

export couch objects
Python
2
star
51

receiver

The receiver application
Python
2
star
52

rapidsms-groups

Groups for rapidsms
Python
2
star
53

poshan-didi-server

FLASK and Telegram Bot servers for the Poshan Didi project
Python
2
star
54

rapidsms-envaya

Backend for EnvayaSMS Android App
Python
2
star
55

commcare-analytics

CommCareHQ Superset Integration
Python
2
star
56

service-monitor

Python
2
star
57

django-field-audit

Python
2
star
58

rapidsms-alerts

supports web and sms alerts
Python
2
star
59

deploytools

Deploy Tools for Django Projects
Shell
2
star
60

email-reports

generic tool to turn web reports into schedulable, subscribable email reports
Python
2
star
61

carehq

CareHQ Code (Formery ASHand)
Python
2
star
62

rapidsms-reminders

Python
2
star
63

django-scheduler

Scheduler for Django
Python
2
star
64

rapidsms-dupe-checker

A very simple app to auto-respond to duplicate messages in RapidSMS.
Python
2
star
65

_deployment-utils_old

Code for making deployment of a new instance fast and easy (fabric, apache, supervisord, etc scripts)
Python
2
star
66

pyfidelius

ECDSA Key Generation and AES-GCM Encryption/Decryption
Python
2
star
67

rapidsms-groupmessaging

Python
2
star
68

couchdbkit-debugpanel

A debug-toolbar panel for couchdbkit
Python
2
star
69

dimagi-data-platform-R

R code for the aggregate tables and reporting components of Dimagi's internal data platform
R
2
star
70

mWellcare-Printer

Java
1
star
71

public-directory

CSS
1
star
72

commcarehq-prelogin

The site that is available to the public / viewed before a user logs in.
HTML
1
star
73

Salesforce

Salesforce custom apex code
Apex
1
star
74

commcarehq-venv

Python
1
star
75

carehq-mobile

Python
1
star
76

rapidsms-push-backend

Push Backend for Rapidsms
Python
1
star
77

rapidsms-smsforms

An alternative XForms application for RapidSMS.
Python
1
star
78

casexml

The case application
Python
1
star
79

datadog-parsers

log parsers for datadog
Python
1
star
80

Data-Management

All scripts related to Data Management and Quality of Service delivery
Shell
1
star
81

oc-patient-portal

JavaScript
1
star
82

rapidsms-messaging

Messaging for rapidsms
Python
1
star
83

tablib

generic tabular export library
Python
1
star
84

commcare-hq-deploy

CommCareHQ's deploy files
Python
1
star
85

hsph-reports

Reports for HSPH (Better Birth)
Python
1
star
86

djangocouch

utilities for getting data from django to couch
Python
1
star
87

uth-rhd-code

Client side desktop scripts for the UTH RHD Project
HTML
1
star
88

commcare-ios

Swift implementation of the CommCare XForm engine using the FormPlayer API
Swift
1
star
89

sqlcouch

A swap-in replacement for couchdbkit's Document that stores docs using the Django ORM and syncs to couchdb in the background
Python
1
star
90

greenhouse-tools

Some utility code and scripts for extracting data from Greenhouse's Harvest API
Python
1
star
91

ctable_deprecated

[DEPRECATED] CouchDB view to SQL Table
Python
1
star
92

a5288-reports

Python
1
star
93

xep_hq_server

App shared by standalone-xep-hq-server and CommCare HQ for integrating 3rd party XForm Editors
Python
1
star
94

hq-domains

Commcare
Python
1
star
95

mvp-reports

Python
1
star
96

sofabed

Django reporting on couchforms!
Python
1
star
97

commcare-translations

Home to translations of text in CommCare's user interface
Python
1
star
98

openhim-mediator-multitenant

An OpenHIM mediator that supports multiple tenants, each potentially with multiple upstream APIs.
Python
1
star
99

zprintspool

A Zebra Print Job Spooler for the MEPI project
Python
1
star
100

script_yard

Collection of useful and reusable scripts
1
star