security-manager-apis


Namesecurity-manager-apis JSON
Version 1.0.1 PyPI version JSON
download
home_page
SummarySecurity Manager API
upload_time2023-02-02 21:01:42
maintainer
docs_urlNone
author
requires_python>=3.6
license
keywords security manager apis
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            

# Python library for FireMon APIs
`Developed using Python 3.8.0 and requests 2.20.1`

## Table of Contents
<!-- TABLE OF CONTENTS -->
* [About The Project](#about-the-project)
* [Setup](#setup)
* [Dependencies](#dependencies)
* [Policy Planner Usage](#policy-planner-usage)
* [Security Manager Usage](#security-manager-usage)
* [Policy Optimizer Usage](#policy-optimizer-usage)
* [Orchestration API Usage](#orchestration-api-usage)
* [Project Structure](#project-structure)
* [Flow of Execution](#flow-of-execution)
* [License](#license)


## About The Project
This library/project is created to jumpstart your Orchestration API, Policy planner API, Security Manager API, or Policy Optimizer API projects.

## Setup

**Setup - PyPi Install:**
* To **install** the library, run the following command from the terminal.

```console
pip install security-manager-apis
```

**Setup - PyPi Upgrade:**

To **upgrade** the library, run the following command from the terminal.

```console
pip install --upgrade security-manager-apis
```


```console
pip install -e .
```

If you don't plan to make any modifications to the project but still want to use it across
your different projects, then do a local install.

```console
pip install .
```

This will install all the dependencies listed in the `setup.py` file. Once done
you can use the library wherever you want.


## Dependencies
__Pre-requisite__ - Python 3.6 or greater version should be installed on your machine.

**Upgrade pip on Mac:**
* __NOTE__ : This is important because, apparently, some Mac apps rely on Python 2 version, so if you attempt to upgrade the Python 2.x to Python 3.x on Mac OS, you will eventually break some apps, perhaps critical apps.
With that in mind, you should not attempt to upgrade the current preinstalled Python release on the Mac; instead, you will just have the co-installation of Python 3 for full compatibility.
```console
brew install python3
```
**Upgrade pip on Windows:**
```console
python -m pip install --upgrade pip
```

## Policy Planner Usage
__Initializing a Policy Planner Class__
```python
from security_manager_apis import policy_planner

policyplan = policy_planner.PolicyPlannerApis(host: str, username: str, password: str, verify_ssl: bool, domain_id: str, workflow_name: str, suppress_ssl_warning: bool)
```
* __host__: Pointing to your FireMon server.
* __username__: The username that would be used to create the API connection to FireMon.
* __password__: The API password for the given user.
* __domain_id__: The Domain ID for the targeted workflow.
* __workflow_name__: The name of the targeted workflow.
* __verify_ssl__: Enabled by default. If you are running demo/test environment, good chance you'll need to set this one to `False`.
* __suppress_ssl_warning__: Set to False by default. Will supress any SSL warnings when set to `True`.

__Create a Policy Planner Ticket__
```python
policyplan.create_pp_ticket(request_body: dict)
```
* __request_body__: JSON of ticket to be created.

_Request JSON Example:_
```json
{
    "variables": {
        "summary": "string",
        "businessNeed": "string",
        "priority": "string",
        "dueDate": "YYYY-MM-DD HH:MM:SS",
        "applicationName": "string",
        "customer": "string",
        "externalTicketId": "string",
        "notes": "string",
        "requesterName": "string",
        "requesterEmail": "string",
        "applicationOwner": "string",
        "carbonCopy": [
            "string", 
            "string"
        ]
    },
    "policyPlanRequirements": [
        {
            "sources": [
                "string",
                "string"
            ],
            "destinations": [
                "string",
                "string"
            ],
            "action": "string",
            "services": [
                "string",
                "string"
            ],
            "requirementType": "string",
            "childKey": "string",
            "variables": {}
        }
    ]
}
```
__Update a Policy Planner Ticket__
```python
policyplan.update_pp_ticket(ticket_id: str, request_body: dict)
```
* __ticket_id__: ID of ticket to be updated.
* __request_body__: JSON of updates to apply to the ticket.

_Request JSON Example:_
```json
{  
    "variables": {  
        "summary": "string"  
  }  
}
```

__Querying for Policy Planner Tickets__
```python
policyplan.siql_query_pp_ticket(siql_query: str, page_size: int)
```
* __siql_query__: SIQL Query to use in search.
* __page_size__: Number of results to return.


__Retrieving a Policy Planner Ticket__
```python
policyplan.pull_pp_ticket(ticket_id: str)
```
* __ticket_id__: ID of ticket to be retrieved.

__Retrieving Policy Planner Ticket Event History__
```python
policyplan.pull_pp_ticket_events(ticket_id: str, page_size: int)
```
* __ticket_id__: ID of ticket to retrieve event history from.
* __page_size__: Number of events to return

__Retrieving Policy Planner Ticket Attachments__
```python
policyplan.pull_pp_ticket_attachements(ticket_id: str, page_size=100)
```
* __ticket_id__: ID of ticket to retrieve event history from.
* __page_size__: Number of events to return

__Download Policy Planner Ticket Attachments__
```python
policyplan.download_pp_ticket_attachment(self, ticket_id: str, attachment_id: str)
```
* __ticket_id__: ID of ticket to retrieve event history from.
* __attachment_id__: ID of attachment to fetch

_Coding Example:_
```python
attachment_resp = pp.download_pp_ticket_attachment(ticket_id, attachment_id)
file_name = attachment_resp.headers['filename']
open(file_name, 'wb').write(attachment_resp.content)
```

__Assigning a Policy Planner Ticket__
```python
policyplan.assign_pp_ticket(ticket_id: str, user_id: str)
```
* __ticket_id__: ID of ticket to assign user to.
* __user_id__: ID of user to be assigned.

__Unassigning a Policy Planner Ticket__
```python
policyplan.unassign_pp_ticket(ticket_id: str)
```
* __ticket_id__: ID of ticket to remove assignee from.

__Adding a Requirement to a Policy Planner Ticket__
```python
policyplan.add_req_pp_ticket(ticket_id: str, req_json: dict)
```
* __ticket_id__: ID of ticket to add requirement to.
* __req_json__: JSON of requirement to be added.

_Requirement JSON Example:_
```json
{
   "requirements":[
      {
         "requirementType":"RULE",
         "childKey":"add_access",
         "variables":{
            "expiration":"2022-01-01T00:00:00+0000"
         },
         "destinations":[
            "10.1.1.1/24"
         ],
         "services":[
            "tcp/22"
         ],
         "sources":[
            "10.0.0.0/24"
         ],
         "action":"ACCEPT"
      }
   ]
}
```

__Replacing Requirements on a Policy Planner Ticket__
```python
policyplan.replace_req_pp_ticket(self, ticket_id: str, req_json: dict)
```
* __ticket_id__: ID of ticket to add requirements to.
* __req_json__: JSON of requirements to be added.

__Completing a Policy Planner Ticket Task__
```python
policyplan.complete_task_pp_ticket(ticket_id: str, button_action: str)
```
* __ticket_id__: ID of ticket to add requirement to.
* __button_action__: Button value, options are: submit, complete, autoDesign, verify, approved, rejected

__Running PCA for a Policy Planner Ticket__
```python
policyplan.run_pca(ticket_id: str, control_types: str, enable_risk_sa: str)
```
* __ticket_id__: ID of ticket to run PCA on.
* __control_types__: Control types as string array. Options: ALLOWED_SERVICES, CHANGE_WINDOW_VIOLATION, DEVICE_ACCESS_ANALYSIS, DEVICE_PROPERTY, DEVICE_STATUS, NETWORK_ACCESS_ANALYSIS, REGEX, REGEX_MULITPATTERN, RULE_SEARCH, RULE_USAGE, SERVICE_RISK_ANALYSIS, ZONE_MATRIX, ZONE_BASED_RULE_SEARCH
* __enable_risk_sa__: true or false

__Adding Attachment to a Policy Planner Ticket__
```python
policyplan.add_attachment(ticket_id: str, file_name: str, f, description: str):
```
* __ticket_id__: ID of ticket to add attachment to.
* __filename__: File name of attachment.
* __f__: file stream.
* __description__: Description of file.

_Adding Attachment Code Example:_
```python
file_name = "test_file.txt"
with open(file_name) as f:
    policyplan.add_attachment('38', file_name, f, 'test upload')
```

__Uploading Requirements via CSV to Policy Planner Ticket__
```python
policyplan.csv_req_upload(ticket_id: str, file_name: str, f, behavior="append"):
```
* __ticket_id__: ID of ticket to add attachment to.
* __filename__: File name of attachment.
* __f__: file stream.
* __behavior__: Defaulted to `append`, pass `replace` to replace all requirements on the ticket with the new CSV requirements

_Uploading Requirements via CSV Code Example:_
```python
file_name = "test_req.csv"
with open(file_name) as f:
    policyplan.csv_req_upload('1', file_name, f)
```

__Retrieving Requirements from a Policy Planner Ticket__
```python
policyplan.get_reqs(ticket_id: str)
```
* __ticket_id__: ID of ticket to retrieve requirements from.

__Retrieving Changes from a Policy Planner Ticket__
```python
policyplan.get_changes(ticket_id: str)
```
* __ticket_id__: ID of ticket to retrieve requirements from.

__Updating Change on a Policy Planner Ticket__
```python
policyplan.update_change(ticket_id: str, req_id: str, change_id: str, change_json: dict)
```
* __ticket_id__: ID of ticket
* __req_id__: ID of requirement change is tied to
* __change_id__: ID of change to update
* __change_json__: JSON of change update


__Deleting Requirements from a Policy Planner Ticket__
```python
policyplan.del_all_reqs(ticket_id: str)
```
* __ticket_id__: ID of ticket to delete requirements from.

__Approving Requirement in a Policy Planner Ticket__
```python
policyplan.approve_req(ticket_id: str, req_id: str)
```
* __ticket_id__: ID of ticket that the requirement is tied to.
* __req_id__: ID of requiremnt to approve.

__Add Comment to Policy Planner Ticket__
```python
policyplan.add_comment(ticket_id: str, comment: str)
```
* __ticket_id__: ID of ticket to add comment to.
* __comment__: Content of comment.

__Retrieve All Policy Planner Ticket Comments__
```python
policyplan.get_comments(ticket_id: str)
```
* __ticket_id__: ID of ticket to retrieve comments from.

__Delete Comment from Policy Planner Ticket__
```python
policyplan.del_comment(ticket_id: str, comment_id: str)
```
* __ticket_id__: ID of ticket to delete comment from.
* __comment_id__: ID of comment to delete.

__Ending a Policy Planner Session__
```python
policyplan.logout()
```

## Security Manager Usage
__Initializing a Security Manager Class__
```python
from security_manager_apis import security_manager

securitymanager = security_manager.SecurityManagerApis(host: str, username: str, password: str, verify_ssl: bool, domain_id: str, suppress_ssl_warning: bool)
```
* __host__: Pointing to your FireMon server.
* __username__: The username that would be used to create the API connection to FireMon.
* __password__: The API password for the given user.
* __verify_ssl__: Enabled by default. If you are running demo/test environment, good chance you'll need to set this one to `False`.
* __domain_id__: The Domain ID for the targeted workflow.
* __suppress_ssl_warning__: Set to False by default. Will supress any SSL warnings when set to `True`.

__Get List of Devices in Security Manager__
```python
securitymanager.get_devices()
```

__Manual Device Retrieval__
```python
securitymanager.manual_device_retrieval(device_id: str)
```
* __device_id__: ID of device to retrieve.

__Create Device Group__
```python
securitymanager.create_device_group(device_group_name: str)
```
* __device_group_name__: Name of device group to create.

__Get Device Group by Name__
```python
securitymanager.get_device_group_by_name(device_group_name: str)
```
* __device_group_name__: Name of device group to create.

__Add Device to Device Group__
```python
securitymanager.add_to_device_group(device_group_id: str, device_id: str)
```
* __device_group_id__: ID of device group to add device to.
* __device_id__: ID of device to add to device group.

__Adding a Supplemental Route__
```python
securitymanager.add_supp_route(device_id: str, supplemental_route: dict)
```
* __device_id__: ID of device to retrieve.
* __supplemental_route__: JSON of supplemental route.

_Supplemental Route JSON Example_
```json
{
    "destination": "10.0.0.25",
    "deviceId": "2",
    "drop": false,
    "gateway": "10.0.0.26",
    "interfaceName": "port1",
    "metric": 3
}
```

__Bulk Adding Supplemental Route via Text File__
```python
securitymanager.bulk_add_supp_route(f)
```
* __f__: File stream.

_Supplemental Route Text File Example_
```
deviceId,interfaceName,destination,gateway,virtualRouter,nextVirtualRouter,metric,drop
2,port1,10.0.0.25,10.0.0.26,,,4,true
2,,10.0.0.25,10.0.0.26,Default,Default,4,true
```
Note: The first line of this file will not be processed, it serves as an informational header.

_Supplemental Route Bulk Upload Code Example_
```python
with open('supp_route.txt') as f:
    securitymanager.bulk_add_supp_route(f)
f.close()
```

__Security Manager SIQL Query__
```python
securitymanager.siql_query(query_type: str, query: str, page_size: int)
```
* __query_type__: What type of object to query. Options: secrule, policy, serviceobj, networkobj, device
* __query__: SIQL query to run.
* __page_size__: Number of results to return

__Search for Device Zones__
```python
securitymanager.zone_search(device_id: str, page_size: int)
```
* __device_id__: Device ID
* __page_size__: Number of results to return

__Retrieve Firewall Object__
```python
securitymanager.get_fw_obj(obj_type: str, device_id: str, match_id: str)
```
* __obj_type__: Type of firewall object. Options: NETWORK, SERVICE, ZONE, APP, PROFILE, SCHEDULE, URL_MATCHER, USER
* __device_id__: Device ID
* __match_id__: Match ID of targeted object

__Retrieve Device Object__
```python
securitymanager.get_device_obj(device_id: str)
```
* __device_id__: Device ID

__Retrieve Rule Documentation__
```python
securitymanager.get_rule_doc(device_id: str, rule_id: str)
```
* __device_id__: Device ID
* __rule_id__: Rule ID

__Update Rule Documentation__
```python
securitymanager.update_rule_doc(device_id: str, rule_doc: dict)
```
* __device_id__: Device ID
* __rule_doc__: Rule documentation JSON

_Rule Doc JSON Example:_
```json
{
   "ruleId":"16959bc0-b9f7-436b-9851-aac6f3d98963",
   "deviceId":3,
   "props":[
      {
         "ruleId":"16959bc0-b9f7-436b-9851-aac6f3d98963",
         "ruleCustomPropertyDefinition":{
            "id":1,
            "customPropertyDefinition":{
               "id":1,
               "name":"Business Justification",
               "key":"business_justification",
               "type":"STRING_ARRAY",
               "filterable":true,
               "inheritFromMgmtStation":false
            },
            "name":"Business Justification",
            "key":"business_justification",
            "type":"STRING_ARRAY"
         },
         "customProperty":{
            "id":1,
            "name":"Business Justification",
            "key":"business_justification",
            "type":"STRING_ARRAY",
            "filterable":true,
            "inheritFromMgmtStation":false
         },
         "stringarray": ["test update"]
      }
   ]
}
```

__Ending a Security Manager Session__
```python
securitymanager.logout()
```


## Policy Optimizer Usage
__Initializing a Policy Optimizer Class__
```python
from security_manager_apis import policy_optimizer

policyoptimizer = policy_optimizer.PolicyOptimizerApis(host: str, username: str, password: str, verify_ssl: bool, domain_id: str, workflow_name: str, suppress_ssl_warning: bool)
```
* __host__: Pointing to your FireMon server.
* __username__: The username that would be used to create the API connection to FireMon.
* __password__: The API password for the given user.
* __verify_ssl__: Enabled by default. If you are running demo/test environment, good chance you'll need to set this one to `False`.
* __domain_id__: The Domain ID for the targeted workflow.
* __workflow_name__: The name of the targeted workflow.
* __suppress_ssl_warning__: Set to False by default. Will supress any SSL warnings when set to `True`.

__Create a Policy Optimizer Ticket__
```python
policyoptimizer.create_pp_ticket(request_body: dict)
```
* __request_body__: JSON of ticket to be created.

_Request JSON Example:_
```json
{
  "deviceId": 1,
  "policyId": "62c7344a-31b9-40a6-8e7e-0c9cd6407fbe",
  "ruleId": "16959bc0-b9f7-436b-9851-aac6f3d98963"
}
```

__Retrieve Policy Optimizer Ticket JSON__
```python
policyoptimizer.get_po_ticket(ticket_id: str)
```
* __ticket_id__: ID of ticket to be retrieved.

__Assign Policy Optimizer Ticket to User__
```python
policyoptimizer.assign_po_ticket(ticket_id: str, user_id: str)
```
* __ticket_id__: ID of ticket to assign user to.
* __user_id__: ID of User to be assigned.


__Complete a Policy Optimizer Ticket__
```python
policyoptimizer.complete_po_ticket(ticket_id: str, decision: dict)
```
* __ticket_id__: ID of ticket to complete.
* __decision__: JSON of decision to Certify/Decertify rule.

_Certify JSON Example:_
```json
{
   "variables":{
      "ruleDecision":"certify",
      "certifyRemarks":"string",
      "nextReviewDate":"2022-01-01T00:00:00-0500"
   }
}
```

_Decertify JSON Example:_
```json
{
   "variables":{
      "ruleDecision":"decertify",
      "ruleActions":"string",
      "modifyRuleOptions":"string",
      "moveToPosition": "string",
      "removeOther": "string",
      "disableRuleOptions":"string",
      "removeRuleOptions":"string",
      "decertifyRuleReason":"string"
   }
}
```
_Decertify JSON Structure:_
* `ruleActions` Options:
   * MODIFYRULE, which prompts a value for `modifyRuleOptions`:
      * `removeObjects`, which prompts a value for `removeOther`
      * `moveToRulePosition`, which prompts a value for `moveToPosition`
      * `modifyRuleOptions`, which prompts a value for `other`
   * DISABLERULE, which prompts a value for `disableRuleOptions`:
      * `couldNotFindOwner`
      * `accessNoLongerNeeded`
      * `other`
   * REMOVERULE, which prompts a value for `removeRuleOptions`:
      * `accessNoLongerNeeded`
      * `accessIsTooRisky`
      * `other`

__Cancel a Policy Optimizer Ticket__
```python
policyoptimizer.cancel_po_ticket(ticket_id: str)
```
* __ticket_id__: ID of ticket to cancel.

__Query Policy Optimizer Tickets__
```python
policyoptimizer.siql_query_po_ticket(parameters: dict)
```
* __parameters__: Parameters of query.

_Params Example:_
```python
params = {'q': "review { workflow = 1 AND status ~ 'Review' }", 'pageSize': 20, 'domainId': 1, 'sortdir': 'asc'}
```

__Ending a Policy Optimizer Session__
```python
policyoptimizer.logout()
```

## Orchestration API Usage
__Initializing an Orchestration API Class__
```python
from security_manager_apis import orchestration_apis

orchestration = orchestration_apis.OrchestrationApis(host: str, username: str, password: str, verify_ssl: bool, domain_id: str, suppress_ssl_warning=False)
```
* __host__: Pointing to your FireMon server.
* __username__: The username that would be used to create the API connection to FireMon.
* __password__: The API password for the given user.
* __verify_ssl__: Enabled by default. If you are running demo/test environment, good chance you'll need to set this one to `False`.
* __domain_id__: The Domain ID for the targeted workflow.
* __suppress_ssl_warning__: Set to False by default. Will supress any SSL warnings when set to `True`.

__Running Rule Recommendation__
```python
orchestration.rulerec_api(params: dict, req_json: dict)
```
* __params__: Parameters to use for recommendation.
* __req_json__: JSON of requirements to provide recommendation for.

_Parameters Example_
```python
parameters = {'deviceGroupId': 1, 'addressMatchingStrategy': 'INTERSECTS', 'modifyBehavior': 'MODIFY', 'strategy': None}
```
_Requirements Example_
```json
{
   "requirements":[
      {
         "requirementType":"RULE",
         "childKey":"add_access",
         "variables":{
            "expiration":"2022-01-01T00:00:00+0000"
         },
         "destinations":[
            "10.1.1.1/24"
         ],
         "services":[
            "tcp/22"
         ],
         "sources":[
            "10.0.0.0/24"
         ],
         "action":"ACCEPT"
      }
   ]
}
```

__Running Pre-Change Assessment__
```python
orchestration.pca_api(device_id: str, req_json: dict)
```
* __device_id__: ID of device to use when running Pre-Change Assessment.
* __req_json__: JSON of requirements to provide recommendation for.

_Requirements Example_
```json
{
   "requirements":[
      {
         "requirementType":"RULE",
         "childKey":"add_access",
         "variables":{
            "expiration":"2022-01-01T00:00:00+0000"
         },
         "destinations":[
            "10.1.1.1/24"
         ],
         "services":[
            "tcp/22"
         ],
         "sources":[
            "10.0.0.0/24"
         ],
         "action":"ACCEPT"
      }
   ]
}
```

## Project Structure

* `application.properties` - All the required URLS are placed here.
* `get_properties_data.py` - Read the properties file data and returns a parser
* `policy_planner.py` - Class to use Policy Planner APIs
* `security_manager.py` - Class to use Security Manager APIs
* `policy_optimizer.py` - Class to use Policy Optimizer APIs
* `orchestration_apis.py` - Class to use Crchestration APIs

## Flow of Execution

As soon as you execute the command to run this library, Authentication class will be called which will internally call get_auth_token() of `authentication_api.py` from `authenticate_user` module only once and
auth token will be set in the headers.
Then we pass headers to the HTTP requests so that user should get authenticated and can access the endpoints safely.

## License
MIT.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "security-manager-apis",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "Security Manager APIs",
    "author": "",
    "author_email": "bryan.ellis@firemon.com",
    "download_url": "https://files.pythonhosted.org/packages/89/9d/c5a22e312583c47994bb4a399515fbb131a78cf74560c8e4f31f7b3b349a/security-manager-apis-1.0.1.tar.gz",
    "platform": null,
    "description": "\r\n\r\n# Python library for FireMon APIs\r\n`Developed using Python 3.8.0 and requests 2.20.1`\r\n\r\n## Table of Contents\r\n<!-- TABLE OF CONTENTS -->\r\n* [About The Project](#about-the-project)\r\n* [Setup](#setup)\r\n* [Dependencies](#dependencies)\r\n* [Policy Planner Usage](#policy-planner-usage)\r\n* [Security Manager Usage](#security-manager-usage)\r\n* [Policy Optimizer Usage](#policy-optimizer-usage)\r\n* [Orchestration API Usage](#orchestration-api-usage)\r\n* [Project Structure](#project-structure)\r\n* [Flow of Execution](#flow-of-execution)\r\n* [License](#license)\r\n\r\n\r\n## About The Project\r\nThis library/project is created to jumpstart your Orchestration API, Policy planner API, Security Manager API, or Policy Optimizer API projects.\r\n\r\n## Setup\r\n\r\n**Setup - PyPi Install:**\r\n* To **install** the library, run the following command from the terminal.\r\n\r\n```console\r\npip install security-manager-apis\r\n```\r\n\r\n**Setup - PyPi Upgrade:**\r\n\r\nTo **upgrade** the library, run the following command from the terminal.\r\n\r\n```console\r\npip install --upgrade security-manager-apis\r\n```\r\n\r\n\r\n```console\r\npip install -e .\r\n```\r\n\r\nIf you don't plan to make any modifications to the project but still want to use it across\r\nyour different projects, then do a local install.\r\n\r\n```console\r\npip install .\r\n```\r\n\r\nThis will install all the dependencies listed in the `setup.py` file. Once done\r\nyou can use the library wherever you want.\r\n\r\n\r\n## Dependencies\r\n__Pre-requisite__ - Python 3.6 or greater version should be installed on your machine.\r\n\r\n**Upgrade pip on Mac:**\r\n* __NOTE__ : This is important because, apparently, some Mac apps rely on Python 2 version, so if you attempt to upgrade the Python 2.x to Python 3.x on Mac OS, you will eventually break some apps, perhaps critical apps.\r\nWith that in mind, you should not attempt to upgrade the current preinstalled Python release on the Mac; instead, you will just have the co-installation of Python 3 for full compatibility.\r\n```console\r\nbrew install python3\r\n```\r\n**Upgrade pip on Windows:**\r\n```console\r\npython -m pip install --upgrade pip\r\n```\r\n\r\n## Policy Planner Usage\r\n__Initializing a Policy Planner Class__\r\n```python\r\nfrom security_manager_apis import policy_planner\r\n\r\npolicyplan = policy_planner.PolicyPlannerApis(host: str, username: str, password: str, verify_ssl: bool, domain_id: str, workflow_name: str, suppress_ssl_warning: bool)\r\n```\r\n* __host__: Pointing to your FireMon server.\r\n* __username__: The username that would be used to create the API connection to FireMon.\r\n* __password__: The API password for the given user.\r\n* __domain_id__: The Domain ID for the targeted workflow.\r\n* __workflow_name__: The name of the targeted workflow.\r\n* __verify_ssl__: Enabled by default. If you are running demo/test environment, good chance you'll need to set this one to `False`.\r\n* __suppress_ssl_warning__: Set to False by default. Will supress any SSL warnings when set to `True`.\r\n\r\n__Create a Policy Planner Ticket__\r\n```python\r\npolicyplan.create_pp_ticket(request_body: dict)\r\n```\r\n* __request_body__: JSON of ticket to be created.\r\n\r\n_Request JSON Example:_\r\n```json\r\n{\r\n    \"variables\": {\r\n        \"summary\": \"string\",\r\n        \"businessNeed\": \"string\",\r\n        \"priority\": \"string\",\r\n        \"dueDate\": \"YYYY-MM-DD HH:MM:SS\",\r\n        \"applicationName\": \"string\",\r\n        \"customer\": \"string\",\r\n        \"externalTicketId\": \"string\",\r\n        \"notes\": \"string\",\r\n        \"requesterName\": \"string\",\r\n        \"requesterEmail\": \"string\",\r\n        \"applicationOwner\": \"string\",\r\n        \"carbonCopy\": [\r\n            \"string\", \r\n            \"string\"\r\n        ]\r\n    },\r\n    \"policyPlanRequirements\": [\r\n        {\r\n            \"sources\": [\r\n                \"string\",\r\n                \"string\"\r\n            ],\r\n            \"destinations\": [\r\n                \"string\",\r\n                \"string\"\r\n            ],\r\n            \"action\": \"string\",\r\n            \"services\": [\r\n                \"string\",\r\n                \"string\"\r\n            ],\r\n            \"requirementType\": \"string\",\r\n            \"childKey\": \"string\",\r\n            \"variables\": {}\r\n        }\r\n    ]\r\n}\r\n```\r\n__Update a Policy Planner Ticket__\r\n```python\r\npolicyplan.update_pp_ticket(ticket_id: str, request_body: dict)\r\n```\r\n* __ticket_id__: ID of ticket to be updated.\r\n* __request_body__: JSON of updates to apply to the ticket.\r\n\r\n_Request JSON Example:_\r\n```json\r\n{  \r\n    \"variables\": {  \r\n        \"summary\": \"string\"  \r\n  }  \r\n}\r\n```\r\n\r\n__Querying for Policy Planner Tickets__\r\n```python\r\npolicyplan.siql_query_pp_ticket(siql_query: str, page_size: int)\r\n```\r\n* __siql_query__: SIQL Query to use in search.\r\n* __page_size__: Number of results to return.\r\n\r\n\r\n__Retrieving a Policy Planner Ticket__\r\n```python\r\npolicyplan.pull_pp_ticket(ticket_id: str)\r\n```\r\n* __ticket_id__: ID of ticket to be retrieved.\r\n\r\n__Retrieving Policy Planner Ticket Event History__\r\n```python\r\npolicyplan.pull_pp_ticket_events(ticket_id: str, page_size: int)\r\n```\r\n* __ticket_id__: ID of ticket to retrieve event history from.\r\n* __page_size__: Number of events to return\r\n\r\n__Retrieving Policy Planner Ticket Attachments__\r\n```python\r\npolicyplan.pull_pp_ticket_attachements(ticket_id: str, page_size=100)\r\n```\r\n* __ticket_id__: ID of ticket to retrieve event history from.\r\n* __page_size__: Number of events to return\r\n\r\n__Download Policy Planner Ticket Attachments__\r\n```python\r\npolicyplan.download_pp_ticket_attachment(self, ticket_id: str, attachment_id: str)\r\n```\r\n* __ticket_id__: ID of ticket to retrieve event history from.\r\n* __attachment_id__: ID of attachment to fetch\r\n\r\n_Coding Example:_\r\n```python\r\nattachment_resp = pp.download_pp_ticket_attachment(ticket_id, attachment_id)\r\nfile_name = attachment_resp.headers['filename']\r\nopen(file_name, 'wb').write(attachment_resp.content)\r\n```\r\n\r\n__Assigning a Policy Planner Ticket__\r\n```python\r\npolicyplan.assign_pp_ticket(ticket_id: str, user_id: str)\r\n```\r\n* __ticket_id__: ID of ticket to assign user to.\r\n* __user_id__: ID of user to be assigned.\r\n\r\n__Unassigning a Policy Planner Ticket__\r\n```python\r\npolicyplan.unassign_pp_ticket(ticket_id: str)\r\n```\r\n* __ticket_id__: ID of ticket to remove assignee from.\r\n\r\n__Adding a Requirement to a Policy Planner Ticket__\r\n```python\r\npolicyplan.add_req_pp_ticket(ticket_id: str, req_json: dict)\r\n```\r\n* __ticket_id__: ID of ticket to add requirement to.\r\n* __req_json__: JSON of requirement to be added.\r\n\r\n_Requirement JSON Example:_\r\n```json\r\n{\r\n   \"requirements\":[\r\n      {\r\n         \"requirementType\":\"RULE\",\r\n         \"childKey\":\"add_access\",\r\n         \"variables\":{\r\n            \"expiration\":\"2022-01-01T00:00:00+0000\"\r\n         },\r\n         \"destinations\":[\r\n            \"10.1.1.1/24\"\r\n         ],\r\n         \"services\":[\r\n            \"tcp/22\"\r\n         ],\r\n         \"sources\":[\r\n            \"10.0.0.0/24\"\r\n         ],\r\n         \"action\":\"ACCEPT\"\r\n      }\r\n   ]\r\n}\r\n```\r\n\r\n__Replacing Requirements on a Policy Planner Ticket__\r\n```python\r\npolicyplan.replace_req_pp_ticket(self, ticket_id: str, req_json: dict)\r\n```\r\n* __ticket_id__: ID of ticket to add requirements to.\r\n* __req_json__: JSON of requirements to be added.\r\n\r\n__Completing a Policy Planner Ticket Task__\r\n```python\r\npolicyplan.complete_task_pp_ticket(ticket_id: str, button_action: str)\r\n```\r\n* __ticket_id__: ID of ticket to add requirement to.\r\n* __button_action__: Button value, options are: submit, complete, autoDesign, verify, approved, rejected\r\n\r\n__Running PCA for a Policy Planner Ticket__\r\n```python\r\npolicyplan.run_pca(ticket_id: str, control_types: str, enable_risk_sa: str)\r\n```\r\n* __ticket_id__: ID of ticket to run PCA on.\r\n* __control_types__: Control types as string array. Options: ALLOWED_SERVICES, CHANGE_WINDOW_VIOLATION, DEVICE_ACCESS_ANALYSIS, DEVICE_PROPERTY, DEVICE_STATUS, NETWORK_ACCESS_ANALYSIS, REGEX, REGEX_MULITPATTERN, RULE_SEARCH, RULE_USAGE, SERVICE_RISK_ANALYSIS, ZONE_MATRIX, ZONE_BASED_RULE_SEARCH\r\n* __enable_risk_sa__: true or false\r\n\r\n__Adding Attachment to a Policy Planner Ticket__\r\n```python\r\npolicyplan.add_attachment(ticket_id: str, file_name: str, f, description: str):\r\n```\r\n* __ticket_id__: ID of ticket to add attachment to.\r\n* __filename__: File name of attachment.\r\n* __f__: file stream.\r\n* __description__: Description of file.\r\n\r\n_Adding Attachment Code Example:_\r\n```python\r\nfile_name = \"test_file.txt\"\r\nwith open(file_name) as f:\r\n    policyplan.add_attachment('38', file_name, f, 'test upload')\r\n```\r\n\r\n__Uploading Requirements via CSV to Policy Planner Ticket__\r\n```python\r\npolicyplan.csv_req_upload(ticket_id: str, file_name: str, f, behavior=\"append\"):\r\n```\r\n* __ticket_id__: ID of ticket to add attachment to.\r\n* __filename__: File name of attachment.\r\n* __f__: file stream.\r\n* __behavior__: Defaulted to `append`, pass `replace` to replace all requirements on the ticket with the new CSV requirements\r\n\r\n_Uploading Requirements via CSV Code Example:_\r\n```python\r\nfile_name = \"test_req.csv\"\r\nwith open(file_name) as f:\r\n    policyplan.csv_req_upload('1', file_name, f)\r\n```\r\n\r\n__Retrieving Requirements from a Policy Planner Ticket__\r\n```python\r\npolicyplan.get_reqs(ticket_id: str)\r\n```\r\n* __ticket_id__: ID of ticket to retrieve requirements from.\r\n\r\n__Retrieving Changes from a Policy Planner Ticket__\r\n```python\r\npolicyplan.get_changes(ticket_id: str)\r\n```\r\n* __ticket_id__: ID of ticket to retrieve requirements from.\r\n\r\n__Updating Change on a Policy Planner Ticket__\r\n```python\r\npolicyplan.update_change(ticket_id: str, req_id: str, change_id: str, change_json: dict)\r\n```\r\n* __ticket_id__: ID of ticket\r\n* __req_id__: ID of requirement change is tied to\r\n* __change_id__: ID of change to update\r\n* __change_json__: JSON of change update\r\n\r\n\r\n__Deleting Requirements from a Policy Planner Ticket__\r\n```python\r\npolicyplan.del_all_reqs(ticket_id: str)\r\n```\r\n* __ticket_id__: ID of ticket to delete requirements from.\r\n\r\n__Approving Requirement in a Policy Planner Ticket__\r\n```python\r\npolicyplan.approve_req(ticket_id: str, req_id: str)\r\n```\r\n* __ticket_id__: ID of ticket that the requirement is tied to.\r\n* __req_id__: ID of requiremnt to approve.\r\n\r\n__Add Comment to Policy Planner Ticket__\r\n```python\r\npolicyplan.add_comment(ticket_id: str, comment: str)\r\n```\r\n* __ticket_id__: ID of ticket to add comment to.\r\n* __comment__: Content of comment.\r\n\r\n__Retrieve All Policy Planner Ticket Comments__\r\n```python\r\npolicyplan.get_comments(ticket_id: str)\r\n```\r\n* __ticket_id__: ID of ticket to retrieve comments from.\r\n\r\n__Delete Comment from Policy Planner Ticket__\r\n```python\r\npolicyplan.del_comment(ticket_id: str, comment_id: str)\r\n```\r\n* __ticket_id__: ID of ticket to delete comment from.\r\n* __comment_id__: ID of comment to delete.\r\n\r\n__Ending a Policy Planner Session__\r\n```python\r\npolicyplan.logout()\r\n```\r\n\r\n## Security Manager Usage\r\n__Initializing a Security Manager Class__\r\n```python\r\nfrom security_manager_apis import security_manager\r\n\r\nsecuritymanager = security_manager.SecurityManagerApis(host: str, username: str, password: str, verify_ssl: bool, domain_id: str, suppress_ssl_warning: bool)\r\n```\r\n* __host__: Pointing to your FireMon server.\r\n* __username__: The username that would be used to create the API connection to FireMon.\r\n* __password__: The API password for the given user.\r\n* __verify_ssl__: Enabled by default. If you are running demo/test environment, good chance you'll need to set this one to `False`.\r\n* __domain_id__: The Domain ID for the targeted workflow.\r\n* __suppress_ssl_warning__: Set to False by default. Will supress any SSL warnings when set to `True`.\r\n\r\n__Get List of Devices in Security Manager__\r\n```python\r\nsecuritymanager.get_devices()\r\n```\r\n\r\n__Manual Device Retrieval__\r\n```python\r\nsecuritymanager.manual_device_retrieval(device_id: str)\r\n```\r\n* __device_id__: ID of device to retrieve.\r\n\r\n__Create Device Group__\r\n```python\r\nsecuritymanager.create_device_group(device_group_name: str)\r\n```\r\n* __device_group_name__: Name of device group to create.\r\n\r\n__Get Device Group by Name__\r\n```python\r\nsecuritymanager.get_device_group_by_name(device_group_name: str)\r\n```\r\n* __device_group_name__: Name of device group to create.\r\n\r\n__Add Device to Device Group__\r\n```python\r\nsecuritymanager.add_to_device_group(device_group_id: str, device_id: str)\r\n```\r\n* __device_group_id__: ID of device group to add device to.\r\n* __device_id__: ID of device to add to device group.\r\n\r\n__Adding a Supplemental Route__\r\n```python\r\nsecuritymanager.add_supp_route(device_id: str, supplemental_route: dict)\r\n```\r\n* __device_id__: ID of device to retrieve.\r\n* __supplemental_route__: JSON of supplemental route.\r\n\r\n_Supplemental Route JSON Example_\r\n```json\r\n{\r\n    \"destination\": \"10.0.0.25\",\r\n    \"deviceId\": \"2\",\r\n    \"drop\": false,\r\n    \"gateway\": \"10.0.0.26\",\r\n    \"interfaceName\": \"port1\",\r\n    \"metric\": 3\r\n}\r\n```\r\n\r\n__Bulk Adding Supplemental Route via Text File__\r\n```python\r\nsecuritymanager.bulk_add_supp_route(f)\r\n```\r\n* __f__: File stream.\r\n\r\n_Supplemental Route Text File Example_\r\n```\r\ndeviceId,interfaceName,destination,gateway,virtualRouter,nextVirtualRouter,metric,drop\r\n2,port1,10.0.0.25,10.0.0.26,,,4,true\r\n2,,10.0.0.25,10.0.0.26,Default,Default,4,true\r\n```\r\nNote: The first line of this file will not be processed, it serves as an informational header.\r\n\r\n_Supplemental Route Bulk Upload Code Example_\r\n```python\r\nwith open('supp_route.txt') as f:\r\n    securitymanager.bulk_add_supp_route(f)\r\nf.close()\r\n```\r\n\r\n__Security Manager SIQL Query__\r\n```python\r\nsecuritymanager.siql_query(query_type: str, query: str, page_size: int)\r\n```\r\n* __query_type__: What type of object to query. Options: secrule, policy, serviceobj, networkobj, device\r\n* __query__: SIQL query to run.\r\n* __page_size__: Number of results to return\r\n\r\n__Search for Device Zones__\r\n```python\r\nsecuritymanager.zone_search(device_id: str, page_size: int)\r\n```\r\n* __device_id__: Device ID\r\n* __page_size__: Number of results to return\r\n\r\n__Retrieve Firewall Object__\r\n```python\r\nsecuritymanager.get_fw_obj(obj_type: str, device_id: str, match_id: str)\r\n```\r\n* __obj_type__: Type of firewall object. Options: NETWORK, SERVICE, ZONE, APP, PROFILE, SCHEDULE, URL_MATCHER, USER\r\n* __device_id__: Device ID\r\n* __match_id__: Match ID of targeted object\r\n\r\n__Retrieve Device Object__\r\n```python\r\nsecuritymanager.get_device_obj(device_id: str)\r\n```\r\n* __device_id__: Device ID\r\n\r\n__Retrieve Rule Documentation__\r\n```python\r\nsecuritymanager.get_rule_doc(device_id: str, rule_id: str)\r\n```\r\n* __device_id__: Device ID\r\n* __rule_id__: Rule ID\r\n\r\n__Update Rule Documentation__\r\n```python\r\nsecuritymanager.update_rule_doc(device_id: str, rule_doc: dict)\r\n```\r\n* __device_id__: Device ID\r\n* __rule_doc__: Rule documentation JSON\r\n\r\n_Rule Doc JSON Example:_\r\n```json\r\n{\r\n   \"ruleId\":\"16959bc0-b9f7-436b-9851-aac6f3d98963\",\r\n   \"deviceId\":3,\r\n   \"props\":[\r\n      {\r\n         \"ruleId\":\"16959bc0-b9f7-436b-9851-aac6f3d98963\",\r\n         \"ruleCustomPropertyDefinition\":{\r\n            \"id\":1,\r\n            \"customPropertyDefinition\":{\r\n               \"id\":1,\r\n               \"name\":\"Business Justification\",\r\n               \"key\":\"business_justification\",\r\n               \"type\":\"STRING_ARRAY\",\r\n               \"filterable\":true,\r\n               \"inheritFromMgmtStation\":false\r\n            },\r\n            \"name\":\"Business Justification\",\r\n            \"key\":\"business_justification\",\r\n            \"type\":\"STRING_ARRAY\"\r\n         },\r\n         \"customProperty\":{\r\n            \"id\":1,\r\n            \"name\":\"Business Justification\",\r\n            \"key\":\"business_justification\",\r\n            \"type\":\"STRING_ARRAY\",\r\n            \"filterable\":true,\r\n            \"inheritFromMgmtStation\":false\r\n         },\r\n         \"stringarray\": [\"test update\"]\r\n      }\r\n   ]\r\n}\r\n```\r\n\r\n__Ending a Security Manager Session__\r\n```python\r\nsecuritymanager.logout()\r\n```\r\n\r\n\r\n## Policy Optimizer Usage\r\n__Initializing a Policy Optimizer Class__\r\n```python\r\nfrom security_manager_apis import policy_optimizer\r\n\r\npolicyoptimizer = policy_optimizer.PolicyOptimizerApis(host: str, username: str, password: str, verify_ssl: bool, domain_id: str, workflow_name: str, suppress_ssl_warning: bool)\r\n```\r\n* __host__: Pointing to your FireMon server.\r\n* __username__: The username that would be used to create the API connection to FireMon.\r\n* __password__: The API password for the given user.\r\n* __verify_ssl__: Enabled by default. If you are running demo/test environment, good chance you'll need to set this one to `False`.\r\n* __domain_id__: The Domain ID for the targeted workflow.\r\n* __workflow_name__: The name of the targeted workflow.\r\n* __suppress_ssl_warning__: Set to False by default. Will supress any SSL warnings when set to `True`.\r\n\r\n__Create a Policy Optimizer Ticket__\r\n```python\r\npolicyoptimizer.create_pp_ticket(request_body: dict)\r\n```\r\n* __request_body__: JSON of ticket to be created.\r\n\r\n_Request JSON Example:_\r\n```json\r\n{\r\n  \"deviceId\": 1,\r\n  \"policyId\": \"62c7344a-31b9-40a6-8e7e-0c9cd6407fbe\",\r\n  \"ruleId\": \"16959bc0-b9f7-436b-9851-aac6f3d98963\"\r\n}\r\n```\r\n\r\n__Retrieve Policy Optimizer Ticket JSON__\r\n```python\r\npolicyoptimizer.get_po_ticket(ticket_id: str)\r\n```\r\n* __ticket_id__: ID of ticket to be retrieved.\r\n\r\n__Assign Policy Optimizer Ticket to User__\r\n```python\r\npolicyoptimizer.assign_po_ticket(ticket_id: str, user_id: str)\r\n```\r\n* __ticket_id__: ID of ticket to assign user to.\r\n* __user_id__: ID of User to be assigned.\r\n\r\n\r\n__Complete a Policy Optimizer Ticket__\r\n```python\r\npolicyoptimizer.complete_po_ticket(ticket_id: str, decision: dict)\r\n```\r\n* __ticket_id__: ID of ticket to complete.\r\n* __decision__: JSON of decision to Certify/Decertify rule.\r\n\r\n_Certify JSON Example:_\r\n```json\r\n{\r\n   \"variables\":{\r\n      \"ruleDecision\":\"certify\",\r\n      \"certifyRemarks\":\"string\",\r\n      \"nextReviewDate\":\"2022-01-01T00:00:00-0500\"\r\n   }\r\n}\r\n```\r\n\r\n_Decertify JSON Example:_\r\n```json\r\n{\r\n   \"variables\":{\r\n      \"ruleDecision\":\"decertify\",\r\n      \"ruleActions\":\"string\",\r\n      \"modifyRuleOptions\":\"string\",\r\n      \"moveToPosition\": \"string\",\r\n      \"removeOther\": \"string\",\r\n      \"disableRuleOptions\":\"string\",\r\n      \"removeRuleOptions\":\"string\",\r\n      \"decertifyRuleReason\":\"string\"\r\n   }\r\n}\r\n```\r\n_Decertify JSON Structure:_\r\n* `ruleActions` Options:\r\n   * MODIFYRULE, which prompts a value for `modifyRuleOptions`:\r\n      * `removeObjects`, which prompts a value for `removeOther`\r\n      * `moveToRulePosition`, which prompts a value for `moveToPosition`\r\n      * `modifyRuleOptions`, which prompts a value for `other`\r\n   * DISABLERULE, which prompts a value for `disableRuleOptions`:\r\n      * `couldNotFindOwner`\r\n      * `accessNoLongerNeeded`\r\n      * `other`\r\n   * REMOVERULE, which prompts a value for `removeRuleOptions`:\r\n      * `accessNoLongerNeeded`\r\n      * `accessIsTooRisky`\r\n      * `other`\r\n\r\n__Cancel a Policy Optimizer Ticket__\r\n```python\r\npolicyoptimizer.cancel_po_ticket(ticket_id: str)\r\n```\r\n* __ticket_id__: ID of ticket to cancel.\r\n\r\n__Query Policy Optimizer Tickets__\r\n```python\r\npolicyoptimizer.siql_query_po_ticket(parameters: dict)\r\n```\r\n* __parameters__: Parameters of query.\r\n\r\n_Params Example:_\r\n```python\r\nparams = {'q': \"review { workflow = 1 AND status ~ 'Review' }\", 'pageSize': 20, 'domainId': 1, 'sortdir': 'asc'}\r\n```\r\n\r\n__Ending a Policy Optimizer Session__\r\n```python\r\npolicyoptimizer.logout()\r\n```\r\n\r\n## Orchestration API Usage\r\n__Initializing an Orchestration API Class__\r\n```python\r\nfrom security_manager_apis import orchestration_apis\r\n\r\norchestration = orchestration_apis.OrchestrationApis(host: str, username: str, password: str, verify_ssl: bool, domain_id: str, suppress_ssl_warning=False)\r\n```\r\n* __host__: Pointing to your FireMon server.\r\n* __username__: The username that would be used to create the API connection to FireMon.\r\n* __password__: The API password for the given user.\r\n* __verify_ssl__: Enabled by default. If you are running demo/test environment, good chance you'll need to set this one to `False`.\r\n* __domain_id__: The Domain ID for the targeted workflow.\r\n* __suppress_ssl_warning__: Set to False by default. Will supress any SSL warnings when set to `True`.\r\n\r\n__Running Rule Recommendation__\r\n```python\r\norchestration.rulerec_api(params: dict, req_json: dict)\r\n```\r\n* __params__: Parameters to use for recommendation.\r\n* __req_json__: JSON of requirements to provide recommendation for.\r\n\r\n_Parameters Example_\r\n```python\r\nparameters = {'deviceGroupId': 1, 'addressMatchingStrategy': 'INTERSECTS', 'modifyBehavior': 'MODIFY', 'strategy': None}\r\n```\r\n_Requirements Example_\r\n```json\r\n{\r\n   \"requirements\":[\r\n      {\r\n         \"requirementType\":\"RULE\",\r\n         \"childKey\":\"add_access\",\r\n         \"variables\":{\r\n            \"expiration\":\"2022-01-01T00:00:00+0000\"\r\n         },\r\n         \"destinations\":[\r\n            \"10.1.1.1/24\"\r\n         ],\r\n         \"services\":[\r\n            \"tcp/22\"\r\n         ],\r\n         \"sources\":[\r\n            \"10.0.0.0/24\"\r\n         ],\r\n         \"action\":\"ACCEPT\"\r\n      }\r\n   ]\r\n}\r\n```\r\n\r\n__Running Pre-Change Assessment__\r\n```python\r\norchestration.pca_api(device_id: str, req_json: dict)\r\n```\r\n* __device_id__: ID of device to use when running Pre-Change Assessment.\r\n* __req_json__: JSON of requirements to provide recommendation for.\r\n\r\n_Requirements Example_\r\n```json\r\n{\r\n   \"requirements\":[\r\n      {\r\n         \"requirementType\":\"RULE\",\r\n         \"childKey\":\"add_access\",\r\n         \"variables\":{\r\n            \"expiration\":\"2022-01-01T00:00:00+0000\"\r\n         },\r\n         \"destinations\":[\r\n            \"10.1.1.1/24\"\r\n         ],\r\n         \"services\":[\r\n            \"tcp/22\"\r\n         ],\r\n         \"sources\":[\r\n            \"10.0.0.0/24\"\r\n         ],\r\n         \"action\":\"ACCEPT\"\r\n      }\r\n   ]\r\n}\r\n```\r\n\r\n## Project Structure\r\n\r\n* `application.properties` - All the required URLS are placed here.\r\n* `get_properties_data.py` - Read the properties file data and returns a parser\r\n* `policy_planner.py` - Class to use Policy Planner APIs\r\n* `security_manager.py` - Class to use Security Manager APIs\r\n* `policy_optimizer.py` - Class to use Policy Optimizer APIs\r\n* `orchestration_apis.py` - Class to use Crchestration APIs\r\n\r\n## Flow of Execution\r\n\r\nAs soon as you execute the command to run this library, Authentication class will be called which will internally call get_auth_token() of `authentication_api.py` from `authenticate_user` module only once and\r\nauth token will be set in the headers.\r\nThen we pass headers to the HTTP requests so that user should get authenticated and can access the endpoints safely.\r\n\r\n## License\r\nMIT.\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Security Manager API",
    "version": "1.0.1",
    "split_keywords": [
        "security",
        "manager",
        "apis"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0cb6e64ce1160a03b52774bee5fad717bbb2a6cd01b65838641045f815f4bcb6",
                "md5": "5ae261df65b1c9d8a7c126325392f3a4",
                "sha256": "2c5dd4023dc2bde211cb341b84325a1f776d2ede165398b693f78f79a217bec6"
            },
            "downloads": -1,
            "filename": "security_manager_apis-1.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5ae261df65b1c9d8a7c126325392f3a4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 20501,
            "upload_time": "2023-02-02T21:01:40",
            "upload_time_iso_8601": "2023-02-02T21:01:40.285744Z",
            "url": "https://files.pythonhosted.org/packages/0c/b6/e64ce1160a03b52774bee5fad717bbb2a6cd01b65838641045f815f4bcb6/security_manager_apis-1.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "899dc5a22e312583c47994bb4a399515fbb131a78cf74560c8e4f31f7b3b349a",
                "md5": "767a397fddd55410ab14d188ea93e86c",
                "sha256": "681f7c9717a539f51ed8b50a7d630fc04f117e3e384416da5c646276d614a93e"
            },
            "downloads": -1,
            "filename": "security-manager-apis-1.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "767a397fddd55410ab14d188ea93e86c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 22584,
            "upload_time": "2023-02-02T21:01:42",
            "upload_time_iso_8601": "2023-02-02T21:01:42.408791Z",
            "url": "https://files.pythonhosted.org/packages/89/9d/c5a22e312583c47994bb4a399515fbb131a78cf74560c8e4f31f7b3b349a/security-manager-apis-1.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-02-02 21:01:42",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "security-manager-apis"
}
        
Elapsed time: 0.05401s