Generic PEP middleware for Django Framework
pip install -U -r requirements.txt
- in Demo/settings.py
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'Demo.middleware.django_pep.DjangoPEPMiddleware', # DjangoPEP here (last)
]
# DjangoPEP Middleware settings
DJANGOPEP_PRODUCT = 1 # 1-WSO2 IS, 2-AuthZForce
DJANGOPEP_URL = 'https://localhost:9443/api/identity/entitlement/decision/pdp'
DJANGOPEP_USER = 'admin'
DJANGOPEP_PASSWORD = 'admin'
DJANGOPEP_TOKEN = ''
DJANGOPEP_DEBUG = True
DJANGOPEP_IGNORE = ['/$', '/admin/*', '/accounts/*']
- In WSO2 IS create new XACML policy from sample (Extra/NewTicket.xml)
python manage.py runserver
Welkson Renny de Medeiros - [email protected]
Carlos Eduardo da Silva - [email protected]
The MIT License (MIT)