Giter Club home page Giter Club logo

Comments (4)

cpu avatar cpu commented on September 28, 2024

Hi @iftahbe, thank you for the very detailed bug report! I appreciate it :-)

During the challenge authorization stage, pebble completes the challenge and the authorization status is changed to "valid" (according to the Pebble console output) but in the HTTP response we still get the "pending" status.

Based on the Fiddler trace & Pebble output it looks like you are:

  1. Creating a new order
  2. GETing the order
  3. GETing the order's authorization
  4. POSTing the authorization's DNS-01 challenge
  5. POSTing the authorization's DNS-01 challenge
  6. POSTing the authorization's DNS-01 challenge
    ....
  7. Eventually getting an error about updating an already valid challenge.

It sounds like you wanted to be polling the authorization to see when it has changed from "pending" to "valid". This should be done by sending a GET request to the authorization URL. Instead, it seems like you are POSTing the challenge over and over - each time it returns "status":"pending" because it is still pending from the initial POSTs. After the first validation completes the status changes to "valid" and then any additional POSTs to the challenge return an error "Cannot update challenge with status valid, only status pending".

E.g. I'd expect the flow for a single identifier order to be more like:

  1. Creating a new order
  2. GETing the new order
  3. GETing the order's authorization
  4. POSTing the authorization's DNS-01 challenge
  5. GETing the order's authorization (Repeat until status != "pending")
  6. POSTing the order's finalize URL if the order's authorization is now "valid"
  7. GETing the order (Repeat until certificate URL is present)
  8. GETing the certificate URL

I don't think there is a bug here. The error you are getting from Pebble is the one I would expect to be delivered to a client that behaved like yours did in the logs :-)

Does that make sense?

from pebble.

cpu avatar cpu commented on September 28, 2024

FWIW: Starting Pebble with PEBBLE_VA_NOSLEEP=1 should make this even more apparent: The first challenge POST will result in a near-immediate change in the authorization from "pending" -> "valid" and you will see the "Cannot update challenge with status valid" error much sooner as a result.

from pebble.

iftahbe avatar iftahbe commented on September 28, 2024

@cpu Thanks a lot for the explanation.
It makes sense yes, I tried to get the status from the challenge itself and not from the order.
I will make the necessary changes :)

from pebble.

cpu avatar cpu commented on September 28, 2024

@iftahbe Great :-)

It makes sense yes, I tried to get the status from the challenge itself and not from the order.

Just to clarify quickly: you can get the individual authorization's statuses as well but you should do so with a GET request and not a POST.

from pebble.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.