How AWS Payment Cryptography works with IAM - AWS Payment Cryptography

How AWS Payment Cryptography works with IAM

Before you use IAM to manage access to AWS Payment Cryptography, you should understand what IAM features are available to use with AWS Payment Cryptography. To get a high-level view of how AWS Payment Cryptography and other AWS services work with IAM, see AWS Services That Work with IAM in the IAM User Guide.

AWS Payment Cryptography Identity-based policies

With IAM identity-based policies, you can specify allowed or denied actions and resources as well as the conditions under which actions are allowed or denied. AWS Payment Cryptography supports specific actions, resources, and condition keys. To learn about all of the elements that you use in a JSON policy, see IAM JSON Policy Elements Reference in the IAM User Guide.

Actions

Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions.

The Action element of a JSON policy describes the actions that you can use to allow or deny access in a policy. Policy actions usually have the same name as the associated AWS API operation. There are some exceptions, such as permission-only actions that don't have a matching API operation. There are also some operations that require multiple actions in a policy. These additional actions are called dependent actions.

Include actions in a policy to grant permissions to perform the associated operation.

Policy actions in AWS Payment Cryptography use the following prefix before the action: payment-cryptography:. For example, to grant someone permission to execute an AWS Payment Cryptography VerifyCardData API operation, you include the payment-cryptography:VerifyCardData action in their policy. Policy statements must include either an Action or NotAction element. AWS Payment Cryptography defines its own set of actions that describe tasks that you can perform with this service.

To specify multiple actions in a single statement, separate them with commas as follows:

"Action": [ "payment-cryptography:action1", "payment-cryptography:action2"

You can specify multiple actions using wildcards (*). For example, to specify all actions that begin with the word List (such as ListKeys and ListAliases), include the following action:

"Action": "payment-cryptography:List*"

To see a list of AWS Payment Cryptography actions, see Actions Defined by AWS Payment Cryptography in the IAM User Guide.

Resources

Administrators can use AWS JSON policies to specify who has access to what. That is, which principal can perform actions on what resources, and under what conditions.

The Resource JSON policy element specifies the object or objects to which the action applies. Statements must include either a Resource or a NotResource element. As a best practice, specify a resource using its Amazon Resource Name (ARN). You can do this for actions that support a specific resource type, known as resource-level permissions.

For actions that don't support resource-level permissions, such as listing operations, use a wildcard (*) to indicate that the statement applies to all resources.

"Resource": "*"

The payment-cryptography key resource has the following ARN:

arn:${Partition}:payment-cryptography:${Region}:${Account}:key/${keyARN}

For more information about the format of ARNs, see Amazon Resource Names (ARNs) and AWS Service Namespaces.

For example, to specify the arn:aws:payment-cryptography:us-east-2:111122223333:key/kwapwa6qaifllw2h instance in your statement, use the following ARN:

"Resource": "arn:aws:payment-cryptography:us-east-2:111122223333:key/kwapwa6qaifllw2h"

To specify all keys that belong to a specific account, use the wildcard (*):

"Resource": "arn:aws:payment-cryptography:us-east-2:111122223333:key/*"

Some AWS Payment Cryptography actions, such as those for creating keys, cannot be performed on a specific resource. In those cases, you must use the wildcard (*).

"Resource": "*"

To specify multiple resources in a single statement, use a comma as shown below:

"Resource": [ "resource1", "resource2"

Examples

To view examples of AWS Payment Cryptography identity-based policies, see AWS Payment Cryptography identity-based policy examples.

Authorization based on AWS Payment Cryptography tags