Skip to content

passport-setup 0.5.0: save commands that ask, your own API, a two-part welcome - #23

Merged
akashrafaliya merged 14 commits into
mainfrom
claude/proxy-env-paste
Dec 1, 2026
Merged

akashrafaliya merged 14 commits into
mainfrom
claude/proxy-env-paste

Conversation

@akashrafaliya

Copy link
Copy Markdown
Collaborator

Summary

Version 0.5.0 of the passport-setup skill, shaped by four end-to-end runs in a clean Linux sandbox (Debian 12, Docker inside, Claude Code, CLI 0.9.6 from the production installer, production Passport Cloud, a new signup each time).

Setup flow

  • Welcome, in two messages. The first gives the skill's version, its update command, the goal, then the curl with the key and the same curl with a pointer. The agent then waits for the user's reply. The second shows the diagram (colour-coded 🟦 machine, 🟩 network, 🟨 Passport Cloud), the steps, and the setup-type question.
  • Secrets are saved with commands, not an editor. The user runs the save command first, then pastes the Passport API key, or the Proxy Configuration's two PASSPORT_PROXY_ID / PASSPORT_PROXY_TOKEN lines, at a hidden prompt. This works in bash and zsh, and nothing reaches the chat or the shell history. A save command pasted in place of the key stops with key_not_a_key.
  • The setup ends with the user's own curl, made with a pointer in place of the key. call check finds that call in the Proxy's audit log.
  • On Linux, the skill handles a daemon that isn't running (passport daemon start --skip-vpn-check, see the CLI fix below) and gives a one-line eval note for each OS.
  • Milestone banners (references/banners.md): Proxy live, It works!, Secured!.
  • The agent shows links, never opens a browser, and the docs link appears once.
  • Stages that show something run their script calls first, then send one final message with a numbered list. In the runs, Sonnet 5.5 skipped, or kept only in its thinking, any message placed between two script calls or just before a menu.
  • doctor returns the sign-in step's links, so the agent has nothing to look up before it writes.
  • .api-body is deleted when each command ends.

What next (optional)

  1. Explore the app: the full /setup link and its tour.
  2. Secure your Passport API key: handson plan/apply/verify moves the key into the Secret Vault (HashiCorp). Then api-key.env is deleted. Optional rotation (handson rotate plan, rotate check, finish) writes the new key straight into the vault as a new version, and the pointer doesn't change.
  3. Secure your own API (new): own plan/apply/check registers an API the user really calls. Its key goes straight into the vault with docker exec.
  4. Done for now.

Other changes

  • vault store-cmd <path> gives a docker exec store command, because the app's vault kv put needs the vault CLI, which this setup doesn't install.
  • Troubleshooting has new rows: key_not_a_key, bad_input, apply_first, saved: false, the knockknock error, and a ! call from the agent's chat.
  • The README's update command now uses the marketplace name: /plugin marketplace update passport-skills.
  • PASSPORT_SKILLS_VERSION is in shared/urls.env, and CI checks that it matches plugin.json.

Merge order

  • Merge after postman-eng/passport-access-app#420 (the app's setup commands) is on production. The skill's Explore copy assumes the page's store command no longer needs the vault CLI.
  • Not a blocker: postman-eng/postman-passport-cli#319 fixes the knockknock probe. The skill works around it with --skip-vpn-check.

Test plan

  • Four sandbox runs against production. Run 4 (test build of this branch): setup to 8/8, the pointer call (authenticated, found in the audit log), both save commands, Proxy live together with the plan in one message, What next in its new order, Done for now.
  • The save commands in bash and zsh through a pseudo-terminal: nothing is echoed, Saved. or Nothing saved., mode 600.
  • The docker exec vault store command writes a new version into passport-vault.
  • Every lint check locally: shellcheck 0.10.0, the sync check, the smoke tests (including own plan and vault store-cmd), manifests, paths, SKILL.md under 160 lines, and claude plugin validate ..
  • Not run end to end yet: own plan/apply/check, and rotation (handson rotate plan/check, finish) against Passport Cloud.

