fix: Encryption Context changes by seebees · Pull Request #148 · aws/aws-encryption-sdk-javascript

@seebees

resolves aws#54

1. browser/node encrypt function public api should match
1. Encryption context should _only_ be optional in the public interface
1. Encryption context moved into cryptographic materials

Internally, it is much more consistent to require an encryption context.
Moving the encryption context onto the cryptographic materials
brings them in line with the python keyring implementation.
It also makes control of the encryption context in the CMM
and **not** the keyrings very clear in the interface.

NOTE: encrypt in encrypt-node now expects `encryptionContext` instead of `context`.
This is **ONLY** done because the project is still in beta.

@seebees requested a review from a team

July 15, 2019 17:07

karlw00t

@seebees

lavaleri

mattsb42-aws

@seebees

Co-Authored-By: Matt Bullock <bullocm@amazon.com>
…als_manager.ts

Co-Authored-By: Matt Bullock <bullocm@amazon.com>
…materials_manager.ts

Co-Authored-By: Matt Bullock <bullocm@amazon.com>

@seebees

@seebees

@seebees

@seebees

ragona

ragona previously approved these changes Jul 23, 2019

@seebees

@seebees

@seebees

@seebees

lavaleri

@seebees

mattsb42-aws

@seebees seebees deleted the encryption_context_on_material branch

July 26, 2019 21:58

seebees added a commit to seebees/aws-encryption-sdk-javascript that referenced this pull request

Nov 6, 2019
resolves aws#232

Typescript 3.7 does a better job identifying declaration conflicts
and so identifies the conflite between the type
and the class import of the same name.
e.g. `WebCryptoEncryptionMaterial` is defined as a type and imported.
When aws#148 was the referance to the return type
can go directly to the needed Material (WebCrypto or Node).

seebees added a commit to seebees/aws-encryption-sdk-javascript that referenced this pull request

Nov 6, 2019
resolves aws#232

Typescript 3.7 does a better job identifying declaration conflicts
and so identifies the conflict between the type
and the class import of the same name.
e.g. `WebCryptoEncryptionMaterial` is defined as a type and imported.
When aws#148 was the reference to the return type
can go directly to the needed Material (WebCrypto or Node).

seebees added a commit to seebees/aws-encryption-sdk-javascript that referenced this pull request

Nov 6, 2019
resolves aws#232

Typescript 3.7 does a better job identifying declaration conflicts
and so identifies the conflict between the type
and the class import of the same name.
e.g. `WebCryptoEncryptionMaterial` is defined as a type and imported.
When aws#148 was written the reference to the return type
should have gone directly to the needed Material (WebCrypto or Node).

seebees added a commit that referenced this pull request

Nov 7, 2019
resolves #232

Typescript 3.7 does a better job identifying declaration conflicts
and so identifies the conflict between the type
and the class import of the same name.
e.g. `WebCryptoEncryptionMaterial` is defined as a type and imported.
When #148 was written the reference to the return type
should have gone directly to the needed Material (WebCrypto or Node).