diff --git a/Packs/Salesforce/.pack-ignore b/Packs/Salesforce/.pack-ignore index 5390cd9babc3..23cde1c1fb2b 100644 --- a/Packs/Salesforce/.pack-ignore +++ b/Packs/Salesforce/.pack-ignore @@ -1,5 +1,5 @@ [file:Salesforce.yml] -ignore=IN126,IN145 +ignore=IN126 [file:classifier-User_Profile_-_Salesforce_(Incoming).json] ignore=MP106 @@ -8,7 +8,7 @@ ignore=MP106 ignore=MP106 [file:Salesforce_IAM.yml] -ignore=BA108,BA109,IN145 +ignore=BA108,BA109 [file:Salesforce_image.png] ignore=IM111 diff --git a/Packs/Salesforce/Integrations/Salesforce/README.md b/Packs/Salesforce/Integrations/Salesforce/README.md index 99a35ccc6dca..c677df3be2fc 100644 --- a/Packs/Salesforce/Integrations/Salesforce/README.md +++ b/Packs/Salesforce/Integrations/Salesforce/README.md @@ -1662,3 +1662,105 @@
6. Go to “Manage Connected Apps”.
7. Edit the new application and under “OAuth Policies” enable all IP address.
+### salesforce-get-casecomment + +*** +Returns a comment through the case number. + +#### Base Command + +`salesforce-get-casecomment` + +#### Input + +| **Argument Name** | **Description** | **Required** | +| --- | --- | --- | +| oid | Returns information of a case. | Optional | +| caseNumber | The case number of the case. | Optional | + +#### Context Output + +| **Path** | **Type** | **Description** | +| --- | --- | --- | +| ID | string | The ID of the case. | +| ParentId | string | The ID of the parent case of the case comment. Required. | +| IsPublished | boolean | Whether the case comment is visible to customers in the Self-Service portal \(true\). The label is published. This is the only CaseComment field that can be updated through the API. | +| CommentBody | string | The text of the case body. Maximum size is 4,000 bytes. The label is Body. | +| CreatedById | unknown | The created date by ID. | +| CreatedDate | string | The created date. | +| SystemModstamp | string | The SystemMod stamp. | +| LastModifiedDate | string | The last modified date. | +| LastModifiedById | string | The last modified date by ID. | +| IsDeleted | boolean | Whether the object has been moved to the Recycle Bin \(true\). Label is Deleted. | +### salesforce-post-casecomment + +*** +The post comment through the case number. + +#### Base Command + +`salesforce-post-casecomment` + +#### Input + +| **Argument Name** | **Description** | **Required** | +| --- | --- | --- | +| oid | The Object ID of the case. | Optional | +| caseNumber | The case number of the case. | Optional | +| text | Added Text to context. | Optional | + +#### Context Output + +There is no context output for this command. +### salesforce-get-user + +*** +Returns the UserName through the case number. + +#### Base Command + +`salesforce-get-user` + +#### Input + +| **Argument Name** | **Description** | **Required** | +| --- | --- | --- | +| oid | The Object ID of the case. | Optional | +| caseNumber | The case number of the case. | Optional | + +#### Context Output + +| **Path** | **Type** | **Description** | +| --- | --- | --- | +| ID | string | The ID of the case. | +| Alias | string | The user’s alias. Required. For example, jsmith. | +| CommunityNickname | string | The name used to identify the user in the Community application, which includes the ideas and answers features. | +| CreatedById | string | Created by the ID. | +| Email | string | The user’s email address. Required. | +| LastLoginDate | string | The time and date when the user last successfully logged in. This value is updated if 60 seconds have elapsed since the user’s last login. | +| LastModifiedDate | string | The last modified date. | +| LastName | string | The user’s last name. Required. | +| Name | string | Concatenation of FirstName and LastName. Limited to 121 characters. | +| Username | string | Contains the name that a user enters to log in to the API or the user interface. Required. Must be in the form of an email address, all characters should be lowercase, and unique across all organizations. Each added user counts as a license. Every organization has a maximum number of licenses. If you attempt to exceed the maximum number of licenses by inserting user records, the attempt to create a user is rejected. | +| UserRoleId | string | The ID of the user’s UserRole. Label is Role ID. | +### salesforce-get-org + +*** +Returns organization details from the case number. + +#### Base Command + +`salesforce-get-org` + +#### Input + +| **Argument Name** | **Description** | **Required** | +| --- | --- | --- | +| caseNumber | The case number of the case. | Optional | + +#### Context Output + +| **Path** | **Type** | **Description** | +| --- | --- | --- | +| ID | string | The unique ID of the case. | +| Name | string | Name of the account. Required. Label is Account Name. Maximum size is 255 characters. If the account has a record type of Person Account, this value is the concatenation of the FirstName, MiddleName, LastName, and Suffix of the associated person contact. You cannot modify this value. | diff --git a/Packs/Salesforce/Integrations/Salesforce/Salesforce.js b/Packs/Salesforce/Integrations/Salesforce/Salesforce.js index 89c8f3b0e47c..0fbb4c53e984 100644 --- a/Packs/Salesforce/Integrations/Salesforce/Salesforce.js +++ b/Packs/Salesforce/Integrations/Salesforce/Salesforce.js @@ -2,10 +2,14 @@ var URI_PREFIX = '/services/data/v39.0/'; var SESSION_DATA = ''; function getNewToken() { + var client_id = params.credentials_client_secret !== null ? params.credentials_client_secret.identifier : params.clientID; + var client_secret = params.credentials_client_secret !== null ? params.credentials_client_secret.password : params.clientSecret; + if (client_id === null || client_secret === null) + return('Consumer Key and Consumer Secret must be provided.') var request = { grant_type: 'password', - client_id: params.clientID, - client_secret: params.clientSecret, + client_id: client_id, + client_secret: client_secret, username: params.credentials.identifier, password: params.credentials.password }; diff --git a/Packs/Salesforce/Integrations/Salesforce/Salesforce.yml b/Packs/Salesforce/Integrations/Salesforce/Salesforce.yml index 880963a3dd11..cf4f9fd1383c 100644 --- a/Packs/Salesforce/Integrations/Salesforce/Salesforce.yml +++ b/Packs/Salesforce/Integrations/Salesforce/Salesforce.yml @@ -20,12 +20,19 @@ configuration: name: clientID defaultvalue: "" type: 0 - required: true + required: false + hidden: true - display: Consumer Secret name: clientSecret defaultvalue: "" type: 4 - required: true + required: false + hidden: true +- display: Consumer Key + displaypassword: Consumer Secret + name: credentials_client_secret + required: false + type: 9 - display: Trust any certificate (not secure) name: insecure type: 8 diff --git a/Packs/Salesforce/Integrations/Salesforce_IAM/Salesforce_IAM.py b/Packs/Salesforce/Integrations/Salesforce_IAM/Salesforce_IAM.py index 93f670bbcb15..9972aad6aafe 100644 --- a/Packs/Salesforce/Integrations/Salesforce_IAM/Salesforce_IAM.py +++ b/Packs/Salesforce/Integrations/Salesforce_IAM/Salesforce_IAM.py @@ -1,8 +1,10 @@ import demistomock as demisto from CommonServerPython import * +import urllib3 + # Disable insecure warnings -requests.packages.urllib3.disable_warnings() +urllib3.disable_warnings() DEFAULT_OUTGOING_MAPPER = "User Profile - Salesforce (Outgoing)" @@ -397,9 +399,10 @@ def main(): username = params.get('credentials').get('identifier') password = params.get('credentials').get('password') - client_id = params.get('consumer_key') - client_secret = params.get('consumer_secret') - + client_id = params.get('credentials_consumer', {}).get('identifier') or params.get('consumer_key') + client_secret = params.get('credentials_consumer', {}).get('password') or params.get('consumer_secret') + if not (client_id and client_secret): + return_error('Consumer Key and Consumer Secret must be provided.') verify_certificate = not params.get('insecure', False) proxy = params.get('proxy', False) diff --git a/Packs/Salesforce/Integrations/Salesforce_IAM/Salesforce_IAM.yml b/Packs/Salesforce/Integrations/Salesforce_IAM/Salesforce_IAM.yml index f7c1c9d69846..a35fcdeda4e4 100644 --- a/Packs/Salesforce/Integrations/Salesforce_IAM/Salesforce_IAM.yml +++ b/Packs/Salesforce/Integrations/Salesforce_IAM/Salesforce_IAM.yml @@ -13,12 +13,20 @@ configuration: type: 9 - display: Consumer Key name: consumer_key - required: true + required: false type: 4 + hidden: true - display: Consumer Secret name: consumer_secret - required: true + required: false type: 4 + hidden: true +- display: Consumer Key + name: credentials_consumer + required: false + type: 9 + displaypassword: Consumer Secret + section: Connect - display: Trust any certificate (not secure) name: insecure required: false @@ -279,7 +287,7 @@ script: description: Retrieves a User Profile schema which holds all of the user fields within the application. Used for outgoing-mapping through the Get Schema option. execution: false name: get-mapping-fields - dockerimage: demisto/python3:3.10.5.31797 + dockerimage: demisto/python3:3.10.12.62631 feed: false isfetch: false longRunning: false diff --git a/Packs/Salesforce/ReleaseNotes/2_0_13.md b/Packs/Salesforce/ReleaseNotes/2_0_13.md new file mode 100644 index 000000000000..f2ac97af2bb6 --- /dev/null +++ b/Packs/Salesforce/ReleaseNotes/2_0_13.md @@ -0,0 +1,9 @@ + +#### Integrations + +##### Salesforce IAM +- Added the *Consumer Key* and *Consumer Secret* integration parameters to support credentials fetching object. +- Updated the Docker image to: *demisto/python3:3.10.12.62631*. + +##### Salesforce +Added the *Consumer Key* and *Consumer Secret* integration parameters to support credentials fetching object. diff --git a/Packs/Salesforce/pack_metadata.json b/Packs/Salesforce/pack_metadata.json index b10afbc1b0f7..c2df69485d0e 100644 --- a/Packs/Salesforce/pack_metadata.json +++ b/Packs/Salesforce/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Salesforce", "description": "CRM Services", "support": "xsoar", - "currentVersion": "2.0.12", + "currentVersion": "2.0.13", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "",