Skip to content

Conversation

miagilepner
Copy link
Collaborator

Description

This PR adds documentation for the enterprise feature enabling users to recover individual items from a raft snapshot.

TODO only if you're a HashiCorp employee

  • Backport Labels: If this fix needs to be backported, use the appropriate backport/ label that matches the desired release branch. Note that in the CE repo, the latest release branch will look like backport/x.x.x, but older release branches will be backport/ent/x.x.x+ent.
    • LTS: If this fixes a critical security vulnerability or severity 1 bug, it will also need to be backported to the current LTS versions of Vault. To ensure this, use all available enterprise labels.
  • ENT Breakage: If this PR either 1) removes a public function OR 2) changes the signature
    of a public function, even if that change is in a CE file, double check that
    applying the patch for this PR to the ENT repo and running tests doesn't
    break any tests. Sometimes ENT only tests rely on public functions in CE
    files.
  • Jira: If this change has an associated Jira, it's referenced either
    in the PR description, commit message, or branch name.
  • RFC: If this change has an associated RFC, please link it in the description.
  • ENT PR: If this change has an associated ENT PR, please link it in the
    description. Also, make sure the changelog is in this PR, not in your ENT PR.

@miagilepner miagilepner added this to the 1.20.0-rc milestone May 23, 2025
@miagilepner miagilepner requested review from a team as code owners May 23, 2025 14:29
@github-actions github-actions bot added the hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed label May 23, 2025
Copy link

github-actions bot commented May 23, 2025

CI Results:
All Go tests succeeded! ✅

Copy link

Build Results:
All builds succeeded! ✅

@miagilepner miagilepner requested a review from a team as a code owner May 23, 2025 16:11
Vault returns you a snapshot ID. Then you can use that snapshot ID to read, list,
and recover individual paths from the snapshot.

## Supported Paths
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## Supported Paths
## Supported plugins

I'd argue the table is more about plugins than paths. Unless we're trying to say that I can't use item recovery with kv unless I've mounted it under a specific math and structured my data in a specific way?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

KV and cubbyhole only really have one path. In the future, other plugins will start supporting recover operations but only on certain paths, e.g. ssh/roles/{name} will be supported but not ssh/creds/{name}. I'm not sure of the best way to explain that.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the table can be kept the same, but these two plugins will have "all paths" as their path value.


## Supported Paths

Not all paths support snapshot operations. The following paths are currently supported:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Not all paths support snapshot operations. The following paths are currently supported:
Not all plugins support snapshot operations. The table below outlines the
functionality available for the currently supported plugins.


| Plugin | Path | Snapshot operations supported | Vault version |
|-----------|-----------------|-------------------------------|---------------|
| cubbyhole | `/:secret_name` | `recover`, `read`, `list` | 1.20.0 |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the path syntax here. If I have a kv plugin mounted at dev/keys and want to recover dev/keys/sandbox/postman, can I do that?

Or do we require that my kv plugin be mounted at kv and the postman secret live at kv/postman?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A path at dev/keys/sandbox/postman is fine.

## Loading snapshots

Load a snapshot using the [`vault operator raft snapshot load`](/vault/docs/commands/operator/raft#snapshot-load) command. There are two ways to call this command:
1. Using a snapshot file:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we documenting how-to instructions in a concept document?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought of it as an explanation of how the feature can be used, end to end. But I can remove the command examples here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi! I'm working on a "Manage snapshots" document that includes manual and automatic integrated storage snapshot saves, restores, and this new secret recovery feature as a part of this Education task: VAULT-35538.

I am including some basic CLI and API example commands in the doc I'm working on, and deferring to this documentation for further details wrt to this item recovery feature.

Maybe this will be of use to folks who need some examples? I'm also looking for ideas on where this content should reside in the navigation. Right now, I've placed it in concepts just so I can run the developer preview without error. I'm open to ideas on this content and it's place in navigation. I'm trying to get this wrapped up soon for the 1.20 release.

Just wanted to comment here to raise awareness and I want to make sure I don't step on anyone's toes as well.

I appreciate any thoughts you can share, and feel free to ping me in Slack about this.

Thanks!

miagilepner and others added 9 commits June 3, 2025 10:40
Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
…ver.mdx

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
miagilepner and others added 4 commits June 3, 2025 10:42
Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
@miagilepner miagilepner requested a review from schavis June 10, 2025 09:00
Copy link
Contributor

@kubawi kubawi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@miagilepner miagilepner merged commit 9b42318 into main Jun 11, 2025
37 of 39 checks passed
@miagilepner miagilepner deleted the miagilepner/VAULT-34525-recover-documentatino branch June 11, 2025 13:50
drivera258 pushed a commit that referenced this pull request Jun 11, 2025
…30739)

* start

* docs

* everything except the concept doc

* actual progress

* thank you copilot for finding passive voice

* formatting

* add changelog

* fix formatting of changelog

* update changelog

* Update website/content/api-docs/secret/cubbyhole.mdx

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

* Update website/content/api-docs/secret/cubbyhole.mdx

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

* Update website/content/api-docs/secret/cubbyhole.mdx

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

* Update website/content/api-docs/secret/cubbyhole.mdx

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

* Update website/content/api-docs/secret/kv/kv-v1.mdx

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

* Update website/content/api-docs/secret/cubbyhole.mdx

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

* Update website/content/docs/concepts/integrated-storage/snapshot-recover.mdx

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

* Update website/content/api-docs/secret/cubbyhole.mdx

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

* Update website/content/api-docs/secret/kv/kv-v1.mdx

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

* Update website/content/api-docs/secret/kv/kv-v1.mdx

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

* more fixes

* remove example usage

---------

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
Monkeychip pushed a commit that referenced this pull request Jun 12, 2025
…30739)

* start

* docs

* everything except the concept doc

* actual progress

* thank you copilot for finding passive voice

* formatting

* add changelog

* fix formatting of changelog

* update changelog

* Update website/content/api-docs/secret/cubbyhole.mdx

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

* Update website/content/api-docs/secret/cubbyhole.mdx

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

* Update website/content/api-docs/secret/cubbyhole.mdx

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

* Update website/content/api-docs/secret/cubbyhole.mdx

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

* Update website/content/api-docs/secret/kv/kv-v1.mdx

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

* Update website/content/api-docs/secret/cubbyhole.mdx

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

* Update website/content/docs/concepts/integrated-storage/snapshot-recover.mdx

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

* Update website/content/api-docs/secret/cubbyhole.mdx

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

* Update website/content/api-docs/secret/kv/kv-v1.mdx

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

* Update website/content/api-docs/secret/kv/kv-v1.mdx

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>

* more fixes

* remove example usage

---------

Co-authored-by: Sarah Chavis <62406755+schavis@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs hashicorp-contributed-pr If the PR is HashiCorp (i.e. not-community) contributed pr/no-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants