Skip to content

Commit a4763e9

Browse files
author
AWS
committed
Access Analyzer Update: This release adds support for the ValidatePolicy API. IAM Access Analyzer is adding over 100 policy checks and actionable recommendations that help you validate your policies during authoring.
1 parent 605294e commit a4763e9

File tree

3 files changed

+257
-1
lines changed

3 files changed

+257
-1
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "feature",
3+
"category": "Access Analyzer",
4+
"contributor": "",
5+
"description": "This release adds support for the ValidatePolicy API. IAM Access Analyzer is adding over 100 policy checks and actionable recommendations that help you validate your policies during authoring."
6+
}

services/accessanalyzer/src/main/resources/codegen-resources/paginators-1.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@
3535
"output_token": "nextToken",
3636
"limit_key": "maxResults",
3737
"result_key": "findings"
38+
},
39+
"ValidatePolicy": {
40+
"input_token": "nextToken",
41+
"output_token": "nextToken",
42+
"limit_key": "maxResults",
43+
"result_key": "findings"
3844
}
3945
}
4046
}

services/accessanalyzer/src/main/resources/codegen-resources/service-2.json

Lines changed: 245 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
{"shape":"ThrottlingException"},
8989
{"shape":"AccessDeniedException"}
9090
],
91-
"documentation":"<p>Creates an archive rule for the specified analyzer. Archive rules automatically archive new findings that meet the criteria you define when you create the rule.</p>",
91+
"documentation":"<p>Creates an archive rule for the specified analyzer. Archive rules automatically archive new findings that meet the criteria you define when you create the rule.</p> <p>To learn about filter keys that you can use to create an archive rule, see <a href=\"https://docs.aws.amazon.com/IAM/latest/UserGuide/access-analyzer-reference-filter-keys.html\">Access Analyzer filter keys</a> in the <b>IAM User Guide</b>.</p>",
9292
"idempotent":true
9393
},
9494
"DeleteAnalyzer":{
@@ -432,6 +432,23 @@
432432
],
433433
"documentation":"<p>Updates the status for the specified findings.</p>",
434434
"idempotent":true
435+
},
436+
"ValidatePolicy":{
437+
"name":"ValidatePolicy",
438+
"http":{
439+
"method":"POST",
440+
"requestUri":"/policy/validation",
441+
"responseCode":200
442+
},
443+
"input":{"shape":"ValidatePolicyRequest"},
444+
"output":{"shape":"ValidatePolicyResponse"},
445+
"errors":[
446+
{"shape":"ValidationException"},
447+
{"shape":"InternalServerException"},
448+
{"shape":"ThrottlingException"},
449+
{"shape":"AccessDeniedException"}
450+
],
451+
"documentation":"<p>Requests the validation of a policy and returns a list of findings. The findings help you identify issues and provide actionable recommendations to resolve the issue and enable you to author functional policies that meet security best practices. </p>"
435452
}
436453
},
437454
"shapes":{
@@ -1540,6 +1557,7 @@
15401557
},
15411558
"documentation":"<p>This configuration sets the Amazon S3 access point network origin to <code>Internet</code>.</p>"
15421559
},
1560+
"IssueCode":{"type":"string"},
15431561
"IssuingAccount":{"type":"string"},
15441562
"KmsConstraintsKey":{"type":"string"},
15451563
"KmsConstraintsMap":{
@@ -1640,6 +1658,7 @@
16401658
"value":{"shape":"KmsKeyPolicy"}
16411659
},
16421660
"KmsKeyPolicy":{"type":"string"},
1661+
"LearnMoreLink":{"type":"string"},
16431662
"ListAccessPreviewFindingsRequest":{
16441663
"type":"structure",
16451664
"required":[
@@ -1905,6 +1924,43 @@
19051924
},
19061925
"documentation":"<p>The response to the request.</p>"
19071926
},
1927+
"Locale":{
1928+
"type":"string",
1929+
"enum":[
1930+
"DE",
1931+
"EN",
1932+
"ES",
1933+
"FR",
1934+
"IT",
1935+
"JA",
1936+
"KO",
1937+
"PT_BR",
1938+
"ZH_CN",
1939+
"ZH_TW"
1940+
]
1941+
},
1942+
"Location":{
1943+
"type":"structure",
1944+
"required":[
1945+
"path",
1946+
"span"
1947+
],
1948+
"members":{
1949+
"path":{
1950+
"shape":"PathElementList",
1951+
"documentation":"<p>A path in a policy, represented as a sequence of path elements.</p>"
1952+
},
1953+
"span":{
1954+
"shape":"Span",
1955+
"documentation":"<p>A span in a policy.</p>"
1956+
}
1957+
},
1958+
"documentation":"<p>A location in a policy that is represented as a path through the JSON representation and a corresponding span.</p>"
1959+
},
1960+
"LocationList":{
1961+
"type":"list",
1962+
"member":{"shape":"Location"}
1963+
},
19081964
"Name":{
19091965
"type":"string",
19101966
"max":255,
@@ -1930,7 +1986,66 @@
19301986
"DESC"
19311987
]
19321988
},
1989+
"PathElement":{
1990+
"type":"structure",
1991+
"members":{
1992+
"index":{
1993+
"shape":"Integer",
1994+
"documentation":"<p>Refers to an index in a JSON array.</p>"
1995+
},
1996+
"key":{
1997+
"shape":"String",
1998+
"documentation":"<p>Refers to a key in a JSON object.</p>"
1999+
},
2000+
"substring":{
2001+
"shape":"Substring",
2002+
"documentation":"<p>Refers to a substring of a literal string in a JSON object.</p>"
2003+
},
2004+
"value":{
2005+
"shape":"String",
2006+
"documentation":"<p>Refers to the value associated with a given key in a JSON object.</p>"
2007+
}
2008+
},
2009+
"documentation":"<p>A single element in a path through the JSON representation of a policy.</p>",
2010+
"union":true
2011+
},
2012+
"PathElementList":{
2013+
"type":"list",
2014+
"member":{"shape":"PathElement"}
2015+
},
2016+
"PolicyDocument":{"type":"string"},
19332017
"PolicyName":{"type":"string"},
2018+
"PolicyType":{
2019+
"type":"string",
2020+
"enum":[
2021+
"IDENTITY_POLICY",
2022+
"RESOURCE_POLICY",
2023+
"SERVICE_CONTROL_POLICY"
2024+
]
2025+
},
2026+
"Position":{
2027+
"type":"structure",
2028+
"required":[
2029+
"column",
2030+
"line",
2031+
"offset"
2032+
],
2033+
"members":{
2034+
"column":{
2035+
"shape":"Integer",
2036+
"documentation":"<p>The column of the position, starting from 0.</p>"
2037+
},
2038+
"line":{
2039+
"shape":"Integer",
2040+
"documentation":"<p>The line of the position, starting from 1.</p>"
2041+
},
2042+
"offset":{
2043+
"shape":"Integer",
2044+
"documentation":"<p>The offset within the policy that corresponds to the position, starting from 0.</p>"
2045+
}
2046+
},
2047+
"documentation":"<p>A position in a policy.</p>"
2048+
},
19342049
"PrincipalMap":{
19352050
"type":"map",
19362051
"key":{"shape":"String"},
@@ -2132,6 +2247,24 @@
21322247
},
21332248
"documentation":"<p>The criteria used to sort.</p>"
21342249
},
2250+
"Span":{
2251+
"type":"structure",
2252+
"required":[
2253+
"end",
2254+
"start"
2255+
],
2256+
"members":{
2257+
"end":{
2258+
"shape":"Position",
2259+
"documentation":"<p>The end position of the span (exclusive).</p>"
2260+
},
2261+
"start":{
2262+
"shape":"Position",
2263+
"documentation":"<p>The start position of the span (inclusive).</p>"
2264+
}
2265+
},
2266+
"documentation":"<p>A span in a policy. The span consists of a start position (inclusive) and end position (exclusive).</p>"
2267+
},
21352268
"SqsQueueConfiguration":{
21362269
"type":"structure",
21372270
"members":{
@@ -2173,6 +2306,24 @@
21732306
"documentation":"<p>Provides more details about the current status of the analyzer. For example, if the creation for the analyzer fails, a <code>Failed</code> status is returned. For an analyzer with organization as the type, this failure can be due to an issue with creating the service-linked roles required in the member accounts of the AWS organization.</p>"
21742307
},
21752308
"String":{"type":"string"},
2309+
"Substring":{
2310+
"type":"structure",
2311+
"required":[
2312+
"length",
2313+
"start"
2314+
],
2315+
"members":{
2316+
"length":{
2317+
"shape":"Integer",
2318+
"documentation":"<p>The length of the substring.</p>"
2319+
},
2320+
"start":{
2321+
"shape":"Integer",
2322+
"documentation":"<p>The start index of the substring, starting from 0.</p>"
2323+
}
2324+
},
2325+
"documentation":"<p>A reference to a substring of a literal string in a JSON document.</p>"
2326+
},
21762327
"TagKeys":{
21772328
"type":"list",
21782329
"member":{"shape":"String"}
@@ -2331,6 +2482,99 @@
23312482
},
23322483
"documentation":"<p>Updates findings with the new values provided in the request.</p>"
23332484
},
2485+
"ValidatePolicyFinding":{
2486+
"type":"structure",
2487+
"required":[
2488+
"findingDetails",
2489+
"findingType",
2490+
"issueCode",
2491+
"learnMoreLink",
2492+
"locations"
2493+
],
2494+
"members":{
2495+
"findingDetails":{
2496+
"shape":"String",
2497+
"documentation":"<p>A localized message that explains the finding and provides guidance on how to address it.</p>"
2498+
},
2499+
"findingType":{
2500+
"shape":"ValidatePolicyFindingType",
2501+
"documentation":"<p>The impact of the finding.</p> <p>Security warnings report when the policy allows access that we consider overly permissive.</p> <p>Errors report when a part of the policy is not functional.</p> <p>Warnings report non-security issues when a policy does not conform to policy writing best practices.</p> <p>Suggestions recommend stylistic improvements in the policy that do not impact access.</p>"
2502+
},
2503+
"issueCode":{
2504+
"shape":"IssueCode",
2505+
"documentation":"<p>The issue code provides an identifier of the issue associated with this finding.</p>"
2506+
},
2507+
"learnMoreLink":{
2508+
"shape":"LearnMoreLink",
2509+
"documentation":"<p>A link to additional documentation about the type of finding.</p>"
2510+
},
2511+
"locations":{
2512+
"shape":"LocationList",
2513+
"documentation":"<p>The list of locations in the policy document that are related to the finding. The issue code provides a summary of an issue identified by the finding.</p>"
2514+
}
2515+
},
2516+
"documentation":"<p>A finding in a policy. Each finding is an actionable recommendation that can be used to improve the policy.</p>"
2517+
},
2518+
"ValidatePolicyFindingList":{
2519+
"type":"list",
2520+
"member":{"shape":"ValidatePolicyFinding"}
2521+
},
2522+
"ValidatePolicyFindingType":{
2523+
"type":"string",
2524+
"enum":[
2525+
"ERROR",
2526+
"SECURITY_WARNING",
2527+
"SUGGESTION",
2528+
"WARNING"
2529+
]
2530+
},
2531+
"ValidatePolicyRequest":{
2532+
"type":"structure",
2533+
"required":[
2534+
"policyDocument",
2535+
"policyType"
2536+
],
2537+
"members":{
2538+
"locale":{
2539+
"shape":"Locale",
2540+
"documentation":"<p>The locale to use for localizing the findings.</p>"
2541+
},
2542+
"maxResults":{
2543+
"shape":"Integer",
2544+
"documentation":"<p>The maximum number of results to return in the response.</p>",
2545+
"location":"querystring",
2546+
"locationName":"maxResults"
2547+
},
2548+
"nextToken":{
2549+
"shape":"Token",
2550+
"documentation":"<p>A token used for pagination of results returned.</p>",
2551+
"location":"querystring",
2552+
"locationName":"nextToken"
2553+
},
2554+
"policyDocument":{
2555+
"shape":"PolicyDocument",
2556+
"documentation":"<p>The JSON policy document to use as the content for the policy.</p>"
2557+
},
2558+
"policyType":{
2559+
"shape":"PolicyType",
2560+
"documentation":"<p>The type of policy to validate. Identity policies grant permissions to IAM principals. Identity policies include managed and inline policies for IAM roles, users, and groups. They also include service-control policies (SCPs) that are attached to an AWS organization, organizational unit (OU), or an account.</p> <p>Resource policies grant permissions on AWS resources. Resource policies include trust policies for IAM roles and bucket policies for S3 buckets. You can provide a generic input such as identity policy or resource policy or a specific input such as managed policy or S3 bucket policy. </p>"
2561+
}
2562+
}
2563+
},
2564+
"ValidatePolicyResponse":{
2565+
"type":"structure",
2566+
"required":["findings"],
2567+
"members":{
2568+
"findings":{
2569+
"shape":"ValidatePolicyFindingList",
2570+
"documentation":"<p>The list of findings in a policy returned by Access Analyzer based on its suite of policy checks.</p>"
2571+
},
2572+
"nextToken":{
2573+
"shape":"Token",
2574+
"documentation":"<p>A token used for pagination of results returned.</p>"
2575+
}
2576+
}
2577+
},
23342578
"ValidationException":{
23352579
"type":"structure",
23362580
"required":[

0 commit comments

Comments
 (0)