Skip to content

Commit

Permalink
Align credentials stores part 17 (demisto#27433)
Browse files Browse the repository at this point in the history
* Align credentials stores part 17

* Twilio

* RM110 fix

* fix RL

* Update Packs/Twilio/Integrations/Twilio/Twilio.js

Co-authored-by: Shelly Tzohar <45915502+Shellyber@users.noreply.github.com>

* cr notes

* undo changes

* fix this

* Update Packs/Twilio/ReleaseNotes/1_0_5.md

Co-authored-by: Shelly Tzohar <45915502+Shellyber@users.noreply.github.com>

* Update Packs/Pipl/Integrations/Pipl/Pipl.js

Co-authored-by: Dan Tavori <38749041+dantavori@users.noreply.github.com>

* Pipl fix js

* dan fix

* fix

* Update Packs/Pipl/Integrations/Pipl/Pipl.js

Co-authored-by: Dan Tavori <38749041+dantavori@users.noreply.github.com>

* Update Packs/Twilio/Integrations/Twilio/Twilio.js

Co-authored-by: Dan Tavori <38749041+dantavori@users.noreply.github.com>

---------

Co-authored-by: Shelly Tzohar <45915502+Shellyber@users.noreply.github.com>
Co-authored-by: Dan Tavori <38749041+dantavori@users.noreply.github.com>
  • Loading branch information
3 people authored and xsoar-bot committed Jul 26, 2023
1 parent 3c24c48 commit f6df311
Show file tree
Hide file tree
Showing 11 changed files with 109 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Packs/Pipl/.pack-ignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[file:Pipl.yml]
ignore=IN144,IN145,DB100,IN154
ignore=IN144,DB100,IN154

[file:Pipl_image.png]
ignore=IM111
6 changes: 5 additions & 1 deletion Packs/Pipl/Integrations/Pipl/Pipl.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ var sendRequest = function(args) {

var queryArgs = {};
var argKeys = Object.keys(args);
var key = params.credentials_api_key ? params.credentials_api_key.password : params.key;
if (!key) {
return('API key must be provided.');
}
for (var i = 0; i < argKeys.length; i++) {
queryArgs[argKeys[i].replace('-','_')] = args[argKeys[i]];
}
Expand All @@ -21,7 +25,7 @@ var sendRequest = function(args) {
Headers: {
'Content-Type': ['application/x-www-form-urlencoded']
},
Body: 'key=' + params.key
Body: 'key=' + key
},
params.insecure,
params.proxy
Expand Down
8 changes: 7 additions & 1 deletion Packs/Pipl/Integrations/Pipl/Pipl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ configuration:
name: key
defaultvalue: ""
type: 4
required: true
required: false
hidden: true
- displaypassword: API Key
name: credentials_api_key
required: false
hiddenusername: true
type: 9
- display: Trust any certificate (not secure)
name: insecure
type: 8
Expand Down
64 changes: 64 additions & 0 deletions Packs/Pipl/Integrations/Pipl/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@

### pipl-search

***
Search for required query

#### Base Command

`pipl-search`

#### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| email | Email address to search. | Optional |
| phone | Home/work/mobile phone number to search. | Optional |
| username | Username/screen-name to search. Minimum 4 characters. | Optional |
| first-name | First name to search. Minimum 2 characters. | Optional |
| last-name | Last name to search. Minimum 2 characters. | Optional |
| middle-name | Middle name or middle initial to search. | Optional |
| raw-name | Full name to search. Use this parameter if the accurate name parts (first/middle/last) are not available, this parameter will only be used in absence of first-name and last-name. | Optional |
| country | A two-letter country code to searchs. | Optional |
| state | A United States, Canada, Great Britain or Australia state code. If a US state is provided and no country specified, we’ll assume the country to be US. | Optional |
| city | City to search. | Optional |
| zipcode | ZIP code to search. | Optional |
| raw-address | Full address to search. | Optional |
| age | Age to search in String, an exact (YY) or approximate (YY-YY) age. | Optional |
| columns | Order of columns to be displayed in results (comma seperated list of values). | Optional |

#### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| Account.Email.Address | unknown | Email addresses |
| Account.IDs | unknown | User IDs |
| Account.Addresses | unknown | Addresses \(geographic\) |
| Account.Names | unknown | Full names |
| Account.Phones | unknown | Phone numbers |
| Account.Usernames | unknown | Online platforms usernames |
### email

***
Searches for information regarding given email address

#### Base Command

`email`

#### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| email | Email address to search for. | Required |

#### Context Output

| **Path** | **Type** | **Description** |
| --- | --- | --- |
| Account.Email.Address | unknown | Email addresses |
| Account.IDs | unknown | User IDs |
| Account.Addresses | unknown | Addresses \(geographic\) |
| Account.Names | unknown | Full names |
| Account.Phones | unknown | Phone numbers |
| Account.Usernames | unknown | Online platforms usernames |
5 changes: 5 additions & 0 deletions Packs/Pipl/ReleaseNotes/1_0_6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

#### Integrations

##### Pipl
Added the *API Key* integration parameters to support credentials fetching object.
2 changes: 1 addition & 1 deletion Packs/Pipl/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Pipl",
"description": "Get contact, social, and professional information about people",
"support": "xsoar",
"currentVersion": "1.0.5",
"currentVersion": "1.0.6",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
2 changes: 1 addition & 1 deletion Packs/Twilio/.pack-ignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[file:Twilio.yml]
ignore=IN145,IN140
ignore=IN140

[file:Twilio_image.png]
ignore=IM111
Expand Down
10 changes: 8 additions & 2 deletions Packs/Twilio/Integrations/Twilio/Twilio.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
var sendRequest = function(method, url, body) {
var account_sid = params.credentials_token ? params.credentials_token.identifier : params.sid;
var auth_token = params.credentials_token ? params.credentials_token.password : params.token;

if (!(account_sid && auth_token)){
throw('Account SID and Auth token must be provided.');
}
var res = http(
params.server.replace(/[\/]+$/, '')+'/'+params.sid+'/Messages.json',
{
Method: method,
Body: body,
Headers: {'Content-Type': ['application/x-www-form-urlencoded']},
Username: params.sid,
Password: params.token
Username: account_sid,
Password: auth_token
},
params.insecure,
params.proxy
Expand Down
12 changes: 10 additions & 2 deletions Packs/Twilio/Integrations/Twilio/Twilio.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,20 @@ configuration:
name: sid
defaultvalue: ""
type: 0
required: true
required: false
hidden: true
- display: Auth token
name: token
defaultvalue: ""
type: 4
required: true
required: false
hidden: true
- display: Account SID
name: credentials_token
required: false
type: 9
displaypassword: Auth token
section: Connect
- display: Default sending number (e.g. +123456789101)
name: from
defaultvalue: ""
Expand Down
6 changes: 6 additions & 0 deletions Packs/Twilio/ReleaseNotes/1_0_5.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Integrations

##### Twilio
Added the *Account SID* and *Auth token* integration parameters to support credentials fetching object.

2 changes: 1 addition & 1 deletion Packs/Twilio/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Twilio",
"description": "Send SMS notifications",
"support": "xsoar",
"currentVersion": "1.0.4",
"currentVersion": "1.0.5",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down

0 comments on commit f6df311

Please sign in to comment.