inspec 2.1.72 → 2.1.78
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +25 -13
- data/Gemfile +1 -1
- data/docs/resources/aws_cloudtrail_trail.md.erb +10 -4
- data/docs/resources/aws_cloudtrail_trails.md.erb +6 -1
- data/docs/resources/aws_cloudwatch_alarm.md.erb +10 -5
- data/docs/resources/aws_cloudwatch_log_metric_filter.md.erb +4 -1
- data/docs/resources/aws_config_delivery_channel.md.erb +9 -4
- data/docs/resources/aws_config_recorder.md.erb +10 -5
- data/docs/resources/aws_ec2_instance.md.erb +6 -0
- data/docs/resources/aws_iam_access_key.md.erb +8 -2
- data/docs/resources/aws_iam_access_keys.md.erb +11 -5
- data/docs/resources/aws_iam_group.md.erb +6 -0
- data/docs/resources/aws_iam_groups.md.erb +7 -1
- data/docs/resources/aws_iam_password_policy.md.erb +7 -1
- data/docs/resources/aws_iam_policies.md.erb +8 -3
- data/docs/resources/aws_iam_policy.md.erb +14 -8
- data/docs/resources/aws_iam_role.md.erb +6 -0
- data/docs/resources/aws_iam_root_user.md.erb +6 -0
- data/docs/resources/aws_iam_user.md.erb +9 -4
- data/docs/resources/aws_iam_users.md.erb +12 -6
- data/docs/resources/aws_kms_key.md.erb +11 -5
- data/docs/resources/aws_kms_keys.md.erb +7 -2
- data/docs/resources/aws_rds_instance.md.erb +6 -0
- data/docs/resources/aws_route_table.md.erb +6 -0
- data/docs/resources/aws_route_tables.md.erb +6 -0
- data/docs/resources/aws_s3_bucket.md.erb +7 -1
- data/docs/resources/aws_s3_bucket_object.md.erb +8 -2
- data/docs/resources/aws_s3_buckets.md.erb +7 -1
- data/docs/resources/aws_security_group.md.erb +24 -18
- data/docs/resources/aws_security_groups.md.erb +6 -0
- data/docs/resources/aws_sns_subscription.md.erb +17 -12
- data/docs/resources/aws_sns_topic.md.erb +6 -0
- data/docs/resources/aws_sns_topics.md.erb +6 -0
- data/docs/resources/aws_subnet.md.erb +19 -13
- data/docs/resources/aws_subnets.md.erb +6 -0
- data/docs/resources/aws_vpc.md.erb +6 -1
- data/docs/resources/aws_vpcs.md.erb +6 -0
- data/docs/resources/http.md.erb +6 -6
- data/inspec.gemspec +3 -1
- data/lib/inspec/reporters/automate.rb +1 -1
- data/lib/inspec/version.rb +1 -1
- data/lib/resources/aws/aws_iam_policy.rb +2 -1
- data/lib/resources/aws/aws_security_group.rb +4 -4
- metadata +18 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6913cacdff2e1163ad9a0bc7fede6da1e0a0bf5
|
4
|
+
data.tar.gz: 1b51c4ecd913682ca233bbae1e8aa7582a3e8b5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cdf492653c8f0b3de9d55712866c8246fb03fe71ad8181b8b5adc1726da3c7120caeaa53e14ede1dc0e8c807a1c2a0611ab2daf828963ac59c68e88cff949a77
|
7
|
+
data.tar.gz: 51930b4e867974a431ae272cefe7c9c8f4aec67d0311eddff3dfc15f6f5617a3e69f34dbcee4c6bb9b3c097fb454d9a0bbdd13e5035489a770a93dfdabae92bc
|
data/CHANGELOG.md
CHANGED
@@ -1,34 +1,46 @@
|
|
1
1
|
# Change Log
|
2
2
|
<!-- usage documentation: http://expeditor-docs.es.chef.io/configuration/changelog/ -->
|
3
|
-
<!-- latest_release 2.1.
|
4
|
-
## [v2.1.
|
3
|
+
<!-- latest_release 2.1.78 -->
|
4
|
+
## [v2.1.78](https://github.com/chef/inspec/tree/v2.1.78) (2018-05-16)
|
5
5
|
|
6
|
-
####
|
7
|
-
-
|
6
|
+
#### Merged Pull Requests
|
7
|
+
- Adds middleware dependecy for Azure [#3061](https://github.com/chef/inspec/pull/3061) ([dmccown](https://github.com/dmccown))
|
8
8
|
<!-- latest_release -->
|
9
9
|
|
10
|
-
<!-- release_rollup since=2.1.
|
11
|
-
### Changes since 2.1.
|
10
|
+
<!-- release_rollup since=2.1.72 -->
|
11
|
+
### Changes since 2.1.72 release
|
12
|
+
|
13
|
+
#### Merged Pull Requests
|
14
|
+
- Adds middleware dependecy for Azure [#3061](https://github.com/chef/inspec/pull/3061) ([dmccown](https://github.com/dmccown)) <!-- 2.1.78 -->
|
15
|
+
- Add train GCP transport [#3046](https://github.com/chef/inspec/pull/3046) ([jquick](https://github.com/jquick)) <!-- 2.1.77 -->
|
16
|
+
- Fix www build for node v10 [#3049](https://github.com/chef/inspec/pull/3049) ([miah](https://github.com/miah)) <!-- 2.1.76 -->
|
17
|
+
- Add a passthrough for report_uuid [#3057](https://github.com/chef/inspec/pull/3057) ([jquick](https://github.com/jquick)) <!-- 2.1.75 -->
|
18
|
+
- Updating Copy To Clipboard for ruby users InSpec installation command [#3054](https://github.com/chef/inspec/pull/3054) ([subramani95](https://github.com/subramani95)) <!-- 2.1.74 -->
|
19
|
+
|
20
|
+
#### Bug Fixes
|
21
|
+
- Fix matcher output when the args to the matcher are a hash for two resources [#3044](https://github.com/chef/inspec/pull/3044) ([clintoncwolfe](https://github.com/clintoncwolfe)) <!-- 2.1.73 -->
|
22
|
+
<!-- release_rollup -->
|
23
|
+
|
24
|
+
<!-- latest_stable_release -->
|
25
|
+
## [v2.1.72](https://github.com/chef/inspec/tree/v2.1.72) (2018-05-10)
|
12
26
|
|
13
27
|
#### New Resources
|
14
|
-
- Skeletal aws_ec2_instances resource [#3023](https://github.com/chef/inspec/pull/3023) ([clintoncwolfe](https://github.com/clintoncwolfe))
|
28
|
+
- Skeletal aws_ec2_instances resource [#3023](https://github.com/chef/inspec/pull/3023) ([clintoncwolfe](https://github.com/clintoncwolfe))
|
15
29
|
|
16
30
|
#### Enhancements
|
17
|
-
- Add git dependency to habitat plan. [#3037](https://github.com/chef/inspec/pull/3037) ([phiggins](https://github.com/phiggins))
|
31
|
+
- Add git dependency to habitat plan. [#3037](https://github.com/chef/inspec/pull/3037) ([phiggins](https://github.com/phiggins))
|
18
32
|
|
19
33
|
#### Bug Fixes
|
20
|
-
- Allow the depends key to be exposed in json profiles report [#3033](https://github.com/chef/inspec/pull/3033) ([jquick](https://github.com/jquick))
|
34
|
+
- Allow the depends key to be exposed in json profiles report [#3033](https://github.com/chef/inspec/pull/3033) ([jquick](https://github.com/jquick))
|
21
35
|
|
22
36
|
#### Merged Pull Requests
|
23
|
-
- Fix typo in os_env_spec [#3028](https://github.com/chef/inspec/pull/3028) ([Happycoil](https://github.com/Happycoil))
|
24
|
-
<!-- release_rollup -->
|
25
|
-
|
37
|
+
- Fix typo in os_env_spec [#3028](https://github.com/chef/inspec/pull/3028) ([Happycoil](https://github.com/Happycoil))
|
26
38
|
<!-- latest_stable_release -->
|
39
|
+
|
27
40
|
## [v2.1.68](https://github.com/chef/inspec/tree/v2.1.68) (2018-05-04)
|
28
41
|
|
29
42
|
#### Merged Pull Requests
|
30
43
|
- Fix the A2 vendoring with depends on the A2 server [#3022](https://github.com/chef/inspec/pull/3022) ([jquick](https://github.com/jquick))
|
31
|
-
<!-- latest_stable_release -->
|
32
44
|
|
33
45
|
## [v2.1.67](https://github.com/chef/inspec/tree/v2.1.67) (2018-05-03)
|
34
46
|
|
data/Gemfile
CHANGED
@@ -55,7 +55,7 @@ The following examples show how to use this InSpec audit resource.
|
|
55
55
|
|
56
56
|
## Properties
|
57
57
|
|
58
|
-
* `s3_bucket_name`, `trail_arn`, `cloud_watch_logs_role_arn`, `cloud_watch_logs_log_group_arn`, `kms_key_id`, `home_region`,
|
58
|
+
* `s3_bucket_name`, `trail_arn`, `cloud_watch_logs_role_arn`, `cloud_watch_logs_log_group_arn`, `kms_key_id`, `home_region`,
|
59
59
|
|
60
60
|
<br>
|
61
61
|
|
@@ -95,7 +95,7 @@ Specifies a log group name using an Amazon Resource Name (ARN), a unique identif
|
|
95
95
|
|
96
96
|
### kms\_key\_id
|
97
97
|
|
98
|
-
Specifies the KMS key ID to used to encrypt the logs delivered by CloudTrail.
|
98
|
+
Specifies the KMS key ID to used to encrypt the logs delivered by CloudTrail.
|
99
99
|
|
100
100
|
describe aws_cloudtrail_trail('trail-name') do
|
101
101
|
its('kms_key_id') { should include "key-arn" }
|
@@ -108,11 +108,11 @@ Specifies the region in which the trail was created.
|
|
108
108
|
describe aws_cloudtrail_trail('trail-name') do
|
109
109
|
its('home_region') { should include "us-east-1" }
|
110
110
|
end
|
111
|
-
|
111
|
+
|
112
112
|
### delivered\_logs\_days\_ago
|
113
113
|
|
114
114
|
Specifies the number of days ago the CloudTrail delivered logs to CloudWatch Logs.
|
115
|
-
|
115
|
+
|
116
116
|
# Ensure the latest delivery time was recent
|
117
117
|
describe aws_cloudtrail_trail('trail-name') do
|
118
118
|
its('delivered_logs_days_ago') { should eq 0 }
|
@@ -147,3 +147,9 @@ The test will pass if the identified trail has log file integrity validation is
|
|
147
147
|
describe aws_cloudtrail_trail('trail-name') do
|
148
148
|
it { should be_log_file_validation_enabled }
|
149
149
|
end
|
150
|
+
|
151
|
+
## AWS Permissions
|
152
|
+
|
153
|
+
Your [Principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/intro-structure.html#intro-structure-principal) will need the `cloudtrail:DescribeTrails` action with Effect set to Allow.
|
154
|
+
|
155
|
+
You can find detailed documentation at [Actions, Resources, and Condition Keys for AWS CloudTrail](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_awscloudtrail.html).
|
@@ -77,5 +77,10 @@ The control will pass if the filter returns at least one result. Use `should_not
|
|
77
77
|
# Verify that at least one CloudTrail Trail exists.
|
78
78
|
describe aws_cloudtrail_trails
|
79
79
|
it { should exist }
|
80
|
-
end
|
80
|
+
end
|
81
|
+
|
82
|
+
## AWS Permissions
|
83
|
+
|
84
|
+
Your [Principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/intro-structure.html#intro-structure-principal) will need the `cloudtrail:DescribeTrails` action with Effect set to Allow.
|
81
85
|
|
86
|
+
You can find detailed documentation at [Actions, Resources, and Condition Keys for AWS CloudTrail](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_awscloudtrail.html).
|
@@ -34,9 +34,9 @@ The following examples show how to use this InSpec audit resource.
|
|
34
34
|
describe aws_cloudwatch_alarm(
|
35
35
|
metric: 'my-metric-name',
|
36
36
|
metric_namespace: 'my-metric-namespace',
|
37
|
-
) do
|
37
|
+
) do
|
38
38
|
its('alarm_actions') { should_not be_empty }
|
39
|
-
end
|
39
|
+
end
|
40
40
|
|
41
41
|
<br>
|
42
42
|
|
@@ -54,7 +54,7 @@ The following examples show how to use this InSpec audit resource.
|
|
54
54
|
describe aws_cloudwatch_alarm(
|
55
55
|
metric: 'bed-metric',
|
56
56
|
metric_namespace: 'my-metric-namespace',
|
57
|
-
) do
|
57
|
+
) do
|
58
58
|
its('alarm_actions') { should_not be_empty }
|
59
59
|
end
|
60
60
|
|
@@ -72,7 +72,7 @@ The control will pass if a Cloudwatch Alarm could be found. Use `should_not` if
|
|
72
72
|
describe aws_cloudwatch_alarm(
|
73
73
|
metric: 'good-metric',
|
74
74
|
metric_namespace: 'my-metric-namespace',
|
75
|
-
) do
|
75
|
+
) do
|
76
76
|
it { should exist }
|
77
77
|
end
|
78
78
|
|
@@ -80,7 +80,12 @@ The control will pass if a Cloudwatch Alarm could be found. Use `should_not` if
|
|
80
80
|
describe aws_cloudwatch_alarm(
|
81
81
|
metric: 'bed-metric',
|
82
82
|
metric_namespace: 'my-metric-namespace',
|
83
|
-
) do
|
83
|
+
) do
|
84
84
|
it { should_not exist }
|
85
85
|
end
|
86
86
|
|
87
|
+
## AWS Permissions
|
88
|
+
|
89
|
+
Your [Principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/intro-structure.html#intro-structure-principal) will need the `cloudwatch:DescribeAlarmsForMetric` action with Effect set to Allow.
|
90
|
+
|
91
|
+
You can find detailed documentation at [Actions, Resources, and Condition Keys for Amazon CloudWatch](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazoncloudwatch.html).
|
@@ -99,7 +99,7 @@ The name of the LMF within the `log_group`.
|
|
99
99
|
|
100
100
|
The name of the log group that the LMF is watching.
|
101
101
|
|
102
|
-
# Check which log group the LMF 'error-watcher' is watching
|
102
|
+
# Check which log group the LMF 'error-watcher' is watching
|
103
103
|
describe aws_cloudwatch_log_metric_filter(
|
104
104
|
filter_name: 'error-watcher',
|
105
105
|
) do
|
@@ -147,5 +147,8 @@ Matches (i.e., passes the test) if the resource parameters (search criteria) wer
|
|
147
147
|
it { should exist }
|
148
148
|
end
|
149
149
|
|
150
|
+
## AWS Permissions
|
150
151
|
|
152
|
+
Your [Principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/intro-structure.html#intro-structure-principal) will need the `cloudwatch:DescribeAlarmsForMetric` action with Effect set to Allow.
|
151
153
|
|
154
|
+
You can find detailed documentation at [Actions, Resources, and Condition Keys for Amazon CloudWatch](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazoncloudwatch.html).
|
@@ -44,7 +44,7 @@ The following examples show how to use this InSpec audit resource.
|
|
44
44
|
describe aws_config_delivery_channel(channel_name: 'my-recorder') do
|
45
45
|
its(delivery_frequency_in_hours) { should be > 3 }
|
46
46
|
end
|
47
|
-
|
47
|
+
|
48
48
|
## Properties
|
49
49
|
|
50
50
|
### channel\_name
|
@@ -71,7 +71,7 @@ Provides the name of the s3 bucket that the channel sends configuration changes
|
|
71
71
|
describe aws_config_delivery_channel(channel_name: 'my_channel')
|
72
72
|
its('s3_bucket_name') { should eq 'my_bucket' }
|
73
73
|
end
|
74
|
-
|
74
|
+
|
75
75
|
### s3\_key\_prefix
|
76
76
|
|
77
77
|
Provides the s3 object key prefix (or "path") under which configuration data will be recorded.
|
@@ -79,7 +79,7 @@ Provides the s3 object key prefix (or "path") under which configuration data wil
|
|
79
79
|
describe aws_config_delivery_channel(channel_name: 'my_channel')
|
80
80
|
its('s3_key_prefix') { should eq 'log/' }
|
81
81
|
end
|
82
|
-
|
82
|
+
|
83
83
|
### sns\_topic\_arn
|
84
84
|
|
85
85
|
Provides the ARN of the SNS topic for which the channel sends notifications about configuration changes.
|
@@ -87,10 +87,15 @@ Provides the ARN of the SNS topic for which the channel sends notifications abou
|
|
87
87
|
describe aws_config_delivery_channel(channel_name: 'my_channel')
|
88
88
|
its('sns_topic_arn') { should eq 'arn:aws:sns:us-east-1:721741954427:sns_topic' }
|
89
89
|
end
|
90
|
-
|
90
|
+
|
91
91
|
<br>
|
92
92
|
|
93
93
|
## Matchers
|
94
94
|
|
95
95
|
This resource provides no matchers, aside from the standard `exist` matcher.
|
96
96
|
|
97
|
+
## AWS Permissions
|
98
|
+
|
99
|
+
Your [Principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/intro-structure.html#intro-structure-principal) will need the `config:DescribeDeliveryChannels` action with Effect set to Allow.
|
100
|
+
|
101
|
+
You can find detailed documentation at [Actions, Resources, and Condition Keys for AWS Config](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_awsconfig.html).
|
@@ -43,7 +43,7 @@ The following examples show how to use this InSpec audit resource.
|
|
43
43
|
describe aws_config_recorder(recorder_name: 'my-recorder') do
|
44
44
|
it { should be_recording }
|
45
45
|
end
|
46
|
-
|
46
|
+
|
47
47
|
## Properties
|
48
48
|
|
49
49
|
### role\_arn
|
@@ -53,7 +53,7 @@ Provides the IAM role arn associated with the configuration recorder. The role
|
|
53
53
|
describe aws_config_recorder(username: 'bob')
|
54
54
|
its('role_arn') { should eq 'arn:aws:iam::721741954427:role/My_Recorder' }
|
55
55
|
end
|
56
|
-
|
56
|
+
|
57
57
|
### resource\_types
|
58
58
|
|
59
59
|
Provides a list of AWS resource types for which the AWS Config records configuration will change. Note that if be_recording_all_resource_types is true than this property is meaningless and will return and empty array.
|
@@ -62,7 +62,7 @@ Provides a list of AWS resource types for which the AWS Config records configura
|
|
62
62
|
its('resource_types') { should include 'AWS::EC2::CustomerGateway' }
|
63
63
|
its('resource_types') { should include 'AWS::EC2::EIP' }
|
64
64
|
end
|
65
|
-
|
65
|
+
|
66
66
|
<br>
|
67
67
|
|
68
68
|
## Matchers
|
@@ -72,10 +72,15 @@ Provides a list of AWS resource types for which the AWS Config records configura
|
|
72
72
|
Indicates if the ConfigurationRecorder will record changes for all resources, regardless of type. If this is true, resource_types is ignored.
|
73
73
|
|
74
74
|
it { should be_recording_all_resource_types }
|
75
|
-
|
75
|
+
|
76
76
|
### be\_recording\_all\_global\_types
|
77
77
|
|
78
|
-
Indicates whether the ConfigurationRecorder will record changes for global resource types (such as IAM
|
78
|
+
Indicates whether the ConfigurationRecorder will record changes for global resource types (such as [Principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/intro-structure.html#intro-structure-principal)s).
|
79
79
|
|
80
80
|
it { should be_recording_all_global_types }
|
81
81
|
|
82
|
+
## AWS Permissions
|
83
|
+
|
84
|
+
Your [Principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/intro-structure.html#intro-structure-principal) will need the `config:DescribeConfigurationRecorders` action with Effect set to Allow.
|
85
|
+
|
86
|
+
You can find detailed documentation at [Actions, Resources, and Condition Keys for AWS Config](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_awsconfig.html).
|
@@ -104,3 +104,9 @@ The `be_terminated` matcher tests if the described EC2 instance state is `termin
|
|
104
104
|
The `be_unknown` matcher tests if the described EC2 instance state is `unknown`. This indicates an error condition in the AWS management system. This state should be temporary.
|
105
105
|
|
106
106
|
it { should be_unknown }
|
107
|
+
|
108
|
+
## AWS Permissions
|
109
|
+
|
110
|
+
Your [Principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/intro-structure.html#intro-structure-principal) will need the `ec2:DescribeInstances`, and `iam:GetInstanceProfile` actions set to allow.
|
111
|
+
|
112
|
+
You can find detailed documentation at [Actions, Resources, and Condition Keys for Amazon EC2](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_amazonec2.html), and [Actions, Resources, and Condition Keys for Identity And Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_identityandaccessmanagement.html).
|
@@ -11,7 +11,7 @@ Use the `aws_iam_access_key` InSpec audit resource to test properties of a singl
|
|
11
11
|
|
12
12
|
## Syntax
|
13
13
|
|
14
|
-
An `aws_iam_access_key` resource block declares the tests for a single AWS IAM access key. An access key is uniquely identified by its access key id.
|
14
|
+
An `aws_iam_access_key` resource block declares the tests for a single AWS IAM access key. An access key is uniquely identified by its access key id.
|
15
15
|
|
16
16
|
# This is unique - the key will either exist or it won't, but it will never be an error.
|
17
17
|
describe aws_iam_access_key(access_key_id: 'AKIA12345678ABCD') do
|
@@ -25,7 +25,7 @@ An `aws_iam_access_key` resource block declares the tests for a single AWS IAM a
|
|
25
25
|
describe aws_iam_access_key(id: 'AKIA12345678ABCD') do
|
26
26
|
# Same
|
27
27
|
end
|
28
|
-
|
28
|
+
|
29
29
|
|
30
30
|
Access keys are associated with IAM users, who may have zero, one or two access keys. You may also lookup an access key by username. If the user has more than one access key, an error occurs (You may use `aws_iam_access_keys` with the `username` resource parameter to access a user's keys when they have multiple keys.)
|
31
31
|
|
@@ -121,3 +121,9 @@ This InSpec audit resource has the following special matchers. For a full list o
|
|
121
121
|
The `be_active` matcher tests if the described IAM access key is active.
|
122
122
|
|
123
123
|
it { should be_active }
|
124
|
+
|
125
|
+
## AWS Permissions
|
126
|
+
|
127
|
+
Your [Principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/intro-structure.html#intro-structure-principal) will need the `iam:ListAccessKeys` action with Effect set to Allow.
|
128
|
+
|
129
|
+
You can find detailed documentation at [Actions, Resources, and Condition Keys for Identity And Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_identityandaccessmanagement.html).
|
@@ -7,7 +7,7 @@ platform: aws
|
|
7
7
|
|
8
8
|
Use the `aws_iam_access_keys` InSpec audit resource to test properties of some or all IAM Access Keys.
|
9
9
|
|
10
|
-
To test properties of a single Access Key, use the `aws_iam_access_key` resource instead.
|
10
|
+
To test properties of a single Access Key, use the `aws_iam_access_key` resource instead.
|
11
11
|
To test properties of an individual user's access keys, use the `aws_iam_user` resource.
|
12
12
|
|
13
13
|
Access Keys are closely related to AWS User resources. Use this resource to perform audits of all keys or of keys specified by criteria unrelated to any particular user.
|
@@ -26,12 +26,12 @@ An `aws_iam_access_keys` resource block uses an optional filter to select a grou
|
|
26
26
|
# Don't let fred have access keys, using filter argument syntax
|
27
27
|
describe aws_iam_access_keys.where(username: 'fred') do
|
28
28
|
it { should_not exist }
|
29
|
-
end
|
29
|
+
end
|
30
30
|
|
31
31
|
# Don't let fred have access keys, using filter block syntax (most flexible)
|
32
32
|
describe aws_iam_access_keys.where { username == 'fred' } do
|
33
33
|
it { should_not exist }
|
34
|
-
end
|
34
|
+
end
|
35
35
|
|
36
36
|
<br>
|
37
37
|
|
@@ -43,7 +43,7 @@ The following examples show how to use this InSpec audit resource.
|
|
43
43
|
|
44
44
|
describe aws_iam_access_keys.where { created_days_ago > 90 } do
|
45
45
|
it { should_not exist }
|
46
|
-
end
|
46
|
+
end
|
47
47
|
|
48
48
|
<br>
|
49
49
|
|
@@ -195,4 +195,10 @@ The control will pass if the filter returns at least one result. Use `should_not
|
|
195
195
|
# Don't let fred have access keys
|
196
196
|
describe aws_iam_access_keys.where(username: 'fred') do
|
197
197
|
it { should_not exist }
|
198
|
-
end
|
198
|
+
end
|
199
|
+
|
200
|
+
## AWS Permissions
|
201
|
+
|
202
|
+
Your [Principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/intro-structure.html#intro-structure-principal) will need the `iam:ListAccessKeys`, and `iam:ListUsers` action with Effect set to Allow.
|
203
|
+
|
204
|
+
You can find detailed documentation at [Actions, Resources, and Condition Keys for Identity And Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_identityandaccessmanagement.html).
|
@@ -56,3 +56,9 @@ The control will pass if a group with the given group name exists.
|
|
56
56
|
describe aws_iam_group('mygroup')
|
57
57
|
it { should exist }
|
58
58
|
end
|
59
|
+
|
60
|
+
## AWS Permissions
|
61
|
+
|
62
|
+
Your [Principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/intro-structure.html#intro-structure-principal) will need the `iam:GetGroup` action with Effect set to Allow.
|
63
|
+
|
64
|
+
You can find detailed documentation at [Actions, Resources, and Condition Keys for Identity And Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_identityandaccessmanagement.html).
|
@@ -32,7 +32,7 @@ As this is the initial release of `aws_iam_groups`, its limited functionality pr
|
|
32
32
|
|
33
33
|
## Matchers
|
34
34
|
|
35
|
-
For a full list of available matchers, please visit our [matchers page](https://www.inspec.io/docs/reference/matchers/).
|
35
|
+
For a full list of available matchers, please visit our [matchers page](https://www.inspec.io/docs/reference/matchers/).
|
36
36
|
|
37
37
|
### exists
|
38
38
|
|
@@ -41,3 +41,9 @@ The control will pass if the filter returns at least one result. Use `should_not
|
|
41
41
|
describe aws_iam_groups
|
42
42
|
it { should exist }
|
43
43
|
end
|
44
|
+
|
45
|
+
## AWS Permissions
|
46
|
+
|
47
|
+
Your [Principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/intro-structure.html#intro-structure-principal) will need the `iam:ListGroups` action with Effect set to Allow.
|
48
|
+
|
49
|
+
You can find detailed documentation at [Actions, Resources, and Condition Keys for Identity And Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_identityandaccessmanagement.html).
|
@@ -71,6 +71,12 @@ The following examples show how to use this InSpec audit resource.
|
|
71
71
|
|
72
72
|
## Matchers
|
73
73
|
|
74
|
-
This resource uses the following special matchers. For a full list of available matchers, please visit our [matchers page](https://www.inspec.io/docs/reference/matchers/).
|
74
|
+
This resource uses the following special matchers. For a full list of available matchers, please visit our [matchers page](https://www.inspec.io/docs/reference/matchers/).
|
75
75
|
|
76
76
|
* `allows_users_to_change_passwords`, `expire_passwords`, `prevent_password_reuse`, `require_lowercase_characters` , `require_uppercase_characters`, `require_numbers`, `require_symbols`
|
77
|
+
|
78
|
+
## AWS Permissions
|
79
|
+
|
80
|
+
Your [Principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/intro-structure.html#intro-structure-principal) will need the `iam:GetAccountPasswordPolicy` action with Effect set to Allow.
|
81
|
+
|
82
|
+
You can find detailed documentation at [Actions, Resources, and Condition Keys for Identity And Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_identityandaccessmanagement.html).
|
@@ -7,7 +7,7 @@ platform: aws
|
|
7
7
|
|
8
8
|
Use the `aws_iam_policies` InSpec audit resource to test properties of some or all AWS IAM Policies.
|
9
9
|
|
10
|
-
A policy is an entity in AWS that, when attached to an identity or resource, defines their permissions. AWS evaluates these policies when a principal, such as a user, makes a request. Permissions in the policies determine if the request is allowed or denied.
|
10
|
+
A policy is an entity in AWS that, when attached to an identity or resource, defines their permissions. AWS evaluates these policies when a principal, such as a user, makes a request. Permissions in the policies determine if the request is allowed or denied.
|
11
11
|
|
12
12
|
Each IAM Policy is uniquely identified by either its `policy_name` or `arn`.
|
13
13
|
|
@@ -69,7 +69,7 @@ Provides access to the raw results of the query. This can be useful for checking
|
|
69
69
|
|
70
70
|
## Matchers
|
71
71
|
|
72
|
-
For a full list of available matchers, please visit our [matchers page](https://www.inspec.io/docs/reference/matchers/).
|
72
|
+
For a full list of available matchers, please visit our [matchers page](https://www.inspec.io/docs/reference/matchers/).
|
73
73
|
|
74
74
|
### exists
|
75
75
|
|
@@ -78,5 +78,10 @@ The control will pass if the filter returns at least one result. Use `should_not
|
|
78
78
|
# Verify that at least one IAM Policies exists.
|
79
79
|
describe aws_iam_policies
|
80
80
|
it { should exist }
|
81
|
-
end
|
81
|
+
end
|
82
|
+
|
83
|
+
## AWS Permissions
|
84
|
+
|
85
|
+
Your [Principal](https://docs.aws.amazon.com/IAM/latest/UserGuide/intro-structure.html#intro-structure-principal) will need the `iam:ListPolicies` action with Effect set to Allow.
|
82
86
|
|
87
|
+
You can find detailed documentation at [Actions, Resources, and Condition Keys for Identity And Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/list_identityandaccessmanagement.html).
|