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

Align credentials stores part 12 #27255

Merged
merged 23 commits into from
Jun 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
7092988
Align credentials stores part 12
maimorag Jun 6, 2023
34fabc5
fix
maimorag Jun 6, 2023
8d4becd
Merge remote-tracking branch 'origin/master' into align_credentials_s…
maimorag Jun 7, 2023
a6f834c
fix
maimorag Jun 7, 2023
f46ea43
undoing last change
maimorag Jun 7, 2023
8ecd866
Merge branch 'master' into align_credentials_stores_part_12
maimorag Jun 12, 2023
7f3e90c
docker image
maimorag Jun 12, 2023
772b2a3
Merge branch 'master' into align_credentials_stores_part_12
maimorag Jun 12, 2023
5d1c10d
Merge branch 'master' into align_credentials_stores_part_12
maimorag Jun 13, 2023
92f5642
Merge branch 'master' into align_credentials_stores_part_12
maimorag Jun 13, 2023
7759612
Merge branch 'master' into align_credentials_stores_part_12
maimorag Jun 15, 2023
f25524f
Merge remote-tracking branch 'origin/master' into align_credentials_s…
maimorag Jun 18, 2023
1a42a74
Merge remote-tracking branch 'origin/master' into align_credentials_s…
maimorag Jun 19, 2023
9860123
docker
maimorag Jun 19, 2023
298dd59
Merge remote-tracking branch 'origin/master' into align_credentials_s…
maimorag Jun 20, 2023
45f3e36
Merge branch 'master' into align_credentials_stores_part_12
maimorag Jun 20, 2023
5ac3876
fix
maimorag Jun 20, 2023
e530413
Merge branch 'master' into align_credentials_stores_part_12
maimorag Jun 20, 2023
bc1f5b3
Merge branch 'master' into align_credentials_stores_part_12
maimorag Jun 21, 2023
1d11b85
Merge branch 'master' into align_credentials_stores_part_12
maimorag Jun 21, 2023
5629931
raise error
maimorag Jun 21, 2023
237da88
Merge remote-tracking branch 'origin/master' into align_credentials_s…
maimorag Jun 21, 2023
2bd3518
Merge branch 'master' into align_credentials_stores_part_12
maimorag Jun 22, 2023
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: 0 additions & 2 deletions Packs/Looker/.pack-ignore
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@
[file:Looker.yml]
ignore=IN145
9 changes: 6 additions & 3 deletions Packs/Looker/Integrations/Looker/Looker.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
import requests
import traceback
import json
import urllib3

# Disable insecure warnings
requests.packages.urllib3.disable_warnings()
urllib3.disable_warnings()


''' CONSTANTS '''
Expand All @@ -20,8 +21,8 @@

''' GLOBALS/PARAMS '''
SESSION_VALIDITY_THRESHOLD = timedelta(minutes=MAX_TIMEOUT_MINUTES)
CLIENT_ID = demisto.params().get('client_id')
CLIENT_SECRET = demisto.params().get('client_secret')
CLIENT_ID = demisto.params().get('credentials_api3_client', {}).get('identifier') or demisto.params().get('client_id')
CLIENT_SECRET = demisto.params().get('credentials_api3_client', {}).get('password') or demisto.params().get('client_secret')
# Remove trailing slash to prevent wrong URL path to service
SERVER = demisto.params()['url'][:-1] if (demisto.params()['url']
and demisto.params()['url'].endswith('/')) else demisto.params()['url']
Expand Down Expand Up @@ -401,6 +402,8 @@ def create_look(query_id, space_id, look_title, look_description=""):

def main():
LOG('Command being called is %s' % (demisto.command()))
if not(CLIENT_ID and CLIENT_SECRET):
raise DemistoException('API3 Client ID and Secret must be provided.')
try:
handle_proxy()
verify_url(SERVER)
Expand Down
11 changes: 9 additions & 2 deletions Packs/Looker/Integrations/Looker/Looker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,15 @@ configuration:
type: 0
- display: API3 Client Secret
name: client_secret
required: true
required: false
type: 4
hidden: true
- display: API3 Client ID
name: credentials_api3_client
required: false
type: 9
displaypassword: API3 Client Secret
section: Connect
- display: Trust any certificate (not secure)
name: unsecure
required: false
Expand Down Expand Up @@ -262,7 +269,7 @@ script:
- contextPath: Looker.Look.LastUpdated
description: The time that the look was last updated.
type: Date
dockerimage: demisto/python3:3.9.8.24399
dockerimage: demisto/python3:3.10.12.63474
isfetch: false
runonce: false
script: '-'
Expand Down
6 changes: 6 additions & 0 deletions Packs/Looker/ReleaseNotes/1_0_6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Integrations

##### Looker
- Added the *API3 Client ID* and *API3 Client Secret* integration parameters to support credentials fetching object.
- Updated the Docker image to: *demisto/python3:3.10.12.63474*.
2 changes: 1 addition & 1 deletion Packs/Looker/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Looker",
"description": "Use the Looker integration to query an explore, save queries as looks, run looks, and fetch look results as incidents.",
"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/ServiceDeskPlus/.pack-ignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[file:ServiceDeskPlus.yml]
ignore=IN126,IN145
ignore=IN126

[file:README.md]
ignore=RM104
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -833,11 +833,16 @@ def generate_refresh_token(client: Client, args: Dict) -> Tuple[str, dict, Any]:
def main():
params = demisto.params()
server_url = params.get('server_url')
technician_key = params.get('credentials_technician_key', {}).get(
'password') or params.get('technician_key')
client_id = params.get('credentials_client', {}).get('identifier') or params.get('client_id')
client_secret = params.get('credentials_client', {}).get('password') or params.get('client_secret')
refresh_token = params.get('credentials_refresh_token', {}).get('password') or params.get('refresh_token')
if server_url == 'On-Premise':
client = Client(url=params.get('server_url_on_premise') + API_VERSION,
use_ssl=not params.get('insecure', False),
use_proxy=params.get('proxy', False),
technician_key=params.get('technician_key'),
technician_key=technician_key,
fetch_time=params.get('first_fetch') if params.get('first_fetch') else '7 days',
fetch_status=params.get('fetch_status'),
fetch_limit=int(params.get('max_fetch')) if params.get('max_fetch') else 50,
Expand All @@ -848,9 +853,9 @@ def main():
client = Client(url=server_url + API_VERSION,
use_ssl=not params.get('insecure', False),
use_proxy=params.get('proxy', False),
client_id=params.get('client_id'),
client_secret=params.get('client_secret'),
refresh_token=params.get('refresh_token'),
client_id=client_id,
client_secret=client_secret,
refresh_token=refresh_token,
fetch_time=params.get('fetch_time') if params.get('fetch_time') else '7 days',
fetch_status=params.get('fetch_status'),
fetch_limit=int(params.get('fetch_limit')) if params.get('fetch_limit') else 50,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ configuration:
name: technician_key
required: false
type: 4
hidden: true
- displaypassword: Technician Key
name: credentials_technician_key
required: false
hiddenusername: true
type: 9
- defaultvalue: https://example.com
display: On-Premise Server URL
name: server_url_on_premise
Expand All @@ -28,14 +34,28 @@ configuration:
name: client_id
required: false
type: 4
hidden: true
- display: Client Secret
name: client_secret
required: false
type: 4
hidden: true
- display: Client ID
name: credentials_client
required: false
type: 9
displaypassword: Client Secret
section: Connect
- display: Refresh Token
name: refresh_token
required: false
type: 4
hidden: true
- displaypassword: Refresh Token
name: credentials_refresh_token
required: false
hiddenusername: true
type: 9
- display: Trust any certificate (not secure)
name: insecure
required: false
Expand Down
9 changes: 9 additions & 0 deletions Packs/ServiceDeskPlus/ReleaseNotes/2_0_17.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

#### Integrations

##### Service Desk Plus
Added the following integration parameters to support credentials fetching object:
- *Technician Key*
- *Client ID*
- *Client Secret*
- *Refresh Token*
2 changes: 1 addition & 1 deletion Packs/ServiceDeskPlus/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Manage Engine Service Desk Plus",
"description": "IT service management.",
"support": "xsoar",
"currentVersion": "2.0.16",
"currentVersion": "2.0.17",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down