Skip to content

Commit

Permalink
Align credentials stores integrations- part 20 (demisto#27534)
Browse files Browse the repository at this point in the history
* lign credentials stores integrations- part 20

* Carbon Black Live Response Cloud

* added '.'

* fix rl

* fix unit tests

* raise exception
  • Loading branch information
maimorag authored and xsoar-bot committed Jul 26, 2023
1 parent 486edb0 commit 28eab53
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 16 deletions.
3 changes: 0 additions & 3 deletions Packs/CarbonBlackDefense/.pack-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,3 @@ ignore=IF100

[file:incidentfield-CarbonBlackES_Last_Event_Time.json]
ignore=IF100

[file:CarbonBlackLiveResponseCloud.yml]
ignore=IN145
Original file line number Diff line number Diff line change
Expand Up @@ -332,9 +332,11 @@ def main():

params = demisto.params()
url = params.get('url')
cb_custom_key = params.get('custom_key')
cb_custom_id = params.get('custom_id')
cb_org_key = params.get('org_key')
cb_custom_key = params.get('credentials_api_token_custom_key', {}).get('password') or params.get('custom_key')
cb_custom_id = params.get('credentials_api_token_custom_id', {}).get('password') or params.get('custom_id')
cb_org_key = params.get('credentials_api_token_org_key', {}).get('password') or params.get('org_key')
if not(cb_custom_key and cb_custom_id and cb_org_key):
raise DemistoException('Custom Key, Custom ID and Organization Key must be provided.')
verify_certificate = not params.get('insecure', True)
handle_proxy()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,43 @@ configuration:
- display: Server URL
name: url
type: 0
required: true
required: false
additionalinfo: The URL used to access the Carbon Black Cloud.
- display: Custom Key
name: custom_key
type: 4
required: true
required: false
hidden: true
additionalinfo: The custom key to use for the connection.
- displaypassword: Custom Key
name: credentials_custom_key
required: false
hiddenusername: true
type: 9
additionalinfo: The custom key to use for the connection.
- display: Custom ID
name: custom_id
type: 4
required: true
required: false
hidden: true
additionalinfo: The custom ID to use for the connection.
- displaypassword: Custom ID
name: credentials_custom_id
required: false
hiddenusername: true
type: 9
additionalinfo: The custom ID to use for the connection.
- display: Organization Key
name: org_key
type: 4
required: true
required: false
hidden: true
additionalinfo: The organization key to use for the connection.
- displaypassword: Organization Key
name: credentials_org_key
required: false
hiddenusername: true
type: 9
additionalinfo: The organization key to use for the connection.
- display: Trust any certificate (not secure)
name: insecure
Expand Down Expand Up @@ -295,6 +316,6 @@ script:
description: Performs a memory dump operation on the remote machine.
execution: true
outputs: []
dockerimage: demisto/carbon-black-cloud:1.0.0.61452
dockerimage: demisto/carbon-black-cloud:1.0.0.63664
runonce: false
subtype: python3
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,9 @@ def test_not_implemented_command(self, mocker):
# prepare
not_implemented_command = 'not_implemented'
mocker.patch.object(demisto, 'command', return_value=not_implemented_command)

mocker.patch.object(demisto, 'params', return_value={'custom_key': 'unit test',
'custom_id': 'unit test',
'org_key': 'unit test'})
# run
with pytest.raises(NotImplementedError) as exc_info:
main()
Expand Down
9 changes: 9 additions & 0 deletions Packs/CarbonBlackDefense/ReleaseNotes/3_0_28.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

#### Integrations

##### Carbon Black Live Response Cloud
- Updated the Docker image to: *demisto/carbon-black-cloud:1.0.0.63664*.
- Added the following integration parameters to support credentials fetching object:
- *Custom Key*.
- *Custom ID*.
- *Organization Key*.
2 changes: 1 addition & 1 deletion Packs/CarbonBlackDefense/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Carbon Black Endpoint Standard",
"description": "Next-generation antivirus + EDR in one cloud-delivered platform that stops commodity malware, advanced malware, non-malware attacks and ransomware.",
"support": "xsoar",
"currentVersion": "3.0.27",
"currentVersion": "3.0.28",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
2 changes: 1 addition & 1 deletion Packs/HashiCorp-Vault/.pack-ignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[file:HashiCorpVault.yml]
ignore=IN145,CJ105
ignore=CJ105

[known_words]
HashiCorp
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
USERNAME = CREDENTIALS.get('identifier')
PASSWORD = CREDENTIALS.get('password')
VERIFY_SSL = not demisto.params().get('unsecure', False)
TOKEN = demisto.params().get('token')
TOKEN = demisto.params().get("credentials_token", {}).get('password') or demisto.params().get('token')
NAMESPACE = demisto.params().get('namespace')
USE_APPROLE_AUTH_METHOD = argToBoolean(demisto.params().get('use_approle', 'false') or 'false')
BASE_URL = demisto.params().get('server', '')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ configuration:
defaultvalue: ""
type: 4
required: false
hidden: true
- displaypassword: Authentication token
name: credentials_token
required: false
hiddenusername: true
type: 9
- display: Vault enterprise namespace
name: namespace
defaultvalue: ""
Expand Down
5 changes: 5 additions & 0 deletions Packs/HashiCorp-Vault/ReleaseNotes/1_1_12.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

#### Integrations

##### HashiCorp Vault
Added the *Authentication token* integration parameters to support credentials fetching object.
2 changes: 1 addition & 1 deletion Packs/HashiCorp-Vault/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "HashiCorp Vault",
"description": "Manage Secrets and Protect Sensitive Data through HashiCorp Vault",
"support": "xsoar",
"currentVersion": "1.1.11",
"currentVersion": "1.1.12",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down

0 comments on commit 28eab53

Please sign in to comment.