Skip to content

Commit

Permalink
Remove certifi and requests dependencies (#20)
Browse files Browse the repository at this point in the history
* Updated requests, certifi modules

* Updated requests, certifi modules

* Update README.md

* Fix urllib version issue

* Update Copyright year

* Update Copyright year

* Remove unwanted library

* Remove idna lib

* Remove unwanted constant and trigger build

* Add IDNA again, update certifi with latest library, remove requests, update notice file, update requirement.txt

* Remove certifi from requirement.txt and wheel dependencies

* remove pip dependencies

* pre-commit changes

* Revert "remove pip dependencies"

This reverts commit 88efed9.

* remove unused dependencies

* Update README.md

* Add idna in NOTICE file

---------

Co-authored-by: splunk-soar-connectors-admin <admin@splunksoar>
Co-authored-by: Ishan Shah <[email protected]>
Co-authored-by: Sweta Popat <[email protected]>
  • Loading branch information
4 people authored Feb 5, 2024
1 parent fc5c7ad commit 4f9223d
Show file tree
Hide file tree
Showing 26 changed files with 106 additions and 146 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/phantomcyber/dev-cicd-tools
rev: v1.16
rev: v1.17
hooks:
- id: org-hook
- id: package-app-dependencies
Expand Down
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright (c) 2016-2022 Splunk Inc.
Copyright (c) 2016-2024 Splunk Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -198,4 +198,4 @@
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.
22 changes: 6 additions & 16 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -1,30 +1,25 @@
Splunk SOAR MaxMind
Copyright (c) 2016-2022 Splunk Inc.
Copyright (c) 2016-2024 Splunk Inc.

Third-party Software Attributions:

Library: certifi
Version: 2019.11.28
License: Mozilla 2.0
PyPA

Library: geoip2
Version: 2.9.0
License: Apache 2.0
MaxMind

Library: maxminddb
Version: 1.5.1
License: Apache 2.0
MaxMind

Library: idna
Version: 2.8
License: BSD 3
Copyright 1991-2014 Unicode, Inc
Copyright 2001-2014 Python Software Foundation; All Rights Reserved
Copyright 2013-2018 Kim Davies

Library: maxminddb
Version: 1.5.1
License: Apache 2.0
MaxMind

Library: python-dateutil
Version: 2.8.1
License: Apache 2.0
Expand All @@ -37,11 +32,6 @@ Copyright 2015 - dateutil contributors (see AUTHORS file)
Copyright 2017 Paul Ganssle <[email protected]>
Copyright 2017 dateutil contributors (see AUTHORS file)

Library: requests
Version: 2.26.0
License: Apache 2.0
Kenneth Reitz

Library: urllib3
Version: 1.26.6
License: MIT
Expand Down
116 changes: 58 additions & 58 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# MaxMind

Publisher: Splunk
Connector Version: 2\.2\.6
Connector Version: 2.2.6
Product Vendor: MaxMind
Product Name: GeoIP2
Product Version Supported (regex): "\.\*"
Minimum Product Version: 5\.2\.0
Product Version Supported (regex): ".\*"
Minimum Product Version: 5.2.0

This app provides IP geolocation with the included MaxMind database

Expand Down Expand Up @@ -74,17 +74,17 @@ The below configuration variables are required for this Connector to operate. T

VARIABLE | REQUIRED | TYPE | DESCRIPTION
-------- | -------- | ---- | -----------
**ip\_address** | optional | string | IP Address for testing connectivity \(default\: 8\.8\.8\.8\)
**license\_key** | optional | password | MaxMind License key to download new databases
**ip_address** | optional | string | IP Address for testing connectivity (default: 8.8.8.8)
**license_key** | optional | password | MaxMind License key to download new databases

### Supported Actions
[test connectivity](#action-test-connectivity) - Validate the asset configuration for connectivity\. This action queries the MaxMind DB for the IP mentioned in the configuration parameters
[test connectivity](#action-test-connectivity) - Validate the asset configuration for connectivity. This action queries the MaxMind DB for the IP mentioned in the configuration parameters
[geolocate ip](#action-geolocate-ip) - Queries MaxMind for IP location info
[update data](#action-update-data) - Update database used to locate an ip
[on poll](#action-on-poll) - Update the database if there is a newer one on the server

## action: 'test connectivity'
Validate the asset configuration for connectivity\. This action queries the MaxMind DB for the IP mentioned in the configuration parameters
Validate the asset configuration for connectivity. This action queries the MaxMind DB for the IP mentioned in the configuration parameters

Type: **test**
Read only: **True**
Expand All @@ -107,64 +107,64 @@ PARAMETER | REQUIRED | DESCRIPTION | TYPE | CONTAINS
**ip** | required | IP to geolocate | string | `ip`

#### Action Output
DATA PATH | TYPE | CONTAINS
--------- | ---- | --------
action\_result\.status | string |
action\_result\.data\.\*\.continent\_name | string |
action\_result\.data\.\*\.country\_iso\_code | string |
action\_result\.data\.\*\.country\_name | string |
action\_result\.data\.\*\.latitude | numeric |
action\_result\.data\.\*\.longitude | numeric |
action\_result\.parameter\.ip | string | `ip`
action\_result\.parameter\.ip | string | `ip`
action\_result\.data\.\*\.city\_name | string |
action\_result\.data\.\*\.postal\_code | string |
action\_result\.data\.\*\.as\_org | string |
action\_result\.data\.\*\.state\_iso\_code | string |
action\_result\.data\.\*\.state\_name | string |
action\_result\.data\.\*\.time\_zone | string |
action\_result\.summary\.city | string |
action\_result\.summary\.state | string |
action\_result\.summary\.country | string |
action\_result\.message | string |
summary\.total\_objects | numeric |
summary\.total\_objects\_successful | numeric |
DATA PATH | TYPE | CONTAINS | EXAMPLE VALUES
--------- | ---- | -------- | --------------
action_result.status | string | | success failed
action_result.data.\*.continent_name | string | | Asia
action_result.data.\*.country_iso_code | string | | IN
action_result.data.\*.country_name | string | | India
action_result.data.\*.latitude | numeric | | 23.0333
action_result.data.\*.longitude | numeric | | 72.6167
action_result.parameter.ip | string | `ip` | 203.88.139.34
action_result.parameter.ip | string | `ip` | 203.88.139.34
action_result.data.\*.city_name | string | | Ahmedabad
action_result.data.\*.postal_code | string | | 380007
action_result.data.\*.as_org | string | |
action_result.data.\*.state_iso_code | string | | GJ
action_result.data.\*.state_name | string | | Gujarat
action_result.data.\*.time_zone | string | | Asia/Kolkata
action_result.summary.city | string | | Ahmedabad
action_result.summary.state | string | | GJ
action_result.summary.country | string | | India
action_result.message | string | | City: Ahmedabad, State: GJ, Country: India
summary.total_objects | numeric | | 1
summary.total_objects_successful | numeric | | 1

## action: 'update data'
Update database used to locate an ip

Type: **generic**
Read only: **False**

This app uses the MaxMind GeoLite2 City database\.
This app uses the MaxMind GeoLite2 City database.

#### Action Parameters
No parameters are required for this action

#### Action Output
DATA PATH | TYPE | CONTAINS
--------- | ---- | --------
action\_result\.status | string |
action\_result\.data\.\*\.Date | string |
action\_result\.data\.\*\.ETag | string |
action\_result\.data\.\*\.Vary | string |
action\_result\.data\.\*\.CF\-Ray | string |
action\_result\.data\.\*\.Server | string |
action\_result\.data\.\*\.Expires | string |
action\_result\.data\.\*\.expect\-ct | string |
action\_result\.data\.\*\.Connection | string |
action\_result\.data\.\*\.Content\-Type | string |
action\_result\.data\.\*\.Accept\-Ranges | string |
action\_result\.data\.\*\.Cache\-Control | string |
action\_result\.data\.\*\.Last\-Modified | string |
action\_result\.data\.\*\.Content\-Length | string |
action\_result\.data\.\*\.CF\-Cache\-Status | string |
action\_result\.data\.\*\.X\-MaxMind\-Worker | string |
action\_result\.data\.\*\.Content\-Disposition | string |
action\_result\.message | string |
action\_result\.summary | string |
summary\.total\_objects | numeric |
summary\.total\_objects\_successful | numeric |
DATA PATH | TYPE | CONTAINS | EXAMPLE VALUES
--------- | ---- | -------- | --------------
action_result.status | string | | success failed
action_result.data.\*.Date | string | | Mon, 03 Jan 2022 19:37:02 GMT
action_result.data.\*.ETag | string | | a3fd54f5dae1d3760e32ee743e21ffbc
action_result.data.\*.Vary | string | | Accept-Encoding
action_result.data.\*.CF-Ray | string | | 6c7eadeaee340899-SEA
action_result.data.\*.Server | string | | cloudflare
action_result.data.\*.Expires | string | | Mon, 03 Jan 2022 19:37:02 GMT
action_result.data.\*.expect-ct | string | | max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
action_result.data.\*.Connection | string | | keep-alive
action_result.data.\*.Content-Type | string | | application/gzip
action_result.data.\*.Accept-Ranges | string | | bytes
action_result.data.\*.Cache-Control | string | | private, max-age=0
action_result.data.\*.Last-Modified | string | | Tue, 28 Dec 2021 17:52:24 GMT
action_result.data.\*.Content-Length | string | | 35748628
action_result.data.\*.CF-Cache-Status | string | | DYNAMIC
action_result.data.\*.X-MaxMind-Worker | string | | enabled
action_result.data.\*.Content-Disposition | string | | attachment; filename=GeoLite2-City_20211228.tar.gz
action_result.message | string | | Successfully updated database.
action_result.summary | string | |
summary.total_objects | numeric | | 1
summary.total_objects_successful | numeric | | 1

## action: 'on poll'
Update the database if there is a newer one on the server
Expand All @@ -175,11 +175,11 @@ Read only: **True**
#### Action Parameters
PARAMETER | REQUIRED | DESCRIPTION | TYPE | CONTAINS
--------- | -------- | ----------- | ---- | --------
**container\_id** | optional | Container IDs to limit the ingestion to | string |
**start\_time** | optional | Start of time range, in epoch time \(milliseconds\) | numeric |
**end\_time** | optional | End of time range, in epoch time \(milliseconds\) | numeric |
**container\_count** | optional | Maximum number of container records to query for | numeric |
**artifact\_count** | optional | Maximum number of artifact records to query for | numeric |
**container_id** | optional | Container IDs to limit the ingestion to | string |
**start_time** | optional | Start of time range, in epoch time (milliseconds) | numeric |
**end_time** | optional | End of time range, in epoch time (milliseconds) | numeric |
**container_count** | optional | Maximum number of container records to query for | numeric |
**artifact_count** | optional | Maximum number of artifact records to query for | numeric |

#### Action Output
No Output
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# File: __init__.py
#
# Copyright (c) 2016-2022 Splunk Inc.
# Copyright (c) 2016-2024 Splunk Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down
92 changes: 32 additions & 60 deletions maxmind.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,13 @@
"consolidate_widgets": false,
"logo": "logo_maxmind.svg",
"logo_dark": "logo_maxmind_dark.svg",
"license": "Copyright (c) 2016-2022 Splunk Inc.",
"license": "Copyright (c) 2016-2024 Splunk Inc.",
"pip_dependencies": {
"wheel": [
{
"module": "certifi",
"input_file": "wheels/shared/certifi-2019.11.28-py2.py3-none-any.whl"
},
{
"module": "chardet",
"input_file": "wheels/shared/chardet-4.0.0-py2.py3-none-any.whl"
},
{
"module": "geoip2",
"input_file": "wheels/shared/geoip2-2.9.0-py2.py3-none-any.whl"
},
{
"module": "idna",
"input_file": "wheels/shared/idna-2.8-py2.py3-none-any.whl"
},
{
"module": "ipaddress",
"input_file": "wheels/shared/ipaddress-1.0.23-py2.py3-none-any.whl"
Expand All @@ -63,57 +51,13 @@
"module": "python_dateutil",
"input_file": "wheels/shared/python_dateutil-2.8.1-py2.py3-none-any.whl"
},
{
"module": "requests",
"input_file": "wheels/shared/requests-2.26.0-py2.py3-none-any.whl"
},
{
"module": "six",
"input_file": "wheels/shared/six-1.16.0-py2.py3-none-any.whl"
},
{
"module": "urllib3",
"input_file": "wheels/shared/urllib3-1.26.6-py2.py3-none-any.whl"
}
]
},
"pip3_dependencies": {
"wheel": [
{
"module": "certifi",
"input_file": "wheels/shared/certifi-2019.11.28-py2.py3-none-any.whl"
},
{
"module": "charset_normalizer",
"input_file": "wheels/py3/charset_normalizer-2.0.9-py3-none-any.whl"
},
{
"module": "geoip2",
"input_file": "wheels/shared/geoip2-2.9.0-py2.py3-none-any.whl"
},
{
"module": "idna",
"input_file": "wheels/shared/idna-2.8-py2.py3-none-any.whl"
},
{
"module": "maxminddb",
"input_file": "wheels/py3/maxminddb-1.5.1-py3-none-any.whl"
},
{
"module": "python_dateutil",
"input_file": "wheels/shared/python_dateutil-2.8.1-py2.py3-none-any.whl"
},
{
"module": "requests",
"input_file": "wheels/shared/requests-2.26.0-py2.py3-none-any.whl"
},
{
"module": "six",
"input_file": "wheels/shared/six-1.16.0-py2.py3-none-any.whl"
},
{
"module": "urllib3",
"input_file": "wheels/shared/urllib3-1.26.6-py2.py3-none-any.whl"
"input_file": "wheels/shared/urllib3-1.26.18-py2.py3-none-any.whl"
}
]
},
Expand Down Expand Up @@ -519,5 +463,33 @@
"output": [],
"versions": "EQ(*)"
}
]
}
],
"pip39_dependencies": {
"wheel": [
{
"module": "geoip2",
"input_file": "wheels/shared/geoip2-2.9.0-py2.py3-none-any.whl"
},
{
"module": "idna",
"input_file": "wheels/shared/idna-2.8-py2.py3-none-any.whl"
},
{
"module": "maxminddb",
"input_file": "wheels/py3/maxminddb-1.5.1-py3-none-any.whl"
},
{
"module": "python_dateutil",
"input_file": "wheels/shared/python_dateutil-2.8.1-py2.py3-none-any.whl"
},
{
"module": "six",
"input_file": "wheels/shared/six-1.16.0-py2.py3-none-any.whl"
},
{
"module": "urllib3",
"input_file": "wheels/shared/urllib3-1.26.18-py2.py3-none-any.whl"
}
]
}
}
4 changes: 2 additions & 2 deletions maxmind_connector.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# File: maxmind_connector.py
#
# Copyright (c) 2016-2022 Splunk Inc.
# Copyright (c) 2016-2024 Splunk Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -93,7 +93,7 @@ def _handle_test_connectivity(self, param):

# Create a ActionResult object to store the result
self.save_progress('In action handler for: {0}'.format(self.get_action_identifier()))
self.save_progress('Querying the Maxmind DB for the IP: {}'.format(self._ip_address))
self.save_progress('Querying the MaxMind DB for the IP: {}'.format(self._ip_address))

try:
_ = self.reader.city(self._ip_address)
Expand Down
Loading

0 comments on commit 4f9223d

Please sign in to comment.