Skip to content

Commit f69663a

Browse files
authored
Merge pull request #2143 from udondan/iam-updates
2 parents def7e97 + 1339a86 commit f69663a

11 files changed

Lines changed: 277 additions & 7 deletions

File tree

CHANGELOG/v0.811.0.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
**New actions:**
2+
3+
- securityhub:CreateConnector
4+
- securityhub:DeleteConnector
5+
- securityhub:DisableSecurityHubFeatureV2
6+
- securityhub:EnableSecurityHubFeatureV2
7+
- securityhub:GetConnector
8+
- securityhub:ListConnectors
9+
- securityhub:UpdateConnector
10+
- ssm:CreateCloudConnector
11+
- ssm:DeleteCloudConnector
12+
- ssm:GetCloudConnector
13+
- ssm:ListCloudConnectors
14+
- ssm:UpdateCloudConnector
15+
- ssm:ValidateCloudConnector
16+
17+
**New resource types:**
18+
19+
- securityhub:connector
20+
- ssm:cloud-connector

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
Support for:
1717

1818
- 451 Services
19-
- 21283 Actions
20-
- 2250 Resource Types
19+
- 21296 Actions
20+
- 2252 Resource Types
2121
- 2374 Condition keys
2222
<!-- /stats -->
2323

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.810.0
1+
0.811.0

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
author = 'Daniel Schroeder'
2525

2626
# The full version, including alpha/beta/rc tags
27-
release = '0.810.0'
27+
release = '0.811.0'
2828

2929
# -- General configuration ---------------------------------------------------
3030

docs/source/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ AWS IAM policy statement generator with fluent interface.
3131
Support for:
3232

3333
- 451 Services
34-
- 21283 Actions
35-
- 2250 Resource Types
34+
- 21296 Actions
35+
- 2252 Resource Types
3636
- 2374 Condition keys
3737

3838
..

lib/generated/policy-statements/securityhub.ts

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,21 @@ export class Securityhub extends PolicyStatement {
277277
return this.to('CreateConfigurationPolicy');
278278
}
279279

280+
/**
281+
* Grants permission to create a connector based on input parameters
282+
*
283+
* Access Level: Write
284+
*
285+
* Possible conditions:
286+
* - .ifAwsRequestTag()
287+
* - .ifAwsTagKeys()
288+
*
289+
* https://docs.aws.amazon.com/securityhub/1.0/APIReference/API_CreateConnector.html
290+
*/
291+
public toCreateConnector() {
292+
return this.to('CreateConnector');
293+
}
294+
280295
/**
281296
* Grants permission to create a connector V2 based on input parameters
282297
*
@@ -391,6 +406,17 @@ export class Securityhub extends PolicyStatement {
391406
return this.to('DeleteConfigurationPolicy');
392407
}
393408

409+
/**
410+
* Grants permission to delete a connector in Security Hub CSPM
411+
*
412+
* Access Level: Write
413+
*
414+
* https://docs.aws.amazon.com/securityhub/1.0/APIReference/API_DeleteConnector.html
415+
*/
416+
public toDeleteConnector() {
417+
return this.to('DeleteConnector');
418+
}
419+
394420
/**
395421
* Grants permission to delete a connector V2 in Security Hub
396422
*
@@ -572,6 +598,17 @@ export class Securityhub extends PolicyStatement {
572598
return this.to('DisableSecurityHub');
573599
}
574600

601+
/**
602+
* Grants permission to disable a Security Hub V2 feature
603+
*
604+
* Access Level: Write
605+
*
606+
* https://docs.aws.amazon.com/securityhub/1.0/APIReference/API_DisableSecurityHubFeatureV2.html
607+
*/
608+
public toDisableSecurityHubFeatureV2() {
609+
return this.to('DisableSecurityHubFeatureV2');
610+
}
611+
575612
/**
576613
* Grants permission to disable Security Hub V2
577614
*
@@ -660,6 +697,17 @@ export class Securityhub extends PolicyStatement {
660697
return this.to('EnableSecurityHub');
661698
}
662699

700+
/**
701+
* Grants permission to enable a Security Hub V2 feature
702+
*
703+
* Access Level: Write
704+
*
705+
* https://docs.aws.amazon.com/securityhub/1.0/APIReference/API_EnableSecurityHubFeatureV2.html
706+
*/
707+
public toEnableSecurityHubFeatureV2() {
708+
return this.to('EnableSecurityHubFeatureV2');
709+
}
710+
663711
/**
664712
* Grants permission to enable Security Hub V2
665713
*
@@ -752,6 +800,17 @@ export class Securityhub extends PolicyStatement {
752800
return this.to('GetConfigurationPolicyAssociation');
753801
}
754802

803+
/**
804+
* Grants permission to retrieve details for a connector from Security Hub CSPM based on connector id
805+
*
806+
* Access Level: Read
807+
*
808+
* https://docs.aws.amazon.com/securityhub/1.0/APIReference/API_GetConnector.html
809+
*/
810+
public toGetConnector() {
811+
return this.to('GetConnector');
812+
}
813+
755814
/**
756815
* Grants permission to retrieve details for a connector V2 from Security Hub based on connector id
757816
*
@@ -1074,6 +1133,17 @@ export class Securityhub extends PolicyStatement {
10741133
return this.to('ListConfigurationPolicyAssociations');
10751134
}
10761135

1136+
/**
1137+
* Grants permission to retrieve a list of connectors and their metadata for the calling account from Security Hub CSPM
1138+
*
1139+
* Access Level: List
1140+
*
1141+
* https://docs.aws.amazon.com/securityhub/1.0/APIReference/API_ListConnectors.html
1142+
*/
1143+
public toListConnectors() {
1144+
return this.to('ListConnectors');
1145+
}
1146+
10771147
/**
10781148
* Grants permission to retrieve a list of connectors V2 and their metadata for the calling account from Security Hub
10791149
*
@@ -1301,6 +1371,17 @@ export class Securityhub extends PolicyStatement {
13011371
return this.to('UpdateConfigurationPolicy');
13021372
}
13031373

1374+
/**
1375+
* Grants permission to update a connector in Security Hub CSPM based on connector id and input parameters
1376+
*
1377+
* Access Level: Write
1378+
*
1379+
* https://docs.aws.amazon.com/securityhub/1.0/APIReference/API_UpdateConnector.html
1380+
*/
1381+
public toUpdateConnector() {
1382+
return this.to('UpdateConnector');
1383+
}
1384+
13041385
/**
13051386
* Grants permission to update a connector V2 in Security Hub based on connector id and input parameters
13061387
*
@@ -1409,6 +1490,7 @@ export class Securityhub extends PolicyStatement {
14091490
'CreateAutomationRule',
14101491
'CreateAutomationRuleV2',
14111492
'CreateConfigurationPolicy',
1493+
'CreateConnector',
14121494
'CreateConnectorV2',
14131495
'CreateFindingAggregator',
14141496
'CreateInsight',
@@ -1419,6 +1501,7 @@ export class Securityhub extends PolicyStatement {
14191501
'DeleteAggregatorV2',
14201502
'DeleteAutomationRuleV2',
14211503
'DeleteConfigurationPolicy',
1504+
'DeleteConnector',
14221505
'DeleteConnectorV2',
14231506
'DeleteFindingAggregator',
14241507
'DeleteInsight',
@@ -1427,13 +1510,15 @@ export class Securityhub extends PolicyStatement {
14271510
'DisableImportFindingsForProduct',
14281511
'DisableOrganizationAdminAccount',
14291512
'DisableSecurityHub',
1513+
'DisableSecurityHubFeatureV2',
14301514
'DisableSecurityHubV2',
14311515
'DisassociateFromAdministratorAccount',
14321516
'DisassociateFromMasterAccount',
14331517
'DisassociateMembers',
14341518
'EnableImportFindingsForProduct',
14351519
'EnableOrganizationAdminAccount',
14361520
'EnableSecurityHub',
1521+
'EnableSecurityHubFeatureV2',
14371522
'EnableSecurityHubV2',
14381523
'GenerateRecommendedPolicyV2',
14391524
'InviteMembers',
@@ -1443,6 +1528,7 @@ export class Securityhub extends PolicyStatement {
14431528
'UpdateAggregatorV2',
14441529
'UpdateAutomationRuleV2',
14451530
'UpdateConfigurationPolicy',
1531+
'UpdateConnector',
14461532
'UpdateConnectorV2',
14471533
'UpdateFindingAggregator',
14481534
'UpdateFindings',
@@ -1475,6 +1561,7 @@ export class Securityhub extends PolicyStatement {
14751561
'GetAutomationRuleV2',
14761562
'GetConfigurationPolicy',
14771563
'GetConfigurationPolicyAssociation',
1564+
'GetConnector',
14781565
'GetConnectorV2',
14791566
'GetControlFindingSummary',
14801567
'GetFindingAggregator',
@@ -1509,6 +1596,7 @@ export class Securityhub extends PolicyStatement {
15091596
'ListAutomationRulesV2',
15101597
'ListConfigurationPolicies',
15111598
'ListConfigurationPolicyAssociations',
1599+
'ListConnectors',
15121600
'ListConnectorsV2',
15131601
'ListEnabledProductsForImport',
15141602
'ListFindingAggregators',
@@ -1654,6 +1742,23 @@ export class Securityhub extends PolicyStatement {
16541742
return this.on(`arn:${ partition ?? this.defaultPartition }:securityhub:${ region ?? this.defaultRegion }:${ account ?? this.defaultAccount }:configuration-policy/${ configurationPolicyId }`);
16551743
}
16561744

1745+
/**
1746+
* Adds a resource of type connector to the statement
1747+
*
1748+
* https://docs.aws.amazon.com/securityhub/latest/userguide/securityhub-access.html#resources
1749+
*
1750+
* @param connectorId - Identifier for the connectorId.
1751+
* @param account - Account of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's account.
1752+
* @param region - Region of the resource; defaults to `*`, unless using the CDK, where the default is the current Stack's region.
1753+
* @param partition - Partition of the AWS account [aws, aws-cn, aws-us-gov]; defaults to `aws`, unless using the CDK, where the default is the current Stack's partition.
1754+
*
1755+
* Possible conditions:
1756+
* - .ifAwsResourceTag()
1757+
*/
1758+
public onConnector(connectorId: string, account?: string, region?: string, partition?: string) {
1759+
return this.on(`arn:${ partition ?? this.defaultPartition }:securityhub:${ region ?? this.defaultRegion }:${ account ?? this.defaultAccount }:connector/${ connectorId }`);
1760+
}
1761+
16571762
/**
16581763
* Adds a resource of type connectorv2 to the statement
16591764
*
@@ -1680,6 +1785,7 @@ export class Securityhub extends PolicyStatement {
16801785
* - .toCreateAutomationRule()
16811786
* - .toCreateAutomationRuleV2()
16821787
* - .toCreateConfigurationPolicy()
1788+
* - .toCreateConnector()
16831789
* - .toCreateConnectorV2()
16841790
* - .toEnableSecurityHub()
16851791
* - .toEnableSecurityHubV2()
@@ -1704,6 +1810,7 @@ export class Securityhub extends PolicyStatement {
17041810
* - automation-rule
17051811
* - automation-rulev2
17061812
* - configuration-policy
1813+
* - connector
17071814
* - connectorv2
17081815
*
17091816
* @param tagKey The tag key to check
@@ -1723,6 +1830,7 @@ export class Securityhub extends PolicyStatement {
17231830
* - .toCreateAutomationRule()
17241831
* - .toCreateAutomationRuleV2()
17251832
* - .toCreateConfigurationPolicy()
1833+
* - .toCreateConnector()
17261834
* - .toCreateConnectorV2()
17271835
* - .toEnableSecurityHub()
17281836
* - .toEnableSecurityHubV2()

0 commit comments

Comments
 (0)