]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw/kms/vault - relax configuration parsing for rgw_crypt_vault_secret_engine
authorMarcus Watts <mwatts@redhat.com>
Mon, 7 Dec 2020 22:28:59 +0000 (17:28 -0500)
committerMarcus Watts <mwatts@redhat.com>
Wed, 10 Mar 2021 01:32:22 +0000 (20:32 -0500)
commit2677dbab55d053bee3a79f266e66027512cc852d
tree853b6b1da5bbce2d5dfe066dda106db3607fc1f0
parent30e0ba07a0d2447eb22f5508968d0fb17cecd2cf
rgw/kms/vault - relax configuration parsing for rgw_crypt_vault_secret_engine

To better manage forwards and backwards compatibility when using vault
transit for rgw object encryption (sse:kms); it is desirable to provide
parameters to control how this works.  It was more attractive to overload
the existing rgw_crypt_vault_secret_engine parameter for this purpose
than to invent one or more all-new parameters.

Additionally, the enum support in the configuration parser looks like
it ought to have helpful syntax checking functionality.  This is not so;
failure to provide a supported enum results in silently replacing that
with the default option, resulting in confusing and non-obvious behavior
that is not at all helpful.

This change removes the enum constraint on rgw_crypt_vault_secret_engine,
allowing for more useful messages from the rgw code, and the possibility
to also provide additional information on the same line.

Fixes: http://tracker.ceph.com/issues/48746
Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit 845dd67b3d0b5ee297171bba437797a18e8711ee)
src/common/options.cc