-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Quick commit. Went back and forth on the generic IAM style. Wound up …
…keeping the generic tag types from AWS Tagging Strategies.
- Loading branch information
Showing
15 changed files
with
1,167 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"ssm:account=985713782822:parameterName=CertificateArn-www.wakemygameup.com:region=us-east-1": "arn:aws:acm:us-east-1:985713782822:certificate/092c0295-caf5-4944-80b2-3263b6b63392", | ||
"hosted-zone:account=985713782822:domainName=wakemygameup.com:region=us-east-1": { | ||
"Id": "/hostedzone/Z2LN05VHV1XSN1", | ||
"Name": "wakemygameup.com." | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,6 @@ | |
"websitePrefix": "www", | ||
"apiPrefix": "api" | ||
} | ||
} | ||
}, | ||
"outdir": "./template-output" | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/usr/bin/env node | ||
import { Construct, Output, TagManager, Tag } from '@aws-cdk/cdk'; | ||
import { Bucket, BlockPublicAccess, BucketEncryption } from '@aws-cdk/aws-s3'; | ||
|
||
|
||
export class TaggedStack extends Stack { | ||
constructor(parent: Construct, name: string, props: TaggedStackProps) { | ||
super(parent, name); | ||
|
||
} | ||
} | ||
|
||
export default function({ key, stack }) { | ||
return | ||
} | ||
|
||
|
||
class CdkEnvironmentBucket extends Construct { | ||
constructor(parent: Construct, name: string, props: CdkEnvironmentBucketProps) { | ||
super(parent, name); | ||
const cdkBucketAccessControl = new BlockPublicAccess({ | ||
blockPublicAcls: true, | ||
blockPublicPolicy: true, | ||
ignorePublicAcls: true, | ||
restrictPublicBuckets: true, | ||
}); | ||
const cdkBucket = new Bucket(this, 'cdkBootstrappedEnvironment', { | ||
encryption: BucketEncryption.Kms, | ||
blockPublicAccess: cdkBucketAccessControl | ||
}); | ||
|
||
new Output(this, 'CdkEnvironmentBucket', { | ||
value: cdkBucket.bucketArn | ||
}); | ||
// export the resource to tag it | ||
const cdkBucketExport = cdkBucket.export(); | ||
|
||
} | ||
} | ||
|
||
// const withTagging = injectTagging({ key: }) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env node | ||
import { Construct } from '@aws-cdk/cdk'; | ||
import { PolicyStatement } from '@aws-cdk/aws-iam'; | ||
import { IBucket } from '@aws-cdk/aws-s3'; | ||
|
||
export interface CloudformationRoleProps { | ||
templateBucket: IBucket | ||
} | ||
export class CloudformationRole extends Construct { | ||
constructor(parent: Construct, name: string, props: CloudformationRoleProps) { | ||
super(parent, name); | ||
const s3Policy = this.createS3BucketPolicy(); | ||
|
||
} | ||
/** | ||
* @name - createS3PolicyStatement | ||
* @description - Do not want an open "new PolicyStatement", so hide it in a private method | ||
*/ | ||
protected createS3BucketPolicy(): PolicyStatement { | ||
const s3Policy = new PolicyStatement(); | ||
const s3Actions = ["s3:PutObject", "s3:ListBucket", "s3:GetObject", "s3:CreateBucket"]; | ||
s3Actions.map(s3Action => { | ||
s3Policy.addAction(s3Action); | ||
}); | ||
|
||
console.log(`s3Policy: ${s3Policy}`); | ||
return s3Policy; | ||
} | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// static analysis | ||
// ? | ||
// checksums and proofs | ||
// checksum -> | ||
// proofs -> | ||
// durability checks | ||
// durability auditor | ||
// microservice for checking integrity | ||
// operational safeguards | ||
// |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
#!/usr/bin/env node | ||
|
||
// this should be an enum | ||
// but I'm not quite sure how | ||
// to get enums to work correctly | ||
type ApplicationRole = { | ||
apiLayer: "api-layer", | ||
dataLayer: { | ||
metaData: { | ||
buildArtifacts: "build-artifact", | ||
logging: "logging", | ||
}, | ||
data: "primary" | ||
} | ||
}; | ||
// stub | ||
type ArnIdentifier = { | ||
id: string | ||
}; | ||
enum EnvironmentSetting { | ||
production = "PROD", | ||
staging = "STAGING", | ||
development = "DEV", | ||
}; | ||
|
||
type Version = { | ||
major: number, | ||
minor: number, | ||
patch: number | ||
}; | ||
|
||
type ResourceIdentifier = { | ||
id: string | ||
}; | ||
|
||
export interface TechnicalTag { | ||
name: string, | ||
applicationId: string, | ||
applicationRole: ApplicationRole, | ||
cluster: ResourceIdentifier, | ||
environment: EnvironmentSetting, | ||
version: Version | ||
}; | ||
|
||
// time is relative... | ||
|
||
export interface AutomationTag { | ||
resourceLifecycle: { | ||
start: string[], | ||
stop: string[], | ||
delete: string[], | ||
rotate: string[], | ||
}, | ||
managedServices: string[], | ||
security: string[], | ||
}; | ||
|
||
|
||
export interface BusinessTag { | ||
owner: ArnIdentifier, | ||
businessUnit: string[], | ||
customers: string[], | ||
project: string[] | ||
}; | ||
|
||
type ConfidentialityLevel = { | ||
GDPRCompliant: boolean | ||
}; | ||
|
||
type Field = { | ||
name: string | ||
}; | ||
// regulations have: | ||
// names | ||
// scope of affected data | ||
// PCI? GDPR? | ||
type Regulation = { | ||
name: string, | ||
fields: Field[]; | ||
}; | ||
export interface SecurityTagProps { | ||
confidentiality: ConfidentialityLevel | ||
compliance: Regulation[], | ||
}; | ||
|
||
export class SecurityTag { | ||
constructor(props: SecurityTagProps) { | ||
const { confidentiality, compliance } = props; | ||
const securityTag = new SecurityTag({ | ||
confidentiality, | ||
compliance | ||
}); | ||
console.log(`securityTag: ${securityTag}`); | ||
} | ||
} | ||
|
Oops, something went wrong.