Repository navigation
pull-reprint: authenticate with Reprint public keys - #5486
Draft
fredrikekelund wants to merge 10 commits into
Draft
fredrikekelund wants to merge 10 commits into
fredrikekelund wants to merge 10 commits into
Conversation
… to v0.11.3 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…c-key-auth # Conflicts: # apps/cli/lib/run-wp-cli-command.ts
…rint exit codes, and keep WP-CLI's start-options import light Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…cepts it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e Reprint client Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Related issues
pull-reprintproject (still hidden behindSTUDIO_ENABLE_PULL_REPRINT)How AI was used in this PR
Claude Code made the changes, ran the checks and drove manual pulls against a WordPress.com staging site. I steered the scope, the module split and the cleanup of comments and tests, and reviewed the diff.
Proposed Changes
Reprint has switched from HMAC shared secrets to public-key authentication. From v0.11 on, hosts with the
opensslextension, which every Atomic site has, only accept signed requests, so the currentpull-reprintcan't authenticate against WordPress.com or Pressable sites at all.reprint keygenand installs the public key on the site through Jetpack's newjetpack/v4/reprint/install-public-keyendpoint. Reprint then finds the private key on its own, so Studio never handles credentials.wpcomsh/v1fallback and support for older Jetpack versions. The site config no longer stores a Reprint secret.pull-reprint.tsinto smaller modules (source resolution, session paths, selection, the pulled-site server) and shortens comments. No behavior changes there.Depends on Jetpack 16.4, which isn't released yet. Until then, the remote site needs Jetpack trunk.
One key per site: Jetpack stores a single key per site, so a pull from another machine (or another local site) pulling the same remote replaces this machine's key. When the site rejects the stored key, Studio reinstalls it and retries the command once, so pulls that take turns keep working. Two pulls running at the same time can still interrupt each other; supporting several keys per site in Jetpack would fix that and is deferred.
Testing Instructions
You need a WordPress.com or Pressable site running Jetpack trunk.
npm run cli:build && node apps/cli/dist/cli/main.mjs auth loginSTUDIO_ENABLE_PULL_REPRINT=1 node apps/cli/dist/cli/main.mjs pull-reprint <site-url>. Check that a key is generated and installed, and that the site pulls and starts.key.pemunder the pull's state dir (~/.studio/pulls/<id>/state/remotes/*/) and pull again. A new key should be generated and installed.--only plugins/<slug>, both on an existing pulled site and on a first pull into a new one.Pre-merge Checklist
🤖 Generated with Claude Code