Skip to content

Tween for verifiying Cloudflare Access wrapped requests

License

Notifications You must be signed in to change notification settings

teamniteo/pyramid_cloudflare_access

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

e186612 · Jan 17, 2022

History

3 Commits
Jan 17, 2022
Jan 17, 2022
Jan 17, 2022
Jan 17, 2022
Jan 17, 2022
Jan 17, 2022
Jan 17, 2022
Jan 17, 2022
Jan 17, 2022
Jan 17, 2022
Jan 17, 2022
Jan 17, 2022
Jan 17, 2022
Jan 17, 2022

Repository files navigation

pyramid_cloudflare_access

Introduction

This package contains Pyramid package that can is used to verify requests behind Cloudflare Team Access.

Installation

Just do

pip install pyramid_cloudflare_access

or

easy_install pyramid_cloudflare_access

Compatibility

pyramid_cloudflare_access runs with pyramid>=1.7 and python>=3.6. Other versions might also work.

Usage

Add Cloudfalre config to a production.ini:

pyramid_cloudflare_access.policy_audience = "my_audience"
pyramid_cloudflare_access.team = "https://team.cloudfare-access.com"

More information can be found at https://developers.cloudflare.com/cloudflare-one/identity/users/validating-json#python-example

Usage example for the tween:

def main(global_config, **settings):
    config = Configurator(settings=settings)
    config.include('pyramid_cloudflare_access')
    return config.make_wsgi_app()

Releasing

  1. Update CHANGES.rst.
  2. Update pyproject.toml version.
  3. Run poetry check.
  4. Run poetry publish --build.

We're hiring!

At Niteo we regularly contribute back to the Open Source community. If you do too, we'd like to invite you to join our team!