adding checks to return error when it is not set in
config options.
Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
generated by the command 'openssl rand -hex 16'. All radosgw instances
in a zone should use the same key. In multisite configurations, all
zones in a realm should use the same key.
- default: sts
services:
- rgw
with_legacy: true
return -EINVAL;
}
string secret_s = cct->_conf->rgw_sts_key;
+ if (secret_s.empty()) {
+ ldpp_dout(dpp, 1) << "ERROR: rgw sts key not set" << dendl;
+ return -EINVAL;
+ }
buffer::ptr secret(secret_s.c_str(), secret_s.length());
int ret = 0;
if (ret = cryptohandler->validate_secret(secret); ret < 0) {
return -EINVAL;
}
string secret_s = cct->_conf->rgw_sts_key;
+ if (secret_s.empty()) {
+ ldpp_dout(dpp, 1) << "ERROR: rgw sts key not set" << dendl;
+ return -EINVAL;
+ }
+
buffer::ptr secret(secret_s.c_str(), secret_s.length());
int ret = 0;
if (ret = cryptohandler->validate_secret(secret); ret < 0) {