Skip to content

feat!: Drop Support & Dependency on AWS SDK V2 #1177

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

Closed
wants to merge 3 commits into from

Conversation

texastony
Copy link
Contributor

Issue #, if available: #1100, #922, #865

Description of changes: Drop Support & Dependency on AWS SDK V2

BREAKING CHANGE:
The AWS Encryption SDK for JavaScript:

  • does not supports the AWS SDK for JavaScript V2
  • requires the AWS SDK for JavaScript V3's kms-client (if using the KMS Keyring).

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Check any applicable:

  • Were any files moved? Moving files changes their URL, which breaks all hyperlinks to the files.

BREAKING CHANGE:
The AWS Encryption SDK for JavaScript:
- does not supports the AWS SDK for JavaScript V2
- requires the AWS SDK for JavaScript V3's kms-client
  (if using the KMS Keyring).
@texastony texastony requested a review from a team as a code owner June 29, 2023 19:46
@texastony
Copy link
Contributor Author

All tests passed except for the testVectorsBrowser.

That failed while trying to build integration-browser:

node:internal/modules/cjs/loader:1080
  throw err;

Error: Cannot find module '@aws-sdk/client-kms'
Require stack:
- /root/.npm/_npx/a05978ae8c8d6c1f/node_modules/@aws-crypto/kms-keyring-browser/build/main/src/kms_keyring_browser.js
- /root/.npm/_npx/a05978ae8c8d6c1f/node_modules/@aws-crypto/kms-keyring-browser/build/main/src/index.js
- /root/.npm/_npx/a05978ae8c8d6c1f/node_modules/@aws-crypto/client-browser/build/main/src/index.js
- /root/.npm/_npx/a05978ae8c8d6c1f/node_modules/@aws-crypto/integration-browser/build/main/src/cli.js
...
    at Object.<anonymous> (/root/.npm/_npx/a05978ae8c8d6c1f/node_modules/@aws-crypto/kms-keyring-browser/build/main/src/kms_keyring_browser.js:12:22)
...
  code: 'MODULE_NOT_FOUND',
...

So something is not configured to depend on the KMS Client correctly.

ajewellamz
ajewellamz previously approved these changes Jun 30, 2023
Comment on lines 54 to 56
describe('KmsKeyringBrowser can encrypt/decrypt with AWS SDK v2 client', () => {
const generatorKeyId =
'arn:aws:kms:us-west-2:658956600833:alias/EncryptDecrypt'
Copy link
Contributor

Choose a reason for hiding this comment

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

Just because we are changing the default, why are we removing the tests for the old SDK?

@@ -16,7 +16,6 @@ import {
AlgorithmSuiteIdentifier,
WebCryptoDecryptionMaterial,
} from '@aws-crypto/material-management-browser'
import { KMS as V2KMS } from 'aws-sdk'
Copy link
Contributor

Choose a reason for hiding this comment

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

Same comment as above. Why does changing the default remove support? Or the need to test that support?

Copy link
Contributor

@seebees seebees left a comment

Choose a reason for hiding this comment

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

Why are we not testing the SDK v2?
Until we remove support we should continue to test it

@texastony
Copy link
Contributor Author

Why are we not testing the SDK v2? Until we remove support we should continue to test it

In this PR, I went all the way, and removed V2 support entirely.
(Or at least I tried to.)

I take it that you object to to that.

I will refactor this PR to return SDK V2 Support, but not take a dependency on it.

@texastony texastony marked this pull request as draft June 30, 2023 17:06
@texastony
Copy link
Contributor Author

Replaced by #1180

@texastony texastony closed this Jul 2, 2023
@texastony texastony deleted the tony-drop-sdk-v2 branch July 2, 2023 00:22
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.

3 participants