{ "info": { "author": "Jos\u00e9 Lopes de Oliveira Jr.", "author_email": "2897144+forkd@users.noreply.github.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.7" ], "description": "# Corsair\nPython wrapper for some NSOC tools. Corsair aims to implement [RESTFul](https://en.wikipedia.org/wiki/Representational_state_transfer) wrappers for different tools commonly used by Network and Security Operations Centers (NSOC).\n\nThe main idea behind Corsair is to provide a method to access different APIs to facilitate the task of integrating tools. So far, each tool has at least three kinds of classes:\n\n* `Api`: the higher level of abstraction, which connects to the API.\n* `Endpoint`: uses endpoints to connect to certain API resources, by using [CRUD](https://en.wikipedia.org/wiki/Create,_read,_update_and_delete) methods.\n* `Request`: execute actions in a given API endpoint or resource, using [HTTP methods](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods).\n\nEach `Api` class has particular properties according to the API it's representing. The `Endpoint` class implements the CRUD methods themselves, usually:\n\n* `create` to insert new items,\n* `read` to retrieve a certain number of items,\n* `update` to alter certain items, and\n* `delete` to erase items.\n\nThe `Request` class implements methods to interact with the server using HTTP, by handling URLs (filter parameters), headers (like `Content-Type` and `Authorization`), and methods (like `GET`, `PUT`, `PATCH`, and `DELETE`). As all examples accross this repository present, the user will only have to connect to certain API using `Api` classes and understand what endpoints are available in `Endpoint` class. This should be enough to make all interactions.\n\n## Architecture\nIt's a project decision to return almost \"raw\" data from API, so the consumer must treat this data. This is done because at this point of the project, it'll take a lot of time to understand all resources provided by each API and organize the way they will output data.\n\nThis is the URL template Corsair tries to implement:\n\n```\nhttps://app.corp/api/endpoint/resource/suffix?filter=f1&filter2=2\n\\__________________/\\_______/\\_______/\\_____/\\__________________/\n Base URL Endpoint Resource Suffix Filters\n\\___________________________/\\__________________________________/\n Corsair will implement Corsair will facilitate,\n but programmer must implement\n```\n\nAccording to common bibliography, that `suffix` field doesn't exist, but some APIs use it, like IBM/QRadar. In that case, when the programmer wants details on certain resources, he must insert `/results` in the URL. It exposes some issues around standardization accross multiple vendors, because some of them wisely prefer to use filters for such things, but others use the `resources` field or even HTTP headers.\n\nBy default, Corsair wrappers will verify TLS certificates, but sometimes programmer could want to avoid this behaviour. That's why `Api` classes have the `tls_verify` parameter set to `True`. Changing the value to `False` makes Corsair inform to `urllib.urlopen` to use a different context that bypasses TLS verification.\n\nAnother important project decision is to implement all wrappers using only the [Python Standard Library](https://docs.python.org/3/library/).\n\n\n## Tests\nRun tests with:\n\n```\n$ python -m unittest tests.test_prime_api\n$ python -m unittest tests.test_netbox_api\n$ python -m unittest tests.test_qradar_api\n$ python -m unittest tests.test_hibp_api\n$ python -m unittest tests.test_vt_api\n$ python -m unittest tests.test_ise_api\n$ python -m unittest tests.test_rdap_api\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/forkd/corsair", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "Corsair", "package_url": "https://pypi.org/project/Corsair/", "platform": "", "project_url": "https://pypi.org/project/Corsair/", "project_urls": { "Homepage": "https://github.com/forkd/corsair" }, "release_url": "https://pypi.org/project/Corsair/0.4.2/", "requires_dist": null, "requires_python": "", "summary": "Python wrappers for some NSOC tools.", "version": "0.4.2" }, "last_serial": 5263857, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "60ac8341be9af762d39b33b57491c4c5", "sha256": "b89a6f146f5ffdb4874b6ae1d43033e642ceb398d1b7989260fb34ca833d85ab" }, "downloads": -1, "filename": "Corsair-0.1.0.tar.gz", "has_sig": false, "md5_digest": "60ac8341be9af762d39b33b57491c4c5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3725, "upload_time": "2019-05-05T19:49:41", "url": "https://files.pythonhosted.org/packages/e1/56/3487ceff5efe975e99dad05d142b7e1ea799b202957df7eb6e2fa7330a45/Corsair-0.1.0.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "2ed807b4a00a6923a1eda9d2856f2e2f", "sha256": "5caf981b5a476adb22a770c7ce11c646ab8f88c70f74dc0e26a508312bf78d79" }, "downloads": -1, "filename": "Corsair-0.3.2.tar.gz", "has_sig": false, "md5_digest": "2ed807b4a00a6923a1eda9d2856f2e2f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4305, "upload_time": "2019-05-10T19:50:40", "url": "https://files.pythonhosted.org/packages/36/3f/9f34bc3b0a827821cad5b23acca67ff00e628aaf24f50a7d74a3731f9ad7/Corsair-0.3.2.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "d367b88bd1113999bff9652d3555b811", "sha256": "179ff67cccffde7341e1815e48137d15e93e4491ed355ff00a786c8f185be877" }, "downloads": -1, "filename": "Corsair-0.3.3.tar.gz", "has_sig": false, "md5_digest": "d367b88bd1113999bff9652d3555b811", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6309, "upload_time": "2019-05-12T12:22:46", "url": "https://files.pythonhosted.org/packages/1e/80/61059c59d7aed58f5ecef4f048a0175ce8788b5703da19a3f52ae695a38f/Corsair-0.3.3.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "1e3168dbc91c52e7903a973ecaac01bc", "sha256": "07673fae449709826f69b4807ef941daf3cc78e41c6f2e81522d8ca52df3c3dc" }, "downloads": -1, "filename": "Corsair-0.4.2.tar.gz", "has_sig": false, "md5_digest": "1e3168dbc91c52e7903a973ecaac01bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7317, "upload_time": "2019-05-13T18:57:20", "url": "https://files.pythonhosted.org/packages/09/3e/b9377e1045868f6a94294c36c88811af4eb816e23622a4b9da961a1c3dc4/Corsair-0.4.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1e3168dbc91c52e7903a973ecaac01bc", "sha256": "07673fae449709826f69b4807ef941daf3cc78e41c6f2e81522d8ca52df3c3dc" }, "downloads": -1, "filename": "Corsair-0.4.2.tar.gz", "has_sig": false, "md5_digest": "1e3168dbc91c52e7903a973ecaac01bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7317, "upload_time": "2019-05-13T18:57:20", "url": "https://files.pythonhosted.org/packages/09/3e/b9377e1045868f6a94294c36c88811af4eb816e23622a4b9da961a1c3dc4/Corsair-0.4.2.tar.gz" } ] }