Skip to content

Commit d885347

Browse files
authored
fix: update Microsoft Defender ATP integration parameters to use encr… (#41204)
* fix: update Microsoft Defender ATP integration parameters to use encrypted types * fix: update auth parameter types to encrypted and fix password retrieval in Microsoft Defender ATP * fix: change display to displaypassword for hidden auth fields in Microsoft Defender ATP integration * fix: replace deprecated _pytest.python_api.raises with pytest.raises * Creating new parameters to avoid BC
1 parent 9bf879e commit d885347

File tree

5 files changed

+28
-6
lines changed

5 files changed

+28
-6
lines changed

Packs/MicrosoftDefenderAdvancedThreatProtection/Integrations/MicrosoftDefenderAdvancedThreatProtection/MicrosoftDefenderAdvancedThreatProtection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6129,8 +6129,8 @@ def main(): # pragma: no cover
61296129
params_endpoint_type = params.get("endpoint_type") or "Worldwide"
61306130
params_url = params.get("url")
61316131
is_gcc = params.get("is_gcc", False)
6132-
tenant_id = params.get("tenant_id") or params.get("_tenant_id")
6133-
auth_id = params.get("_auth_id") or params.get("auth_id")
6132+
tenant_id = params.get("tenant_id") or params.get("_tenant_id") or params.get("_tenant_id_encrypted", {}).get("password")
6133+
auth_id = params.get("_auth_id") or params.get("auth_id") or params.get("_auth_id_encrypted", {}).get("password")
61346134
enc_key = (params.get("credentials") or {}).get("password") or params.get("enc_key")
61356135
use_ssl: bool = not params.get("insecure", False)
61366136
proxy: bool = params.get("proxy", False)

Packs/MicrosoftDefenderAdvancedThreatProtection/Integrations/MicrosoftDefenderAdvancedThreatProtection/MicrosoftDefenderAdvancedThreatProtection.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,30 @@ configuration:
2424
- Custom
2525
advanced: true
2626
required: false
27+
- displaypassword: ID
28+
name: _auth_id_encrypted
29+
type: 9
30+
hiddenusername: true
31+
section: Connect
32+
required: false
33+
- displaypassword: Token
34+
name: _tenant_id_encrypted
35+
type: 9
36+
hiddenusername: true
37+
section: Connect
38+
required: false
2739
- display: ID
2840
name: _auth_id
2941
type: 0
3042
section: Connect
3143
required: false
44+
hidden: true
3245
- display: Token
3346
name: _tenant_id
3447
type: 0
3548
section: Connect
3649
required: false
50+
hidden: true
3751
- displaypassword: Key
3852
section: Connect
3953
name: credentials
@@ -5815,7 +5829,7 @@ script:
58155829
- contextPath: MicrosoftATP.PublicVulnerability.UpdatedOn
58165830
description: The date and time when this vulnerability was last updated.
58175831
type: String
5818-
dockerimage: demisto/crypto:1.0.0.3539024
5832+
dockerimage: demisto/crypto:1.0.0.4578119
58195833
isfetch: true
58205834
runonce: false
58215835
script: '-'

Packs/MicrosoftDefenderAdvancedThreatProtection/Integrations/MicrosoftDefenderAdvancedThreatProtection/MicrosoftDefenderAdvancedThreatProtection_test.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import demistomock as demisto
66
import pytest
77
import requests_mock
8-
from _pytest.python_api import raises
98
from CommonServerPython import DemistoException, snakify
109
from freezegun import freeze_time
1110
from MicrosoftDefenderAdvancedThreatProtection import (
@@ -1081,7 +1080,9 @@ def test_add_error_message(failed_devices, all_requested_devices, expected_resul
10811080
def test_add_error_message_raise_error(failed_devices, all_requested_devices):
10821081
from MicrosoftDefenderAdvancedThreatProtection import add_error_message
10831082

1084-
with raises(DemistoException, match=f"Microsoft Defender ATP The command was failed with the errors: {failed_devices}"):
1083+
with pytest.raises(
1084+
DemistoException, match=f"Microsoft Defender ATP The command was failed with the errors: {failed_devices}"
1085+
):
10851086
add_error_message(failed_devices, all_requested_devices)
10861087

10871088

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
#### Integrations
3+
4+
##### Microsoft Defender for Endpoint
5+
6+
- Updated the Docker image to: *demisto/crypto:1.0.0.4578119*.
7+
- Updated the Microsoft Defender Advanced Threat Protection integration parameters: *ID* and *Token* to be encrypted.

Packs/MicrosoftDefenderAdvancedThreatProtection/pack_metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "Microsoft Defender for Endpoint",
33
"description": "Microsoft Defender for Endpoint (previously Microsoft Defender Advanced Threat Protection (ATP)) is a unified platform for preventative protection, post-breach detection, automated investigation, and response.",
44
"support": "xsoar",
5-
"currentVersion": "1.20.8",
5+
"currentVersion": "1.20.9",
66
"author": "Cortex XSOAR",
77
"url": "https://www.paloaltonetworks.com/cortex",
88
"email": "",

0 commit comments

Comments
 (0)