Repository navigation
feat(vault): add secret copy and service token tools to @ferrvault/api-mcp - #424
Merged
Merged
Conversation
There was a problem hiding this comment.
Nothing blocking. The secret-handling paths look right: copied values and new tokens are redacted from errors through redactLater, a failed store revokes the new token, and the upsertSecret extraction keeps set/generate behaving as before.
- Nit: there are now two names for the same outcome.
set/generatereportrotated(secret-writes.ts:12), whilecopyandcreate_ferrvault_service_tokenreportversionedthroughversionOutcome. Pick one word for the public output. Ifrotatedhas to stay for compatibility, haveversionOutcometake the label so the mapping isn't written twice. - Nit: the gitleaks alert on
service-tokens.test.ts:15is a fake fixture UUID. Dismiss it as a test value so it doesn't sit on the PR.
Contributor
Author
|
Folded the outcome mapping into one |
ferrflow Bot
added a commit
that referenced
this pull request
Oct 7, 2026
## [10.4.0] - 2026-10-07 ### Features - feat(vault): add secret copy and service token tools to @ferrvault/api-mcp (#424)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds four tools to
@ferrvault/api-mcp.copy_ferrvault_secret:source {vault, environment, name},target {vault, environment, name?}(name defaults to the source name). Reveals the source and creates or versions the target inside the server. The value is never returned and is redacted from errors. Refuses a target equal to the source. Returnsoutcome(created/versioned), target coordinates,source_version,target_version.list_ferrvault_service_tokens:GET /vaults/{vault}/environments/{env}/operator/tokens. Whitelisted metadata only (id, name, vault, environment, role, created_by, created_at, expires_at, last_used_at);token_previewis dropped too.create_ferrvault_service_token:POST .../operator/tokenswith{label, role, expires_at?}, then writes the returned token intostore {vault, environment, name}with the same create-or-version logic. The token is never returned and is redacted from errors. If the write fails, the new token is revoked (DELETE .../operator/tokens/{id}) and the error says whether that worked.revoke_ferrvault_service_token:DELETE .../operator/tokens/{id}, id validated as a uuid.Tokens are bound to one vault environment (that is how the API scopes them), and all three token routes require the admin role on the vault.
The create-or-version logic moved to
upsert.tsso the new tools share it.set_ferrvault_secretandgenerate_ferrvault_secretstill reportrotated.guardedcan now redact values that are only known mid-call (the revealed value, the created token). The test harness moved to__tests__/harness.tsand also exposes the registered input schemas, so the tests check path parameter validation against the real tool schemas, nested objects included.