aws_signer_profile_permissions resource
Use the aws_signer_profile_permissions InSpec audit resource to test properties of multiple AWS Signer profile permissions.
The AWS::Signer::ProfilePermission resource adds cross-account permissions to a signing profile.
For additional information, including details on parameters and properties, see the AWS documentation on AWS Signer ProfilePermission.
Syntax
Ensure that the profile permission exists.
describe aws_signer_profile_permissions(profile_name: 'PROFILE_NAME') do
it { should exist }
end
Parameters
profile_name(required)Name of the signing profile containing the cross-account permissions.
Properties
actions- An AWS Signer action permitted as part of cross-account permissions.
Field:
actionprincipals- The AWS principal that has been granted a cross-account permission.
Field:
principalstatement_ids- A unique identifier for a cross-account permission statement.
Field:
statement_idprofile_versions- The signing profile version that a permission applies to.
Field:
profile_version
Examples
Ensure a principal is available:
describe aws_signer_profile_permissions(profile_name: 'PROFILE_NAME') do
its('principals') { should include 'PRINCIPAL' }
end
Ensure a statement ID is available:
describe aws_signer_profile_permissions(profile_name: 'PROFILE_NAME') do
its('statement_ids') { should include 'STATEMENT_ID' }
end
Ensure a profile version is available:
describe aws_signer_profile_permissions(profile_name: 'PROFILE_NAME') do
its('profile_versions') { should include 'PROFILE_VERSION' }
end
Matchers
For a full list of available matchers, see 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_signer_profile_permissions(profile_name: 'PROFILE_NAME') do
it { should exist }
end
Use should_not to test the entity does not exist.
describe aws_signer_profile_permissions(profile_name: 'PROFILE_NAME') do
it { should_not exist }
end
AWS Permissions
Your AWS principal will need the Signer:Client:ListProfilePermissionsResponse action with Effect set to Allow.