Skip to content

Commit

Permalink
add port param and improve writer json creds param doc (#14297)
Browse files Browse the repository at this point in the history
  • Loading branch information
Itay4 authored Aug 15, 2021
1 parent d15256f commit 3b00b75
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 4 deletions.
7 changes: 4 additions & 3 deletions Packs/Devo/Integrations/Devo_v2/Devo_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
FETCH_INCIDENTS_FILTER = demisto.params().get('fetch_incidents_filters', None)
FETCH_INCIDENTS_DEDUPE = demisto.params().get('fetch_incidents_deduplication', None)
TIMEOUT = demisto.params().get('timeout', '60')
PORT = arg_to_number(demisto.params().get('port', '443') or '443')
HEALTHCHECK_WRITER_RECORD = [{'hello': 'world', 'from': 'demisto-integration'}]
HEALTHCHECK_WRITER_TABLE = 'test.keep.free'
RANGE_PATTERN = re.compile('^[0-9]+ [a-zA-Z]+')
Expand Down Expand Up @@ -163,7 +164,7 @@ def check_configuration():

if WRITER_RELAY and WRITER_CREDENTIALS:
creds = get_writer_creds()
Sender(SenderConfigSSL(address=(WRITER_RELAY, 443),
Sender(SenderConfigSSL(address=(WRITER_RELAY, PORT),
key=creds['key'].name, cert=creds['crt'].name, chain=creds['chain'].name))\
.send(tag=HEALTHCHECK_WRITER_TABLE, msg=f'{HEALTHCHECK_WRITER_RECORD}')

Expand Down Expand Up @@ -553,7 +554,7 @@ def write_to_table_command():
creds = get_writer_creds()
linq = f"from {table_name}"

sender = Sender(SenderConfigSSL(address=(WRITER_RELAY, 443),
sender = Sender(SenderConfigSSL(address=(WRITER_RELAY, PORT),
key=creds['key'].name, cert=creds['crt'].name, chain=creds['chain'].name))

for r in records:
Expand Down Expand Up @@ -600,7 +601,7 @@ def write_to_lookup_table_command():

creds = get_writer_creds()

engine_config = SenderConfigSSL(address=(WRITER_RELAY, 443),
engine_config = SenderConfigSSL(address=(WRITER_RELAY, PORT),
key=creds['key'].name,
cert=creds['crt'].name,
chain=creds['chain'].name)
Expand Down
5 changes: 5 additions & 0 deletions Packs/Devo/Integrations/Devo_v2/Devo_v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ configuration:
defaultvalue: https://apiv2-us.devo.com/search/query
type: 0
required: true
- display: Port (e.g. 443)
name: port
defaultvalue: 443
type: 0
required: false
- display: OAuth Token (Preferred method)
name: reader_oauth_token
defaultvalue: ""
Expand Down
5 changes: 5 additions & 0 deletions Packs/Devo/Integrations/Devo_v2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ of the time that other traditional time series databases can't.
3. Click __Add instance__ to create and configure a new integration instance.
* __Name__: a textual name for the integration instance.
* __Query Server Endpoint (e.g. `https://apiv2-us.devo.com/search/query`)__
* __Port (e.g. 443)__
* __Oauth Token (Preferred method)__
* __Writer relay to connect to (e.g. us.elb.relay.logtrust.net)__ *Optional*
* __Writer JSON credentials__ *Optional*
Expand All @@ -57,6 +58,10 @@ of the time that other traditional time series databases can't.
"chain": string
}
```
The JSON should be given in one line, and new lines should be replaced with `\n`, for example:
```
{"key": "-----BEGIN RSA PRIVATE KEY-----\n\n...\n-----END RSA PRIVATE KEY-----", "crt": "-----BEGIN CERTIFICATE-----\n\n...\n-----END CERTIFICATE-----", "chain": "-----BEGIN CERTIFICATE-----\n\n...\n-----END CERTIFICATE-----"}
```
* __Devo base domain__ *Optional*
* __Use system proxy settings__ *Optional*
* __Fetch incidents__ *Optional*
Expand Down
4 changes: 4 additions & 0 deletions Packs/Devo/ReleaseNotes/1_1_3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@

#### Integrations
##### Devo v2
- Added the *Port* parameter.
2 changes: 1 addition & 1 deletion Packs/Devo/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Devo",
"description": "Use the Devo integration to query Devo for alerts, lookup tables, and to write to lookup tables.",
"support": "xsoar",
"currentVersion": "1.1.2",
"currentVersion": "1.1.3",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down

0 comments on commit 3b00b75

Please sign in to comment.