app.api.v2 package
Subpackages
- app.api.v2.handlers namespace
- Submodules
- app.api.v2.handlers.ability_api module
- app.api.v2.handlers.adversary_api module
- app.api.v2.handlers.agent_api module
- app.api.v2.handlers.base_api module
- app.api.v2.handlers.base_object_api module
BaseObjectApiBaseObjectApi.add_routes()BaseObjectApi.create_object()BaseObjectApi.create_on_disk_object()BaseObjectApi.create_or_update_object()BaseObjectApi.create_or_update_on_disk_object()BaseObjectApi.delete_object()BaseObjectApi.delete_on_disk_object()BaseObjectApi.get_all_objects()BaseObjectApi.get_object()BaseObjectApi.update_object()BaseObjectApi.update_on_disk_object()
- app.api.v2.handlers.config_api module
- app.api.v2.handlers.contact_api module
- app.api.v2.handlers.fact_api module
FactApiFactApi.add_facts()FactApi.add_relationships()FactApi.add_routes()FactApi.delete_facts()FactApi.delete_relationships()FactApi.get_facts()FactApi.get_facts_by_operation_id()FactApi.get_relationships()FactApi.get_relationships_by_operation_id()FactApi.update_facts()FactApi.update_relationships()
- app.api.v2.handlers.fact_source_api module
- app.api.v2.handlers.health_api module
- app.api.v2.handlers.obfuscator_api module
- app.api.v2.handlers.objective_api module
- app.api.v2.handlers.operation_api module
OperationApiOperationApi.add_routes()OperationApi.create_object()OperationApi.create_operation()OperationApi.create_potential_link()OperationApi.delete_operation()OperationApi.get_operation_by_id()OperationApi.get_operation_event_logs()OperationApi.get_operation_link()OperationApi.get_operation_link_result()OperationApi.get_operation_links()OperationApi.get_operation_report()OperationApi.get_operations()OperationApi.get_operations_summary()OperationApi.get_potential_links()OperationApi.get_potential_links_by_paw()OperationApi.update_object()OperationApi.update_operation()OperationApi.update_operation_link()
- app.api.v2.handlers.payload_api module
- app.api.v2.handlers.planner_api module
- app.api.v2.handlers.plugins_api module
- app.api.v2.handlers.schedule_api module
- app.api.v2.managers namespace
- Submodules
- app.api.v2.managers.ability_api_manager module
- app.api.v2.managers.adversary_api_manager module
- app.api.v2.managers.agent_api_manager module
- app.api.v2.managers.base_api_manager module
BaseApiManagerBaseApiManager.create_object_from_schema()BaseApiManager.create_on_disk_object()BaseApiManager.dump_object_with_filters()BaseApiManager.find_and_dump_objects()BaseApiManager.find_and_update_object()BaseApiManager.find_and_update_on_disk_object()BaseApiManager.find_object()BaseApiManager.find_objects()BaseApiManager.logBaseApiManager.remove_object_from_disk_by_id()BaseApiManager.remove_object_from_memory_by_id()BaseApiManager.replace_object()BaseApiManager.replace_on_disk_object()BaseApiManager.update_object()BaseApiManager.update_on_disk_object()
- app.api.v2.managers.config_api_manager module
- app.api.v2.managers.contact_api_manager module
- app.api.v2.managers.fact_api_manager module
- app.api.v2.managers.fact_source_manager module
- app.api.v2.managers.operation_api_manager module
OperationApiManagerOperationApiManager.build_ability()OperationApiManager.build_executor()OperationApiManager.create_object_from_schema()OperationApiManager.create_potential_link()OperationApiManager.find_and_update_object()OperationApiManager.get_agent()OperationApiManager.get_agents()OperationApiManager.get_hosts()OperationApiManager.get_operation_event_logs()OperationApiManager.get_operation_link()OperationApiManager.get_operation_link_result()OperationApiManager.get_operation_links()OperationApiManager.get_operation_object()OperationApiManager.get_operation_report()OperationApiManager.get_potential_links()OperationApiManager.get_reachable_hosts()OperationApiManager.search_operation_for_link()OperationApiManager.setup_operation()OperationApiManager.update_object()OperationApiManager.update_operation_link()OperationApiManager.validate_link_data()OperationApiManager.validate_operation_state()
- app.api.v2.managers.schedule_api_manager module
- app.api.v2.schemas namespace
- Submodules
- app.api.v2.schemas.base_schemas module
- app.api.v2.schemas.caldera_info_schemas module
- app.api.v2.schemas.config_schemas module
- app.api.v2.schemas.deploy_command_schemas module
- app.api.v2.schemas.error_schemas module
- app.api.v2.schemas.link_result_schema module
- app.api.v2.schemas.payload_schemas module
Submodules
app.api.v2.errors module
- exception app.api.v2.errors.DataValidationError(message=None, name=None, value=None)
Bases:
Exception
- exception app.api.v2.errors.RequestBodyParseError
Bases:
ExceptionBase class for HTTP body parsing errors.
- exception app.api.v2.errors.RequestUnparsableJsonError(message=None)
Bases:
RequestBodyParseErrorRaised when a request body is not parsable (i.e., it is not well-formed json)
- exception app.api.v2.errors.RequestValidationError(message=None, errors=None)
Bases:
RequestBodyParseErrorRaised when an http request body contains json that is not schema-valid.
app.api.v2.responses module
- exception app.api.v2.responses.JsonHttpBadRequest(error, details=None, **kwargs)
Bases:
JsonHttpErrorResponse,HTTPBadRequestAn HTTP 400 response with a json formatted body.
- class app.api.v2.responses.JsonHttpErrorResponse(error, details=None, **kwargs)
Bases:
objectBase class for json formatted versions of aiohttp responses.
- exception app.api.v2.responses.JsonHttpForbidden(error, details=None, **kwargs)
Bases:
JsonHttpErrorResponse,HTTPForbiddenAn HTTP 403 response with a json formatted body.
- exception app.api.v2.responses.JsonHttpNotFound(error, details=None, **kwargs)
Bases:
JsonHttpErrorResponse,HTTPNotFoundAn HTTP 404 response with a json formatted body.
- async app.api.v2.responses.apispec_request_validation_middleware(request, handler)
Middleware to handle errors thrown by schema validation
Must be added before validation_middleware
- async app.api.v2.responses.json_request_validation_middleware(request, handler)
Middleware that converts json decoding and marshmallow validation errors into 400 responses w/ json bodies.
app.api.v2.security module
- app.api.v2.security.authentication_exempt(handler)
Mark the endpoint handler as not requiring authentication.
- Note:
This only applies when the authentication_required_middleware is being used.
- app.api.v2.security.authentication_required_middleware_factory(auth_svc)
Enforce authentication on every endpoint within an web application.
- Note:
Any endpoint handler can opt-out of authentication using the @authentication_exempt decorator.
- app.api.v2.security.is_handler_authentication_exempt(handler)
Return True if the endpoint handler is authentication exempt.
- async app.api.v2.security.pass_option_middleware(request, handler)
Allow all ‘OPTIONS’ request to the server to return 200 This mitigates CORS issues while developing the UI.
app.api.v2.validation module
- app.api.v2.validation.check_not_empty_string(value, name=None)
- app.api.v2.validation.check_positive_integer(value, name=None)
Module contents
- app.api.v2.make_app(services, upload_max_size_mb=100)