Skip to content

Commit

Permalink
[AWSApiModule] Fixed sts_client.assume_role arguments (demisto#36163)
Browse files Browse the repository at this point in the history
* fix

* update rn

* update docker

* trigger build - update secrets

* Update Packs/ApiModules/Scripts/AWSApiModule/AWSApiModule.yml

revert update docker

* Bump pack from version AWS-EC2 to 1.4.13.

* fix TPBs

* update docker

---------

Co-authored-by: Content Bot <[email protected]>
  • Loading branch information
2 people authored and xsoar-bot committed Sep 10, 2024
1 parent cf73ef4 commit 711dc80
Show file tree
Hide file tree
Showing 44 changed files with 156 additions and 29 deletions.
6 changes: 6 additions & 0 deletions Packs/AWS-ACM/ReleaseNotes/1_1_37.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Integrations

##### AWS - ACM

- Fixed an issue where AWS authentication could fail when assuming a role because the region was set incorrectly.
2 changes: 0 additions & 2 deletions Packs/AWS-ACM/TestPlaybooks/playbook-AWS-ACM.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ tasks:
extendedKeyUsage: {}
keyTypes: {}
keyUsage: {}
region:
simple: us-west-2
roleArn: {}
roleSessionDuration: {}
roleSessionName: {}
Expand Down
2 changes: 1 addition & 1 deletion Packs/AWS-ACM/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "AWS - ACM",
"description": "Amazon Web Services Certificate Manager Service (acm)",
"support": "xsoar",
"currentVersion": "1.1.36",
"currentVersion": "1.1.37",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
6 changes: 6 additions & 0 deletions Packs/AWS-AccessAnalyzer/ReleaseNotes/1_1_34.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Integrations

##### AWS - AccessAnalyzer

- Fixed an issue where AWS authentication could fail when assuming a role because the region was set incorrectly.
2 changes: 1 addition & 1 deletion Packs/AWS-AccessAnalyzer/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "AWS - AccessAnalyzer",
"description": "Amazon Web Services IAM Access Analyzer",
"support": "xsoar",
"currentVersion": "1.1.33",
"currentVersion": "1.1.34",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
6 changes: 6 additions & 0 deletions Packs/AWS-Athena/ReleaseNotes/2_0_2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Integrations

##### AWS - Athena

- Fixed an issue where AWS authentication could fail when assuming a role because the region was set incorrectly.
2 changes: 1 addition & 1 deletion Packs/AWS-Athena/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "AWS - Athena",
"description": "Amazon Web Services Athena",
"support": "xsoar",
"currentVersion": "2.0.1",
"currentVersion": "2.0.2",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
6 changes: 6 additions & 0 deletions Packs/AWS-CloudWatchLogs/ReleaseNotes/1_2_23.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Integrations

##### AWS - CloudWatchLogs

- Fixed an issue where AWS authentication could fail when assuming a role because the region was set incorrectly.
2 changes: 1 addition & 1 deletion Packs/AWS-CloudWatchLogs/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "AWS - CloudWatchLogs",
"description": "Amazon Web Services CloudWatch Logs (logs).",
"support": "xsoar",
"currentVersion": "1.2.22",
"currentVersion": "1.2.23",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
6 changes: 6 additions & 0 deletions Packs/AWS-EC2/ReleaseNotes/1_4_13.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Integrations

##### AWS - EC2

- Fixed an issue where AWS authentication could fail when assuming a role because the region was set incorrectly.
2 changes: 1 addition & 1 deletion Packs/AWS-EC2/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "AWS - EC2",
"description": "Amazon Web Services Elastic Compute Cloud (EC2)",
"support": "xsoar",
"currentVersion": "1.4.12",
"currentVersion": "1.4.13",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
6 changes: 6 additions & 0 deletions Packs/AWS-EKS/ReleaseNotes/1_0_4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Integrations

##### AWS-EKS

- Fixed an issue where AWS authentication could fail when assuming a role because the region was set incorrectly.
2 changes: 1 addition & 1 deletion Packs/AWS-EKS/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "AWS - EKS",
"description": "The AWS EKS integration allows for the management and operation of Amazon Elastic Kubernetes Service (EKS) clusters.",
"support": "xsoar",
"currentVersion": "1.0.3",
"currentVersion": "1.0.4",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
10 changes: 10 additions & 0 deletions Packs/AWS-GuardDuty/ReleaseNotes/1_3_52.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

#### Integrations

##### AWS - GuardDuty

- Fixed an issue where AWS authentication could fail when assuming a role because the region was set incorrectly.

##### AWS - GuardDuty Event Collector

- Fixed an issue where AWS authentication could fail when assuming a role because the region was set incorrectly.
2 changes: 1 addition & 1 deletion Packs/AWS-GuardDuty/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "AWS - GuardDuty",
"description": "Amazon Web Services Guard Duty Service (gd)",
"support": "xsoar",
"currentVersion": "1.3.51",
"currentVersion": "1.3.52",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
6 changes: 6 additions & 0 deletions Packs/AWS-IAM/ReleaseNotes/1_1_65.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Integrations

##### AWS - Identity and Access Management

- Fixed an issue where AWS authentication could fail when assuming a role because the region was set incorrectly.
2 changes: 1 addition & 1 deletion Packs/AWS-IAM/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Amazon Web Services Identity and Access Management (IAM)",
"support": "xsoar",
"author": "Cortex XSOAR",
"currentVersion": "1.1.64",
"currentVersion": "1.1.65",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
"created": "2020-04-14T00:00:00Z",
Expand Down
6 changes: 6 additions & 0 deletions Packs/AWS-IAMIdentityCenter/ReleaseNotes/1_0_4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Integrations

##### AWS - IAM Identity Center

- Fixed an issue where AWS authentication could fail when assuming a role because the region was set incorrectly.
2 changes: 1 addition & 1 deletion Packs/AWS-IAMIdentityCenter/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "AWS - IAM Identity Center",
"description": "AWS IAM Identity Center\n\nWith AWS IAM Identity Center (successor to AWS Single Sign-On), you can manage sign-in security for your workforce identities, also known as workforce users. IAM Identity Center provides one place where you can create or connect workforce users and manage their access centrally across all their AWS accounts and applications. IAM Identity Center is the recommended approach for workforce authentication and authorization in AWS, for organizations of any size and type.",
"support": "xsoar",
"currentVersion": "1.0.3",
"currentVersion": "1.0.4",
"author": "Cortex XSOAR",
"url": "",
"email": "",
Expand Down
6 changes: 6 additions & 0 deletions Packs/AWS-Lambda/ReleaseNotes/1_3_7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Integrations

##### AWS - Lambda

- Fixed an issue where AWS authentication could fail when assuming a role because the region was set incorrectly.
2 changes: 1 addition & 1 deletion Packs/AWS-Lambda/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "AWS - Lambda",
"description": "Amazon Web Services Serverless Compute service (lambda)",
"support": "xsoar",
"currentVersion": "1.3.6",
"currentVersion": "1.3.7",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
6 changes: 6 additions & 0 deletions Packs/AWS-Organizations/ReleaseNotes/1_0_3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Integrations

##### AWS - Organizations

- Fixed an issue where AWS authentication could fail when assuming a role because the region was set incorrectly.
2 changes: 1 addition & 1 deletion Packs/AWS-Organizations/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "AWS Organizations",
"description": "AWS Organizations offers policy-based management for multiple AWS accounts.",
"support": "xsoar",
"currentVersion": "1.0.2",
"currentVersion": "1.0.3",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
6 changes: 6 additions & 0 deletions Packs/AWS-Route53/ReleaseNotes/1_1_35.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Integrations

##### AWS - Route53

- Fixed an issue where AWS authentication could fail when assuming a role because the region was set incorrectly.
2 changes: 1 addition & 1 deletion Packs/AWS-Route53/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "AWS - Route53",
"description": "Amazon Web Services Managed Cloud DNS Service.",
"support": "xsoar",
"currentVersion": "1.1.34",
"currentVersion": "1.1.35",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
6 changes: 6 additions & 0 deletions Packs/AWS-S3/ReleaseNotes/1_2_26.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Integrations

##### AWS - S3

- Fixed an issue where AWS authentication could fail when assuming a role because the region was set incorrectly.
10 changes: 5 additions & 5 deletions Packs/AWS-S3/TestPlaybooks/playbook-AWS_-_S3_Test_Playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ tasks:
- "6"
scriptarguments:
bucket:
simple: demisto-test1234
simple: demisto-test12345
entryID:
simple: ${File.EntryID}
key:
Expand Down Expand Up @@ -124,7 +124,7 @@ tasks:
- "5"
scriptarguments:
bucket:
simple: demisto-test1234
simple: demisto-test12345
key:
simple: ${File.Name}
separatecontext: false
Expand Down Expand Up @@ -161,7 +161,7 @@ tasks:
- "9"
scriptarguments:
bucket:
simple: demisto-test1234
simple: demisto-test12345
separatecontext: false
continueonerrortype: ""
view: |-
Expand Down Expand Up @@ -196,7 +196,7 @@ tasks:
- "4"
scriptarguments:
bucket:
simple: demisto-test1234
simple: demisto-test12345
separatecontext: false
continueonerrortype: ""
view: |-
Expand Down Expand Up @@ -304,7 +304,7 @@ tasks:
brand: AWS - S3
scriptarguments:
bucket:
simple: demisto-test1234
simple: demisto-test12345
separatecontext: false
continueonerrortype: ""
view: |-
Expand Down
2 changes: 1 addition & 1 deletion Packs/AWS-S3/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "AWS - S3",
"description": "Amazon Web Services Simple Storage Service (S3)",
"support": "xsoar",
"currentVersion": "1.2.25",
"currentVersion": "1.2.26",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
6 changes: 6 additions & 0 deletions Packs/AWS-SNS/ReleaseNotes/1_0_17.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Integrations

##### AWS - SNS

- Fixed an issue where AWS authentication could fail when assuming a role because the region was set incorrectly.
2 changes: 1 addition & 1 deletion Packs/AWS-SNS/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "AWS - SNS",
"description": "This is the integration content pack which can create or delete topic/subscription on AWS Simple Notification System and send the message via SNS as well.",
"support": "xsoar",
"currentVersion": "1.0.16",
"currentVersion": "1.0.17",
"author": "Jie Liau",
"url": "",
"email": "",
Expand Down
6 changes: 6 additions & 0 deletions Packs/AWS-SQS/ReleaseNotes/1_2_27.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Integrations

##### AWS - SQS

- Fixed an issue where AWS authentication could fail when assuming a role because the region was set incorrectly.
2 changes: 1 addition & 1 deletion Packs/AWS-SQS/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "AWS - SQS",
"description": "Amazon Web Services Simple Queuing Service (SQS)",
"support": "xsoar",
"currentVersion": "1.2.26",
"currentVersion": "1.2.27",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
10 changes: 10 additions & 0 deletions Packs/AWS-SecurityHub/ReleaseNotes/1_3_35.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

#### Integrations

##### AWS - Security Hub

- Fixed an issue where AWS authentication could fail when assuming a role because the region was set incorrectly.

##### AWS Security Hub Event Collector

- Fixed an issue where AWS authentication could fail when assuming a role because the region was set incorrectly.
2 changes: 1 addition & 1 deletion Packs/AWS-SecurityHub/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "AWS - Security Hub",
"description": "Amazon Web Services Security Hub Service.",
"support": "xsoar",
"currentVersion": "1.3.34",
"currentVersion": "1.3.35",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
6 changes: 6 additions & 0 deletions Packs/AWS-SecurityLake/ReleaseNotes/1_0_10.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Integrations

##### Amazon Security Lake

- Fixed an issue where AWS authentication could fail when assuming a role because the region was set incorrectly.
2 changes: 1 addition & 1 deletion Packs/AWS-SecurityLake/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Amazon - Security Lake",
"description": "Amazon Security Lake is a fully managed security data lake service.",
"support": "xsoar",
"currentVersion": "1.0.9",
"currentVersion": "1.0.10",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
6 changes: 6 additions & 0 deletions Packs/AWS_SystemManager/ReleaseNotes/1_0_4.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Integrations

##### AWS - System Manager

- Fixed an issue where AWS authentication could fail when assuming a role because the region was set incorrectly.
2 changes: 1 addition & 1 deletion Packs/AWS_SystemManager/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "AWS Systems Manager",
"description": "AWS Systems Manager is the operations hub for your AWS applications and resources and a secure end-to-end management solution for hybrid cloud environments that enables safe and secure operations at scale.",
"support": "xsoar",
"currentVersion": "1.0.3",
"currentVersion": "1.0.4",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
6 changes: 6 additions & 0 deletions Packs/AWS_WAF/ReleaseNotes/1_0_8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Integrations

##### AWS-WAF

- Fixed an issue where AWS authentication could fail when assuming a role because the region was set incorrectly.
2 changes: 1 addition & 1 deletion Packs/AWS_WAF/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "AWS WAF",
"description": "Amazon Web Services Web Application Firewall (WAF)",
"support": "xsoar",
"currentVersion": "1.0.7",
"currentVersion": "1.0.8",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
3 changes: 2 additions & 1 deletion Packs/ApiModules/Scripts/AWSApiModule/AWSApiModule.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def aws_session(self, service, region=None, role_arn=None, role_session_name=Non
elif self.aws_role_policy is not None:
kwargs.update({'Policy': self.aws_role_policy})

demisto.debug('{kwargs}='.format(kwargs=kwargs))
demisto.debug(f'{kwargs=}')

if kwargs and not self.aws_access_key_id: # login with Role ARN
if not self.aws_access_key_id:
Expand All @@ -126,6 +126,7 @@ def aws_session(self, service, region=None, role_arn=None, role_session_name=Non
elif self.aws_access_key_id and (role_arn or self.aws_role_arn): # login with Access Key ID and Role ARN
sts_client = boto3.client(
service_name='sts',
region_name=region if region else self.aws_default_region,
aws_access_key_id=self.aws_access_key_id,
aws_secret_access_key=self.aws_secret_access_key,
verify=self.verify_certificate,
Expand Down
2 changes: 1 addition & 1 deletion Packs/ApiModules/Scripts/AWSApiModule/AWSApiModule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ comment: AWS Client class, provides generic Infrastructure to all AWS integratio
scripttarget: 0
dependson: {}
timeout: 0s
dockerimage: demisto/boto3py3:1.0.0.52713
dockerimage: demisto/boto3py3:1.0.0.110635
fromversion: 5.5.0
tests:
- No tests (auto formatted)
6 changes: 6 additions & 0 deletions Packs/Aws-SecretsManager/ReleaseNotes/1_0_42.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Integrations

##### Aws Secrets Manager

- Fixed an issue where AWS authentication could fail when assuming a role because the region was set incorrectly.
Loading

0 comments on commit 711dc80

Please sign in to comment.