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

commitment_policy not set correctly in stream_kwargs_from_args #388

Open
zanhua-aws opened this issue Aug 9, 2023 · 0 comments
Open

commitment_policy not set correctly in stream_kwargs_from_args #388

zanhua-aws opened this issue Aug 9, 2023 · 0 comments

Comments

@zanhua-aws
Copy link

zanhua-aws commented Aug 9, 2023

General:

commitment_policy not set correctly in stream_kwargs_from_args.

Problem:

These if statements does not take effect.

LHS of Line 251 has type <enum 'CommitmentPolicyArgs'>, while RHS is a str. On my machine (python ver3.7), two types won't equal no matter what.

print(type(args.commitment_policy))
# <enum 'CommitmentPolicyArgs'>

print(CommitmentPolicyArgs.REQUIRE_ENCRYPT_REQUIRE_DECRYPT == "require-encrypt-require-decrypt")
# False

Solution

The above-mentioned if statements should be deleted because

  1. currently they toke no effect
  2. stream_args will not accept "commitment_policy" as a key word.
  3. CommitmentPolicy are handled correctly in process_cli_request

My Platform

$ python
Python 3.7.16 (default, Mar 10 2023, 03:25:26)
[GCC 7.3.1 20180712 (Red Hat 7.3.1-15)] on linux
Type "help", "copyright", "credits" or "license" for more information.

$ aws-encryption-cli --version
aws-encryption-sdk-cli/4.2.0 aws-encryption-sdk/3.1.1
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

No branches or pull requests

1 participant