2
0
mirror of https://github.com/openkmip/pykmip synced 2025-12-16 00:04:26 +00:00

Add CryptographicUsageMask filtering support for Locate

This change updates Locate operation support in the PyKMIP server,
allowing users to filter objects based on the object's
Cryptographic Usage Masks. Unit tests and integration tests have
been added to test and verify the correctness of this feature.

Additionally, the Locate demo scripts have also been updated to
support Cryptographic Usage Mask filtering. Simply use the
"--cryptographic-usage-mask" flag to specify one or more
Cryptographic Usage Mask enumeration values for the Locate script
to filter on.
This commit is contained in:
Peter Hamilton
2019-08-12 15:22:04 -04:00
committed by Peter Hamilton
parent 4a6a2eccc1
commit b5a8739157
7 changed files with 302 additions and 0 deletions

View File

@@ -303,6 +303,20 @@ def build_cli_parser(operation=None):
dest="cryptographic_length",
help="The cryptographic length of the secret (e.g., 128, 2048)"
)
parser.add_option(
"--cryptographic-usage-mask",
action="append",
type="str",
default=[],
dest="cryptographic_usage_masks",
help=(
"The cryptographic usage mask(s) the secret should have set "
"(e.g., ENCRYPT, DECRYPT). Use multiple times to specify "
"multiple cryptographic usage mask enumeration values. All "
"values will get combined into a single mask when sent to the "
"server."
)
)
parser.add_option(
"-i",
"--unique-identifier",