Skip to content

Add multi-credential support with JSON output#2

Open
bmansvk wants to merge 2 commits intomasterfrom
claude/multi-credential-support-0MstS
Open

Add multi-credential support with JSON output#2
bmansvk wants to merge 2 commits intomasterfrom
claude/multi-credential-support-0MstS

Conversation

@bmansvk
Copy link
Copy Markdown
Owner

@bmansvk bmansvk commented Mar 14, 2026

  • keymaster get now accepts comma-separated keys (e.g., get a,b,c)
    with a single Touch ID/password prompt for the entire batch
  • Default output format is now JSON for get command
  • Added --plain flag to preserve legacy raw-text output (single key only)
  • keymasterd: new /keys/,,... endpoint returns JSON with one auth
  • keymasterd-inetd: same multi-key support as keymasterd
  • /key/ endpoint unchanged (plain text, backward compatible)
  • Missing keys return {"value": null, "error": "not found"} instead of
    failing the whole request
  • Updated README.md with new usage examples
  • Added CLAUDE.md development guide

https://claude.ai/code/session_01FQjN5DyMVBT3wLizVxAWS4

claude added 2 commits March 6, 2026 08:57
- keymaster get now accepts comma-separated keys (e.g., `get a,b,c`)
  with a single Touch ID/password prompt for the entire batch
- Default output format is now JSON for `get` command
- Added --plain flag to preserve legacy raw-text output (single key only)
- keymasterd: new /keys/<k1>,<k2>,... endpoint returns JSON with one auth
- keymasterd-inetd: same multi-key support as keymasterd
- /key/<name> endpoint unchanged (plain text, backward compatible)
- Missing keys return {"value": null, "error": "not found"} instead of
  failing the whole request
- Updated README.md with new usage examples
- Added CLAUDE.md development guide

https://claude.ai/code/session_01FQjN5DyMVBT3wLizVxAWS4
Both /key/ and /keys/ endpoints now accept an optional
?description=<text> query parameter that customizes the Touch ID /
password prompt shown to the user, matching the CLI's --description flag.

Updated keymasterd-inetd.swift with the same feature.
Updated README.md and keymasterd help text with usage examples.

https://claude.ai/code/session_01FQjN5DyMVBT3wLizVxAWS4
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b38d395653

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

// For "get", split comma-separated keys
let keys: [String]
if action == "get" {
keys = keyArg.components(separatedBy: ",").map { $0.trimmingCharacters(in: .whitespaces) }.filter { !$0.isEmpty }
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve access to keys containing commas

Spliting keyArg on every comma makes key names like team,prod impossible to fetch as a single secret. In JSON mode this silently reads the wrong keys, and in --plain mode it now hard-fails because the parsed key count is > 1, so existing comma-containing keys that were previously readable become unreachable through keymaster get.

Useful? React with 👍 / 👎.

Comment on lines +262 to +263
return httpResponse(status: 400, body: "Key name(s) required", contentType: "application/json")
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Return valid JSON for /keys bad requests

This /keys validation path declares application/json but returns an unquoted plain-text body (Key name(s) required), which is invalid JSON. Any client that follows the documented JSON contract for /keys and always parses the response body as JSON will fail on these 400 cases instead of getting a structured error payload.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants