Skip to content

Commit

Permalink
change to star
Browse files Browse the repository at this point in the history
  • Loading branch information
msambol committed Feb 17, 2024
1 parent d02580d commit 9516130
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 24 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@
}
},
"Effect": "Deny",
"Principal": {
"AWS": "*"
},
"Principal": "*",
"Resource": {
"Ref": "TopicBFC7AF6E"
},
Expand Down Expand Up @@ -80,9 +78,7 @@
}
},
"Effect": "Deny",
"Principal": {
"AWS": "*"
},
"Principal": "*",
"Resource": {
"Ref": "TopicAddPolicy7DB03706"
},
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/aws-cdk-lib/aws-sns/lib/policy.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Construct } from 'constructs';
import { CfnTopicPolicy } from './sns.generated';
import { ITopic } from './topic-base';
import { AnyPrincipal, Effect, PolicyDocument, PolicyStatement } from '../../aws-iam';
import { Effect, PolicyDocument, PolicyStatement, StarPrincipal } from '../../aws-iam';
import { Resource } from '../../core';

/**
Expand Down Expand Up @@ -84,7 +84,7 @@ export class TopicPolicy extends Resource {
conditions: {
Bool: { 'aws:SecureTransport': 'false' },
},
principals: [new AnyPrincipal()],
principals: [new StarPrincipal()],
});
}
}
2 changes: 1 addition & 1 deletion packages/aws-cdk-lib/aws-sns/lib/topic-base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export abstract class TopicBase extends Resource implements ITopic {
conditions: {
Bool: { 'aws:SecureTransport': 'false' },
},
principals: [new iam.AnyPrincipal()],
principals: [new iam.StarPrincipal()],
});
}

Expand Down
4 changes: 2 additions & 2 deletions packages/aws-cdk-lib/aws-sns/test/sns.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ describe('Topic', () => {
'aws:SecureTransport': 'false',
},
},
'Principal': { 'AWS': '*' },
'Principal': '*',
},
],
},
Expand Down Expand Up @@ -353,7 +353,7 @@ describe('Topic', () => {
'aws:SecureTransport': 'false',
},
},
'Principal': { 'AWS': '*' },
'Principal': '*',
},
],
'Version': '2012-10-17',
Expand Down

0 comments on commit 9516130

Please sign in to comment.