Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Route53 Resolver Endpoint L2 implementation #38

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/aws-route53resolver/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export * from './resolver-endpoint';
export * from './resolver-rule';
43 changes: 43 additions & 0 deletions src/aws-route53resolver/private/multi-default-port-connections.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import {
Connections,
ConnectionsProps,
IConnectable,
Port,
} from 'aws-cdk-lib/aws-ec2';

export interface MultiDefaultPortConnectionsProps extends ConnectionsProps {
readonly defaultPorts?: Port[];
}
export class MultiDefaultPortConnections extends Connections {
readonly defaultPorts?: Port[];
constructor(props?: MultiDefaultPortConnectionsProps) {
super(props);
this.defaultPorts = props?.defaultPorts;
}
allowDefaultPortFrom(
other: IConnectable,
description?: string | undefined,
): void {
this.defaultPorts?.forEach((port) =>
super.allowFrom(other, port, description),
);
}
allowDefaultPortFromAnyIpv4(description?: string | undefined): void {
this.defaultPorts?.forEach((port) =>
super.allowFromAnyIpv4(port, description),
);
}
allowDefaultPortInternally(description?: string | undefined): void {
this.defaultPorts?.forEach((port) =>
super.allowInternally(port, description),
);
}
allowDefaultPortTo(
other: IConnectable,
description?: string | undefined,
): void {
this.defaultPorts?.forEach((port) =>
super.allowTo(other, port, description),
);
}
}
24 changes: 24 additions & 0 deletions src/aws-route53resolver/protocol.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/**
* The protocols you want to use for the endpoint.
* DoH-FIPS is applicable for inbound endpoints only.
*/
export enum Protocol {
/**
* The data is relayed using the Route 53 Resolver without additional encryption.
* While the data cannot be read by external parties, it can be viewed within the AWS networks.
*/
DO_53 = 'Do53',
/**
* The data is transmitted over an encrypted HTTPS session.
* DoH adds an added level of security where data can't be decrypted by unauthorized users,
* and can't be read by anyone except the intended recipient.
*/
DO_H = 'DoH',
/**
* The data is transmitted over an encrypted HTTPS session that is compliant with the FIPS 140-2 cryptographic standard.
* Supported for inbound endpoints only.
*
* @see https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.140-2.pdf
*/
DO_H_FIPS = 'DoH-FIPS',
}
Loading