Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
aws-api-gateway-policy-generator
Advanced tools
Generates an AWS policy document based on a given set of claims.
It is a simple tool that can be used with a custom authorizer to generate policy documents. You have to feed a dictionary of policy statements keyed by unique names (called claims). When a set of claims are fed to the generator, it in turn generates a policy document by attaching policy statements linked with the claims.
The Policy statements in the policy map are standard Amazon policy documents.
const policyMap = {
'CreateUser': [
{'Resource': 'test resource'},
{'Resource': 'denied resource', 'Effect': 'deny'},
{'Resource': 'another resource', 'Action': 'execute-api:Invoke'}
],
'UpdateUser': [
{'Resource': 'some other resource'}
]
};
npm install aws-api-gateway-policy-generator --save
const policyMap = {
'CreateUser': [
{'Resource': 'test resource'},
{'Resource': 'denied resource', 'Effect': 'deny'},
{'Resource': 'another resource', 'Action': 'execute-api:Invoke'}
],
'UpdateUser': [
{'Resource': 'some other resource'}
]
};
const generator = new PolicyGenerator(policyMap);
const claims = ['CreateUser', 'SomeOther'];
const document = generator.generatePolicyDocument(claims);
Refer the demo/ directory for a complete implementation.
FAQs
Generates an AWS policy document based on a given set of claims.
The npm package aws-api-gateway-policy-generator receives a total of 8 weekly downloads. As such, aws-api-gateway-policy-generator popularity was classified as not popular.
We found that aws-api-gateway-policy-generator demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.