Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
d5b3beb
Add logic for creation of new style authorizations
rolandshoemaker Mar 1, 2019
1081577
Add GetAuthorizations2 and FinalizeAuthorization2
rolandshoemaker Mar 6, 2019
5b850bf
Implement DeactivateAuthorization2
rolandshoemaker Mar 7, 2019
c65f4f2
Implement RevokeAuthorizationsByDomain2
rolandshoemaker Mar 7, 2019
7c9019c
Merge branch 'master' into authz2-ra-new
rolandshoemaker Mar 7, 2019
df8a0da
Remaining methods + most of the tests
rolandshoemaker Mar 14, 2019
ae8b1b9
Initial restructuring work
rolandshoemaker Mar 20, 2019
53d6e30
Scratch
rolandshoemaker Mar 23, 2019
d637e6f
Last bit (I think?)
rolandshoemaker Mar 25, 2019
3021ea4
Review fixes
rolandshoemaker Mar 29, 2019
2b44bd3
Finish SA gRPC wrappers and fix incomplete RevokeAuthorizationsByDoma…
rolandshoemaker Apr 1, 2019
ba4fdba
Initial pass on tests
rolandshoemaker Apr 1, 2019
19896ff
Add GetValidOrderAuthorizations2 and CountInvalidAuthorizations2 tests
rolandshoemaker Apr 2, 2019
4178872
Merge branch 'master' into authz2-ra-new
rolandshoemaker Apr 4, 2019
73cb792
Add GetValidAuthorizations2 test
rolandshoemaker Apr 4, 2019
01a66a7
Update TestNewOrder
rolandshoemaker Apr 4, 2019
ead04f1
Fix tests and wrappers and such
rolandshoemaker Apr 5, 2019
3979a42
Fix tests
rolandshoemaker Apr 8, 2019
f5b4eb2
Actually the opposite of what I wanted
rolandshoemaker Apr 8, 2019
ae31fde
Check error in FinalizeAuthorization2
rolandshoemaker Apr 8, 2019
4851186
Review fixes
rolandshoemaker Apr 10, 2019
ed4841b
Merge branch 'master' into authz2-ra-new
rolandshoemaker Apr 10, 2019
9392df7
Remove feature checking in grpc/pb-marshalling.go
rolandshoemaker Apr 10, 2019
6c798e5
Add 2 to the new authorization methods
rolandshoemaker Apr 10, 2019
3636c49
Switch (mostly) to named variables in SQL
rolandshoemaker Apr 15, 2019
3fc4221
Change NewAuthorization2 return var name in ra
rolandshoemaker Apr 15, 2019
1e83e34
Update authzPBToModel comments
rolandshoemaker Apr 15, 2019
d16a35e
Comment updates and validity info name change
rolandshoemaker Apr 15, 2019
8f7b89d
More comment changes
rolandshoemaker Apr 15, 2019
1636852
Make GetAuthorizations2 only return WFE2 created authorizations
rolandshoemaker Apr 15, 2019
592495e
Remove result check
rolandshoemaker Apr 15, 2019
5a01621
Remove return from RevokeAuthorizationsByDomain2
rolandshoemaker Apr 15, 2019
bb7b69f
Remove wrong test
rolandshoemaker Apr 15, 2019
9c0e01f
Fix GetAuthorizations2 tests
rolandshoemaker Apr 15, 2019
a600636
Replace usage of NewAuthorization2 with NewAuthorizations2
rolandshoemaker Apr 16, 2019
c5af986
Add helper function for core.AcmeStatus -> uint8 conversion
rolandshoemaker Apr 16, 2019
b63c902
Use proto field rather than magic prefix for v2 authz IDs in order
rolandshoemaker Apr 17, 2019
aefd1db
Merge branch 'master' into authz2-ra-new
rolandshoemaker Apr 17, 2019
c25c630
Refactor RevokeAuthorizationsByDomain2
rolandshoemaker Apr 18, 2019
48983b3
Remove features.NewAuthorizationSchema check in sa
rolandshoemaker Apr 18, 2019
292fb70
Review fixes
rolandshoemaker Apr 23, 2019
7ecbc23
Fix breakage
rolandshoemaker Apr 23, 2019
4ad861a
Always update error/expires in FinalizeAuthorization2
rolandshoemaker Apr 23, 2019
dbb3949
Merge branch 'master' into authz2-ra-new
rolandshoemaker Apr 23, 2019
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion core/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,14 @@ type StorageGetter interface {
GetValidOrderAuthorizations(ctx context.Context, req *sapb.GetValidOrderAuthorizationsRequest) (map[string]*Authorization, error)
CountInvalidAuthorizations(ctx context.Context, req *sapb.CountInvalidAuthorizationsRequest) (count *sapb.Count, err error)
GetAuthorizations(ctx context.Context, req *sapb.GetAuthorizationsRequest) (*sapb.Authorizations, error)
GetAuthz2(ctx context.Context, req *sapb.AuthorizationID2) (*corepb.Authorization, error)
// New authz2 methods
GetAuthorization2(ctx context.Context, req *sapb.AuthorizationID2) (*corepb.Authorization, error)
GetAuthorizations2(ctx context.Context, req *sapb.GetAuthorizationsRequest) (*sapb.Authorizations, error)
GetPendingAuthorization2(ctx context.Context, req *sapb.GetPendingAuthorizationRequest) (*corepb.Authorization, error)
CountPendingAuthorizations2(ctx context.Context, req *sapb.RegistrationID) (*sapb.Count, error)
GetValidOrderAuthorizations2(ctx context.Context, req *sapb.GetValidOrderAuthorizationsRequest) (*sapb.Authorizations, error)
CountInvalidAuthorizations2(ctx context.Context, req *sapb.CountInvalidAuthorizationsRequest) (*sapb.Count, error)
GetValidAuthorizations2(ctx context.Context, req *sapb.GetValidAuthorizationsRequest) (*sapb.Authorizations, error)
}

