Skip to content

Commit

Permalink
minor modifications with ceph config and kms_key_id for gklm
Browse files Browse the repository at this point in the history
Signed-off-by: Hemanth Sai Maheswarla <[email protected]>
  • Loading branch information
Hemanth Sai Maheswarla authored and Hemanth Sai Maheswarla committed Mar 21, 2024
1 parent 2aac4b5 commit dcdef4b
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 50 deletions.
6 changes: 4 additions & 2 deletions rgw/v2/tests/s3_swift/reusables/server_side_encryption_s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ def put_bucket_encryption(s3_client, bucketname, encryption_method):
{
"ApplyServerSideEncryptionByDefault": {
"SSEAlgorithm": "aws:kms",
"KMSMasterKeyID": "testKey01",
# "KMSMasterKeyID": "testKey01",
"KMSMasterKeyID": "gkl00f1f7088000000000",
}
}
]
Expand Down Expand Up @@ -116,7 +117,8 @@ def put_object_encryption(
Key=s3_object_name,
Body=s3_object_path,
ServerSideEncryption="aws:kms",
SSEKMSKeyId="testKey01",
# SSEKMSKeyId="testKey01",
SSEKMSKeyId="gkl00f1f7088000000000",
)

if not put_obj_encryption:
Expand Down
96 changes: 48 additions & 48 deletions rgw/v2/tests/s3_swift/test_sse_s3_kms_with_vault.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,54 +68,54 @@ def test_exec(config, ssh_con):
# authenticate with s3 client
s3_client = auth.do_auth_using_client()

# get ceph version
ceph_version_id, ceph_version_name = utils.get_ceph_version()
is_multisite = utils.is_cluster_multisite()
if config.encryption_keys == "s3" and not is_multisite:
log.info("sse-s3 configuration will be added now.")
ceph_conf.set_to_ceph_conf(
"global",
ConfigOpts.rgw_crypt_require_ssl,
str(config.rgw_crypt_require_ssl),
ssh_con,
)
ceph_conf.set_to_ceph_conf(
"global",
ConfigOpts.rgw_crypt_sse_s3_backend,
str(config.rgw_crypt_sse_s3_backend),
ssh_con,
)
ceph_conf.set_to_ceph_conf(
"global",
ConfigOpts.rgw_crypt_sse_s3_vault_auth,
str(config.rgw_crypt_sse_s3_vault_auth),
ssh_con,
)
ceph_conf.set_to_ceph_conf(
"global",
ConfigOpts.rgw_crypt_sse_s3_vault_prefix,
str(config.rgw_crypt_sse_s3_vault_prefix),
ssh_con,
)
ceph_conf.set_to_ceph_conf(
"global",
ConfigOpts.rgw_crypt_sse_s3_vault_secret_engine,
str(config.rgw_crypt_sse_s3_vault_secret_engine),
ssh_con,
)
ceph_conf.set_to_ceph_conf(
"global",
ConfigOpts.rgw_crypt_sse_s3_vault_addr,
str(config.rgw_crypt_sse_s3_vault_addr),
ssh_con,
)
log.info("trying to restart services")
srv_restarted = rgw_service.restart(ssh_con)
time.sleep(30)
if srv_restarted is False:
raise TestExecError("RGW service restart failed")
else:
log.info("RGW service restarted")
# # get ceph version
# ceph_version_id, ceph_version_name = utils.get_ceph_version()
# is_multisite = utils.is_cluster_multisite()
# if config.encryption_keys == "s3" and not is_multisite:
# log.info("sse-s3 configuration will be added now.")
# ceph_conf.set_to_ceph_conf(
# "global",
# ConfigOpts.rgw_crypt_require_ssl,
# str(config.rgw_crypt_require_ssl),
# ssh_con,
# )
# ceph_conf.set_to_ceph_conf(
# "global",
# ConfigOpts.rgw_crypt_sse_s3_backend,
# str(config.rgw_crypt_sse_s3_backend),
# ssh_con,
# )
# ceph_conf.set_to_ceph_conf(
# "global",
# ConfigOpts.rgw_crypt_sse_s3_vault_auth,
# str(config.rgw_crypt_sse_s3_vault_auth),
# ssh_con,
# )
# ceph_conf.set_to_ceph_conf(
# "global",
# ConfigOpts.rgw_crypt_sse_s3_vault_prefix,
# str(config.rgw_crypt_sse_s3_vault_prefix),
# ssh_con,
# )
# ceph_conf.set_to_ceph_conf(
# "global",
# ConfigOpts.rgw_crypt_sse_s3_vault_secret_engine,
# str(config.rgw_crypt_sse_s3_vault_secret_engine),
# ssh_con,
# )
# ceph_conf.set_to_ceph_conf(
# "global",
# ConfigOpts.rgw_crypt_sse_s3_vault_addr,
# str(config.rgw_crypt_sse_s3_vault_addr),
# ssh_con,
# )
# log.info("trying to restart services")
# srv_restarted = rgw_service.restart(ssh_con)
# time.sleep(30)
# if srv_restarted is False:
# raise TestExecError("RGW service restart failed")
# else:
# log.info("RGW service restarted")
objects_created_list = []
if config.test_ops["create_bucket"] is True:
log.info("no of buckets to create: %s" % config.bucket_count)
Expand Down

0 comments on commit dcdef4b

Please sign in to comment.