CredStash requires specific IAM permissions depending on the action being performed. Replace AWSACCOUNTID with your account ID and KEY-GUID with your KMS key identifier.
Secret Writer Permissions
Required to use put or putall. Requires kms:GenerateDataKey and dynamodb:PutItem.
{
"Version": "2012-10-17",
"Statement": [
{
"Action": ["kms:GenerateDataKey"],
"Effect": "Allow",
"Resource": "arn:aws:kms:us-east-1:AWSACCOUNTID:key/KEY-GUID"
},
{
"Action": ["dynamodb:PutItem"],
"Effect": "Allow",
"Resource": "arn:aws:dynamodb:us-east-1:AWSACCOUNTID:table/credential-store"
}
]
}
Secret Reader Permissions
Required to use get or getall. Requires kms:Decrypt and DynamoDB read permissions (GetItem, Query, and optionally Scan if using wildcards).
{
"Version": "2012-10-17",
"Statement": [
{
"Action": ["kms:Decrypt"],
"Effect": "Allow",
"Resource": "arn:aws:kms:us-east-1:AWSACCOUNTID:key/KEY-GUID"
},
{
"Action": [
"dynamodb:GetItem",
"dynamodb:Query",
"dynamodb:Scan"
],
"Effect": "Allow",
"Resource": "arn:aws:dynamodb:us-east-1:AWSACCOUNTID:table/credential-store"
}
]
}
Setup Permissions
Required to run credstash setup. Requires CreateTable, DescribeTable, and ListTables permissions.
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"dynamodb:CreateTable",
"dynamodb:DescribeTable"
],
"Effect": "Allow",
"Resource": "arn:aws:dynamodb:us-west-2:<ACCOUNT NUMBER>:table/credential-store"
},
{
"Action": ["dynamodb:ListTables"],
"Effect": "Allow",
"Resource": "*"
}
]
}