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

Jl credentialize instances #26557

Merged
merged 42 commits into from Jun 15, 2023
Merged
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
b85cbf9
added credtential option to Cylance Protect
jlevypaloalto May 15, 2023
4f5a6b4
updated release notes
jlevypaloalto May 15, 2023
12dd49d
added error in case of insufficient creds
jlevypaloalto May 16, 2023
2940f44
fixed bug in error in case of insufficient creds
jlevypaloalto May 16, 2023
b2bf671
Merge branch 'master' into jl-credentialize-instances
jlevypaloalto May 16, 2023
fbee802
added creds as config option
jlevypaloalto May 16, 2023
0579e37
added hidden to old fields
jlevypaloalto May 16, 2023
1104829
updated release notes
jlevypaloalto May 17, 2023
31d56a7
updated docker image
jlevypaloalto May 18, 2023
106d370
Merge branch 'master' into jl-credentialize-instances
jlevypaloalto May 18, 2023
93925f9
updated docker image
jlevypaloalto May 18, 2023
5804516
updated secrets ignore
jlevypaloalto Jun 1, 2023
1219004
updated secrets ignore again
jlevypaloalto Jun 1, 2023
500dc75
updated docker
jlevypaloalto Jun 1, 2023
04f45de
Revert "updated secrets ignore"
jlevypaloalto Jun 1, 2023
7eb134e
revised release notes
jlevypaloalto Jun 1, 2023
6844e1c
remove pipeline files
jlevypaloalto Jun 1, 2023
b85e606
Merge branch 'master' into jl-credentialize-instances
jlevypaloalto Jun 1, 2023
7aef33e
Merge branch 'master' into jl-credentialize-instances
jlevypaloalto Jun 4, 2023
cd4e547
Update 1_2_31.md
jlevypaloalto Jun 4, 2023
6744e8f
Revert 1_2_31.md to bot version
jlevypaloalto Jun 4, 2023
3640bad
Update 1_2_31.md
jlevypaloalto Jun 4, 2023
c123846
Update 1_1_16.md to bot version
jlevypaloalto Jun 4, 2023
94cfe34
update release notes
jlevypaloalto Jun 4, 2023
5b4c49d
update release notes pylance project
jlevypaloalto Jun 4, 2023
27e3867
fixed test errors
jlevypaloalto Jun 4, 2023
b2cadc7
Merge branch 'master' into jl-credentialize-instances
jlevypaloalto Jun 4, 2023
a721413
Merge branch 'master' into jl-credentialize-instances
jlevypaloalto Jun 4, 2023
6a24e35
update docker image
jlevypaloalto Jun 5, 2023
f6c2bdb
Merge branch 'master' into jl-credentialize-instances
jlevypaloalto Jun 5, 2023
ec1eec9
Remove empty ignore from .pack-ignore
jlevypaloalto Jun 6, 2023
8819979
fixed user_id bug
jlevypaloalto Jun 7, 2023
99dc323
Merge branch 'master' into jl-credentialize-instances
jlevypaloalto Jun 7, 2023
e557609
updated release notes
jlevypaloalto Jun 7, 2023
946df10
fixed precommit errors
jlevypaloalto Jun 7, 2023
fbd0e12
possible solution to server error
jlevypaloalto Jun 8, 2023
3534868
update docker
jlevypaloalto Jun 8, 2023
b21cfbc
updated docker
jlevypaloalto Jun 14, 2023
9ffc5da
updated docker
jlevypaloalto Jun 14, 2023
8c8519d
Added period to 1_2_33.md
jlevypaloalto Jun 15, 2023
f08cf9f
update docker
jlevypaloalto Jun 15, 2023
8552cc2
Merge branch 'master' into jl-credentialize-instances
jlevypaloalto Jun 15, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitlab/ci/.gitlab-ci.yml
Expand Up @@ -13,7 +13,7 @@ stages:
- prepare-testing-bucket
- run-instances
- upload-to-marketplace
jlevypaloalto marked this conversation as resolved.
Show resolved Hide resolved
- are-jobs-realy-done
- are-jobs-really-done
- fan-in # concentrate pipeline artifacts to single job before triggering child slack pipeline


Expand Down
20 changes: 13 additions & 7 deletions .gitlab/ci/bucket-upload.yml
Expand Up @@ -35,6 +35,8 @@
if [[ $TEST_UPLOAD == "false" ]]; then
section_start "Upload content graph GraphML to GCP" --collapsed
gsutil cp $ARTIFACTS_FOLDER/content_graph/$MARKETPLACE_VERSION.zip "gs://$GCS_MARKET_BUCKET_DEV/content_graph/$MARKETPLACE_VERSION.zip"
# copy the packs.json file to the bucket, used in contribution management
gsutil cp $ARTIFACTS_FOLDER/packs.json "gs://$GCS_MARKET_BUCKET_DEV/content_graph/"$MARKETPLACE_VERSION"_packs.json"
section_end "Upload content graph GraphML to GCP"
fi

Expand Down Expand Up @@ -64,7 +66,7 @@ jobs-done-check-upload-flow:
extends:
- .jobs-done-check
- .bucket-upload-rule
needs: ['run-unittests-and-lint-upload-flow', 'run-validations-upload-flow', 'mpv2-prepare-testing-bucket-upload-flow', 'upload-id-set-bucket', 'xpanse-prepare-testing-bucket-upload-flow', 'xsoar-prepare-testing-bucket-upload-flow', 'install-packs-in-server6_5', 'install-packs-in-server6_6', 'install-packs-in-server6_8', 'install-packs-in-server-master', 'install-packs-in-xsiam-ga', 'sync-buckets-between-projects', 'upload-packs-to-marketplace', 'upload-packs-to-marketplace-v2', 'upload-packs-to-xpanse-marketplace']
needs: ['run-unittests-and-lint-upload-flow', 'run-validations-upload-flow', 'mpv2-prepare-testing-bucket-upload-flow', 'upload-id-set-bucket', 'xpanse-prepare-testing-bucket-upload-flow', 'xsoar-prepare-testing-bucket-upload-flow', 'install-packs-in-server6_6', 'install-packs-in-server6_8', 'install-packs-in-server6_9', 'install-packs-in-server6_10', 'install-packs-in-server-master', 'install-packs-in-xsiam-ga', 'sync-buckets-between-projects', 'upload-packs-to-marketplace', 'upload-packs-to-marketplace-v2', 'upload-packs-to-xpanse-marketplace']
tags:
- gke

Expand Down Expand Up @@ -154,11 +156,6 @@ xpanse-prepare-testing-bucket-upload-flow:
- exit "$EXIT_CODE"


install-packs-in-server6_5:
extends: .install_packs_in_xsoar_server
variables:
INSTANCE_ROLE: "Server 6.5"

install-packs-in-server6_6:
extends: .install_packs_in_xsoar_server
variables:
Expand All @@ -169,6 +166,15 @@ install-packs-in-server6_8:
variables:
INSTANCE_ROLE: "Server 6.8"

install-packs-in-server6_9:
extends: .install_packs_in_xsoar_server
variables:
INSTANCE_ROLE: "Server 6.9"

install-packs-in-server6_10:
extends: .install_packs_in_xsoar_server
variables:
INSTANCE_ROLE: "Server 6.10"

install-packs-in-server-master:
extends: .install_packs_in_xsoar_server
Expand Down Expand Up @@ -256,7 +262,7 @@ install-packs-in-xsiam-ga:
upload-packs-to-marketplace:
tags:
- gke
needs: ["run-validations-upload-flow", "install-packs-in-server6_5", "install-packs-in-server6_6", "install-packs-in-server6_8", "run-unittests-and-lint-upload-flow"]
needs: ["run-validations-upload-flow", "install-packs-in-server6_6", "install-packs-in-server6_8", "install-packs-in-server6_9", "install-packs-in-server6_10", "run-unittests-and-lint-upload-flow"]
stage: upload-to-marketplace
artifacts:
expire_in: 48 hrs
Expand Down
2 changes: 1 addition & 1 deletion .gitlab/ci/global.yml
Expand Up @@ -362,6 +362,6 @@
- job-done

