Fix some TAXII 2 issues#267
Conversation
- Added example on how to define accounts with permissions for taxii2 and taxii1. - Fixed authentication for taxii2. Now accounts can be defined to access private collections with 'read' or 'modify' access.
When a collection that does not exist is used in a data-configuration file, a warning is produced
If no credentials are provided and you try to access a public collection, there is an error. Now it has been fixed.
Also expanded the example for taxii2 data-configuration-accounts
The script can be used to test push, pull, and subscribe functionality with taxii2-client
docker-compose.yml was missing version and services.
There was a problem hiding this comment.
Thank you very much for your contributions. There are many unrelated changes. I would prefer to split the changes in multiple MRs:
Add examples/data-configuration-accounts.yml. An example about configure accounts for accessing private taxii1 and taxii2 collections
Fixed examples/docker-compose.yml. version and services fields were missing.
Modify opentaxii/defaults.yml with TAXII2 configuration.
Those could be merged immediately if provided separately.
Fix opentaxii/taxii2/entities.py. modify allows reading and writting to collections.
Please open a dedicated PR. I understand the need to grant permissions however it goes from one extreme, nothing, to the other, all permissions.
I would request to add this behind a flag.
Fix "UUID is not JSON serializable" in opentaxii/taxii2/http.py.
Fixed by #289
Add field --public when creating TAXII2 API roots with opentaxii-add-api-root.
Fixed by #283
Add examples/pullpushsub.py, a script to test pull, push, and subscribe functionalities.
This script is really about taxii2client. It would better to keep that outside the repo as a gist for example to not endorse the responsibility of maintaining it.
|
Sorry for the late review, and thank you for your contributions. In the meantime, a lot of fixes have already landed and for the remaining items I would prefer dedicated PRs to simplify the review process. In any case, a good description of the change and new/updated tests are a requirement. |
This pull request makes the following changes:
examples/data-configuration-accounts.yml. An example about configure accounts for accessing private taxii1 and taxii2 collectionsopentaxii/auth/manager.pysodata-configuration-accounts.ymlworks and you can specify taxii1 and taxii2 collections.examples/docker-compose.yml.versionandservicesfields were missing.examples/pullpushsub.py, a script to test pull, push, and subscribe functionalities.--publicwhen creating TAXII2 API roots withopentaxii-add-api-root.opentaxii/defaults.ymlwith TAXII2 configuration.opentaxii/taxii2/entities.py.modifyallows reading and writting to collections.opentaxii/taxii2/http.py.