Skip to content

Create a list-all api endpoint for listing/finding the secrets available#32012

Open
pschou wants to merge 2 commits into
hashicorp:mainfrom
pschou:masterh
Open

Create a list-all api endpoint for listing/finding the secrets available#32012
pschou wants to merge 2 commits into
hashicorp:mainfrom
pschou:masterh

Conversation

@pschou

@pschou pschou commented Jun 24, 2026

Copy link
Copy Markdown

Description

What does this PR do?

Problem: When a tech is at the command line and needs to look up the password for a particular device, but forgets which path the device credentials are stored in, the lookup can take a while. In the effort to make the list searchable (think: pipe grep) or list all the options for a name segment (think: list all the ILOMs), the ability to open this up via an API for a client call can help realize this as a solution.

@pschou
pschou requested a review from a team as a code owner June 24, 2026 16:17
@pschou
pschou requested a review from itsjaspermilan June 24, 2026 16:17
@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jun 24, 2026
@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
vault-ui Error Error Jun 24, 2026 4:24pm

Request Review

@vercel

vercel Bot commented Jun 24, 2026

Copy link
Copy Markdown

Deployment failed with the following error:

The `vercel.json` schema validation failed with the following message: should NOT have additional property `public`

Learn More: https://vercel.com/docs/concepts/projects/project-configuration

@hashicorp-cla-app

hashicorp-cla-app Bot commented Jun 24, 2026

Copy link
Copy Markdown

CLA assistant check

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement

Learn more about why HashiCorp requires a CLA and what the CLA includes

Have you signed the CLA already but the status is still pending? Recheck it.

@vercel

vercel Bot commented Jul 11, 2026

Copy link
Copy Markdown

@pschou is attempting to deploy a commit to the HashiCorp Team on Vercel.

A member of the Team first needs to authorize it.

Add a new /sys/secrets/list-recursive endpoint that lists all secrets
across all secret engine mounts with optional filtering by path, glob
pattern, fuzzy substring matching, and ACL permissions. The response
includes key_info metadata for each secret (mount path, type, accessor).

CLI integration:
- Extend vault list command with --all-mounts, --recursive, --fuzzy,
  --pattern, --permissions, and --recursive-mode flags
- New ListRecursiveInput struct in the Vault API SDK for programmatic access

API client changes:
- Add ListRecursive() and ListRecursiveWithContext() methods to the
  Logical backend client

Tests:
- Unit tests for shouldFilterKey (glob + fuzzy matching logic)
- Integration tests covering all filter combinations via core.HandleRequest
- HTTP-level integration tests exercising the full request/response cycle
- Added key_info metadata validation in response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core/api enhancement size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant