Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
cdk-iam-generator
Advanced tools
Readme
AWS CDK construct helps create IAM Managed Policies and IAM Roles using JSON Configuration
This package is written in TypeScript and made available via JSII to all other supported languages. Package are available on:
Install or update from npm
TypeScript/Javascript
npm i cdk-iam-generator
Python
pip install cdk-iamgenerator
** TypeScript **
import { IamPolicyGenerator, IamRoleGenerator } from 'cdk-iam-generator';
new IamPolicyGenerator(this,"IamPolicyGenerator",{
configPath:"config/iam_generator_config.json",
policyPath: "config/policy"
});
new IamRoleGenerator(this,"IamRoleGenerator",{
configPath:"config/iam_generator_config.json"
});
Example folder structure for Json Configuration of Roles and Policies:
config
├── policy
│ ├── CodeCommitArchive.json
│ └── KMSPolicy.json
│ └── CreateServiceLinkedRoleECS.json
│ └── DeployService1.json
│ └── DeployService2.json
├── iam_generator_config.json
Place all the Policy Json files inside config/policy in your project root and policy file would look something like this:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"codecommit:CancelUploadArchive",
"codecommit:UploadArchive"
],
"Resource": "*"
}
]
}
Configure the policies and roles to be created in config/iam_generator_config.json file and would look something like this:
{
"policies": [
{
"policy_name": "CodeCommitArchive",
"description": "CodeCommitArchive policy",
"policy_file": "CodeCommitArchive.json"
},
{
"policy_name": "KMSPolicy",
"description": "KMSPolicy policy",
"policy_file": "KMSPolicy.json"
},
{
"policy_name": "CreateServiceLinkedRoleECS",
"description": "CreateServiceLinkedRoleECS policy",
"policy_file": "CreateServiceLinkedRoleECS.json"
},
{
"policy_name": "DeployService1",
"description": "DeployService1 policy",
"policy_file": "DeployService1.json"
},
{
"policy_name": "DeployService2",
"description": "DeployService2 policy",
"policy_file": "DeployService2.json"
}
],
"roles": [
{
"role_name": "TestRole1",
"trust_service_principal": ["apigateway.amazonaws.com","lambda.amazonaws.com"],
"customer_managed_policies": ["DeployService1","DeployService2","KMSPolicy"],
"aws_managed_policies": ["service-role/AmazonAPIGatewayPushToCloudWatchLogs"]
},
{
"role_name": "TestRole2",
"trust_service_principal": ["sns.amazonaws.com"],
"trust_account_principal": ["748669239283"],
"customer_managed_policies": ["CreateServiceLinkedRoleECS","CodeCommitArchive","KMSPolicy"],
"aws_managed_policies": ["service-role/AmazonAPIGatewayPushToCloudWatchLogs"]
},
{
"role_name": "TestRole3",
"trust_service_principal": ["ec2.amazonaws.com","sns.amazonaws.com"],
"trust_account_principal": ["748669239283"],
"customer_managed_policies": ["DeployService2","CodeCommitArchive","KMSPolicy"],
"aws_managed_policies": ["AWSLambdaFullAccess"]
}
]
}
cdk-iam-generator is distributed under the Apache License, Version 2.0.
See LICENSE for more information.
FAQs
This CDK Construct helps create IAM Managed Policies and IAM Roles using JSON Configuration
The npm package cdk-iam-generator receives a total of 15 weekly downloads. As such, cdk-iam-generator popularity was classified as not popular.
We found that cdk-iam-generator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.