Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport of UI: Add version 1 if KV engine has no version data into release/1.15.x #23617

Conversation

hc-github-team-secure-vault-core
Copy link
Collaborator

Backport

This PR is auto-generated from #23585 to be assessed for backporting due to the inclusion of the label backport/1.15.x.

The below text is copied from the body of the original PR.


Fixes #23463

When a user enables KV in the UI we default to version 2 by passing the version in the options object.

A kv v1 engine is mounted if no version flag is used when enabling kv using the CLI. This is unclear on the READ request because there is no version information in the options key (see below). This PR updates the UI logic so that if no version information exists, the UI assumes it is version 1.

$ vault secrets enable  kv

$ curl   
    --header "X-Vault-Token: root" \
    http://127.0.0.1:8200/v1/sys/mounts | jq
⇒
  "request_id": "fdf6549f-c136-c288-81e5-5e02993ad6c3",
  "lease_id": "",
  "renewable": false,
  "lease_duration": 0,
  "data": {
    "kv-test/": {
      "accessor": "kv_4396c4ae",
      "config": {
        "default_lease_ttl": 0,
        "force_no_cache": false,
        "max_lease_ttl": 0
      },
      "deprecation_status": "supported",
      "description": "",
      "external_entropy_access": false,
      "local": false,
      "options": null, //  <= no version information
      "plugin_version": "",
      "running_plugin_version": "v0.16.1+builtin",
      "running_sha256": "",
      "seal_wrap": false,
      "type": "kv",
      "uuid": "b0306a4d-01da-23dc-c734-925d6e72a579"
    }
 }

---

<details>
<summary> Overview of commits </summary>

  - feeda224c8a288c0218f36a5b23fc12b06c1f188 

</details>


@hc-github-team-secure-vault-core hc-github-team-secure-vault-core force-pushed the backport/ui/VAULT-20811/assume-kv-v1-if-no-version-data/suddenly-inviting-cougar branch from 277e2ad to 6b64fac Compare October 11, 2023 18:04
@hc-github-team-secure-vault-core hc-github-team-secure-vault-core force-pushed the backport/ui/VAULT-20811/assume-kv-v1-if-no-version-data/suddenly-inviting-cougar branch from 5a6a777 to 120815e Compare October 11, 2023 18:04
@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label Oct 11, 2023
@schavis schavis added the vault-update Used by SPE team to filter out PRs not related to content label Oct 11, 2023
@github-actions
Copy link

Build Results:
All builds succeeded! ✅

@hellobontempo hellobontempo added this to the 1.15.1 milestone Oct 11, 2023
…v1-if-no-version-data/suddenly-inviting-cougar
@hellobontempo hellobontempo merged commit 7914b7d into release/1.15.x Oct 11, 2023
@hellobontempo hellobontempo deleted the backport/ui/VAULT-20811/assume-kv-v1-if-no-version-data/suddenly-inviting-cougar branch October 11, 2023 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed vault-update Used by SPE team to filter out PRs not related to content
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants