Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Microsoft Align credentials stores -part 23 #27684

Merged
merged 9 commits into from
Jun 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Packs/MicrosoftGraphDeviceManagement/.pack-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ignore=auto-test

[file:MicrosoftGraphDeviceManagement.yml]
ignore=DS107,IN145
ignore=DS107

[known_words]
Intune
Original file line number Diff line number Diff line change
Expand Up @@ -405,15 +405,16 @@ def update_windows_device_account_command(client: MsGraphClient, args: dict) ->
def main():
args: dict = demisto.args()
params: dict = demisto.params()
tenant_id: str = params.get('tenant_id', '')
auth_and_token_url: str = params.get('auth_id', '')
enc_key: str = params.get('enc_key', '')
tenant_id: str = params.get('credentials_tenant_id', {}).get('password') or params.get('tenant_id', '')
auth_and_token_url: str = params.get('credentials_auth_id', {}).get('password') or params.get('auth_id', '')
enc_key: str = params.get('credentials_enc_key', {}).get('password') or params.get('enc_key', '')
base_url: str = urljoin(params.get('url', ''), '/v1.0')
app_name: str = 'ms-graph-device-management'
ok_codes: tuple = (200, 201, 202, 204)
use_ssl: bool = not params.get('insecure', False)
proxy: bool = params.get('proxy', False)
certificate_thumbprint: str = params.get('certificate_thumbprint', '')
certificate_thumbprint: str = params.get('credentials_certificate_thumbprint', {}).get(
'password') or params.get('certificate_thumbprint', '')
private_key: str = params.get('private_key', '')
managed_identities_client_id: Optional[str] = get_azure_managed_identities_client_id(params)
self_deployed: bool = params.get('self_deployed', False) or managed_identities_client_id is not None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,44 @@ configuration:
name: auth_id
required: false
type: 4
hidden: true
- displaypassword: ID or Client ID - see Detailed Instructions (?)
name: credentials_auth_id
required: false
hiddenusername: true
type: 9
- display: Token or Tenant ID - see Detailed Instructions (?)
name: tenant_id
required: false
type: 4
hidden: true
- displaypassword: Token or Tenant ID - see Detailed Instructions (?)
name: credentials_tenant_id
required: false
hiddenusername: true
type: 9
- display: Key or Client Secret - see Detailed Instructions (?)
name: enc_key
required: false
type: 4
hidden: true
- displaypassword: Key or Client Secret - see Detailed Instructions (?)
name: credentials_enc_key
required: false
hiddenusername: true
type: 9
- additionalinfo: Used for certificate authentication. As appears in the "Certificates & secrets" page of the app.
display: Certificate Thumbprint
name: certificate_thumbprint
required: false
type: 4
hidden: true
- displaypassword: Certificate Thumbprint
additionalinfo: Used for certificate authentication. As appears in the "Certificates & secrets" page of the app.
name: credentials_certificate_thumbprint
required: false
hiddenusername: true
type: 9
- additionalinfo: Used for certificate authentication. The private key of the registered certificate.
display: Private Key
name: private_key
Expand Down Expand Up @@ -886,7 +911,7 @@ script:
- contextPath: MSGraphDeviceManagement.Device.PartnerReportedThreatState
description: Indicates the threat state of a device when a Mobile Threat Defense partner is in use by the account and device. Read Only. Possible values are unknown, activated, deactivated, secured, lowSeverity, mediumSeverity, highSeverity, unresponsive, compromised, misconfigured.
type: string
dockerimage: demisto/crypto:1.0.0.62404
dockerimage: demisto/crypto:1.0.0.63672
runonce: false
script: ''
subtype: python3
Expand Down
10 changes: 10 additions & 0 deletions Packs/MicrosoftGraphDeviceManagement/ReleaseNotes/1_1_13.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

#### Integrations

##### Microsoft Endpoint Manager (Intune)
- Added the following integration parameters to support credentials fetching object:
- ID or Client ID.
- Token or Tenant ID.
- Key or Client Secret.
- Certificate Thumbprint.
- Updated the Docker image to: *demisto/crypto:1.0.0.63672*.
2 changes: 1 addition & 1 deletion Packs/MicrosoftGraphDeviceManagement/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Microsoft Graph Device Management",
"description": "Microsoft Graph Device Management",
"support": "xsoar",
"currentVersion": "1.1.12",
"currentVersion": "1.1.13",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
2 changes: 1 addition & 1 deletion Packs/MicrosoftGraphFiles/.pack-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
ignore=auto-test

[file:MicrosoftGraphFiles.yml]
ignore=DS107,IN145
ignore=DS107
Original file line number Diff line number Diff line change
Expand Up @@ -814,13 +814,14 @@ def delete_file_command(client: MsGraphClient, args):
def main():
params: dict = demisto.params()
base_url: str = params.get('host', '').rstrip('/') + '/v1.0/'
tenant = params.get('tenant_id')
auth_id = params.get('auth_id')
enc_key = params.get('enc_key')
tenant = params.get('credentials_tenant_id', {}).get('password') or params.get('tenant_id')
auth_id = params.get('credentials_auth_id', {}).get('password') or params.get('auth_id')
enc_key = params.get('credentials_enc_key', {}).get('password') or params.get('enc_key')
use_ssl: bool = not params.get('insecure', False)
proxy: bool = params.get('proxy', False)
ok_codes: tuple = (200, 204, 201)
certificate_thumbprint = params.get('certificate_thumbprint')
certificate_thumbprint = params.get('credentials_certificate_thumbprint', {}).get(
'password') or params.get('certificate_thumbprint')
private_key = params.get('private_key')
managed_identities_client_id: Optional[str] = get_azure_managed_identities_client_id(params)
self_deployed: bool = params.get('self_deployed', False) or managed_identities_client_id is not None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,44 @@ configuration:
name: auth_id
required: false
type: 4
hidden: true
- name: credentials_auth_id
required: false
type: 9
displaypassword: ID (received from the admin consent - see Detailed Instructions)
hiddenusername: true
- display: Token (received from the admin consent - see Detailed Instructions)
name: tenant_id
required: false
type: 4
hidden: true
- name: credentials_tenant_id
required: false
type: 9
displaypassword: Token (received from the admin consent - see Detailed Instructions)
hiddenusername: true
- display: Key (received from the admin consent - see Detailed Instructions)
name: enc_key
required: false
type: 4
hidden: true
- name: credentials_enc_key
required: false
type: 9
displaypassword: Key (received from the admin consent - see Detailed Instructions)
hiddenusername: true
- additionalinfo: Used for certificate authentication. As appears in the "Certificates & secrets" page of the app.
display: Certificate Thumbprint
name: certificate_thumbprint
required: false
type: 4
hidden: true
- name: credentials_certificate_thumbprint
required: false
type: 9
additionalinfo: Used for certificate authentication. As appears in the "Certificates & secrets" page of the app.
displaypassword: Certificate Thumbprint
hiddenusername: true
- additionalinfo: Used for certificate authentication. The private key of the registered certificate.
display: Private Key
name: private_key
Expand Down Expand Up @@ -610,7 +635,7 @@ script:
- contextPath: File.MD5
description: The MD5 hash of the file.
type: String
dockerimage: demisto/python_pancloud:1.0.0.49449
dockerimage: demisto/python_pancloud:1.0.0.60733
runonce: false
script: ''
subtype: python3
Expand Down
10 changes: 10 additions & 0 deletions Packs/MicrosoftGraphFiles/ReleaseNotes/1_1_13.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

#### Integrations

##### O365 File Management (Onedrive/Sharepoint/Teams)
- Added the following integration parameters to support credentials fetching object:
- ID.
- Token.
- Key.
- Certificate Thumbprint.
- Updated the Docker image to: *demisto/python_pancloud:1.0.0.60733*.
2 changes: 1 addition & 1 deletion Packs/MicrosoftGraphFiles/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Microsoft Graph Files",
"description": "Use the O365 File Management (Onedrive/Sharepoint/Teams) integration to enable your app get authorized access to files in OneDrive, SharePoint, and MS Teams across your entire organization. This integration requires admin consent.",
"support": "xsoar",
"currentVersion": "1.1.12",
"currentVersion": "1.1.13",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
2 changes: 1 addition & 1 deletion Packs/MicrosoftGraphGroups/.pack-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ ignore=auto-test
ignore=RM106

[file:MicrosoftGraphGroups.yml]
ignore=DS107,IN145,IN124
ignore=DS107,IN124
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,8 @@ def main():
auth_code = params.get('creds_auth_code', {}).get('password', '') or params.get('auth_code', '')
proxy = params.get('proxy')
handle_error: bool = argToBoolean(params.get('handle_error', 'true'))
certificate_thumbprint = params.get('certificate_thumbprint')
certificate_thumbprint = params.get('credentials_certificate_thumbprint', {}).get(
'password', '') or params.get('certificate_thumbprint')
private_key = params.get('private_key')
managed_identities_client_id = get_azure_managed_identities_client_id(params)
self_deployed: bool = params.get('self_deployed', False) or managed_identities_client_id is not None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@ configuration:
name: certificate_thumbprint
required: false
type: 4
hidden: true
- displaypassword: Certificate Thumbprint
additionalinfo: Used for certificate authentication. As appears in the "Certificates & secrets" page of the app.
name: credentials_certificate_thumbprint
required: false
hiddenusername: true
type: 9
- additionalinfo: Used for certificate authentication. The private key of the registered certificate.
name: private_key
required: false
Expand Down
5 changes: 5 additions & 0 deletions Packs/MicrosoftGraphGroups/ReleaseNotes/1_1_22.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

#### Integrations

##### Azure Active Directory Groups
- Added the *Certificate Thumbprint* integration parameters to support credentials fetching object.
2 changes: 1 addition & 1 deletion Packs/MicrosoftGraphGroups/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Microsoft Graph Groups",
"description": "Microsoft Graph Groups enables you to create and manage different types of groups and group functionality according to your requirements.",
"support": "xsoar",
"currentVersion": "1.1.21",
"currentVersion": "1.1.22",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
2 changes: 1 addition & 1 deletion Packs/MicrosoftManagementActivity/.pack-ignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[file:MicrosoftManagementActivity.yml]
ignore=IN126,IN145
ignore=IN126
Original file line number Diff line number Diff line change
Expand Up @@ -544,14 +544,16 @@ def main():
command = demisto.command()
LOG(f'Command being called is {command}')
try:
refresh_token = params.get('refresh_token', '')
refresh_token = params.get('credentials_refresh_token', {}).get('password') or params.get('refresh_token', '')
managed_identities_client_id = get_azure_managed_identities_client_id(params)
self_deployed = params.get('self_deployed', False) or managed_identities_client_id is not None
redirect_uri = params.get('redirect_uri', '')
tenant_id = refresh_token if self_deployed else ''
auth_id = params.get('auth_id')
enc_key = params.get('enc_key')
certificate_thumbprint = params.get('certificate_thumbprint')
auth_id = params.get('credentials_auth_id', {}).get('password') or params.get('auth_id')
enc_key = params.get('credentials_enc_key', {}).get('password') or params.get('enc_key')
auth_code = params.get('credentials_auth_code', {}).get('password') or params.get('auth_code', '')
certificate_thumbprint = params.get('credentials_certificate_thumbprint', {}).get(
'password') or params.get('certificate_thumbprint')
private_key = params.get('private_key')

if not managed_identities_client_id:
Expand All @@ -578,7 +580,7 @@ def main():
auth_and_token_url=auth_id,
timeout=calculate_timeout_value(params=params, args=args),
enc_key=enc_key,
auth_code=params.get('auth_code', ''),
auth_code=auth_code,
redirect_uri=redirect_uri,
certificate_thumbprint=certificate_thumbprint,
private_key=private_key,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,55 @@ configuration:
required: false
type: 4
section: Connect
- display: Key or Client Secret
hidden: true
- displaypassword: Application ID or Client ID
additionalinfo: See the Help tab.
name: enc_key
name: credentials_auth_id
required: false
type: 4
hiddenusername: true
section: Connect
type: 9
- display: Token or Tenant ID
additionalinfo: See the Help tab.
name: refresh_token
required: false
type: 4
section: Connect
hidden: true
- displaypassword: Token or Tenant ID
additionalinfo: See the Help tab.
name: credentials_refresh_token
required: false
hiddenusername: true
type: 9
section: Connect
- display: Key or Client Secret
additionalinfo: See the Help tab.
name: enc_key
required: false
type: 4
section: Connect
hidden: true
- displaypassword: Key or Client Secret
additionalinfo: See the Help tab.
name: credentials_enc_key
required: false
hiddenusername: true
type: 9
section: Connect
- additionalinfo: Used for certificate authentication as it appears in the "Certificates & secrets" page of the app.
display: Certificate Thumbprint
name: certificate_thumbprint
required: false
type: 4
hidden: true
section: Connect
- displaypassword: Certificate Thumbprint
additionalinfo: Used for certificate authentication as it appears in the "Certificates & secrets" page of the app.
name: credentials_certificate_thumbprint
required: false
hiddenusername: true
type: 9
section: Connect
- additionalinfo: Used for certificate authentication. The private key of the registered certificate.
display: Private Key
Expand All @@ -47,7 +79,7 @@ configuration:
required: false
type: 8
section: Connect
advanced: true
advanced: false
- display: Application redirect URI (for self-deployed mode)
name: redirect_uri
required: false
Expand All @@ -60,6 +92,13 @@ configuration:
required: false
type: 4
section: Connect
hidden: true
- displaypassword: The authentication code you got for the service
additionalinfo: For instructions on how to receive it, see the Help tab.
name: credentials_auth_code
required: false
hiddenusername: true
type: 9
- additionalinfo: Relevant only if the integration is running on Azure VM.
If selected, authenticates based on the value provided for the Azure Managed Identities Client ID field.
If no value is provided for the Azure Managed Identities Client ID field, authenticates based on the System Assigned Managed Identity.
Expand Down
10 changes: 10 additions & 0 deletions Packs/MicrosoftManagementActivity/ReleaseNotes/1_3_20.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

#### Integrations

##### Microsoft Management Activity API (O365 Azure Events)
- Added the following integration parameters to support credentials fetching object:
- Application ID or Client ID.
- Key or Client Secret.
- Certificate Thumbprint.
- Token or Tenant ID.
- The authentication code.
2 changes: 1 addition & 1 deletion Packs/MicrosoftManagementActivity/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Microsoft Management Activity API (O365/Azure Events)",
"description": "An integration for Microsoft's management activity API, which enables you to fetch content records and manage your subscriptions.",
"support": "xsoar",
"currentVersion": "1.3.19",
"currentVersion": "1.3.20",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down