.jobs-done-check:
stage: are-jobs-realy-done
stage: are-jobs-really-done
script:
- python3 Tests/scripts/check_jobs_done.py --job-done-files $PIPELINE_JOBS_FOLDER
32 changes: 22 additions & 10 deletions .gitlab/ci/on-push.yml
Expand Up @@ -149,10 +149,10 @@ validate-content-conf:
if [[ $MARKETPLACE_VERSION == "xsoar" ]];
then
echo "Starting to create artifacts with zip for XSOAR."
python Tests/scripts/create_artifacts_graph/create_artifacts.py --marketplace "xsoar" --artifacts-output $ARTIFACTS_FOLDER/content_packs --dependencies-output $ARTIFACTS_FOLDER/packs_dependencies.json --bucket-upload "$BUCKET_UPLOAD"
python Tests/scripts/create_artifacts_graph/create_artifacts.py --marketplace "xsoar" --artifacts-output $ARTIFACTS_FOLDER/content_packs --dependencies-output $ARTIFACTS_FOLDER/packs_dependencies.json --packs-output $ARTIFACTS_FOLDER/packs.json --bucket-upload "$BUCKET_UPLOAD"
else
echo "Starting to create artifacts without zip."
python Tests/scripts/create_artifacts_graph/create_artifacts.py --marketplace "$MARKETPLACE_VERSION" --artifacts-output $ARTIFACTS_FOLDER/content_packs --dependencies-output $ARTIFACTS_FOLDER/packs_dependencies.json --no-zip --bucket-upload "$BUCKET_UPLOAD"
python Tests/scripts/create_artifacts_graph/create_artifacts.py --marketplace "$MARKETPLACE_VERSION" --artifacts-output $ARTIFACTS_FOLDER/content_packs --dependencies-output $ARTIFACTS_FOLDER/packs_dependencies.json --packs-output $ARTIFACTS_FOLDER/packs.json --no-zip --bucket-upload "$BUCKET_UPLOAD"
fi

- gcloud auth activate-service-account --key-file="$GCS_ARTIFACTS_KEY"
Expand Down Expand Up @@ -288,32 +288,41 @@ xpanse-prepare-testing-bucket:
- job-done
- exit $EXIT_CODE

xsoar_server_6_5:
xsoar_server_6_6:
extends: .test_content_on_xsoar_server_instances_base
# No need to trigger in case of release branch or docker update branches (non-nightly packs)
rules:
- !reference [.filter-non-nightly-docker-updates-rule, rules]
- if: '$CI_PIPELINE_SOURCE =~ /^(push|contrib)$/'
variables:
INSTANCE_ROLE: "Server 6.5"
INSTANCE_ROLE: "Server 6.6"

xsoar_server_6_6:
xsoar_server_6_8:
extends: .test_content_on_xsoar_server_instances_base
# No need to trigger in case of release branch or docker update branches (non-nightly packs)
rules:
- !reference [.filter-non-nightly-docker-updates-rule, rules]
- if: '$CI_PIPELINE_SOURCE =~ /^(push|contrib)$/'
variables:
INSTANCE_ROLE: "Server 6.6"
INSTANCE_ROLE: "Server 6.8"

xsoar_server_6_8:
xsoar_server_6_9:
extends: .test_content_on_xsoar_server_instances_base
# No need to trigger in case of release branch or docker update branches (non-nightly packs)
rules:
- !reference [.filter-non-nightly-docker-updates-rule, rules]
- if: '$CI_PIPELINE_SOURCE =~ /^(push|contrib)$/'
variables:
INSTANCE_ROLE: "Server 6.8"
INSTANCE_ROLE: "Server 6.9"

xsoar_server_6_10:
extends: .test_content_on_xsoar_server_instances_base
# No need to trigger in case of release branch or docker update branches (non-nightly packs)
rules:
- !reference [.filter-non-nightly-docker-updates-rule, rules]
- if: '$CI_PIPELINE_SOURCE =~ /^(push|contrib)$/'
variables:
INSTANCE_ROLE: "Server 6.10"

xsoar_server_master:
extends:
Expand Down Expand Up @@ -367,12 +376,14 @@ jobs-done-check-on-push:
optional: true
- job: xsiam_server_ga
optional: true
- job: xsoar_server_6_5
optional: true
- job: xsoar_server_6_6
optional: true
- job: xsoar_server_6_8
optional: true
- job: xsoar_server_6_9
optional: true
- job: xsoar_server_6_10
optional: true
- job: xsoar_server_master
optional: true
tags:
Expand Down Expand Up @@ -544,6 +555,7 @@ xsoar_ng_server_ga:
needs:
- job: xsoar-prepare-testing-bucket
optional: true
allow_failure: true


test-upload-flow:
Expand Down
2 changes: 1 addition & 1 deletion Packs/Cylance_Protect/.pack-ignore
Expand Up @@ -5,7 +5,7 @@ ignore=BA101
ignore=PA116

[file:Cylance_Protect_v2.yml]
ignore=IN126,BA108,BA109,IN145
ignore=IN126,BA108,BA109

[file:README.md]
ignore=RM104
Expand Down
4 changes: 3 additions & 1 deletion Packs/Cylance_Protect/.secrets-ignore
@@ -1 +1,3 @@
api_call(uri=URI_LISTS,
api_call(uri=URI_LISTS,
displaypassword: Application Secret
displaypassword: Tenant API Key
Expand Up @@ -1513,19 +1513,24 @@ def add_capitalized_hash_to_context(threats_context): # pragma: no cover

# EXECUTION
def main(): # pragma: no cover
params = demisto.params()

global APP_ID
APP_ID = demisto.params()['app_id']
APP_ID = params.get('app_creds', {}).get('identifier') or params.get('app_id')
global APP_SECRET
APP_SECRET = demisto.params()['app_secret']
APP_SECRET = params.get('app_creds', {}).get('password') or params.get('app_secret')
global TID
TID = demisto.params()['tid']
TID = params.get('api_key', {}).get('password') or params.get('tid')
global SERVER_URL
SERVER_URL = load_server_url()
global FILE_THRESHOLD
FILE_THRESHOLD = demisto.params()['file_threshold']
FILE_THRESHOLD = params['file_threshold']
global USE_SSL
USE_SSL = not demisto.params().get('unsecure', False)
USE_SSL = not params.get('unsecure', False)
command = demisto.command()

if not all((APP_ID, APP_SECRET, TID)):
raise DemistoException('Please fill out the Application ID, Application Secret and Tenant API Key')

LOG(f'Command being called is {command}')
try:
Expand Down
Expand Up @@ -14,19 +14,31 @@ configuration:
section: Connect
- display: Application ID
name: app_id
required: true
type: 0
section: Connect
hidden: true
- display: Application Secret
name: app_secret
required: true
type: 4
section: Connect
hidden: true
- display: Tenant API Key
name: tid
required: true
type: 4
section: Connect
hidden: true
- display: Application ID
name: app_creds
required: false
type: 9
section: Connect
displaypassword: Application Secret
- name: api_key
required: false
type: 9
section: Connect
hiddenusername: true
displaypassword: Tenant API Key
- display: Use system proxy settings
name: proxy
required: false
Expand Down Expand Up @@ -953,7 +965,7 @@ script:
- contextPath: InstaQuery.List
description: The list of InstaQuery
type: string
dockerimage: demisto/pyjwt3:1.0.0.58911
dockerimage: demisto/pyjwt3:1.0.0.62273
isfetch: true
runonce: false
script: ''
Expand Down
10 changes: 10 additions & 0 deletions Packs/Cylance_Protect/ReleaseNotes/1_2_0.md
@@ -0,0 +1,10 @@

#### Integrations

##### Cylance Protect v2
- Updated the Docker image to: *demisto/pyjwt3:1.0.0.59487*.

- Added the following integration parameters to support credentials fetching object:
- *Application ID*
- *Application Secret*
- *Tenant API Key*
2 changes: 1 addition & 1 deletion Packs/Cylance_Protect/pack_metadata.json
Expand Up @@ -2,7 +2,7 @@
"name": "Cylance Protect",
"description": "Manage Endpoints using Cylance protect",
"support": "xsoar",
"currentVersion": "1.1.15",
"currentVersion": "1.2.0",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
2 changes: 1 addition & 1 deletion Packs/GoogleDrive/.pack-ignore
Expand Up @@ -5,7 +5,7 @@ ignore=RM104
ignore=BA101

[file:GoogleDrive.yml]
ignore=IN145
ignore=

[file:GoogleDrive_image.png]
ignore=IM111
Expand Down
11 changes: 9 additions & 2 deletions Packs/GoogleDrive/Integrations/GoogleDrive/GoogleDrive.py
Expand Up @@ -1686,7 +1686,14 @@ def main() -> None:

try:
params = demisto.params()
service_account_dict = GSuiteClient.safe_load_non_strict_json(params.get('user_service_account_json'))

account_json = params.get('user_creds', {}).get('password') or params.get('user_service_account_json')
user_id = params.get('user_creds', {}).get('identifier') or params.get('user_id', '')

if not account_json:
raise DemistoException('Please fill out the User\'s Service Account JSON field.')

service_account_dict = GSuiteClient.safe_load_non_strict_json(account_json)
verify_certificate = not params.get('insecure', False)
proxy = params.get('proxy', False)

Expand All @@ -1698,7 +1705,7 @@ def main() -> None:
gsuite_client = GSuiteClient(service_account_dict,
base_url='https://www.googleapis.com/', verify=verify_certificate, proxy=proxy,
headers=headers,
user_id=params.get('user_id', ''))
user_id=user_id)

# Trim the arguments
args = GSuiteClient.strip_dict(demisto.args())
Expand Down