registry icon indicating copy to clipboard operation
registry copied to clipboard

HTTP domain authentication fails signature verification with matching Ed25519 key

Open chrismann040-commits opened this issue 2 months ago • 2 comments

I am trying to publish a remote MCP server using HTTP domain authentication.

Environment:

  • Windows 10
  • mcp-publisher 1.8.1
  • OpenSSL 4.0.2
  • Domain: bodywise.io
  • Server name: io.bodywise/public
  • Authentication method: HTTP domain verification

The public proof is served successfully at:

https://bodywise.io/.well-known/mcp-registry-auth

With Ed25519:

  • The private key passed to mcp-publisher is exactly 64 hex characters.
  • mcp-publisher prints an "Expected proof record".
  • That expected proof record exactly matches the proof record being served by bodywise.io.
  • The keypair was independently tested locally with OpenSSL: "Signature Verified Successfully"

However:

mcp-publisher login http --domain "bodywise.io" --private-key "<64-char private key>"

fails with:

401 Unauthorized HTTP authentication failed signature verification failed

I also tested the supported ECDSA P-384 HTTP authentication method.

Again:

  • mcp-publisher derived the expected public proof record.
  • The live bodywise.io verification endpoint served that same proof record.
  • Login still failed at signature verification with 401.

The MCP server itself is live at:

https://bodywise.io/api/mcp

The prepared server.json passes mcp-publisher validate.

I have not included any private keys in this report.

Is this a current issue with HTTP domain authentication / signature verification, or is there another step required for domain authentication?

chrismann040-commits avatar Sep 30 '26 12:09 chrismann040-commits

I checked what the registry would see for your domain today (2026-10-13 05:00 UTC), and the proof itself looks fine.

  • https://bodywise.io/.well-known/mcp-registry-auth returns 200 text/plain, 92 bytes, v=MCPv1; k=ecdsap384; p=A2FizsW8..., with no trailing newline or BOM. I get the same body when I send the registry's own request headers (User-Agent: mcp-registry/1.0, Accept: text/plain, http.go#L181-L189).
  • I fed that exact string to the registry's parser (ParseMCPKeysFromStrings on main 11b7b0e). It parses as a valid compressed P-384 key with fingerprint ecdsap384:A2FizsW8.

So the 401 is a real mismatch: the registry verified your signature against a public key that doesn't belong to the private key you signed with. The production registry (1.8.1) tells you which key it used. The full error line should end with something like signature verification failed (tried published key ecdsap384:XXXXXXXX); if this is not the key you are signing with, the published record may be stale (common.go#L150-L155). Could you post that full line from an ECDSA attempt?

  • If the fingerprint is not ecdsap384:A2FizsW8, the registry got a different file from the one you and I see. Your response carries cache-control: public, max-age=300, so after switching keys or algorithms, wait at least five minutes before retrying, and make sure every edge or deployment serves the new file.
  • If it is A2FizsW8, the private key in that command isn't the one behind this record. Re-run mcp-publisher login http --algorithm ecdsap384 --domain bodywise.io --private-key <96 hex chars> and check that the "Expected proof record" it prints in that same run is byte-identical to the served file.

One unrelated thing you might also hit with ECDSA: about 1 login in 140 fails (146 of 20,000 signatures in a local run) with invalid signature size for ECDSA P-384, because the publisher doesn't zero-pad r and s (cmd/publisher/auth/common.go#L130). That is fixed by the open #1457. If you see that message, just retry.

Prepared with help from Claude Code. I made the HTTP requests and ran the registry parser myself; I did not call the production auth endpoint for your domain.

basitalisandhu avatar Oct 13 '26 05:10 basitalisandhu

Thanks for the report. We investigated this further on 2026-11-12 using the actual publisher signing and HTTP exchange code against local registry and HTTPS proof fixtures.

With the served proof taken directly from the publisher's printed “Expected proof record”:

Algorithm v1.8.1 source Current main (ee9df07)
Ed25519 2,000/2,000 logins succeeded 2,000/2,000 succeeded
ECDSA P-384 1,987/2,000 succeeded 2,000/2,000 succeeded

The 13 failures on v1.8.1 were invalid signature size for ECDSA P-384: the known leading-zero padding bug fixed by the now-merged #1457. This is distinct from a cryptographic signature mismatch and does not explain the reported Ed25519 failure.

Additional checks:

  • Deliberately serving a different public key reproduced signature verification failed.
  • CRLF line endings and a UTF-8 BOM did not break verification in the tested cases.
  • OpenSSL 4.0.3 verified both algorithms' publisher-generated signatures.
  • Your live proof endpoint still returned one valid P-384 record (92 bytes), fingerprint ecdsap384:A2FizsW8, with Cache-Control: public, max-age=300.

These were source builds tested on macOS, not a reproduction of your Windows 10 environment. We only fetched the public proof from your domain; all authentication experiments used local fixtures. The cause of your original matching-key failure remains unconfirmed. #1849 addresses multiple proof records and has not been shown to resolve this single-record report.

Please retry with mcp-publisher v1.8.9, which includes the P-384 fix. If you change the proof file, allow its five-minute cache lifetime to expire and ensure all origins/CDN edges serve the updated record.

If the failure still reproduces, please reopen this issue (or reply here so we can reopen it) and share these from the same login attempt:

  1. The complete error output, including any tried-key fingerprint.
  2. The registry URL used.
  3. The exact public “Expected proof record” printed by that invocation.

Please also confirm the publisher version and algorithm used. Do not include your private key or any registry token.

Closing for now because we could not reproduce the reported matching-key mismatch with the available information; this does not establish that the original cause was fixed. We can continue investigating with the same-attempt diagnostics above.

rdimitrov avatar Nov 12 '26 17:11 rdimitrov