Skip to content

Commit 88e8811

Browse files
committed
SA: Stop supporting OCSP status NotReady
1 parent b9e126f commit 88e8811

File tree

9 files changed

+767
-925
lines changed

9 files changed

+767
-925
lines changed

ca/ca_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,6 @@ func (m *mockSA) GetLintPrecertificate(ctx context.Context, req *sapb.Serial, _
135135
return nil, berrors.NotFoundError("cannot find the precert")
136136
}
137137

138-
func (m *mockSA) SetCertificateStatusReady(ctx context.Context, req *sapb.Serial, _ ...grpc.CallOption) (*emptypb.Empty, error) {
139-
return &emptypb.Empty{}, nil
140-
}
141-
142138
var ctx = context.Background()
143139

144140
func setup(t *testing.T) *testCtx {

core/objects.go

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,11 @@ type OCSPStatus string
7676
const (
7777
OCSPStatusGood = OCSPStatus("good")
7878
OCSPStatusRevoked = OCSPStatus("revoked")
79-
// Not a real OCSP status. This is a placeholder we write before the
80-
// actual precertificate is issued, to ensure we never return "good" before
81-
// issuance succeeds, for BR compliance reasons.
82-
OCSPStatusNotReady = OCSPStatus("wait")
8379
)
8480

8581
var OCSPStatusToInt = map[OCSPStatus]int{
86-
OCSPStatusGood: ocsp.Good,
87-
OCSPStatusRevoked: ocsp.Revoked,
88-
OCSPStatusNotReady: -1,
82+
OCSPStatusGood: ocsp.Good,
83+
OCSPStatusRevoked: ocsp.Revoked,
8984
}
9085

9186
// DNSPrefix is attached to DNS names in DNS challenges

docs/ISSUANCE-CYCLE.md

Lines changed: 3 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -8,44 +8,12 @@ At a high level:
88
2. Recheck CAA for hostnames that need it.
99
3. Allocate and store a serial number.
1010
4. Select a certificate profile.
11-
5. Generate and store linting certificate, set status to "wait" (precommit).
12-
6. Sign, log (and don't store) precertificate, set status to "good".
11+
5. Generate and store linting precertificate.
12+
6. Sign, log (and don't store) precertificate.
1313
7. Submit precertificate to CT.
1414
8. Generate linting final certificate. Not logged or stored.
1515
9. Sign, log, and store final certificate.
1616

1717
Revocation can happen at any time after (5), whether or not step (6) was successful. We do things this way so that even in the event of a power failure or error storing data, we have a record of what we planned to sign (the tbsCertificate bytes of the linting certificate).
1818

19-
Note that to avoid needing a migration, we chose to store the linting certificate from (5)in the "precertificates" table, which is now a bit of a misnomer.
20-
21-
# OCSP Status state machine:
22-
23-
wait -> good -> revoked
24-
\
25-
-> revoked
26-
27-
Serial numbers with a "wait" status recorded have not been submitted to CT,
28-
because issuing the precertificate is a prerequisite to setting the status to
29-
"good". And because they haven't been submitted to CT, they also haven't been
30-
turned into a final certificate, nor have they been returned to a user.
31-
32-
OCSP requests for serial numbers in "wait" status will return 500, but we expect
33-
not to serve any 500s in practice because these serial numbers never wind up in
34-
users' hands. Serial numbers in "wait" status are not added to CRLs.
35-
36-
Note that "serial numbers never wind up in users' hands" does not relieve us of
37-
any compliance duties. Our duties start from the moment of signing a
38-
precertificate with trusted key material.
39-
40-
Since serial numbers in "wait" status _may_ have had a precertificate signed,
41-
We need the ability to set revocation status for them. For instance if the public key
42-
we planned to sign for turns out to be weak or compromised, we would want to serve
43-
a revoked status for that serial. However since they also _may not_ have had a
44-
Precertificate signed, we also can't serve an OCSP "good" status. That's why we
45-
serve 500. A 500 is appropriate because the only way a serial number can have "wait"
46-
status for any significant amount of time is if there was an internal error of some
47-
sort: an error during or before signing, or an error storing a record of the
48-
signing success in the database.
49-
50-
For clarity, "wait" is not an RFC 6960 status, but is an internal placeholder
51-
value specific to Boulder.
19+
Note that to avoid needing a migration, we chose to store the linting certificate from (5) in the "precertificates" table, which is now a bit of a misnomer.

mocks/sa.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ import (
1212
"github.com/go-jose/go-jose/v4"
1313
"github.com/jmhodges/clock"
1414
"google.golang.org/grpc"
15-
"google.golang.org/grpc/codes"
16-
"google.golang.org/grpc/status"
1715
"google.golang.org/protobuf/types/known/emptypb"
1816
"google.golang.org/protobuf/types/known/timestamppb"
1917

@@ -213,10 +211,6 @@ func (sa *StorageAuthorityReadOnly) GetCertificateStatus(_ context.Context, req
213211
return nil, errors.New("no cert status")
214212
}
215213

216-
func (sa *StorageAuthorityReadOnly) SetCertificateStatusReady(ctx context.Context, req *sapb.Serial, _ ...grpc.CallOption) (*emptypb.Empty, error) {
217-
return nil, status.Error(codes.Unimplemented, "unimplemented mock")
218-
}
219-
220214
// GetRevocationStatus is a mock
221215
func (sa *StorageAuthorityReadOnly) GetRevocationStatus(_ context.Context, req *sapb.Serial, _ ...grpc.CallOption) (*sapb.RevocationStatus, error) {
222216
return nil, nil

0 commit comments

Comments
 (0)