{ "info": { "author": "Dimitris Karakostas", "author_email": "dimit.karakostas@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Flask", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Topic :: Security", "Topic :: Security :: Cryptography" ], "description": "flask-ctx\n==============\n\nA simple integration of the CTX defense against side-channel attacks for Flask projects.\n\nRequirements\n============\n\n- Python 2.5+\n- Flask 0.10+\n- ctx-defense\n\nInstallation\n============\n\n- Install the latest stable version using ``pip``:\n\n```sh\npip install flask-ctx\n```\n\nConfiguration\n=============\n\n- Import the *ctx_processor* function from ctx's context processors:\n```python\nfrom flask_ctx.context_processors import ctx_processor\n```\n\n- Add the *ctx_processor* in the application's context processors:\n```python\napp.context_processor(ctx_processor)\n```\n\nBasic Usage\n===========\n\n- Use the *ctx_protect* function to use ctx on secrets:\n```html\n{{ ctx_protect(secret, origin, alphabet) }}\n```\n\n*secret* is a string containing the secret that needs to be protected and *origin*\nis a string uniquely identifying the CTX origin for the secret. *alphabet* is\nan optional argument to define the alphabet that the secret belongs to, default\nbeing the [ASCII_printable](https://docs.python.org/2/library/string.html#string.printable) characters.\n\n- Add the *ctx_permutations* function to include the used permutations for each\n origin:\n```html\n{{ ctx_permutations() }}\n```\n\nThe *ctx_permutations* function needs to run after all *ctx_protect* calls\nthat use an origin for the first time. It is proposed that it is included\nbefore the ** HTML tag.\n\n- Include the ctx *client script* in the template:\n```html\n\n```\n\nExample\n=======\n\n```html\n\n\n\n\n\n \n flask-ctx Example\n\n\n\n This is a very sensitive secret: {{ ctx_protect(\"a secret\", \"origin1\") }}\n This is another very sensitive secret: {{ ctx_protect(\"another secret\", \"origin2\") }}\n\n {{ ctx_permutations() }}\n \n\n\n\n```\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/dimkarakostas/ctx", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/dimkarakostas/ctx", "keywords": "flask ctx defense compression security BREACH", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "flask-ctx", "package_url": "https://pypi.org/project/flask-ctx/", "platform": "", "project_url": "https://pypi.org/project/flask-ctx/", "project_urls": { "Download": "https://github.com/dimkarakostas/ctx", "Homepage": "https://github.com/dimkarakostas/ctx" }, "release_url": "https://pypi.org/project/flask-ctx/1.0.0/", "requires_dist": [ "Flask (>=0.10)", "ctx-defense" ], "requires_python": "", "summary": "A simple integration of the CTX defense against side-channel attacks for Flask projects.", "version": "1.0.0" }, "last_serial": 2445656, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "ddb5b68c8492dfec37607b81c77ebf48", "sha256": "604961fb0bbf6aa6c664e21e530261b61c5902d94697fd1283b2505cdde5597b" }, "downloads": -1, "filename": "flask_ctx-1.0.0-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "ddb5b68c8492dfec37607b81c77ebf48", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5447, "upload_time": "2016-11-06T17:08:46", "url": "https://files.pythonhosted.org/packages/7d/66/5fc3fe372330fd4ac5f6801b0078955be1d1453c21e25050dc7d8120fe7a/flask_ctx-1.0.0-py2.py3-none-any.whl" } ], "1.0.0.dev20161104": [ { "comment_text": "", "digests": { "md5": "1ae7b11deefe4dae1896df476f1bdeb9", "sha256": "657ebbcd5c92d42a5b5a0c7c875aff97bc77044ab2f76169e3fc37cc1462534a" }, "downloads": -1, "filename": "flask_ctx-1.0.0.dev20161104-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "1ae7b11deefe4dae1896df476f1bdeb9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5644, "upload_time": "2016-11-04T00:37:04", "url": "https://files.pythonhosted.org/packages/7b/e5/0103297d478e9c96bc462f6ee6ef16c3e7c591eceeb6bdba0e3a0865d830/flask_ctx-1.0.0.dev20161104-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ddb5b68c8492dfec37607b81c77ebf48", "sha256": "604961fb0bbf6aa6c664e21e530261b61c5902d94697fd1283b2505cdde5597b" }, "downloads": -1, "filename": "flask_ctx-1.0.0-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "ddb5b68c8492dfec37607b81c77ebf48", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5447, "upload_time": "2016-11-06T17:08:46", "url": "https://files.pythonhosted.org/packages/7d/66/5fc3fe372330fd4ac5f6801b0078955be1d1453c21e25050dc7d8120fe7a/flask_ctx-1.0.0-py2.py3-none-any.whl" } ] }