Skip to content

Commit

Permalink
Align Credentials for BmcHelixRemedyForce, GoogleCloudFunctions, OPSW…
Browse files Browse the repository at this point in the history
…ATMetadefenderV2, Incapsula (#27597)

* BmcHelixRemedyForce complete

* OPSWATMetadefenderV2 complete

* Incapsula complete

* GoogleCloudFunctions complete

* fixed incapsula

* Update docker in GoogleCloudFunctions.yml

* Update docker in 1_0_26.md

* update RN
  • Loading branch information
jlevypaloalto authored Jun 25, 2023
1 parent 2cd5f7c commit 603f33f
Show file tree
Hide file tree
Showing 21 changed files with 113 additions and 47 deletions.
5 changes: 3 additions & 2 deletions Packs/BmcHelixRemedyForce/.pack-ignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[file:BmcHelixRemedyForce.yml]
ignore=IN135,IN145
ignore=IN135

[file:README.md]
ignore=RM104
Expand All @@ -8,4 +8,5 @@ ignore=RM104
ignore=BA101

[file:classifier-BMCHelixRemedyforce.json]
ignore=BA101
ignore=BA101

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import urllib3
import contextlib
import traceback
import xml.etree.ElementTree as ElementTree
from xml.etree import ElementTree
import dateparser
from os import path

Expand Down Expand Up @@ -870,7 +870,7 @@ def process_single_service_request_definition(res) -> dict:

# For checking each name in field, to ensure the standard keys are not replaced in the context,
# e.g. there is a field called 'id' in the fields objects
standard_key_set = set(key.strip().lower() for key in srd_context)
standard_key_set = {key.strip().lower() for key in srd_context}

# Creating a dictionary of Name: Value pairs for fields where name and value fields exist
fields = {field['Name']: field['Value'] for field in res.get('Fields', []) if
Expand Down Expand Up @@ -2799,8 +2799,8 @@ def main():
params = demisto.params()
init_globals(params)
# Username and password from credentials
username = params.get('username')
password = params.get('password')
username = params.get('username_creds', {}).get('identifier') or params.get('username')
password = params.get('username_creds', {}).get('password') or params.get('password')

# Get the service API base url
base_url = params['url']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,28 @@ configuration:
defaultvalue: https://login.salesforce.com
- display: Username
name: username
required: true
required: false
type: 0
hidden: true
- display: Password
name: password
required: true
required: false
type: 4
hidden: true
- display: Username
name: username_creds
required: false
type: 9
displaypassword: Password
- additionalinfo: Incidents will be fetched based on selected type.
defaultvalue: BMC Remedyforce Service Request
display: Type
name: type
required: false
type: 15
defaultvalue: BMC Remedyforce Service Request
options:
- BMC Remedyforce Incident
- BMC Remedyforce Service Request
required: false
type: 15
- additionalinfo: Incidents will be fetched having this category.
display: Category
name: category
Expand All @@ -55,21 +62,21 @@ configuration:
required: false
type: 0
- additionalinfo: Maximum numbers of ServiceRequests or Incidents to retrieve per fetch.
defaultvalue: '10'
display: Max Incidents
name: max_fetch
required: false
type: 0
defaultvalue: '10'
- additionalinfo: Fetch notes of the BMC Remedyforce Service Request or BMC Remedyforce Incident.
display: Fetch Note(s)
name: fetch_note
required: false
type: 8
- additionalinfo: Incidents will be fetched based on the query. Name and LastModifiedDate fields are mandatory to be present inside the select clause of the query. Multiple 'where' clauses are not supported.
display: Query (If provided other filtering parameters will be ignored) e.g. select Name, LastModifiedDate from BMCServiceDesk__Incident__c where BMCServiceDesk__Impact_Id__c = 'High'
- display: Query (If provided other filtering parameters will be ignored) e.g. select Name, LastModifiedDate from BMCServiceDesk__Incident__c where BMCServiceDesk__Impact_Id__c = 'High'
name: query
required: false
type: 12
additionalinfo: Incidents will be fetched based on the query. Name and LastModifiedDate fields are mandatory to be present inside the select clause of the query. Multiple 'where' clauses are not supported.
- display: Incident type
name: incidentType
required: false
Expand All @@ -82,12 +89,12 @@ configuration:
name: proxy
required: false
type: 8
- additionalinfo: Specify the time interval in seconds. All the RemedyForce API calls would timeout if the response is not returned within the configured time interval.
defaultvalue: '60'
display: HTTP(S) Request Timeout (in seconds)
- display: HTTP(S) Request Timeout (in seconds)
name: request_timeout
required: true
type: 0
additionalinfo: Specify the time interval in seconds. All the RemedyForce API calls would timeout if the response is not returned within the configured time interval.
defaultvalue: '60'
- display: Fetch incidents
name: isFetch
required: false
Expand All @@ -97,6 +104,7 @@ configuration:
name: first_fetch
required: false
type: 0

description: BMC Helix Remedyforce integration enables customers to create/update service requests and incidents, update statuses, and resolve service requests and incidents with customer notes. This integration exposes standard ticketing capabilities that can be utilized as part of automation & orchestration.
display: BMC Helix Remedyforce
name: BMCHelixRemedyforce
Expand Down
1 change: 1 addition & 0 deletions Packs/BmcHelixRemedyForce/ReleaseNotes/1_0_30.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#### Integrations
##### BMC Helix Remedyforce

- Updated the Docker image to: *demisto/python3:3.10.12.63474*.
9 changes: 9 additions & 0 deletions Packs/BmcHelixRemedyForce/ReleaseNotes/1_0_31.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

#### Integrations

##### BMC Helix Remedyforce

- You can now use credentials when configuring the following fields:
- *Username*
- *Password*
- Updated the Docker image to: *demisto/python3:3.10.12.63474*.
2 changes: 1 addition & 1 deletion Packs/BmcHelixRemedyForce/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Bmc Helix Remedyforce",
"description": "Integration of BMC Helix Remedyforce with Cortex XSOAR. BMC Helix Remedyforce integration allows customers to create/update service requests and incidents. It also allows to update status, resolve service requests and incidents with customer notes. This integration exposes standard ticketing capabilities that can be utilized as part of automation & orchestration.",
"support": "xsoar",
"currentVersion": "1.0.30",
"currentVersion": "1.0.31",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
2 changes: 0 additions & 2 deletions Packs/GoogleCloudFunctions/.pack-ignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
[file:README.md]
ignore=RM106

[file:GoogleCloudFunctions.yml]
ignore=IN145
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,15 @@ def resolve_default_project_id(project: str, credentials_json: dict):


def main():
credentials_json = json.loads(demisto.params().get('credentials_json', {}))
project = demisto.params().get('project_id')
params = demisto.params()
credentials_json = json.loads(
params.get('project_id_creds', {}).get('password') or params.get('credentials_json', {}))
project = params.get('project_id_creds', {}).get('identifier') or params.get('project_id')
project = resolve_default_project_id(project, credentials_json)
region = demisto.params().get('region')
region = params.get('region')
region = resolve_default_region(region)
proxy = demisto.params().get('proxy', False)
insecure = demisto.params().get('insecure', False)
proxy = params.get('proxy', False)
insecure = params.get('insecure', False)
scopes = ['https://www.googleapis.com/auth/cloud-platform']
client = GoogleClient('cloudfunctions', 'v1', credentials_json, scopes, proxy, insecure, project=project,
region=region)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,19 @@ commonfields:
configuration:
- display: Service account private key file contents (JSON)
name: credentials_json
required: true
required: false
type: 4
hidden: true
- display: Default project ID
name: project_id_creds
required: false
type: 9
displaypassword: Service account private key file contents (JSON)
- display: Default project ID
name: project_id
required: false
type: 0
hidden: true
- display: Default region
name: region
required: false
Expand All @@ -23,6 +30,7 @@ configuration:
name: insecure
required: false
type: 8

description: Google Cloud Functions is an event-driven serverless compute platform that enables you to run your code locally or in the cloud without having to provision servers.
display: Google Cloud Functions
name: Google Cloud Functions
Expand Down Expand Up @@ -148,10 +156,12 @@ script:
- contextPath: GoogleCloudFunctions.Execution.error
description: Either a system or user-function generated error. Set if the execution was not successful.
type: String
dockerimage: demisto/google-api-py3:1.0.0.45941
dockerimage: demisto/google-api-py3:1.0.0.64100
isfetch: false
runonce: false
script: '-'
type: python
subtype: python3
fromversion: 5.0.0
tests:
- No tests (auto formatted)
9 changes: 9 additions & 0 deletions Packs/GoogleCloudFunctions/ReleaseNotes/1_0_26.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

#### Integrations

##### Google Cloud Functions

- You can now use credentials when configuring the following fields:
- *Default project ID*
- *Service account private key file contents (JSON)*
- Updated the Docker image to: *demisto/google-api-py3:1.0.0.64100*.
2 changes: 1 addition & 1 deletion Packs/GoogleCloudFunctions/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Google Cloud Functions",
"description": "Google Cloud Functions",
"support": "xsoar",
"currentVersion": "1.0.25",
"currentVersion": "1.0.26",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
3 changes: 0 additions & 3 deletions Packs/Incapsula/.pack-ignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
[file:Incapsula]
ignore=PA116

[file:Incapsula.yml]
ignore=IN145

[file:Incapsula_image.png]
ignore=IM111

Expand Down
4 changes: 2 additions & 2 deletions Packs/Incapsula/Integrations/Incapsula/Incapsula.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var apiid = params.apiid;
var apikey = params.apikey;
var apiid = params.creds ? params.creds.identifier : params.apiid;
var apikey = params.creds ? params.creds.password : params.apikey;
var base = 'https://my.incapsula.com';
var proxy = params.proxy;

Expand Down
14 changes: 11 additions & 3 deletions Packs/Incapsula/Integrations/Incapsula/Incapsula.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,24 @@ configuration:
name: apiid
defaultvalue: ""
type: 0
required: true
required: false
hidden: true
- display: API key
name: apikey
defaultvalue: ""
type: 4
required: true
required: false
hidden: true
- display: API ID
name: creds
type: 9
required: false
displaypassword: API key
- display: Use system proxy settings
name: proxy
type: 8
required: false
type: 8

script:
script: ''
type: javascript
Expand Down
8 changes: 8 additions & 0 deletions Packs/Incapsula/ReleaseNotes/1_1_2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

#### Integrations

##### Imperva Incapsula

- You can now use credentials when configuring the following fields:
- *API ID*
- *API key*
4 changes: 2 additions & 2 deletions Packs/Incapsula/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Imperva Incapsula",
"description": "Uses Incapsula to manage sites and IPs",
"support": "xsoar",
"currentVersion": "1.1.1",
"currentVersion": "1.1.2",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand All @@ -17,4 +17,4 @@
"xsoar",
"marketplacev2"
]
}
}
3 changes: 2 additions & 1 deletion Packs/opswat-metadefender/.pack-ignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[file:OPSWATMetadefenderV2.yml]
ignore=IN126,IN135,IN145,IN153
ignore=IN126,IN135,IN153

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
PARAMS = demisto.params()
BASE_URL = PARAMS['url'] + '/' if PARAMS['url'][-1] != '/' else PARAMS['url']
USE_SSL = not PARAMS.get('insecure', False)
API_KEY = PARAMS.get('api_key', '')
API_KEY = PARAMS.get('api_key_creds', {}).get('password') or PARAMS.get('api_key', '')
USE_CLOUD = PARAMS.get('cloud', False)
HIGH_THRESHOLD = int(PARAMS.get('highPercnt', 66))
LOW_THRESHOLD = int(PARAMS.get('lowPercnt', 34))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,17 @@ configuration:
defaultvalue: ""
type: 4
required: false
hidden: true
- name: api_key_creds
type: 9
required: false
displaypassword: API Key - Needed in cloud based solutions
hiddenusername: true
- display: Cloud based
name: cloud
defaultvalue: "false"
type: 8
required: false
defaultvalue: 'false'
- display: Trust any certificate (not secure)
name: insecure
type: 8
Expand All @@ -31,14 +37,15 @@ configuration:
required: false
- display: The high threshold
name: highPercnt
defaultvalue: "66"
defaultvalue: '66'
type: 0
required: false
- display: The low threshold
- defaultvalue: '34'
display: The low threshold
name: lowPercnt
defaultvalue: "34"
type: 0
required: false
type: 0

script:
script: ''
type: python
Expand Down Expand Up @@ -71,7 +78,7 @@ script:
default: true
description: OPSWAT scan id
description: Get OPSWAT result
dockerimage: demisto/python3:3.10.11.61265
dockerimage: demisto/python3:3.10.12.63474
subtype: python3
runonce: false
tests:
Expand Down
7 changes: 7 additions & 0 deletions Packs/opswat-metadefender/ReleaseNotes/1_0_8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

#### Integrations

##### OPSWAT-Metadefender v2

- You can now use credentials when configuring the *API Key - Needed in cloud based solutions* field.
- Updated the Docker image to: *demisto/python3:3.10.12.63474*.
2 changes: 1 addition & 1 deletion Packs/opswat-metadefender/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "OPSWAT-Metadefender",
"description": "multi-scanning engine uses 30+ anti-malware engines to scan files for threats, significantly increasing malware detection.",
"support": "xsoar",
"currentVersion": "1.0.7",
"currentVersion": "1.0.8",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down

0 comments on commit 603f33f

Please sign in to comment.