Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

allowedflare

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

allowedflare

Authenticate to Django with JSON Web Tokens (JWTs) signed by Cloudflare Access

  • 2024.44.3
  • PyPI
  • Socket score

Maintainers
1

Authenticate to Django with JSON Web Tokens (JWTs) signed by Cloudflare Access. A Django reimplementation of https://developers.cloudflare.com/cloudflare-one/identity/authorization-cookie/validating-json/#python-example

To run the demo, set the following environment variables:

export ALLOWEDFLARE_ACCESS_URL=https://your-organization.cloudflareaccess.com
export ALLOWEDFLARE_AUDIENCE=64-character hexadecimal string
export ALLOWEDFLARE_PRIVATE_DOMAIN=your-domain.tld

Then run

docker compose up

Configure Cloudflare Tunnel public hostname demodj.your-domain.tld to http://localhost:8001 or equivalent.

TODO

  • Iterate on the same-origin (re-)authenticating proxy
  • Iterate on Admin site ModelBackend
    • http://localhost:8001/admin/login/ text when authenticated is "You are authenticated as , but are not authorized to access this page. Would you like to login to a different account?"
  • Expand unit test coverage
  • Basic integration and end-to-end tests
  • mTLS support and testing
  • Configure PostgreSQL
    • Post-migration hook to create a readonly DB user
    • Use the readonly DB user for django-sql-explorer and jupyterhub
    • Update the django-sql-explorer allowlist to accept SET since it's only dangerous for MySQL
    • Exclude only specific fields, like password hash, from the django-sql-explorer view of the django.contrib.auth schema
    • See if admin site change history fields can be shown in the django-sql-explorer schema viewer

Open Questions

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc