Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repro failure #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Repro failure #2

wants to merge 3 commits into from

Conversation

bmw
Copy link
Owner

@bmw bmw commented Jan 19, 2018

No description provided.

Daniel added 3 commits January 19, 2018 15:41
Prior to this commit the combination of:
* Order reuse
* Authz reuse within orders
* Orders not being set invalid on a failed challenge/authz

Meant that if a user created an order, failed (or deactivated) one of
the associated authzs, and then tried to create another order for the
same names they would get back the original order with the
failed/deactivated authzs. Oops!

This commit addresses this problem in three main ways:

1. Pending authz reuse within orders is removed. There's no advantage to
   reusing one pending authz across multiple orders when we have reuse
   at the order level and it complicates invalidating an order when
   a pending authz is finalized to invalid.

2. When an authz is finalized to an invalid state the SA now tries to
   find an associated order (if any) using the `orderToAuthz` join
   table. If an order is associated with the authz being finalized as
   invalid then the order is also updated to be invalid.

3. When NewOrder looks for an order to reuse it only reuses the order if
   the status is pending.

The combination of the above means that calling NewOrder, failing (or
deactivating an authz) and then calling NewOrder again will not result
in the same "stuck" order being returned for the second call.

The associated integration test was written ahead of the fixes and
verifies that the change has the intended affect. Prior to the fixes it
failed in the same manner as reported by users of the V2 staging API.
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.

1 participant