// StorageAdder are the Boulder SA's write/update methods
Expand All @@ -155,6 +162,11 @@ type StorageAdder interface {
AddPendingAuthorizations(ctx context.Context, req *sapb.AddPendingAuthorizationsRequest) (*sapb.AuthorizationIDs, error)
SetOrderError(ctx context.Context, order *corepb.Order) error
RevokeCertificate(ctx context.Context, req *sapb.RevokeCertificateRequest) error
// New authz2 methods
NewAuthorizations2(ctx context.Context, req *sapb.AddPendingAuthorizationsRequest) (*sapb.Authorization2IDs, error)
FinalizeAuthorization2(ctx context.Context, req *sapb.FinalizeAuthorizationRequest) error
DeactivateAuthorization2(ctx context.Context, req *sapb.AuthorizationID2) (*corepb.Empty, error)
RevokeAuthorizationsByDomain2(ctx context.Context, req *sapb.RevokeAuthorizationsByDomainRequest) (*corepb.Empty, error)
}

// StorageAuthority interface represents a simple key/value
Expand Down
133 changes: 73 additions & 60 deletions core/proto/core.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions core/proto/core.proto
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,16 @@ message Order {
optional int64 expires = 3;
optional ProblemDetails error = 4;
optional string certificateSerial = 5;
// contains only v1 authorization IDs, should be
// deprecated once fully switched to v2 authorizations
// in favor of v2Authorizations.
repeated string authorizations = 6;
optional string status = 7;
repeated string names = 8;
optional bool beganProcessing = 9;
optional int64 created = 10;
// contains only v2 authorization IDs.
repeated int64 v2Authorizations = 11;
}

message Empty {}
25 changes: 15 additions & 10 deletions grpc/pb-marshalling.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func pbToChallenge(in *corepb.Challenge) (challenge core.Challenge, err error) {
if in == nil {
return core.Challenge{}, ErrMissingParameters
}
if in.Id == nil || in.Type == nil || in.Status == nil || in.Token == nil || in.KeyAuthorization == nil {
if in.Type == nil || in.Status == nil || in.Token == nil {
return core.Challenge{}, ErrMissingParameters
}
var recordAry []core.ValidationRecord
Expand All @@ -131,15 +131,20 @@ func pbToChallenge(in *corepb.Challenge) (challenge core.Challenge, err error) {
if err != nil {
return core.Challenge{}, err
}
return core.Challenge{
ID: *in.Id,
Type: *in.Type,
Status: core.AcmeStatus(*in.Status),
Token: *in.Token,
ProvidedKeyAuthorization: *in.KeyAuthorization,
Error: prob,
ValidationRecord: recordAry,
}, nil
ch := core.Challenge{
Type: *in.Type,
Status: core.AcmeStatus(*in.Status),
Token: *in.Token,
Error: prob,
ValidationRecord: recordAry,
}
if in.Id != nil {
ch.ID = *in.Id
}
if in.KeyAuthorization != nil {
ch.ProvidedKeyAuthorization = *in.KeyAuthorization
}
return ch, nil
}

func ValidationRecordToPB(record core.ValidationRecord) (*corepb.ValidationRecord, error) {
Expand Down
Loading