AWS Authentication¶
DRACO authenticates to AWS with the static access keys of a dedicated, read-only IAM user in the scanned account.
Required Permissions¶
Attach the following AWS managed policies to the IAM user DRACO uses:
arn:aws:iam::aws:policy/SecurityAuditarn:aws:iam::aws:policy/job-function/ViewOnlyAccess
Additional Permissions¶
Some checks need read permissions that the two managed policies do not include. Add the following policy to the same user as an inline policy (IAM > Users > DRACO > Permissions > Add permissions > Create inline policy > JSON), for example named DracoScanAdditions:
Additional permissions policy (JSON)
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"account:Get*",
"amplify:ListApps",
"amplify:ListBranches",
"appstream:Describe*",
"appstream:List*",
"backup:List*",
"backup:Get*",
"bedrock:List*",
"bedrock:Get*",
"cloudtrail:GetInsightSelectors",
"codeartifact:List*",
"codebuild:BatchGet*",
"codebuild:ListReportGroups",
"cognito-idp:GetUserPoolMfaConfig",
"datapipeline:DescribePipelines",
"datapipeline:GetPipelineDefinition",
"datapipeline:ListPipelines",
"dlm:Get*",
"drs:Describe*",
"ds:Get*",
"ds:Describe*",
"ds:List*",
"dynamodb:GetResourcePolicy",
"ec2:GetEbsEncryptionByDefault",
"ec2:GetSnapshotBlockPublicAccessState",
"ec2:GetInstanceMetadataDefaults",
"ecr:Describe*",
"ecr:GetRegistryScanningConfiguration",
"ecr:BatchGetImage",
"ecr:GetDownloadUrlForLayer",
"elasticfilesystem:DescribeBackupPolicy",
"glue:GetConnections",
"glue:GetSecurityConfiguration*",
"glue:SearchTables",
"glue:GetMLTransforms",
"inspector2:BatchGetFindingDetails",
"lambda:GetFunction*",
"lambda:GetLayerVersion",
"logs:FilterLogEvents",
"lightsail:GetRelationalDatabases",
"macie2:GetMacieSession",
"macie2:GetAutomatedDiscoveryConfiguration",
"rolesanywhere:ListProfiles",
"rolesanywhere:ListTagsForResource",
"rolesanywhere:ListTrustAnchors",
"s3:GetAccountPublicAccessBlock",
"s3:GetObjectAcl",
"s3:ListBucket",
"shield:DescribeProtection",
"shield:GetSubscriptionState",
"securityhub:BatchImportFindings",
"securityhub:GetFindings",
"servicecatalog:Describe*",
"servicecatalog:List*",
"ssm:GetDocument",
"ssm-incidents:List*",
"states:ListTagsForResource",
"support:Describe*",
"tag:GetTagKeys",
"wellarchitected:List*"
],
"Resource": "*",
"Effect": "Allow",
"Sid": "AllowMoreReadOnly"
},
{
"Effect": "Allow",
"Action": [
"apigateway:GET"
],
"Resource": [
"arn:*:apigateway:*::/restapis/*",
"arn:*:apigateway:*::/apis/*",
"arn:*:apigateway:*::/domainnames",
"arn:*:apigateway:*::/domainnames/*"
],
"Sid": "AllowAPIGatewayReadOnly"
}
]
}
Every action is read-only except securityhub:BatchImportFindings, which only the AWS Security Hub integration uses; remove it if you do not send findings to Security Hub.
AWS SDK Default¶
The DRACO platform has no AWS identity of its own, so the AWS SDK Default credential source fails with:
AWSAssumeRoleError[1012]: AWS assume role error - An error occurred (InvalidClientTokenId) when calling the AssumeRole operation: The security token included in the request is invalid.
Connect AWS accounts with access keys instead.
Credentials¶
Create a dedicated IAM user for DRACO. Never use the keys of your own user, an administrator or the root user: aws iam create-access-key run in CloudShell creates a key for the signed-in identity, with all of its permissions.
- In the AWS Console open IAM > Users > Create user.
- Name the user
DRACOand leave Provide user access to the AWS Management Console cleared (no console access). - On Set permissions choose Attach policies directly and select
SecurityAuditandViewOnlyAccess, then create the user. - Open the user and add the additional permissions as an inline policy.
- On the user's Security credentials tab click Create access key, choose Third-party service, confirm and create the key.
- Copy the Access key ID and the Secret access key into DRACO. The secret is shown only once.
Rotation
Access keys never expire by themselves: rotate them every 90 days. Create a second access key on the user, enter it in DRACO with Update Credentials in the provider's row actions, then deactivate and delete the old key in IAM.
The AWS Session Token field is optional and only for temporary credentials (for example from aws sts get-session-token). Temporary credentials expire within hours, after which scheduled scans of the provider fail; use them only for a one-off scan.