Generated with Claude Code

mohitpunjabi-postman and others added 14 commits December 1, 2026 01:29
The Passport app now shows a new Proxy Configuration's ID and enrollment
token as two ready-to-paste lines (PASSPORT_PROXY_ID=… and
PASSPORT_PROXY_TOKEN=…). The Proxy stage now says to replace the two
empty lines in proxy.env with them, and still covers an app that shows
the token alone. If both lines are pasted next to the empty ones, the
file has each key twice: proxy start now stops with
proxy_env_duplicate and says which line to delete, rather than leaving
it to whichever duplicate Docker and the script happen to keep.

Bump the plugin to 0.4.1.

Co-Authored-By: Claude <noreply@anthropic.com>
The Proxy stage now gives the user a one-line command to run in their
own terminal. It reads the key with `read -rs`, so the key isn't shown
and never lands in shell history, writes PASSPORT_API_KEY into
api-key.env with mode 600, and prints "Saved." The stage tells the user
beforehand that nothing appears while they paste, as with sudo. It uses
only shell built-ins, works in bash 3.2 and zsh, and needs no change to
passport-onboard's checks.

Co-Authored-By: Claude <noreply@anthropic.com>
The app copies a new Proxy Configuration's two lines at once. The Proxy
stage now has the user paste them into a one-line command in their own
terminal: two `read -rs`, so nothing is shown and nothing reaches shell
history, writing proxy-enrollment.env (mode 600). The command can't edit
proxy.env in place with shell built-ins alone, so `proxy start` (and
`key check`) move the two values into proxy.env and delete the file. A
paste without both lines stops with enrollment_paste_bad and the command
to rerun. `proxy start` now also reports the Proxy ID it used.

Editing proxy.env by hand still works, for an app that shows the token
alone.

Co-Authored-By: Claude <noreply@anthropic.com>
Error hints for an empty or refused API key, an unknown Proxy ID and a
leftover Proxy Configuration now give the save command to rerun, from
one definition the stage copy matches. SKILL.md, the README and
troubleshooting no longer tell the user to paste secrets into files,
and verification.md records how the two commands were tested.

Co-Authored-By: Claude <noreply@anthropic.com>
"Walk through what was created" was a stage of its own: a menu, a
`mark tour`, and a slot on the progress bar. The sample API stage now
ends with one line telling the user where to look if they want to see
what it created (<app>/setup, Show me what was created). The agent
doesn't open it or wait for it. The script's stage list drops `tour`,
so the progress bar counts 9 stages; a state.json that already has
`tour` still resolves.

Co-Authored-By: Claude <noreply@anthropic.com>
The welcome now has the user run a sample call with the key in the
command, in a new terminal tab. The sample API's objects are made through
the public API right after the Proxy starts, before the CLI signs in, so
the first certificate already carries the grant. The user then runs
`passport login` in that tab, `eval "$(passport daemon shellenv)"`
(macOS: quit and reopen the terminal app once, after setup; Linux: add the
line to the shell's rc file), and the same curl with {{vault:<pointer>}}
in place of the key. `call check` finds that call in the Proxy's audit
log; `call verify` makes it from the agent's side to tell a Proxy problem
from a terminal one.

After setup, a "What next" menu offers, all optional: explore in the app
(the /setup page's own steps, unchanged), securing the Passport API key
(the agent moves the setup key into the Secret Vault, registers Passport's
API, calls it with a pointer and deletes api-key.env), and rotating it (a
new key into the Vault, the old one revoked, the same pointer still
working). This replaces the hands-on stage where the user built five
objects by hand and revoked the first key.

The script's stage list is now 8 stages, with the extras reported in
`status` under data.extras. The CLI minimum is 0.9.6, for `daemon
shellenv`. Plugin 0.5.0.

Co-Authored-By: Claude <noreply@anthropic.com>
call verify's own request lands in the Proxy's audit log, so it now moves
call check's baseline. The macOS copy says a new tab needs the shellenv
line too until the terminal app restarts, and the secure-key plan says
api-key.env is deleted.

Co-Authored-By: Claude <noreply@anthropic.com>
… vault, your own API

From a Linux sandbox run against production (verification.md has the details):

- The save commands now print where to get the secret, then wait for the
  paste, so the user copies it once. The prompt comes from printf, not
  read -p, which zsh rejects. proxy prepare hands them over as
  saveKeyCmd / saveProxyCmd.
- Rotation writes the new key straight into the Secret Vault as a new
  version (handson rotate plan / check); api-key.env is no longer involved.
- New optional "Secure your own API" (own plan / apply / check): the key goes
  into the Secret Vault through docker exec, then the objects, then the
  user's own call found in the audit log.
- vault store-cmd gives a docker exec command for a secret, because the
  app's vault kv put needs a vault CLI this setup doesn't install.
- A menu shows only its question: plans and results now go in a message
  first (sample API plan, the pointer call's result, the secured key).
- Linux: passport daemon start gets --skip-vpn-check (CLI 0.9.6's check
  calls the wrong management address); its own step.
- Welcome: colour-keyed diagram, the skill's version and update command.
  Sign-in copy explains why login comes next.
- Milestone banners; no ID columns; .api-body removed on exit.
- What next: Explore the app, Secure your own API, Secure your Passport API
  key, Done for now. The remark about the /setup demo box is gone; it waits
  for the UI fix.
- PASSPORT_SKILLS_VERSION in urls.env, checked against plugin.json in CI;
  smoke tests for own plan and vault store-cmd.

Co-Authored-By: Claude <noreply@anthropic.com>
…n's path check

Co-Authored-By: Claude <noreply@anthropic.com>
…e, links only

- At the four points where the agent skipped a result and went straight to a
  menu (the pointer call passing, What next, Explore, the rotate offer), the
  message now ends with the choices as a numbered list. Menus stay only where
  nothing comes before them.
- The welcome is two messages: first the goal and the before and after curl,
  then a stop for the user's call or "skip"; then the diagram and the plan.
  The version shows at the top, and the docs link only once, there.
- Links only, never a browser opened.
- Clearer copy: the Secret Reference row; the one-line eval note (macOS: new
  terminals get it after a restart; Linux: add it to ~/.bashrc, since nothing
  sets it); the console link and login after the pointer call; what Passport
  does in each What next option; which Passport API key; the always-full
  /setup link.
- After the key is secured and rotated: this machine and the agent use
  Passport's API through the Proxy alone.
- key check stops with key_not_a_key when the "key" has spaces or shell
  characters (the save command pasted as the key).

Co-Authored-By: Claude <noreply@anthropic.com>
…rn, key before own API

Claude Code shows text written between two tool calls only as a summary
line, so each step runs its script calls first and ends the turn with one
message, asking with a numbered list. The Proxy live banner joins the sample
API's plan, the Secret Reference's origin moves under the table, the copy
says Passport API key, the pointer call gets a one-line form for the chat's
shell, What next puts the Passport API key before your own API, and Explore
drops the vault caveat.

Co-Authored-By: Claude <noreply@anthropic.com>
…gin in the Proxy step

Co-Authored-By: Claude <noreply@anthropic.com>
…troubleshooting

Co-Authored-By: Claude <noreply@anthropic.com>
… look up before it writes

In the fourth run the agent drafted the account message, searched the skill
for the sign-up URL, then sent only "The app URL above is correct".

Co-Authored-By: Claude <noreply@anthropic.com>
@akashrafaliya
akashrafaliya merged commit ee6005a into main Dec 1, 2026
8 checks passed
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