{ "info": { "author": "Kapil Thangavelu", "author_email": "kapil.foss@gmail.com", "bugtrack_url": null, "classifiers": [ "Topic :: System :: Distributed Computing", "Topic :: System :: Systems Administration" ], "description": "# Policy Changes from Git\n\nUsing custodian in accordance with infrastructure as code principles,\nwe store policy assets in a versioned control repository. This\nprovides for an audit log and facilitates code reviews. However this\ncapability is primarily of use to humans making semantic interpretations\nof changes.\n\nThis script also provides logical custodian policy changes over a git\nrepo and allows streaming those changes for machine readable/application\nconsumption. Its typically used as a basis for CI integrations or indexes\nover policies.\n\nTwo example use cases:\n\n - Doing dryrun only on changed policies within a pull request\n - Constructing a database of policy changes.\n\nPolicystream works on individual github repositories, or per Github integration\nacross an organization's set of repositories.\n\n# Install\n\npolicystream can be installed via pypi, provided the require pre-requisites\nlibraries are available (libgit2 > 0.26)\n\n```\npip install c7n-policystream\n```\n\nDocker images available soon, see build for constructing your own.\n\n# Build\n\nAlternatively a docker image can be built as follows\n\n```shell\n# Note must be top level directory of checkout\ncd cloud-custodian\n\ndocker build -t policystream:latest -f tools/c7n_policystream/Dockerfile .\n\ndocker run --mount src=\"$(pwd)\",target=/repos,type=bind policystream:latest\n```\n\n# Usage\n\nStreaming use case (default stream is to stdout, also supports kinesis, rdbms and sqs)\n\n```\n $ c7n-policystream stream -r foo\n 2018-08-12 12:37:00,567: c7n.policystream:INFO Cloning repository: foo\n \n \n \n \n \n \n \n 2018-08-12 12:37:01,275: c7n.policystream:INFO Streamed 7 policy changes\n```\n\nPolicy diff between two source and target revision specs. If source\nand target are not specified default revision selection is dependent\non current working tree branch. The intent is for two use cases, if on\na non-master branch then show the diff to master. If on master show\nthe diff to previous commit on master. For repositories not using the\n`master` convention, please specify explicit source and target.\n\n\n```\n $ c7n-policystream diff -r foo -v\n```\n\nPull request use, output policies changes between current branch and master.\n\n```\n $ c7n-policystream diff -r foo\n policies:\n - filters:\n - {type: cross-account}\n name: lambda-access-check\n resource: aws.lambda\n```\n\n# Options\n\n```\n$ c7n-policystream --help\nUsage: c7n-policystream [OPTIONS] COMMAND [ARGS]...\n\n Policy changes from git history\n\nOptions:\n --help Show this message and exit.\n\nCommands:\n diff Policy diff between two arbitrary revisions.\n org-checkout Checkout repositories from a GitHub organization.\n org-stream Stream changes for repos in a GitHub organization.\n stream Stream git history policy changes to destination.\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/capitalone/cloud-custodian", "keywords": "", "license": "Apache-2.0", "maintainer": "", "maintainer_email": "", "name": "c7n-policystream", "package_url": "https://pypi.org/project/c7n-policystream/", "platform": "", "project_url": "https://pypi.org/project/c7n-policystream/", "project_urls": { "Homepage": "https://github.com/capitalone/cloud-custodian" }, "release_url": "https://pypi.org/project/c7n-policystream/0.3.1/", "requires_dist": null, "requires_python": "", "summary": "Cloud Custodian - Git Commits as Logical Policy Changes", "version": "0.3.1" }, "last_serial": 5612645, "releases": { "0.2.0": [ { "comment_text": "", "digests": { "md5": "a4e46d3b24a8b94f3edd25e241bccd74", "sha256": "cc77e8da3dec7e4681ab5b25d8f34069f22f029ea884956031142527de089cb0" }, "downloads": -1, "filename": "c7n_policystream-0.2.0.tar.gz", "has_sig": false, "md5_digest": "a4e46d3b24a8b94f3edd25e241bccd74", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11402, "upload_time": "2018-10-24T13:52:41", "url": "https://files.pythonhosted.org/packages/e6/c1/9681f8c4ddd8fb4b07bc219bbaa101d4acec67b0e950e273314beb6c4b02/c7n_policystream-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "32e59f9b5f8ad2f2a8bf85fdf8c2f178", "sha256": "2002b24ae42d97852a683ba36523ecc367856c13fc87141360023607d5dea403" }, "downloads": -1, "filename": "c7n_policystream-0.2.1.tar.gz", "has_sig": false, "md5_digest": "32e59f9b5f8ad2f2a8bf85fdf8c2f178", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11431, "upload_time": "2018-10-24T13:56:13", "url": "https://files.pythonhosted.org/packages/93/98/394d43bc212650ea3b73b323eb2204047f5ed3d62dbf0a75102533459171/c7n_policystream-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "0d005f7b94e75a97f388a62fb2c230ef", "sha256": "170fe49680c5064bf3f7696e521e16ab7e04a170aec61eb96b2b272a116289ed" }, "downloads": -1, "filename": "c7n_policystream-0.2.2.tar.gz", "has_sig": false, "md5_digest": "0d005f7b94e75a97f388a62fb2c230ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11826, "upload_time": "2018-10-24T14:05:15", "url": "https://files.pythonhosted.org/packages/f0/a3/5ba3a0ba9501fa8abd7d7422867a3c967416082a32c923e5aac2caa5cd24/c7n_policystream-0.2.2.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "bb393d5caeb34632eb24b1af0b82a85a", "sha256": "055e2212ecbb27b83c34f6339bcbd6788a42ed998c080517df2abef22c6cc485" }, "downloads": -1, "filename": "c7n_policystream-0.3.0.tar.gz", "has_sig": false, "md5_digest": "bb393d5caeb34632eb24b1af0b82a85a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13438, "upload_time": "2018-11-14T09:27:31", "url": "https://files.pythonhosted.org/packages/ea/52/bbe9b470b92e19f83c318028319abf79c67ef07cffdf7394f421f9b59148/c7n_policystream-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "df84c4c550ae403cd5f6746750b3b771", "sha256": "419375676d0f48239cd66b0a2d8293f306569d189f56a6c830aa46c11fd5de33" }, "downloads": -1, "filename": "c7n_policystream-0.3.1.tar.gz", "has_sig": false, "md5_digest": "df84c4c550ae403cd5f6746750b3b771", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12391, "upload_time": "2019-01-31T20:47:42", "url": "https://files.pythonhosted.org/packages/30/b8/1eb42c98f85b1360a47e901cb5d762b5d20458c33d7ad9e2a83f9783049b/c7n_policystream-0.3.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "df84c4c550ae403cd5f6746750b3b771", "sha256": "419375676d0f48239cd66b0a2d8293f306569d189f56a6c830aa46c11fd5de33" }, "downloads": -1, "filename": "c7n_policystream-0.3.1.tar.gz", "has_sig": false, "md5_digest": "df84c4c550ae403cd5f6746750b3b771", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12391, "upload_time": "2019-01-31T20:47:42", "url": "https://files.pythonhosted.org/packages/30/b8/1eb42c98f85b1360a47e901cb5d762b5d20458c33d7ad9e2a83f9783049b/c7n_policystream-0.3.1.tar.gz" } ] }