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(sns): support encryption of topics #5052

Merged
merged 4 commits into from
Nov 26, 2019

Conversation

yamatatsu
Copy link
Contributor

@yamatatsu yamatatsu commented Nov 15, 2019

Add Support KMS masterKey on SNS.
It is allowed to set masterKey as Kms::Key to TopicProps.
Fixes #1729

@mergify
Copy link
Contributor

mergify bot commented Nov 15, 2019

Thanks so much for taking the time to contribute to the AWS CDK ❤️

We will shortly assign someone to review this pull request and help get it
merged. In the meantime, please take a minute to make sure you follow this
checklist
:

  • PR title type(scope): text
    • type: fix, feat, refactor go into CHANGELOG, chore is hidden
    • scope: name of module without aws- or cdk- prefix or postfix (e.g. s3 instead of aws-s3-deployment)
    • text: use all lower-case, do not end with a period, do not include issue refs
  • PR Description
    • Rationale: describe rationale of change and approach taken
    • Issues: indicate issues fixed via: fixes #xxx or closes #xxx
    • Breaking?: last paragraph: BREAKING CHANGE: <describe what changed + link for details>
  • Testing
    • Unit test added. Prefer to add a new test rather than modify existing tests
    • CLI or init templates change? Re-run/add CLI integration tests
  • Documentation
    • README: update module README to describe new features
    • API docs: public APIs must be documented. Copy from official AWS docs when possible
    • Design: for significant features, follow design process

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@nija-at
Copy link
Contributor

nija-at commented Nov 18, 2019

@yamatatsu

Is it possible for me to pass this test locally without a security token?

You do not need to run npm run integ just yet.

integ.sns.ts synthesizes a CloudFormation template and compares it against the checked in template in integ.sns.expected.json. The error you're seeing - Error: Some stacks have changed. - happens because you've updated the integration test but not the expected JSON.
Scrollback when you get this error and you will see the diff between what is expected and what is synthesized.

Copy link
Contributor

@nija-at nija-at left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow the contribution guidelines for your PR title and description.

packages/@aws-cdk/aws-sns/lib/topic.ts Outdated Show resolved Hide resolved
packages/@aws-cdk/aws-sns/test/test.sns.ts Show resolved Hide resolved
@yamatatsu yamatatsu changed the title Support KMS masterKey in SNS feat(sns): Support KMS masterKey in SNS Nov 19, 2019
@yamatatsu yamatatsu force-pushed the support-sns-kms-master-key branch from e5ccc09 to c6290a1 Compare November 19, 2019 00:33
@mergify mergify bot dismissed nija-at’s stale review November 19, 2019 00:34

Pull request has been modified.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@yamatatsu yamatatsu force-pushed the support-sns-kms-master-key branch from ec605e9 to 80b3d55 Compare November 19, 2019 00:42
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@yamatatsu
Copy link
Contributor Author

@nija-at
I fixed the commit message. So it is needed to use push -f. Is it your expected? If not, I'll re-create PR.
And I fixed for your comments.

I have a question that I should edit integ.sns.expected.json manually? I guess that this json is a snapshot and is edited automatically.

Copy link
Contributor

@nija-at nija-at left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I fixed the commit message. So it is needed to use push -f. Is it your expected? If not, I'll re-create PR.

Thanks for doing that but that's less important than the PR title and description. When GH squashes and merges, it uses the PR title and description primarily and then the commit messages.

I have a question that I should edit integ.sns.expected.json manually?

Yes please.

Add Support KMS masterKey on SNS.
It is allowed to set `masterKey` as `Kms::Key` to `TopicProps`.
Fixes aws#1729
@yamatatsu yamatatsu force-pushed the support-sns-kms-master-key branch from 1ac0e2d to a640e06 Compare November 19, 2019 12:35
@mergify mergify bot dismissed nija-at’s stale review November 19, 2019 12:36

Pull request has been modified.

@yamatatsu yamatatsu changed the title feat(sns): Support KMS masterKey in SNS feat(sns): support KMS masterKey on SNS Nov 19, 2019
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@yamatatsu yamatatsu requested a review from nija-at November 19, 2019 23:44
@nija-at
Copy link
Contributor

nija-at commented Nov 20, 2019

The team is currently heads down for the next couple of days, so it'll be a bit longer before we can get to this. Apologies for the delayed response on your PR.

@nija-at nija-at changed the title feat(sns): support KMS masterKey on SNS feat(sns): support encryption of topics Nov 21, 2019
@nija-at nija-at added the pr/do-not-merge This PR should not be merged at this time. label Nov 21, 2019
@nija-at
Copy link
Contributor

nija-at commented Nov 21, 2019

Code looks good 👍. We're not accepting community contributions into the CDK until next week, so hang tight.

@yamatatsu
Copy link
Contributor Author

OK. It was so fun to complete making this PR with you.
ARIGATO!

@nija-at nija-at removed the pr/do-not-merge This PR should not be merged at this time. label Nov 25, 2019
nija-at
nija-at previously approved these changes Nov 25, 2019
@mergify
Copy link
Contributor

mergify bot commented Nov 25, 2019

Thank you for contributing! Your pull request is now being automatically merged.

@nija-at nija-at mentioned this pull request Nov 26, 2019
2 tasks
@mergify mergify bot dismissed nija-at’s stale review November 26, 2019 10:11

Pull request has been modified.

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mergify mergify bot merged commit edd5395 into aws:master Nov 26, 2019
@yamatatsu yamatatsu deleted the support-sns-kms-master-key branch November 5, 2021 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[sns] support encrypted topics
3 participants