Pebble error unmarshalling body JSON

Pebble is rejecting a JSON body with this error,

{
  type: "urn:ietf:params:acme:error:malformed",
  detail: "Error unmarshaling body JSON",
  status: 400
}

Here is the JWS (pretty printed) sent to the new account url,

{
  "payload":"eyJleHRlcm5hbEFjY291bnRCaW5kaW5nIjpmYWxzZSwib25seVJldHVybkV4aXN0aW5nIjpmYWxzZSwidGVybXNPZlNlcnZpY2VBZ3JlZWQiOnRydWV9",
  "protected":"eyJhbGciOiJFUzI1NiIsImp3ayI6eyJhbGciOiJFUzI1NiIsImNydiI6IlAtMjU2Iiwia3R5IjoiRUMiLCJ1c2UiOiJzaWciLCJ4Ijoiak1pVU1obEhDXzBOV2p2UUd4T0p2aWR5ZWs5bDV6d3U5b1VOZ01yVHFwayIsInkiOiJ2LWphemtKcjF6RTc5NFZoa0lfcC1UcWN3dks2VHdXX29hVUdnT2owUWRrIn0sIm5vbmNlIjoiSFRfaUFBQU1vMEFfR0p5M0tFVXJCQSIsInVybCI6Imh0dHBzOi8vbG9jYWxob3N0L3NpZ24tbWUtdXAifQ",
  "signature":"U4LCZuI5FuNdFkqNhHLZNvDmBREFla-jBG2UvmINlB71IYW4zo-QbJM_Gc3ki2swkscnVs4XcW2KSbK4gHZPfQ"
}

Weird thing is it works fine with the Let's Encrypt staging API, just not Pebble.

I'm also running Pebble with -strict false.

Any ideas?

Looking at RFC 8555 Section 7.3.4, I do not believe that setting externalAccountBinding to false is valid. You must either omit it, if not using EAB, or supply a JWS object as EAB. There is no indication in the spec that you can supply a boolean here.

9 Likes

That was it.

Forgot to fix that up.

Thanks

4 Likes

In the future (I'm guessing there are about some 10 to 20 new threads to come) please provide more information than just the JWS. I'd prefer to also have the plain text input and code which generated the output et cetera.

In this case @Nummer378 was kind enough to do all the decoding work for you, but this might not be the case in the future. If you provide more information to begin with, more volunteers will be enclined to react to your threads.

4 Likes

Ok. No worries.

I actually saw another thread where someone had provided the encoded payload and thought it prudent as that’s a more ‘pure’ representation of what’s being sent.

As for 10 to 20 new threads to come, you’ll be glad to know I now have a working prototype.

I’m hanging around to see if there’s anything I might be able to help with in future.

Thanks again everyone for the help.

3 Likes

Sure, the encoded payload is mostly the required stuff, but IMO "more = better" :slight_smile:

4 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.