Skip to content

Commit 9de8147

Browse files
This release adds support for policy validation and external access findings for resource control policies (RCP). IAM Access Analyzer helps you author functional and secure RCPs and awareness that a RCP may restrict external access. Updated service API, documentation, and paginators.
1 parent 57bb43d commit 9de8147

14 files changed

+234
-22
lines changed

generator/ServiceModels/accessanalyzer/accessanalyzer-2019-11-01.api.json

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"version":"2.0",
33
"metadata":{
44
"apiVersion":"2019-11-01",
5+
"auth":["aws.auth#sigv4"],
56
"endpointPrefix":"access-analyzer",
67
"protocol":"rest-json",
78
"protocols":["rest-json"],
@@ -723,7 +724,8 @@
723724
"status":{"shape":"FindingStatus"},
724725
"resourceOwnerAccount":{"shape":"String"},
725726
"error":{"shape":"String"},
726-
"sources":{"shape":"FindingSourceList"}
727+
"sources":{"shape":"FindingSourceList"},
728+
"resourceControlPolicyRestriction":{"shape":"ResourceControlPolicyRestriction"}
727729
}
728730
},
729731
"AccessPreviewFindingId":{"type":"string"},
@@ -1291,7 +1293,8 @@
12911293
"condition":{"shape":"ConditionKeyMap"},
12921294
"isPublic":{"shape":"Boolean"},
12931295
"principal":{"shape":"PrincipalMap"},
1294-
"sources":{"shape":"FindingSourceList"}
1296+
"sources":{"shape":"FindingSourceList"},
1297+
"resourceControlPolicyRestriction":{"shape":"ResourceControlPolicyRestriction"}
12951298
}
12961299
},
12971300
"FilterCriteriaMap":{
@@ -1325,7 +1328,8 @@
13251328
"status":{"shape":"FindingStatus"},
13261329
"resourceOwnerAccount":{"shape":"String"},
13271330
"error":{"shape":"String"},
1328-
"sources":{"shape":"FindingSourceList"}
1331+
"sources":{"shape":"FindingSourceList"},
1332+
"resourceControlPolicyRestriction":{"shape":"ResourceControlPolicyRestriction"}
13291333
}
13301334
},
13311335
"FindingChangeType":{
@@ -1425,7 +1429,8 @@
14251429
"status":{"shape":"FindingStatus"},
14261430
"resourceOwnerAccount":{"shape":"String"},
14271431
"error":{"shape":"String"},
1428-
"sources":{"shape":"FindingSourceList"}
1432+
"sources":{"shape":"FindingSourceList"},
1433+
"resourceControlPolicyRestriction":{"shape":"ResourceControlPolicyRestriction"}
14291434
}
14301435
},
14311436
"FindingSummaryV2":{
@@ -2283,7 +2288,8 @@
22832288
"enum":[
22842289
"IDENTITY_POLICY",
22852290
"RESOURCE_POLICY",
2286-
"SERVICE_CONTROL_POLICY"
2291+
"SERVICE_CONTROL_POLICY",
2292+
"RESOURCE_CONTROL_POLICY"
22872293
]
22882294
},
22892295
"Position":{
@@ -2427,6 +2433,14 @@
24272433
"type":"string",
24282434
"pattern":"arn:[^:]*:[^:]*:[^:]*:[^:]*:.*"
24292435
},
2436+
"ResourceControlPolicyRestriction":{
2437+
"type":"string",
2438+
"enum":[
2439+
"APPLICABLE",
2440+
"FAILED_TO_EVALUATE_RCP",
2441+
"NOT_APPLICABLE"
2442+
]
2443+
},
24302444
"ResourceNotFoundException":{
24312445
"type":"structure",
24322446
"required":[

generator/ServiceModels/accessanalyzer/accessanalyzer-2019-11-01.docs.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"AccessCheckPolicyType": {
6464
"base": null,
6565
"refs": {
66-
"CheckAccessNotGrantedRequest$policyType": "<p>The type of policy. Identity policies grant permissions to IAM principals. Identity policies include managed and inline policies for IAM roles, users, and groups.</p> <p>Resource policies grant permissions on Amazon Web Services resources. Resource policies include trust policies for IAM roles and bucket policies for Amazon S3 buckets. You can provide a generic input such as identity policy or resource policy or a specific input such as managed policy or Amazon S3 bucket policy.</p>",
66+
"CheckAccessNotGrantedRequest$policyType": "<p>The type of policy. Identity policies grant permissions to IAM principals. Identity policies include managed and inline policies for IAM roles, users, and groups.</p> <p>Resource policies grant permissions on Amazon Web Services resources. Resource policies include trust policies for IAM roles and bucket policies for Amazon S3 buckets.</p>",
6767
"CheckNoNewAccessRequest$policyType": "<p>The type of policy to compare. Identity policies grant permissions to IAM principals. Identity policies include managed and inline policies for IAM roles, users, and groups.</p> <p>Resource policies grant permissions on Amazon Web Services resources. Resource policies include trust policies for IAM roles and bucket policies for Amazon S3 buckets. You can provide a generic input such as identity policy or resource policy or a specific input such as managed policy or Amazon S3 bucket policy.</p>"
6868
}
6969
},
@@ -159,7 +159,7 @@
159159
"AccessResourcesList": {
160160
"base": null,
161161
"refs": {
162-
"Access$resources": "<p>A list of resources for the access permissions. Any strings that can be used as a resource in an IAM policy can be used in the list of resources to check.</p>"
162+
"Access$resources": "<p>A list of resources for the access permissions. Any strings that can be used as an Amazon Resource Name (ARN) in an IAM policy can be used in the list of resources to check. You can only use a wildcard in the portion of the ARN that specifies the resource ID.</p>"
163163
}
164164
},
165165
"AclCanonicalId": {
@@ -324,7 +324,7 @@
324324
"CheckAccessNotGrantedRequestAccessList": {
325325
"base": null,
326326
"refs": {
327-
"CheckAccessNotGrantedRequest$access": "<p>An access object containing the permissions that shouldn't be granted by the specified policy. If only actions are specified, IAM Access Analyzer checks for access of the actions on all resources in the policy. If only resources are specified, then IAM Access Analyzer checks which actions have access to the specified resources. If both actions and resources are specified, then IAM Access Analyzer checks which of the specified actions have access to the specified resources.</p>"
327+
"CheckAccessNotGrantedRequest$access": "<p>An access object containing the permissions that shouldn't be granted by the specified policy. If only actions are specified, IAM Access Analyzer checks for access to peform at least one of the actions on any resource in the policy. If only resources are specified, then IAM Access Analyzer checks for access to perform any action on at least one of the resources. If both actions and resources are specified, IAM Access Analyzer checks for access to perform at least one of the specified actions on at least one of the specified resources.</p>"
328328
}
329329
},
330330
"CheckAccessNotGrantedResponse": {
@@ -1379,6 +1379,15 @@
13791379
"UpdateFindingsRequest$resourceArn": "<p>The ARN of the resource identified in the finding.</p>"
13801380
}
13811381
},
1382+
"ResourceControlPolicyRestriction": {
1383+
"base": null,
1384+
"refs": {
1385+
"AccessPreviewFinding$resourceControlPolicyRestriction": "<p>The type of restriction applied to the finding by the resource owner with an Organizations resource control policy (RCP).</p>",
1386+
"ExternalAccessDetails$resourceControlPolicyRestriction": "<p>The type of restriction applied to the finding by the resource owner with an Organizations resource control policy (RCP).</p>",
1387+
"Finding$resourceControlPolicyRestriction": "<p>The type of restriction applied to the finding by the resource owner with an Organizations resource control policy (RCP).</p>",
1388+
"FindingSummary$resourceControlPolicyRestriction": "<p>The type of restriction applied to the finding by the resource owner with an Organizations resource control policy (RCP).</p>"
1389+
}
1390+
},
13821391
"ResourceNotFoundException": {
13831392
"base": "<p>The specified resource could not be found.</p>",
13841393
"refs": {

generator/ServiceModels/accessanalyzer/accessanalyzer-2019-11-01.normal.json

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"version":"2.0",
33
"metadata":{
44
"apiVersion":"2019-11-01",
5+
"auth":["aws.auth#sigv4"],
56
"endpointPrefix":"access-analyzer",
67
"protocol":"rest-json",
78
"protocols":["rest-json"],
@@ -660,7 +661,7 @@
660661
},
661662
"resources":{
662663
"shape":"AccessResourcesList",
663-
"documentation":"<p>A list of resources for the access permissions. Any strings that can be used as a resource in an IAM policy can be used in the list of resources to check.</p>"
664+
"documentation":"<p>A list of resources for the access permissions. Any strings that can be used as an Amazon Resource Name (ARN) in an IAM policy can be used in the list of resources to check. You can only use a wildcard in the portion of the ARN that specifies the resource ID.</p>"
664665
}
665666
},
666667
"documentation":"<p>Contains information about actions and resources that define permissions to check against a policy.</p>"
@@ -830,6 +831,10 @@
830831
"sources":{
831832
"shape":"FindingSourceList",
832833
"documentation":"<p>The sources of the finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings.</p>"
834+
},
835+
"resourceControlPolicyRestriction":{
836+
"shape":"ResourceControlPolicyRestriction",
837+
"documentation":"<p>The type of restriction applied to the finding by the resource owner with an Organizations resource control policy (RCP).</p>"
833838
}
834839
},
835840
"documentation":"<p>An access preview finding generated by the access preview.</p>"
@@ -1197,11 +1202,11 @@
11971202
},
11981203
"access":{
11991204
"shape":"CheckAccessNotGrantedRequestAccessList",
1200-
"documentation":"<p>An access object containing the permissions that shouldn't be granted by the specified policy. If only actions are specified, IAM Access Analyzer checks for access of the actions on all resources in the policy. If only resources are specified, then IAM Access Analyzer checks which actions have access to the specified resources. If both actions and resources are specified, then IAM Access Analyzer checks which of the specified actions have access to the specified resources.</p>"
1205+
"documentation":"<p>An access object containing the permissions that shouldn't be granted by the specified policy. If only actions are specified, IAM Access Analyzer checks for access to peform at least one of the actions on any resource in the policy. If only resources are specified, then IAM Access Analyzer checks for access to perform any action on at least one of the resources. If both actions and resources are specified, IAM Access Analyzer checks for access to perform at least one of the specified actions on at least one of the specified resources.</p>"
12011206
},
12021207
"policyType":{
12031208
"shape":"AccessCheckPolicyType",
1204-
"documentation":"<p>The type of policy. Identity policies grant permissions to IAM principals. Identity policies include managed and inline policies for IAM roles, users, and groups.</p> <p>Resource policies grant permissions on Amazon Web Services resources. Resource policies include trust policies for IAM roles and bucket policies for Amazon S3 buckets. You can provide a generic input such as identity policy or resource policy or a specific input such as managed policy or Amazon S3 bucket policy.</p>"
1209+
"documentation":"<p>The type of policy. Identity policies grant permissions to IAM principals. Identity policies include managed and inline policies for IAM roles, users, and groups.</p> <p>Resource policies grant permissions on Amazon Web Services resources. Resource policies include trust policies for IAM roles and bucket policies for Amazon S3 buckets.</p>"
12051210
}
12061211
}
12071212
},
@@ -1749,6 +1754,10 @@
17491754
"sources":{
17501755
"shape":"FindingSourceList",
17511756
"documentation":"<p>The sources of the external access finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings.</p>"
1757+
},
1758+
"resourceControlPolicyRestriction":{
1759+
"shape":"ResourceControlPolicyRestriction",
1760+
"documentation":"<p>The type of restriction applied to the finding by the resource owner with an Organizations resource control policy (RCP).</p>"
17521761
}
17531762
},
17541763
"documentation":"<p>Contains information about an external access finding.</p>"
@@ -1826,6 +1835,10 @@
18261835
"sources":{
18271836
"shape":"FindingSourceList",
18281837
"documentation":"<p>The sources of the finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings.</p>"
1838+
},
1839+
"resourceControlPolicyRestriction":{
1840+
"shape":"ResourceControlPolicyRestriction",
1841+
"documentation":"<p>The type of restriction applied to the finding by the resource owner with an Organizations resource control policy (RCP).</p>"
18291842
}
18301843
},
18311844
"documentation":"<p>Contains information about a finding.</p>"
@@ -1999,6 +2012,10 @@
19992012
"sources":{
20002013
"shape":"FindingSourceList",
20012014
"documentation":"<p>The sources of the finding. This indicates how the access that generated the finding is granted. It is populated for Amazon S3 bucket findings.</p>"
2015+
},
2016+
"resourceControlPolicyRestriction":{
2017+
"shape":"ResourceControlPolicyRestriction",
2018+
"documentation":"<p>The type of restriction applied to the finding by the resource owner with an Organizations resource control policy (RCP).</p>"
20022019
}
20032020
},
20042021
"documentation":"<p>Contains information about a finding.</p>"
@@ -3256,7 +3273,8 @@
32563273
"enum":[
32573274
"IDENTITY_POLICY",
32583275
"RESOURCE_POLICY",
3259-
"SERVICE_CONTROL_POLICY"
3276+
"SERVICE_CONTROL_POLICY",
3277+
"RESOURCE_CONTROL_POLICY"
32603278
]
32613279
},
32623280
"Position":{
@@ -3453,6 +3471,14 @@
34533471
"type":"string",
34543472
"pattern":"arn:[^:]*:[^:]*:[^:]*:[^:]*:.*"
34553473
},
3474+
"ResourceControlPolicyRestriction":{
3475+
"type":"string",
3476+
"enum":[
3477+
"APPLICABLE",
3478+
"FAILED_TO_EVALUATE_RCP",
3479+
"NOT_APPLICABLE"
3480+
]
3481+
},
34563482
"ResourceNotFoundException":{
34573483
"type":"structure",
34583484
"required":[

sdk/src/Services/AccessAnalyzer/Generated/Model/Access.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,10 @@ internal bool IsSetActions()
6161
/// <summary>
6262
/// Gets and sets the property Resources.
6363
/// <para>
64-
/// A list of resources for the access permissions. Any strings that can be used as a
65-
/// resource in an IAM policy can be used in the list of resources to check.
64+
/// A list of resources for the access permissions. Any strings that can be used as an
65+
/// Amazon Resource Name (ARN) in an IAM policy can be used in the list of resources to
66+
/// check. You can only use a wildcard in the portion of the ARN that specifies the resource
67+
/// ID.
6668
/// </para>
6769
/// </summary>
6870
[AWSProperty(Min=0, Max=100)]

sdk/src/Services/AccessAnalyzer/Generated/Model/AccessPreviewFinding.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public partial class AccessPreviewFinding
4545
private bool? _isPublic;
4646
private Dictionary<string, string> _principal = AWSConfigs.InitializeCollections ? new Dictionary<string, string>() : null;
4747
private string _resource;
48+
private ResourceControlPolicyRestriction _resourceControlPolicyRestriction;
4849
private string _resourceOwnerAccount;
4950
private ResourceType _resourceType;
5051
private List<FindingSource> _sources = AWSConfigs.InitializeCollections ? new List<FindingSource>() : null;
@@ -275,6 +276,25 @@ internal bool IsSetResource()
275276
return this._resource != null;
276277
}
277278

279+
/// <summary>
280+
/// Gets and sets the property ResourceControlPolicyRestriction.
281+
/// <para>
282+
/// The type of restriction applied to the finding by the resource owner with an Organizations
283+
/// resource control policy (RCP).
284+
/// </para>
285+
/// </summary>
286+
public ResourceControlPolicyRestriction ResourceControlPolicyRestriction
287+
{
288+
get { return this._resourceControlPolicyRestriction; }
289+
set { this._resourceControlPolicyRestriction = value; }
290+
}
291+
292+
// Check to see if ResourceControlPolicyRestriction property is set
293+
internal bool IsSetResourceControlPolicyRestriction()
294+
{
295+
return this._resourceControlPolicyRestriction != null;
296+
}
297+
278298
/// <summary>
279299
/// Gets and sets the property ResourceOwnerAccount.
280300
/// <para>

sdk/src/Services/AccessAnalyzer/Generated/Model/CheckAccessNotGrantedRequest.cs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,12 @@ public partial class CheckAccessNotGrantedRequest : AmazonAccessAnalyzerRequest
4343
/// Gets and sets the property Access.
4444
/// <para>
4545
/// An access object containing the permissions that shouldn't be granted by the specified
46-
/// policy. If only actions are specified, IAM Access Analyzer checks for access of the
47-
/// actions on all resources in the policy. If only resources are specified, then IAM
48-
/// Access Analyzer checks which actions have access to the specified resources. If both
49-
/// actions and resources are specified, then IAM Access Analyzer checks which of the
50-
/// specified actions have access to the specified resources.
46+
/// policy. If only actions are specified, IAM Access Analyzer checks for access to peform
47+
/// at least one of the actions on any resource in the policy. If only resources are specified,
48+
/// then IAM Access Analyzer checks for access to perform any action on at least one of
49+
/// the resources. If both actions and resources are specified, IAM Access Analyzer checks
50+
/// for access to perform at least one of the specified actions on at least one of the
51+
/// specified resources.
5152
/// </para>
5253
/// </summary>
5354
[AWSProperty(Required=true, Min=0, Max=1)]
@@ -91,9 +92,7 @@ internal bool IsSetPolicyDocument()
9192
///
9293
/// <para>
9394
/// Resource policies grant permissions on Amazon Web Services resources. Resource policies
94-
/// include trust policies for IAM roles and bucket policies for Amazon S3 buckets. You
95-
/// can provide a generic input such as identity policy or resource policy or a specific
96-
/// input such as managed policy or Amazon S3 bucket policy.
95+
/// include trust policies for IAM roles and bucket policies for Amazon S3 buckets.
9796
/// </para>
9897
/// </summary>
9998
[AWSProperty(Required=true)]

sdk/src/Services/AccessAnalyzer/Generated/Model/ExternalAccessDetails.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public partial class ExternalAccessDetails
3838
private Dictionary<string, string> _condition = AWSConfigs.InitializeCollections ? new Dictionary<string, string>() : null;
3939
private bool? _isPublic;
4040
private Dictionary<string, string> _principal = AWSConfigs.InitializeCollections ? new Dictionary<string, string>() : null;
41+
private ResourceControlPolicyRestriction _resourceControlPolicyRestriction;
4142
private List<FindingSource> _sources = AWSConfigs.InitializeCollections ? new List<FindingSource>() : null;
4243

4344
/// <summary>
@@ -115,6 +116,25 @@ internal bool IsSetPrincipal()
115116
return this._principal != null && (this._principal.Count > 0 || !AWSConfigs.InitializeCollections);
116117
}
117118

119+
/// <summary>
120+
/// Gets and sets the property ResourceControlPolicyRestriction.
121+
/// <para>
122+
/// The type of restriction applied to the finding by the resource owner with an Organizations
123+
/// resource control policy (RCP).
124+
/// </para>
125+
/// </summary>
126+
public ResourceControlPolicyRestriction ResourceControlPolicyRestriction
127+
{
128+
get { return this._resourceControlPolicyRestriction; }
129+
set { this._resourceControlPolicyRestriction = value; }
130+
}
131+
132+
// Check to see if ResourceControlPolicyRestriction property is set
133+
internal bool IsSetResourceControlPolicyRestriction()
134+
{
135+
return this._resourceControlPolicyRestriction != null;
136+
}
137+
118138
/// <summary>
119139
/// Gets and sets the property Sources.
120140
/// <para>

0 commit comments

Comments
 (0)