Skip to content

commitment_policy not set correctly in stream_kwargs_from_args #388

@zanhua-aws

Description

@zanhua-aws

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions