Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@alma-cdk/origin-verify

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alma-cdk/origin-verify

Enforce API Gateway or Application Load Balancer traffic via CloudFront.

  • 0.0.9
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
331
decreased by-27.57%
Maintainers
1
Weekly downloads
 
Created
Source


Alma CDK Origin Verify

npm i -D @alma-cdk/origin-verify

Enforce API Gateway or Application Load Balancer traffic via CloudFront by generating a Secrets Manager secret value which is used as a CloudFront Origin Custom header and a WAFv2 WebACL header match rule.


diagram

Work in Progress

🚧  Do not use for production critial stuff! This construct is still very much work in progress and breaking changes may occur. 🚧

Getting Started

import { OriginVerify } from '@alma-cdk/origin-verify';
import { Distribution } from 'aws-cdk-lib/aws-cloudfront';

const api: RestApi; // TODO: actually define the RestApi
const apiDomain: string = api.domainName; // TODO: actually define the domain

const verification = new OriginVerify(this, 'OriginVerify', {
  origin: api.deploymentStage,
});

new Distribution(this, 'CDN', {
  defaultBehavior: { origin: new HttpOrigin(apiDomain, {
    customHeaders: {
      [verification.headerName]: verification.headerValue,
    },
  }) },
})

Keywords

FAQs

Package last updated on 16 May 2022

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc