aws_iam_oidc_providers Resource
Use the aws_iam_oidc_providers
InSpec audit resource to test properties of a set of AWS IAM OpenID Connect (OIDC) providers.
This resource retrieves information about all OIDC providers.
Installation
This resource is available in the Chef InSpec AWS resource pack.
See the Chef InSpec documentation on cloud platforms for information on configuring your AWS environment for InSpec and creating an InSpec profile that uses the InSpec AWS resource pack.
Syntax
Ensure that an OIDC provider exists.
describe aws_iam_oidc_providers do
it { should exist }
end
For additional information, see the AWS documentation on IAM OIDC provider.
Parameters
This resource does not require any parameters.
Properties
arns
- The Amazon Resource Name (ARN).
Examples
Ensure a OIDC Provider is available.
describe aws_iam_oidc_providers do
its('arns') { should include 'OIDC_PROVIDER_ARN' }
end
Matchers
This InSpec audit resource has the following special matchers. For a full list of available matchers, please visit our Universal Matchers page.
The controls will pass if the list
method returns at least one result.
exist
Use should
to test that the entity exists.
describe aws_iam_oidc_providers do
it { should exist }
end
Use should_not
to test the entity does not exist.
describe aws_iam_oidc_providers do
it { should_not exist }
end
be_available
Use should
to check if the OIDC Provider is available.
describe aws_iam_oidc_providers do
it { should be_available }
end
AWS Permissions
Your Principal will need the IAM:Client:ListOpenIDConnectProviderTagsResponse
action with Effect
set to Allow
.
Was this page helpful?