Skip to content

Commit b32fadf

Browse files
authored
Merge pull request ceph#57546 from clwluvw/vault-token
rgw: eliminate vault token perm for group read Reviewed-by: Jiffin Tony Thottan <[email protected]>
2 parents fb3410b + 63508cc commit b32fadf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/rgw/rgw_kms.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,9 +221,9 @@ class VaultSecretEngine: public SecretEngine {
221221
return -ENOENT;
222222
}
223223

224-
if (token_st.st_mode & (S_IRWXG | S_IRWXO)) {
224+
if (token_st.st_mode & (S_IWGRP | S_IXGRP | S_IRWXO)) {
225225
ldpp_dout(dpp, 0) << "ERROR: Vault token file '" << token_file << "' permissions are "
226-
<< "too open, it must not be accessible by other users" << dendl;
226+
<< "too open, the maximum allowed is 0740" << dendl;
227227
return -EACCES;
228228
}
229229

@@ -257,7 +257,7 @@ class VaultSecretEngine: public SecretEngine {
257257
int res;
258258
string vault_token = "";
259259
if (RGW_SSE_KMS_VAULT_AUTH_TOKEN == kctx.auth()){
260-
ldpp_dout(dpp, 0) << "Loading Vault Token from filesystem" << dendl;
260+
ldpp_dout(dpp, 20) << "Loading Vault Token from filesystem" << dendl;
261261
res = load_token_from_file(dpp, &vault_token);
262262
if (res < 0){
263263
return res;

0 commit comments

Comments
 (0)