Bug 2005801
Summary: | [KMS] Tenant config does not override backendpath if the key is specified in UPPER_CASE | ||
---|---|---|---|
Product: | [Red Hat Storage] Red Hat OpenShift Data Foundation | Reporter: | Rachael <rgeorge> |
Component: | management-console | Assignee: | gowtham <gshanmug> |
Status: | CLOSED ERRATA | QA Contact: | Rachael <rgeorge> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 4.9 | CC: | afrahman, gshanmug, jefbrown, kbg, madam, muagarwa, nberry, ndevos, nthomas, ocs-bugs, odf-bz-bot, shan, shilpsha, skatiyar |
Target Milestone: | --- | ||
Target Release: | ODF 4.10.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: |
.OpenShift Data Foundation user interface available in camel case
Previously, OpenShift Data Foundation user interface used upper case to store the vault Key Management System (KMS) configs in the csi-kms-connection-details config map. However, Ceph Container Storage Interface (CSI) supports the upper case for a user interface at limited places. Ceph CSI recommends using camel cases in most places. As a result, the csi-kms-connection-details config map is mixed with both upper and lower cases which caused confusion.
With this update, the user interface is moving to the camel case while supporting the upper case for backward compatibility.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2022-04-13 18:49:43 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 2011326, 2056571 |
Description
Rachael
2021-09-20 08:22:13 UTC
It is intentional that the tenants ConfigMap `ceph-csi-kms-config` only can contain the camelCase keys. The UPPER_CASE keys were an addition only for the UI as mapping the user input to the pre-existing ceph-csi configuration options was deemed to complex and confusing. The camelCase configuration is the default, and offers more advanced options than the UI is expected to handle. I think this is not so much a bug in Ceph-CSI, but rather a documentation topic. Would that work for you, Rachael? Niels, should this be moved to UI? Adding it as a known issue and moving to the UI team. Till we decide for a fix, we can add it in release notes. Niels, please fill the doc text. This is indeed a limitation imposed by the UI. There is no assistance from the UI to configure a KMS with tenant specific options. The UI required only UPPER_CASE (environment like key/value) options to be supported, whereas Ceph-CSI uses camelCase formatting. The added functionality in Ceph-CSI to support UPPER_CASE options is very limited, the camelCase configuration format supports more advanced features. The tenant configuration for KMS providers is expected to be in camelCase (UI is not involved at all). Ideally the UI can support the camelCase configuration options, which will allow a better configuration for global setting that are related to tenants as well (these are not key/value environment like parameters). From a Rook perspective, we treat the VAULT flags as environment variables, which are all described here: https://www.vaultproject.io/docs/commands#environment-variables So I believe ceph-csi should comply to that format. @ndevos (In reply to Sébastien Han from comment #17) > From a Rook perspective, we treat the VAULT flags as environment variables, > which are all described here: > https://www.vaultproject.io/docs/commands#environment-variables > So I believe ceph-csi should comply to that format. Ceph-CSI does not use this as environment variables, but reads the options as a JSON configuration file. Some variables can be nested, or overridden for selected tenants/namespaces. The format for the variables was defined before the downstream product even considered supporting PV-encryption. The UI required formatting in UPPER_CASE, which was introduced for a subset of the available options. There are options that do not have matching environment variables, but are consumed by the API (e.g. VAULT_DESTROY_KEYS in libopenstorage/secrets, or VAULT_AUTH_NAMESPACE in Ceph-CSI). Technically Ceph-CSI should be able to add a mapping from (to be added) UPPER_CASE options to existing camelCase ones. This will require some work and quite some testing, the current implementation is not prepared for alias-names of options. As Ceph-CSI does offer more options than Vault (or Rook) does, the UPPER_CASE options will not be documented by the KMS provider (https://www.vaultproject.io/docs/commands#environment-variables). At the moment, I am not sure what is more confusing for users: a. a selection of 'environment' variables that are partially listed on the KMS product docs b. a configuration file (ConfigMap) containing Ceph-CSI specific options, making a clear distinction between what is supported and tested An other idea: As the Ceph-CSI configuration is in JSON, it is possible to annotate the sections with a note or warning, like vault-token-v1: '{ "_WARNING": "this section is generated by ODF, use UPPER_CASE options only", "KMS_PROVIDER": "vaulttokens", "KMS_SERVICE_NAME": "vault-token-v1", "VAULT_ADDR": "https://vault.ocs.com:8200", "VAULT_BACKEND_PATH": "vb-sys-v1", "VAULT_CACERT": "ocs-kms-ca-secret-izzsps", "VAULT_TLS_SERVER_NAME": "", "VAULT_CLIENT_CERT": "ocs-kms-client-cert-3jnpp", "VAULT_CLIENT_KEY": "ocs-kms-client-key-r1f8op", "VAULT_NAMESPACE": "", "VAULT_TOKEN_NAME": "", "VAULT_CACERT_FILE": "fullchain.pem", "VAULT_CLIENT_CERT_FILE": "cert.pem", "VAULT_CLIENT_KEY_FILE": "privkey.pem" }' Users will then be warned to not use camelCase options (which will be ignored) in that section. Please test with the latest build. Doc text? User need to with UI only, whether It is camel case or upper case will taken care by UI. Gowtham, you need to fill the doc text in the **Doc Text:** field of the bug. There is a format which needs to be followed while filling the doc text. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Important: Red Hat OpenShift Data Foundation 4.10.0 enhancement, security & bug fix update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:1372 |