diff --git a/.github/workflows/run-int-dev-checklist.yml b/.github/workflows/run-int-dev-checklist.yml index 80e76bd..0ae6dfd 100644 --- a/.github/workflows/run-int-dev-checklist.yml +++ b/.github/workflows/run-int-dev-checklist.yml @@ -10,14 +10,16 @@ jobs: container: 'rockylinux:8' steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 - - name: Test NPM Install - id: test-npm-install - run: | - npm ci - - name: Polarity Integration Development Checklist - id: int-dev-checklist - uses: polarityio/polarity-integration-development-checklist@main - with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v6 + - uses: actions/setup-node@v4 + with: + node-version: '18' + - name: Test NPM Install + id: test-npm-install + run: | + npm ci + - name: Polarity Integration Development Checklist + id: int-dev-checklist + uses: polarityio/polarity-integration-development-checklist@main + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index abc35c6..6fb16ff 100644 --- a/.gitignore +++ b/.gitignore @@ -8,7 +8,7 @@ # Ignore Sublime Text Project Files *.sublime-project *.sublime-workspace -sftp-config.json + # Ignore Eclipse Project Information *.settings @@ -16,12 +16,12 @@ sftp-config.json *.classpath dependency-reduced-pom.xml + # Ignore Excel Files *.xlsx # Ignore local log files *.log -test.js # Ignore Generated HTML README Files README.html @@ -29,6 +29,15 @@ README.html # Ignored installed NPM modules node_modules/ -# Ignored VsCode Project Info +# Ignore private keys +key/ + +#Ignore VSCode *.history -*.vscode \ No newline at end of file +.histoy +*.vscode +.vscode + +#Other +legacy_wrapper.js +.DS_Store \ No newline at end of file diff --git a/config/config.js b/config/config.js deleted file mode 100644 index 1776ec2..0000000 --- a/config/config.js +++ /dev/null @@ -1,2129 +0,0 @@ -module.exports = { - name: 'MaxMind', - acronym: 'MM', - logging: { - level: 'info' - }, - entityTypes: ['IPv4', 'IPv6'], - description: 'Polarity integration that connects to the MaxMind GeoLite2 database.', - styles: ['./styles/maxmind.less'], - defaultColor: 'light-gray', - block: { - component: { - file: './components/maxmind-block.js' - }, - template: { - file: './templates/maxmind-block.hbs' - } - }, - summary: { - component: { - file: './components/maxmind-summary.js' - }, - template: { - file: './templates/maxmind-summary.hbs' - } - }, - request: { - cert: '', - key: '', - passphrase: '', - ca: '', - proxy: '' - }, - options: [ - { - key: 'countryBlacklist', - name: 'Country Block List', - description: - 'A block list of countries to hide results from (i.e., no results will be shown for selected countries). You cannot provide both a Country Blacklist and a Country Whitelist.', - default: [], - type: 'select', - options: [ - { - value: 'AD', - display: 'Andorra' - }, - { - value: 'AE', - display: 'United Arab Emirates' - }, - { - value: 'AF', - display: 'Afghanistan' - }, - { - value: 'AG', - display: 'Antigua and Barbuda' - }, - { - value: 'AI', - display: 'Anguilla' - }, - { - value: 'AL', - display: 'Albania' - }, - { - value: 'AM', - display: 'Armenia' - }, - { - value: 'AO', - display: 'Angola' - }, - { - value: 'AP', - display: 'Asia/Pacific Region' - }, - { - value: 'AQ', - display: 'Antarctica' - }, - { - value: 'AR', - display: 'Argentina' - }, - { - value: 'AS', - display: 'American Samoa' - }, - { - value: 'AT', - display: 'Austria' - }, - { - value: 'AU', - display: 'Australia' - }, - { - value: 'AW', - display: 'Aruba' - }, - { - value: 'AX', - display: 'Aland Islands' - }, - { - value: 'AZ', - display: 'Azerbaijan' - }, - { - value: 'BA', - display: 'Bosnia and Herzegovina' - }, - { - value: 'BB', - display: 'Barbados' - }, - { - value: 'BD', - display: 'Bangladesh' - }, - { - value: 'BE', - display: 'Belgium' - }, - { - value: 'BF', - display: 'Burkina Faso' - }, - { - value: 'BG', - display: 'Bulgaria' - }, - { - value: 'BH', - display: 'Bahrain' - }, - { - value: 'BI', - display: 'Burundi' - }, - { - value: 'BJ', - display: 'Benin' - }, - { - value: 'BL', - display: 'Saint Barthelemey' - }, - { - value: 'BM', - display: 'Bermuda' - }, - { - value: 'BN', - display: 'Brunei Darussalam' - }, - { - value: 'BO', - display: 'Bolivia' - }, - { - value: 'BQ', - display: 'Bonaire, Saint Eustatius and Saba' - }, - { - value: 'BR', - display: 'Brazil' - }, - { - value: 'BS', - display: 'Bahamas' - }, - { - value: 'BT', - display: 'Bhutan' - }, - { - value: 'BV', - display: 'Bouvet Island' - }, - { - value: 'BW', - display: 'Botswana' - }, - { - value: 'BY', - display: 'Belarus' - }, - { - value: 'BZ', - display: 'Belize' - }, - { - value: 'CA', - display: 'Canada' - }, - { - value: 'CC', - display: 'Cocos (Keeling) Islands' - }, - { - value: 'CD', - display: 'Congo, The Democratic Republic of the' - }, - { - value: 'CF', - display: 'Central African Republic' - }, - { - value: 'CG', - display: 'Congo' - }, - { - value: 'CH', - display: 'Switzerland' - }, - { - value: 'CI', - display: "Cote d'Ivoire" - }, - { - value: 'CK', - display: 'Cook Islands' - }, - { - value: 'CL', - display: 'Chile' - }, - { - value: 'CM', - display: 'Cameroon' - }, - { - value: 'CN', - display: 'China' - }, - { - value: 'CO', - display: 'Colombia' - }, - { - value: 'CR', - display: 'Costa Rica' - }, - { - value: 'CU', - display: 'Cuba' - }, - { - value: 'CV', - display: 'Cape Verde' - }, - { - value: 'CW', - display: 'Curacao' - }, - { - value: 'CX', - display: 'Christmas Island' - }, - { - value: 'CY', - display: 'Cyprus' - }, - { - value: 'CZ', - display: 'Czech Republic' - }, - { - value: 'DE', - display: 'Germany' - }, - { - value: 'DJ', - display: 'Djibouti' - }, - { - value: 'DK', - display: 'Denmark' - }, - { - value: 'DM', - display: 'Dominica' - }, - { - value: 'DO', - display: 'Dominican Republic' - }, - { - value: 'DZ', - display: 'Algeria' - }, - { - value: 'EC', - display: 'Ecuador' - }, - { - value: 'EE', - display: 'Estonia' - }, - { - value: 'EG', - display: 'Egypt' - }, - { - value: 'EH', - display: 'Western Sahara' - }, - { - value: 'ER', - display: 'Eritrea' - }, - { - value: 'ES', - display: 'Spain' - }, - { - value: 'ET', - display: 'Ethiopia' - }, - { - value: 'EU', - display: 'Europe' - }, - { - value: 'FI', - display: 'Finland' - }, - { - value: 'FJ', - display: 'Fiji' - }, - { - value: 'FK', - display: 'Falkland Islands (Malvinas)' - }, - { - value: 'FM', - display: 'Micronesia, Federated States of' - }, - { - value: 'FO', - display: 'Faroe Islands' - }, - { - value: 'FR', - display: 'France' - }, - { - value: 'GA', - display: 'Gabon' - }, - { - value: 'GB', - display: 'United Kingdom' - }, - { - value: 'GD', - display: 'Grenada' - }, - { - value: 'GE', - display: 'Georgia' - }, - { - value: 'GF', - display: 'French Guiana' - }, - { - value: 'GG', - display: 'Guernsey' - }, - { - value: 'GH', - display: 'Ghana' - }, - { - value: 'GI', - display: 'Gibraltar' - }, - { - value: 'GL', - display: 'Greenland' - }, - { - value: 'GM', - display: 'Gambia' - }, - { - value: 'GN', - display: 'Guinea' - }, - { - value: 'GP', - display: 'Guadeloupe' - }, - { - value: 'GQ', - display: 'Equatorial Guinea' - }, - { - value: 'GR', - display: 'Greece' - }, - { - value: 'GS', - display: 'South Georgia and the South Sandwich Islands' - }, - { - value: 'GT', - display: 'Guatemala' - }, - { - value: 'GU', - display: 'Guam' - }, - { - value: 'GW', - display: 'Guinea-Bissau' - }, - { - value: 'GY', - display: 'Guyana' - }, - { - value: 'HK', - display: 'Hong Kong' - }, - { - value: 'HM', - display: 'Heard Island and McDonald Islands' - }, - { - value: 'HN', - display: 'Honduras' - }, - { - value: 'HR', - display: 'Croatia' - }, - { - value: 'HT', - display: 'Haiti' - }, - { - value: 'HU', - display: 'Hungary' - }, - { - value: 'ID', - display: 'Indonesia' - }, - { - value: 'IE', - display: 'Ireland' - }, - { - value: 'IL', - display: 'Israel' - }, - { - value: 'IM', - display: 'Isle of Man' - }, - { - value: 'IN', - display: 'India' - }, - { - value: 'IO', - display: 'British Indian Ocean Territory' - }, - { - value: 'IQ', - display: 'Iraq' - }, - { - value: 'IR', - display: 'Iran, Islamic Republic of' - }, - { - value: 'IS', - display: 'Iceland' - }, - { - value: 'IT', - display: 'Italy' - }, - { - value: 'JE', - display: 'Jersey' - }, - { - value: 'JM', - display: 'Jamaica' - }, - { - value: 'JO', - display: 'Jordan' - }, - { - value: 'JP', - display: 'Japan' - }, - { - value: 'KE', - display: 'Kenya' - }, - { - value: 'KG', - display: 'Kyrgyzstan' - }, - { - value: 'KH', - display: 'Cambodia' - }, - { - value: 'KI', - display: 'Kiribati' - }, - { - value: 'KM', - display: 'Comoros' - }, - { - value: 'KN', - display: 'Saint Kitts and Nevis' - }, - { - value: 'KP', - display: "Korea, Democratic People's Republic of" - }, - { - value: 'KR', - display: 'Korea, Republic of' - }, - { - value: 'KW', - display: 'Kuwait' - }, - { - value: 'KY', - display: 'Cayman Islands' - }, - { - value: 'KZ', - display: 'Kazakhstan' - }, - { - value: 'LA', - display: "Lao People's Democratic Republic" - }, - { - value: 'LB', - display: 'Lebanon' - }, - { - value: 'LC', - display: 'Saint Lucia' - }, - { - value: 'LI', - display: 'Liechtenstein' - }, - { - value: 'LK', - display: 'Sri Lanka' - }, - { - value: 'LR', - display: 'Liberia' - }, - { - value: 'LS', - display: 'Lesotho' - }, - { - value: 'LT', - display: 'Lithuania' - }, - { - value: 'LU', - display: 'Luxembourg' - }, - { - value: 'LV', - display: 'Latvia' - }, - { - value: 'LY', - display: 'Libyan Arab Jamahiriya' - }, - { - value: 'MA', - display: 'Morocco' - }, - { - value: 'MC', - display: 'Monaco' - }, - { - value: 'MD', - display: 'Moldova, Republic of' - }, - { - value: 'ME', - display: 'Montenegro' - }, - { - value: 'MF', - display: 'Saint Martin' - }, - { - value: 'MG', - display: 'Madagascar' - }, - { - value: 'MH', - display: 'Marshall Islands' - }, - { - value: 'MK', - display: 'Macedonia' - }, - { - value: 'ML', - display: 'Mali' - }, - { - value: 'MM', - display: 'Myanmar' - }, - { - value: 'MN', - display: 'Mongolia' - }, - { - value: 'MO', - display: 'Macao' - }, - { - value: 'MP', - display: 'Northern Mariana Islands' - }, - { - value: 'MQ', - display: 'Martinique' - }, - { - value: 'MR', - display: 'Mauritania' - }, - { - value: 'MS', - display: 'Montserrat' - }, - { - value: 'MT', - display: 'Malta' - }, - { - value: 'MU', - display: 'Mauritius' - }, - { - value: 'MV', - display: 'Maldives' - }, - { - value: 'MW', - display: 'Malawi' - }, - { - value: 'MX', - display: 'Mexico' - }, - { - value: 'MY', - display: 'Malaysia' - }, - { - value: 'MZ', - display: 'Mozambique' - }, - { - value: 'NA', - display: 'Namibia' - }, - { - value: 'NC', - display: 'New Caledonia' - }, - { - value: 'NE', - display: 'Niger' - }, - { - value: 'NF', - display: 'Norfolk Island' - }, - { - value: 'NG', - display: 'Nigeria' - }, - { - value: 'NI', - display: 'Nicaragua' - }, - { - value: 'NL', - display: 'Netherlands' - }, - { - value: 'NO', - display: 'Norway' - }, - { - value: 'NP', - display: 'Nepal' - }, - { - value: 'NR', - display: 'Nauru' - }, - { - value: 'NU', - display: 'Niue' - }, - { - value: 'NZ', - display: 'New Zealand' - }, - { - value: 'OM', - display: 'Oman' - }, - { - value: 'PA', - display: 'Panama' - }, - { - value: 'PE', - display: 'Peru' - }, - { - value: 'PF', - display: 'French Polynesia' - }, - { - value: 'PG', - display: 'Papua New Guinea' - }, - { - value: 'PH', - display: 'Philippines' - }, - { - value: 'PK', - display: 'Pakistan' - }, - { - value: 'PL', - display: 'Poland' - }, - { - value: 'PM', - display: 'Saint Pierre and Miquelon' - }, - { - value: 'PN', - display: 'Pitcairn' - }, - { - value: 'PR', - display: 'Puerto Rico' - }, - { - value: 'PS', - display: 'Palestinian Territory' - }, - { - value: 'PT', - display: 'Portugal' - }, - { - value: 'PW', - display: 'Palau' - }, - { - value: 'PY', - display: 'Paraguay' - }, - { - value: 'QA', - display: 'Qatar' - }, - { - value: 'RE', - display: 'Reunion' - }, - { - value: 'RO', - display: 'Romania' - }, - { - value: 'RS', - display: 'Serbia' - }, - { - value: 'RU', - display: 'Russian Federation' - }, - { - value: 'RW', - display: 'Rwanda' - }, - { - value: 'SA', - display: 'Saudi Arabia' - }, - { - value: 'SB', - display: 'Solomon Islands' - }, - { - value: 'SC', - display: 'Seychelles' - }, - { - value: 'SD', - display: 'Sudan' - }, - { - value: 'SE', - display: 'Sweden' - }, - { - value: 'SG', - display: 'Singapore' - }, - { - value: 'SH', - display: 'Saint Helena' - }, - { - value: 'SI', - display: 'Slovenia' - }, - { - value: 'SJ', - display: 'Svalbard and Jan Mayen' - }, - { - value: 'SK', - display: 'Slovakia' - }, - { - value: 'SL', - display: 'Sierra Leone' - }, - { - value: 'SM', - display: 'San Marino' - }, - { - value: 'SN', - display: 'Senegal' - }, - { - value: 'SO', - display: 'Somalia' - }, - { - value: 'SR', - display: 'Suriname' - }, - { - value: 'SS', - display: 'South Sudan' - }, - { - value: 'ST', - display: 'Sao Tome and Principe' - }, - { - value: 'SV', - display: 'El Salvador' - }, - { - value: 'SX', - display: 'Sint Maarten' - }, - { - value: 'SY', - display: 'Syrian Arab Republic' - }, - { - value: 'SZ', - display: 'Swaziland' - }, - { - value: 'TC', - display: 'Turks and Caicos Islands' - }, - { - value: 'TD', - display: 'Chad' - }, - { - value: 'TF', - display: 'French Southern Territories' - }, - { - value: 'TG', - display: 'Togo' - }, - { - value: 'TH', - display: 'Thailand' - }, - { - value: 'TJ', - display: 'Tajikistan' - }, - { - value: 'TK', - display: 'Tokelau' - }, - { - value: 'TL', - display: 'Timor-Leste' - }, - { - value: 'TM', - display: 'Turkmenistan' - }, - { - value: 'TN', - display: 'Tunisia' - }, - { - value: 'TO', - display: 'Tonga' - }, - { - value: 'TR', - display: 'Turkey' - }, - { - value: 'TT', - display: 'Trinidad and Tobago' - }, - { - value: 'TV', - display: 'Tuvalu' - }, - { - value: 'TW', - display: 'Taiwan' - }, - { - value: 'TZ', - display: 'Tanzania, United Republic of' - }, - { - value: 'UA', - display: 'Ukraine' - }, - { - value: 'UG', - display: 'Uganda' - }, - { - value: 'UM', - display: 'United States Minor Outlying Islands' - }, - { - value: 'US', - display: 'United States' - }, - { - value: 'UY', - display: 'Uruguay' - }, - { - value: 'UZ', - display: 'Uzbekistan' - }, - { - value: 'VA', - display: 'Holy See (Vatican City State)' - }, - { - value: 'VC', - display: 'Saint Vincent and the Grenadines' - }, - { - value: 'VE', - display: 'Venezuela' - }, - { - value: 'VG', - display: 'Virgin Islands, British' - }, - { - value: 'VI', - display: 'Virgin Islands, U.S.' - }, - { - value: 'VN', - display: 'Vietnam' - }, - { - value: 'VU', - display: 'Vanuatu' - }, - { - value: 'WF', - display: 'Wallis and Futuna' - }, - { - value: 'WS', - display: 'Samoa' - }, - { - value: 'YE', - display: 'Yemen' - }, - { - value: 'YT', - display: 'Mayotte' - }, - { - value: 'ZA', - display: 'South Africa' - }, - { - value: 'ZM', - display: 'Zambia' - }, - { - value: 'ZW', - display: 'Zimbabwe' - } - ], - multiple: true, - userCanEdit: true, - adminOnly: false - }, - { - key: 'countryWhitelist', - name: 'Country Allow List', - description: - 'An allow list of countries that results should be shown for (i.e., results will only be shown for selected countries). You cannot provide both a Country Blacklist and a Country Whitelist.', - default: [], - type: 'select', - options: [ - { - value: 'AD', - display: 'Andorra' - }, - { - value: 'AE', - display: 'United Arab Emirates' - }, - { - value: 'AF', - display: 'Afghanistan' - }, - { - value: 'AG', - display: 'Antigua and Barbuda' - }, - { - value: 'AI', - display: 'Anguilla' - }, - { - value: 'AL', - display: 'Albania' - }, - { - value: 'AM', - display: 'Armenia' - }, - { - value: 'AO', - display: 'Angola' - }, - { - value: 'AP', - display: 'Asia/Pacific Region' - }, - { - value: 'AQ', - display: 'Antarctica' - }, - { - value: 'AR', - display: 'Argentina' - }, - { - value: 'AS', - display: 'American Samoa' - }, - { - value: 'AT', - display: 'Austria' - }, - { - value: 'AU', - display: 'Australia' - }, - { - value: 'AW', - display: 'Aruba' - }, - { - value: 'AX', - display: 'Aland Islands' - }, - { - value: 'AZ', - display: 'Azerbaijan' - }, - { - value: 'BA', - display: 'Bosnia and Herzegovina' - }, - { - value: 'BB', - display: 'Barbados' - }, - { - value: 'BD', - display: 'Bangladesh' - }, - { - value: 'BE', - display: 'Belgium' - }, - { - value: 'BF', - display: 'Burkina Faso' - }, - { - value: 'BG', - display: 'Bulgaria' - }, - { - value: 'BH', - display: 'Bahrain' - }, - { - value: 'BI', - display: 'Burundi' - }, - { - value: 'BJ', - display: 'Benin' - }, - { - value: 'BL', - display: 'Saint Barthelemey' - }, - { - value: 'BM', - display: 'Bermuda' - }, - { - value: 'BN', - display: 'Brunei Darussalam' - }, - { - value: 'BO', - display: 'Bolivia' - }, - { - value: 'BQ', - display: 'Bonaire, Saint Eustatius and Saba' - }, - { - value: 'BR', - display: 'Brazil' - }, - { - value: 'BS', - display: 'Bahamas' - }, - { - value: 'BT', - display: 'Bhutan' - }, - { - value: 'BV', - display: 'Bouvet Island' - }, - { - value: 'BW', - display: 'Botswana' - }, - { - value: 'BY', - display: 'Belarus' - }, - { - value: 'BZ', - display: 'Belize' - }, - { - value: 'CA', - display: 'Canada' - }, - { - value: 'CC', - display: 'Cocos (Keeling) Islands' - }, - { - value: 'CD', - display: 'Congo, The Democratic Republic of the' - }, - { - value: 'CF', - display: 'Central African Republic' - }, - { - value: 'CG', - display: 'Congo' - }, - { - value: 'CH', - display: 'Switzerland' - }, - { - value: 'CI', - display: "Cote d'Ivoire" - }, - { - value: 'CK', - display: 'Cook Islands' - }, - { - value: 'CL', - display: 'Chile' - }, - { - value: 'CM', - display: 'Cameroon' - }, - { - value: 'CN', - display: 'China' - }, - { - value: 'CO', - display: 'Colombia' - }, - { - value: 'CR', - display: 'Costa Rica' - }, - { - value: 'CU', - display: 'Cuba' - }, - { - value: 'CV', - display: 'Cape Verde' - }, - { - value: 'CW', - display: 'Curacao' - }, - { - value: 'CX', - display: 'Christmas Island' - }, - { - value: 'CY', - display: 'Cyprus' - }, - { - value: 'CZ', - display: 'Czech Republic' - }, - { - value: 'DE', - display: 'Germany' - }, - { - value: 'DJ', - display: 'Djibouti' - }, - { - value: 'DK', - display: 'Denmark' - }, - { - value: 'DM', - display: 'Dominica' - }, - { - value: 'DO', - display: 'Dominican Republic' - }, - { - value: 'DZ', - display: 'Algeria' - }, - { - value: 'EC', - display: 'Ecuador' - }, - { - value: 'EE', - display: 'Estonia' - }, - { - value: 'EG', - display: 'Egypt' - }, - { - value: 'EH', - display: 'Western Sahara' - }, - { - value: 'ER', - display: 'Eritrea' - }, - { - value: 'ES', - display: 'Spain' - }, - { - value: 'ET', - display: 'Ethiopia' - }, - { - value: 'EU', - display: 'Europe' - }, - { - value: 'FI', - display: 'Finland' - }, - { - value: 'FJ', - display: 'Fiji' - }, - { - value: 'FK', - display: 'Falkland Islands (Malvinas)' - }, - { - value: 'FM', - display: 'Micronesia, Federated States of' - }, - { - value: 'FO', - display: 'Faroe Islands' - }, - { - value: 'FR', - display: 'France' - }, - { - value: 'GA', - display: 'Gabon' - }, - { - value: 'GB', - display: 'United Kingdom' - }, - { - value: 'GD', - display: 'Grenada' - }, - { - value: 'GE', - display: 'Georgia' - }, - { - value: 'GF', - display: 'French Guiana' - }, - { - value: 'GG', - display: 'Guernsey' - }, - { - value: 'GH', - display: 'Ghana' - }, - { - value: 'GI', - display: 'Gibraltar' - }, - { - value: 'GL', - display: 'Greenland' - }, - { - value: 'GM', - display: 'Gambia' - }, - { - value: 'GN', - display: 'Guinea' - }, - { - value: 'GP', - display: 'Guadeloupe' - }, - { - value: 'GQ', - display: 'Equatorial Guinea' - }, - { - value: 'GR', - display: 'Greece' - }, - { - value: 'GS', - display: 'South Georgia and the South Sandwich Islands' - }, - { - value: 'GT', - display: 'Guatemala' - }, - { - value: 'GU', - display: 'Guam' - }, - { - value: 'GW', - display: 'Guinea-Bissau' - }, - { - value: 'GY', - display: 'Guyana' - }, - { - value: 'HK', - display: 'Hong Kong' - }, - { - value: 'HM', - display: 'Heard Island and McDonald Islands' - }, - { - value: 'HN', - display: 'Honduras' - }, - { - value: 'HR', - display: 'Croatia' - }, - { - value: 'HT', - display: 'Haiti' - }, - { - value: 'HU', - display: 'Hungary' - }, - { - value: 'ID', - display: 'Indonesia' - }, - { - value: 'IE', - display: 'Ireland' - }, - { - value: 'IL', - display: 'Israel' - }, - { - value: 'IM', - display: 'Isle of Man' - }, - { - value: 'IN', - display: 'India' - }, - { - value: 'IO', - display: 'British Indian Ocean Territory' - }, - { - value: 'IQ', - display: 'Iraq' - }, - { - value: 'IR', - display: 'Iran, Islamic Republic of' - }, - { - value: 'IS', - display: 'Iceland' - }, - { - value: 'IT', - display: 'Italy' - }, - { - value: 'JE', - display: 'Jersey' - }, - { - value: 'JM', - display: 'Jamaica' - }, - { - value: 'JO', - display: 'Jordan' - }, - { - value: 'JP', - display: 'Japan' - }, - { - value: 'KE', - display: 'Kenya' - }, - { - value: 'KG', - display: 'Kyrgyzstan' - }, - { - value: 'KH', - display: 'Cambodia' - }, - { - value: 'KI', - display: 'Kiribati' - }, - { - value: 'KM', - display: 'Comoros' - }, - { - value: 'KN', - display: 'Saint Kitts and Nevis' - }, - { - value: 'KP', - display: "Korea, Democratic People's Republic of" - }, - { - value: 'KR', - display: 'Korea, Republic of' - }, - { - value: 'KW', - display: 'Kuwait' - }, - { - value: 'KY', - display: 'Cayman Islands' - }, - { - value: 'KZ', - display: 'Kazakhstan' - }, - { - value: 'LA', - display: "Lao People's Democratic Republic" - }, - { - value: 'LB', - display: 'Lebanon' - }, - { - value: 'LC', - display: 'Saint Lucia' - }, - { - value: 'LI', - display: 'Liechtenstein' - }, - { - value: 'LK', - display: 'Sri Lanka' - }, - { - value: 'LR', - display: 'Liberia' - }, - { - value: 'LS', - display: 'Lesotho' - }, - { - value: 'LT', - display: 'Lithuania' - }, - { - value: 'LU', - display: 'Luxembourg' - }, - { - value: 'LV', - display: 'Latvia' - }, - { - value: 'LY', - display: 'Libyan Arab Jamahiriya' - }, - { - value: 'MA', - display: 'Morocco' - }, - { - value: 'MC', - display: 'Monaco' - }, - { - value: 'MD', - display: 'Moldova, Republic of' - }, - { - value: 'ME', - display: 'Montenegro' - }, - { - value: 'MF', - display: 'Saint Martin' - }, - { - value: 'MG', - display: 'Madagascar' - }, - { - value: 'MH', - display: 'Marshall Islands' - }, - { - value: 'MK', - display: 'Macedonia' - }, - { - value: 'ML', - display: 'Mali' - }, - { - value: 'MM', - display: 'Myanmar' - }, - { - value: 'MN', - display: 'Mongolia' - }, - { - value: 'MO', - display: 'Macao' - }, - { - value: 'MP', - display: 'Northern Mariana Islands' - }, - { - value: 'MQ', - display: 'Martinique' - }, - { - value: 'MR', - display: 'Mauritania' - }, - { - value: 'MS', - display: 'Montserrat' - }, - { - value: 'MT', - display: 'Malta' - }, - { - value: 'MU', - display: 'Mauritius' - }, - { - value: 'MV', - display: 'Maldives' - }, - { - value: 'MW', - display: 'Malawi' - }, - { - value: 'MX', - display: 'Mexico' - }, - { - value: 'MY', - display: 'Malaysia' - }, - { - value: 'MZ', - display: 'Mozambique' - }, - { - value: 'NA', - display: 'Namibia' - }, - { - value: 'NC', - display: 'New Caledonia' - }, - { - value: 'NE', - display: 'Niger' - }, - { - value: 'NF', - display: 'Norfolk Island' - }, - { - value: 'NG', - display: 'Nigeria' - }, - { - value: 'NI', - display: 'Nicaragua' - }, - { - value: 'NL', - display: 'Netherlands' - }, - { - value: 'NO', - display: 'Norway' - }, - { - value: 'NP', - display: 'Nepal' - }, - { - value: 'NR', - display: 'Nauru' - }, - { - value: 'NU', - display: 'Niue' - }, - { - value: 'NZ', - display: 'New Zealand' - }, - { - value: 'OM', - display: 'Oman' - }, - { - value: 'PA', - display: 'Panama' - }, - { - value: 'PE', - display: 'Peru' - }, - { - value: 'PF', - display: 'French Polynesia' - }, - { - value: 'PG', - display: 'Papua New Guinea' - }, - { - value: 'PH', - display: 'Philippines' - }, - { - value: 'PK', - display: 'Pakistan' - }, - { - value: 'PL', - display: 'Poland' - }, - { - value: 'PM', - display: 'Saint Pierre and Miquelon' - }, - { - value: 'PN', - display: 'Pitcairn' - }, - { - value: 'PR', - display: 'Puerto Rico' - }, - { - value: 'PS', - display: 'Palestinian Territory' - }, - { - value: 'PT', - display: 'Portugal' - }, - { - value: 'PW', - display: 'Palau' - }, - { - value: 'PY', - display: 'Paraguay' - }, - { - value: 'QA', - display: 'Qatar' - }, - { - value: 'RE', - display: 'Reunion' - }, - { - value: 'RO', - display: 'Romania' - }, - { - value: 'RS', - display: 'Serbia' - }, - { - value: 'RU', - display: 'Russian Federation' - }, - { - value: 'RW', - display: 'Rwanda' - }, - { - value: 'SA', - display: 'Saudi Arabia' - }, - { - value: 'SB', - display: 'Solomon Islands' - }, - { - value: 'SC', - display: 'Seychelles' - }, - { - value: 'SD', - display: 'Sudan' - }, - { - value: 'SE', - display: 'Sweden' - }, - { - value: 'SG', - display: 'Singapore' - }, - { - value: 'SH', - display: 'Saint Helena' - }, - { - value: 'SI', - display: 'Slovenia' - }, - { - value: 'SJ', - display: 'Svalbard and Jan Mayen' - }, - { - value: 'SK', - display: 'Slovakia' - }, - { - value: 'SL', - display: 'Sierra Leone' - }, - { - value: 'SM', - display: 'San Marino' - }, - { - value: 'SN', - display: 'Senegal' - }, - { - value: 'SO', - display: 'Somalia' - }, - { - value: 'SR', - display: 'Suriname' - }, - { - value: 'SS', - display: 'South Sudan' - }, - { - value: 'ST', - display: 'Sao Tome and Principe' - }, - { - value: 'SV', - display: 'El Salvador' - }, - { - value: 'SX', - display: 'Sint Maarten' - }, - { - value: 'SY', - display: 'Syrian Arab Republic' - }, - { - value: 'SZ', - display: 'Swaziland' - }, - { - value: 'TC', - display: 'Turks and Caicos Islands' - }, - { - value: 'TD', - display: 'Chad' - }, - { - value: 'TF', - display: 'French Southern Territories' - }, - { - value: 'TG', - display: 'Togo' - }, - { - value: 'TH', - display: 'Thailand' - }, - { - value: 'TJ', - display: 'Tajikistan' - }, - { - value: 'TK', - display: 'Tokelau' - }, - { - value: 'TL', - display: 'Timor-Leste' - }, - { - value: 'TM', - display: 'Turkmenistan' - }, - { - value: 'TN', - display: 'Tunisia' - }, - { - value: 'TO', - display: 'Tonga' - }, - { - value: 'TR', - display: 'Turkey' - }, - { - value: 'TT', - display: 'Trinidad and Tobago' - }, - { - value: 'TV', - display: 'Tuvalu' - }, - { - value: 'TW', - display: 'Taiwan' - }, - { - value: 'TZ', - display: 'Tanzania, United Republic of' - }, - { - value: 'UA', - display: 'Ukraine' - }, - { - value: 'UG', - display: 'Uganda' - }, - { - value: 'UM', - display: 'United States Minor Outlying Islands' - }, - { - value: 'US', - display: 'United States' - }, - { - value: 'UY', - display: 'Uruguay' - }, - { - value: 'UZ', - display: 'Uzbekistan' - }, - { - value: 'VA', - display: 'Holy See (Vatican City State)' - }, - { - value: 'VC', - display: 'Saint Vincent and the Grenadines' - }, - { - value: 'VE', - display: 'Venezuela' - }, - { - value: 'VG', - display: 'Virgin Islands, British' - }, - { - value: 'VI', - display: 'Virgin Islands, U.S.' - }, - { - value: 'VN', - display: 'Vietnam' - }, - { - value: 'VU', - display: 'Vanuatu' - }, - { - value: 'WF', - display: 'Wallis and Futuna' - }, - { - value: 'WS', - display: 'Samoa' - }, - { - value: 'YE', - display: 'Yemen' - }, - { - value: 'YT', - display: 'Mayotte' - }, - { - value: 'ZA', - display: 'South Africa' - }, - { - value: 'ZM', - display: 'Zambia' - }, - { - value: 'ZW', - display: 'Zimbabwe' - } - ], - multiple: true, - userCanEdit: true, - adminOnly: false - }, - { - key: 'fullResultsForOnDemand', - name: 'Return all Countries for On-Demand Lookups', - description: - 'If checked, the integration will return results for all countries when an On-demand search is run (i.e., Country Whitelist and Country Blacklist settings will be ignored for On-Demand lookups).', - default: false, - type: 'boolean', - userCanEdit: true, - adminOnly: false - }, - { - key: 'showFullCountryName', - name: 'Show Full Country Name in Summary', - description: - 'If checked, integration will always display the full country name rather than just the country ISO Code in the MaxMind notification summary', - default: true, - type: 'boolean', - userCanEdit: true, - adminOnly: false - }, - { - key: 'showState', - name: 'Show State in Summary', - description: - 'If checked, the integration will display the state or subdivision information when available in the MaxMind notification summary', - default: true, - type: 'boolean', - userCanEdit: true, - adminOnly: false - }, - { - key: 'showAsnTag', - name: 'Show ASN and Org Info in Summary', - description: 'If checked, the integration will display the ASN and organization information as a summary tag', - default: true, - type: 'boolean', - userCanEdit: true, - adminOnly: false - }, - { - key: 'pathToCityDatabase', - name: 'MaxMind City Database File Path', - description: - "A file path to pointing to the MaxMind City database file. If a relative path is provided, the path will be relative to the MaxMind integration directory on the Polarity Server. If left blank, the default value of 'database/GeoLite2-City.mmdb' will be used.", - default: 'database/GeoLite2-City.mmdb', - type: 'text', - userCanEdit: false, - adminOnly: true - }, - { - key: 'pathToAsnDatabase', - name: 'MaxMind ASN Database File Path', - description: - "A file path to pointing to the MaxMind ASN database file. If a relative path is provided, the path will be relative to the MaxMind integration directory on the Polarity Server. If left blank, the default value of 'database/GeoLite2-ASN.mmdb' will be used.", - default: 'database/GeoLite2-ASN.mmdb', - type: 'text', - userCanEdit: false, - adminOnly: true - } - ] -}; diff --git a/database/COPYRIGHT.txt b/database/COPYRIGHT.txt index 7fb7920..51e7fe6 100644 --- a/database/COPYRIGHT.txt +++ b/database/COPYRIGHT.txt @@ -1 +1 @@ -Database and Contents Copyright (c) 2024 MaxMind, Inc. +Database and Contents Copyright (c) 2026 MaxMind, Inc. diff --git a/database/GeoLite2-ASN.mmdb b/database/GeoLite2-ASN.mmdb index b777c71..4555b50 100644 Binary files a/database/GeoLite2-ASN.mmdb and b/database/GeoLite2-ASN.mmdb differ diff --git a/database/GeoLite2-City.mmdb b/database/GeoLite2-City.mmdb index 7d521d3..b911f15 100644 Binary files a/database/GeoLite2-City.mmdb and b/database/GeoLite2-City.mmdb differ diff --git a/database/LICENSE.txt b/database/LICENSE.txt index ee7434d..8652d14 100644 --- a/database/LICENSE.txt +++ b/database/LICENSE.txt @@ -1,3 +1,3 @@ -Use of this MaxMind product is governed by MaxMind's GeoLite2 End User License Agreement, which can be viewed at https://www.maxmind.com/en/geolite2/eula. +Use of this MaxMind product is governed by MaxMind's GeoLite End User License Agreement, which can be viewed at https://www.maxmind.com/en/geolite/eula. This database incorporates GeoNames [https://www.geonames.org] geographical data, which is made available under the Creative Commons Attribution 4.0 License. To view a copy of this license, visit https://creativecommons.org/licenses/by/4.0/. diff --git a/integration.js b/integration.js index 8b13f3b..5ddbe6f 100644 --- a/integration.js +++ b/integration.js @@ -1,7 +1,6 @@ 'use strict'; const async = require('async'); -const config = require('./config/config'); const maxmind = require('maxmind'); let Logger; diff --git a/package-lock.json b/package-lock.json index 4e43ebc..d2fbd2e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,32 +1,51 @@ { "name": "MaxMind", - "version": "3.5.1", - "lockfileVersion": 1, + "version": "3.5.2", + "lockfileVersion": 3, "requires": true, - "dependencies": { - "async": { + "packages": { + "": { + "name": "MaxMind", + "version": "3.5.2", + "dependencies": { + "async": "^3.2.6", + "maxmind": "^4.3.29" + } + }, + "node_modules/async": { "version": "3.2.6", "resolved": "https://registry.npmjs.org/async/-/async-3.2.6.tgz", "integrity": "sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==" }, - "maxmind": { - "version": "4.3.23", - "resolved": "https://registry.npmjs.org/maxmind/-/maxmind-4.3.23.tgz", - "integrity": "sha512-AMm4Eem0J0Y1EQJRVSdi2xevw5bJgUDd+lHyQwu0PvGUtK/4uOb8/uidmsrRZ/ST90UfF48H4ShAeFFWKvZ7bw==", - "requires": { - "mmdb-lib": "2.1.1", - "tiny-lru": "11.2.11" + "node_modules/maxmind": { + "version": "4.3.29", + "resolved": "https://registry.npmjs.org/maxmind/-/maxmind-4.3.29.tgz", + "integrity": "sha512-Vxx0rh7omBekjZnsDxpw35SrGGM3Uy7NoIKWzZlvh3UcjihGaySR8n+YSQ8YBseCvhEn+yehA98rZkTDW+uhPw==", + "dependencies": { + "mmdb-lib": "2.2.1", + "tiny-lru": "11.3.4" + }, + "engines": { + "node": ">=12", + "npm": ">=6" } }, - "mmdb-lib": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/mmdb-lib/-/mmdb-lib-2.1.1.tgz", - "integrity": "sha512-yx8H/1H5AfnufiLnzzPqPf4yr/dKU9IFT1rPVwSkrKWHsQEeVVd6+X+L0nUbXhlEFTu3y/7hu38CFmEVgzvyeg==" + "node_modules/mmdb-lib": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/mmdb-lib/-/mmdb-lib-2.2.1.tgz", + "integrity": "sha512-DXO4L9W+08T+A7h5+xdT32l7IMot8z7WOH+7C1Maol571PnktQ8un7Ni4CyPFp4H+vht/FDA5/tpjRvWMFQDMw==", + "engines": { + "node": ">=10", + "npm": ">=6" + } }, - "tiny-lru": { - "version": "11.2.11", - "resolved": "https://registry.npmjs.org/tiny-lru/-/tiny-lru-11.2.11.tgz", - "integrity": "sha512-27BIW0dIWTYYoWNnqSmoNMKe5WIbkXsc0xaCQHd3/3xT2XMuMJrzHdrO9QBFR14emBz1Bu0dOAs2sCBBrvgPQA==" + "node_modules/tiny-lru": { + "version": "11.3.4", + "resolved": "https://registry.npmjs.org/tiny-lru/-/tiny-lru-11.3.4.tgz", + "integrity": "sha512-UxWEfRKpFCabAf6fkTNdlfSw/RDUJ/4C6i1aLZaDnGF82PERHyYhz5CMCVYXtLt34LbqgfpJ2bjmgGKgxuF/6A==", + "engines": { + "node": ">=12" + } } } } diff --git a/package.json b/package.json index 52c5c30..f14fa36 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { "name": "MaxMind", - "version": "3.5.1", + "version": "3.5.2", "main": "./integration.js", "description": "Polarity MaxMind Integration", "private": true, "dependencies": { "async": "^3.2.6", - "maxmind": "^4.3.23" + "maxmind": "^4.3.29" } } diff --git a/reducers/details.json b/reducers/details.json index a9375a1..0bf092f 100644 --- a/reducers/details.json +++ b/reducers/details.json @@ -14,11 +14,6 @@ "from": "country", "to": "reduced_results.country" }, - { - "op": "copy", - "from": "continent", - "to": "reduced_results.continent" - }, { "op": "copy", "from": "registered_country", @@ -26,8 +21,8 @@ }, { "op": "copy", - "from": "postal", - "to": "reduced_results.postal" + "from": "location", + "to": "reduced_results.location" }, { "op": "copy", @@ -55,74 +50,52 @@ "to": "reduced_results.mostSpecificSubdivision" }, { - "op": "transform", - "path": "reduced_results.city.name", - "function": "extract", - "field": "names.en" - }, - { - "op": "drop", - "paths": ["reduced_results.city.names"] + "op": "copy", + "from": "reduced_results.city.names.en", + "to": "reduced_results.city.name" }, { - "op": "transform", - "path": "reduced_results.country.name", - "function": "extract", - "field": "names.en" + "op": "copy", + "from": "reduced_results.country.names.en", + "to": "reduced_results.country.name" }, { - "op": "drop", - "paths": [ - "reduced_results.country.names", - "reduced_results.country.iso_code" - ] + "op": "copy", + "from": "reduced_results.continent.names.en", + "to": "reduced_results.continent.name" }, { - "op": "transform", - "path": "reduced_results.continent.name", - "function": "extract", - "field": "names.en" + "op": "copy", + "from": "reduced_results.registered_country.names.en", + "to": "reduced_results.registered_country.name" }, { - "op": "drop", - "paths": [ - "reduced_results.continent.names", - "reduced_results.continent.code" - ] + "op": "copy", + "from": "reduced_results.subdivisions[].names.en", + "to": "reduced_results.subdivisions[].name" }, { - "op": "transform", - "path": "reduced_results.isp_registered_country.name", - "function": "extract", - "field": "names.en" + "op": "copy", + "from": "reduced_results.isp_registered_country.names.en", + "to": "reduced_results.isp_registered_country.name" }, { "op": "drop", "paths": [ + "reduced_results.city.names", + "reduced_results.city.geoname_id", + "reduced_results.country.names", + "reduced_results.country.geoname_id", + "reduced_results.continent.names", + "reduced_results.continent.geoname_id", "reduced_results.isp_registered_country.names", - "reduced_results.isp_registered_country.iso_code" + "reduced_results.isp_registered_country.geoname_id", + "reduced_results.subdivisions[].names", + "reduced_results.subdivisions[].geoname_id", + "reduced_results.registered_country.names", + "reduced_results.registered_country.geoname_id" ] }, - { - "op": "transform", - "path": "reduced_results.postal_code", - "function": "extract", - "field": "postal.code" - }, - { - "op": "drop", - "paths": ["reduced_results.postal"] - }, - { - "op": "transform", - "path": "reduced_results.subdivisions[].name", - "function": "extract", - "field": "names.en" - }, - { - "op": "drop", - "paths": ["reduced_results.subdivisions[].names"] - }, { "op": "prune", "strategy": "empty_values",