Skip to content

Commit 60ce926

Browse files
committed
MB-67315 Update key names
ns_server updated the following key names in MB-61292: * awskms-aes-key-256 -> awskms-symmetric-key (https://review.couchbase.org/c/ns_server/+/228494) * auto-generated-aes-key-256 -> cb-server-managed-aes-key-256 (https://review.couchbase.org/c/ns_server/+/228428) We now use the new key names when creating/editing keys. Change-Id: I8df1829dc627223b7ff8112fd98d8e99890b2c45 Reviewed-on: https://review.couchbase.org/c/couchbase-cli/+/229754 Tested-by: Build Bot <build@couchbase.com> Reviewed-by: Lubo Marinski <lubo.marinski@couchbase.com>
1 parent 0f5deb4 commit 60ce926

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

cbmgr.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3701,7 +3701,7 @@ def _add_edit_parse_opts(self, opts):
37013701
data = {}
37023702
typ = ""
37033703
if opts.key_type == "aws":
3704-
typ = "awskms-aes-key-256"
3704+
typ = "awskms-symmetric-key"
37053705

37063706
if not opts.cloud_key_arn or not opts.cloud_region:
37073707
_exit_if_errors(["--cloud-key-arn and --cloud-region must be specified"])
@@ -3760,7 +3760,7 @@ def _add_edit_parse_opts(self, opts):
37603760
data["caSelection"] = "skipServerCertVerification"
37613761

37623762
elif opts.key_type == "auto-generated":
3763-
typ = "auto-generated-aes-key-256"
3763+
typ = "cb-server-managed-aes-key-256"
37643764

37653765
if not opts.encrypt_with_master and opts.encrypt_with_key is None:
37663766
_exit_if_errors(["one of --encrypt-with-master-password, --encrypt-with-key must be specified"])

test/test_cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1546,7 +1546,7 @@ def test_add_edit_key_cloud(self):
15461546
expected = json.dumps({
15471547
'usage': ['KEK-encryption'],
15481548
'name': 'key01',
1549-
'type': 'awskms-aes-key-256',
1549+
'type': 'awskms-symmetric-key',
15501550
'data': {'keyARN': 'arn', 'region': 'us-east-1', 'useIMDS': False}
15511551
}, sort_keys=True)
15521552
self.rest_parameter_match([expected], length_match=False)
@@ -1731,7 +1731,7 @@ def test_add_key_auto(self):
17311731
expected = json.dumps({
17321732
'usage': ['KEK-encryption'],
17331733
'name': 'key01',
1734-
'type': 'auto-generated-aes-key-256',
1734+
'type': 'cb-server-managed-aes-key-256',
17351735
'data': {
17361736
'encryptWith': 'nodeSecretManager',
17371737
'autoRotation': True,

0 commit comments

Comments
 (0)