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

Add Identifiers to Authorization & Order structs #7961

Draft
wants to merge 91 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
e8ebb38
Add Identifiers to Authorization & Order structs
jprenken Jan 21, 2025
a133fb2
Add TODOs, clarify others, found existing NormalizeIdentifiers
jprenken Jan 21, 2025
9e34394
Merge branch 'main' of github.com:letsencrypt/boulder into pb-identif…
jprenken Jan 21, 2025
92b5df2
Use identifiers in policy functions & part of wfe NewOrder
jprenken Jan 22, 2025
807f44a
Merge branch 'main' of github.com:letsencrypt/boulder into pb-identif…
jprenken Jan 22, 2025
8bddab2
Change HashNames to HashIdentifiers, fix more errors, drink more Glurp
jprenken Jan 22, 2025
9307f39
Use 'idents' var name instead of 'identifiers' to reduce confusion wi…
jprenken Jan 22, 2025
66bddc4
Use identifiers in RequestEvent, add convenience funcs to identifier pkg
jprenken Jan 23, 2025
f56c456
Merge branch 'main' of github.com:letsencrypt/boulder into pb-identif…
jprenken Jan 23, 2025
98538f4
Use identifiers in ra.NewOrder, fix test typo, move AsProto calls to …
jprenken Jan 23, 2025
ed7e503
Change some SA model & test functions to use identifiers
jprenken Jan 23, 2025
3b659a6
Change ra.certificateRequestEvent & test functions to use identifiers
jprenken Jan 23, 2025
95e473d
Fix more TODOs in cert-checker, tests & mocks
jprenken Jan 23, 2025
a792197
Add helper funcs, with tests, to handle both idents & names
jprenken Jan 24, 2025
008498a
Add empty/nil test cases
jprenken Jan 24, 2025
5c1845b
Merge branch 'main' of github.com:letsencrypt/boulder into pb-identif…
jprenken Jan 24, 2025
1bcd9fc
Use identifiers throughout integration tests
jprenken Jan 24, 2025
013206b
Consistent nil/empty handling
jprenken Jan 24, 2025
4f4905c
Simplify helper funcs; their callers won't use names
jprenken Jan 24, 2025
b5840da
Remove singular helper func, not useful because of defers; use helper…
jprenken Jan 24, 2025
9e70389
Actually remove singular helper func, and it's because of derefs, not…
jprenken Jan 24, 2025
e2a3082
Merge branch 'main' of github.com:letsencrypt/boulder into pb-identif…
jprenken Jan 25, 2025
4f9700a
Identifier-ize new code from main
jprenken Jan 25, 2025
9e3c10f
Plumb identifiers through RA
jprenken Jan 25, 2025
8bbe0f3
Plumb identifiers through grpc & sa
jprenken Jan 25, 2025
d0b7523
Remove stale TODOs
jprenken Jan 25, 2025
b368e44
Fix missed reference in SA (don't worry, there are still more failures)
jprenken Jan 25, 2025
f8844d3
Fix last tests!
jprenken Jan 26, 2025
16a2c10
Merge branch 'main' of github.com:letsencrypt/boulder into pb-identif…
jprenken Jan 26, 2025
d4c07a5
Merge branch 'main' of github.com:letsencrypt/boulder into pb-identif…
jprenken Jan 27, 2025
79bb748
Merge branch 'main' of github.com:letsencrypt/boulder into pb-identif…
jprenken Jan 27, 2025
b65c35a
Merge branch 'main' of github.com:letsencrypt/boulder into pb-identif…
jprenken Jan 27, 2025
6fc740a
Merge branch 'main' of github.com:letsencrypt/boulder into pb-identif…
jprenken Jan 28, 2025
f6a53e3
Merge branch 'main' of github.com:letsencrypt/boulder into pb-identif…
jprenken Jan 30, 2025
48489d4
Merge branch 'main' of github.com:letsencrypt/boulder into pb-identif…
jprenken Feb 3, 2025
071228a
Identifier-ize new code from main
jprenken Feb 3, 2025
1294a04
Collapse FromNames into SliceFromProto; move NormalizeIdentifiers to …
jprenken Feb 4, 2025
8fb4c53
Merge branch 'main' of github.com:letsencrypt/boulder into pb-identif…
jprenken Feb 4, 2025
6239ea6
Merge branch 'main' of github.com:letsencrypt/boulder into pb-identif…
jprenken Feb 5, 2025
60b8aa3
Use FromCert in cert-checker; rename NormalizeIdentifiers to Normalize
jprenken Feb 5, 2025
92caa0d
Identifier-ize new code from main
jprenken Feb 5, 2025
eb7d1d7
Use FromCert in expiration-mailer
jprenken Feb 5, 2025
d3c85f0
Use FromCert in expiration-mailer tests; add todo
jprenken Feb 5, 2025
d30fc19
Use SliceFromProto in several simple cases
jprenken Feb 5, 2025
76172f9
Plumb identifiers through ratelimits too
jprenken Feb 7, 2025
539679c
Merge branch 'main' of github.com:letsencrypt/boulder into pb-identif…
jprenken Feb 7, 2025
054521f
Remove SliceNewDNS, refactor its remaining uses
jprenken Feb 7, 2025
f758109
Fix test, reorder idents in protos, remove names from RA log events
jprenken Feb 7, 2025
75cabb3
Add TODO for ratelimits; remove TODO per feedback & change var name f…
jprenken Feb 7, 2025
4204208
Address feedback, add TODOs
jprenken Feb 7, 2025
6025aa4
Refactor most uses of NamesFromCSR; expand comment
jprenken Feb 8, 2025
a58c9a4
Rename array indices to i
jprenken Feb 8, 2025
cdfb479
Add tiny test case, fix tiny punctuation
jprenken Feb 8, 2025
1fd581f
Add IP address support to common_test makeCSR
jprenken Feb 8, 2025
cce94be
Correct identifier type across test clients
jprenken Feb 8, 2025
6bbb99f
Merge branch 'main' of github.com:letsencrypt/boulder into pb-identif…
jprenken Feb 10, 2025
a18fe27
Identifier-ize new code from main
jprenken Feb 10, 2025
52460da
Don't modify existing vars; plumb IPs into SA model & authz2 queries
jprenken Feb 11, 2025
e4bb0b3
Revert unnecessary comment reformat
jprenken Feb 11, 2025
fe600b9
Don't modify existing vars; avoid more nil pointer derefs
jprenken Feb 11, 2025
4954e85
Fix namesPerCert in RA
jprenken Feb 11, 2025
4078f36
Simplify uintToIdentifierType in SA
jprenken Feb 11, 2025
2746c44
Partially revert broken csr.VerifyCSR change
jprenken Feb 12, 2025
65cb892
Merge branch 'main' of github.com:letsencrypt/boulder into pb-identif…
jprenken Feb 12, 2025
4d149df
Fix lints
jprenken Feb 12, 2025
cea1e03
Merge branch 'main' of github.com:letsencrypt/boulder into pb-identif…
jprenken Feb 13, 2025
6077d8c
Update TODO
jprenken Feb 13, 2025
58b8441
Revert most ratelimits changes; add conversion glue to WFE & RA
jprenken Feb 13, 2025
1e139dd
Use table-based tests for core.HashIdentifiers; add test cases
jprenken Feb 13, 2025
ebaa075
Add test cases for grpc.newOrderValid
jprenken Feb 13, 2025
bb2bc9b
Add test cases for sa.authzPbToModel
jprenken Feb 13, 2025
83e4bdb
Add test cases for sa.NewOrderAndAuthzs
jprenken Feb 13, 2025
d9cb11b
Add test cases for sa.FQDNSetTimestampsForWindow
jprenken Feb 13, 2025
e805983
Add test cases for sa.FQDNSetExists; fix typo
jprenken Feb 13, 2025
4b38b98
Add test cases for sa.TestGetValidAuthorizations2
jprenken Feb 13, 2025
38e2dba
Add test cases for sa.CountInvalidAuthorizations2
jprenken Feb 13, 2025
13f85cf
Add test case for sa.StatusForOrder
jprenken Feb 13, 2025
7e9c8e6
Add test case for policy.WellFormedIdentifiers
jprenken Feb 13, 2025
4c15381
Add test case for policy.WillingToIssue; clean up core.TestHashIdenti…
jprenken Feb 13, 2025
6022840
Add test cases for ra.NewOrder
jprenken Feb 13, 2025
e468865
Add test cases for ra.FinalizeOrder
jprenken Feb 13, 2025
b11d8e5
Add test cases for identifier.FromCSR (identical to FromCert)
jprenken Feb 13, 2025
62648e3
Merge branch 'main' of github.com:letsencrypt/boulder into pb-identif…
jprenken Feb 19, 2025
94520f3
Merge branch 'main' of github.com:letsencrypt/boulder into pb-identif…
jprenken Feb 21, 2025
e85166c
Address feedback: don't preallocate slices, error on unsupported iden…
jprenken Feb 21, 2025
c4ed5fe
Address feedback: fix TODO & simplify FromCert
jprenken Feb 21, 2025
dc5e744
Address feedback: simplify FromCert & FromCSR
jprenken Feb 21, 2025
bc1ff68
Address feedback: greatly simplify SliceFromProto calls
jprenken Feb 24, 2025
17869c0
Address feedback: introduce identifier.FromProtoWithDefault
jprenken Feb 24, 2025
3d99ea3
Fix comment for lint
jprenken Feb 24, 2025
d2ad19f
Merge branch 'main' of github.com:letsencrypt/boulder into pb-identif…
jprenken Mar 7, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Consistent nil/empty handling
  • Loading branch information
jprenken committed Jan 24, 2025
commit 013206bfd2ace84f6b86a4b6ccc8e5f4a3ceea38
3 changes: 3 additions & 0 deletions identifier/identifier.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ func IdentifierAndName(pbIdent *corepb.Identifier, name string) (ACMEIdentifier,
// Deprecated: TODO(#7311): This can be removed after DnsNames are no longer
// used in RPCs.
func IdentifiersAndNames(pbIdents []*corepb.Identifier, names []string) ([]ACMEIdentifier, []string) {
if len(pbIdents) == 0 && len(names) == 0 {
return nil, nil
}
if len(pbIdents) == 0 {
idents := make([]ACMEIdentifier, len(names))
for i, name := range names {
Expand Down
16 changes: 8 additions & 8 deletions identifier/identifier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,15 +143,15 @@ func TestIdentifiersAndNames(t *testing.T) {
Name: "Empty identifiers, empty names",
InputIdents: []*corepb.Identifier{},
InputNames: []string{},
ExpectIdents: []ACMEIdentifier{},
ExpectNames: []string{},
ExpectIdents: nil,
ExpectNames: nil,
},
{
Name: "Empty identifiers, nil names",
InputIdents: []*corepb.Identifier{},
InputNames: nil,
ExpectIdents: []ACMEIdentifier{},
ExpectNames: []string{},
ExpectIdents: nil,
ExpectNames: nil,
},
{
Name: "Nil identifiers, populated names",
Expand All @@ -167,15 +167,15 @@ func TestIdentifiersAndNames(t *testing.T) {
Name: "Nil identifiers, empty names",
InputIdents: nil,
InputNames: []string{},
ExpectIdents: []ACMEIdentifier{},
ExpectNames: []string{},
ExpectIdents: nil,
ExpectNames: nil,
},
{
Name: "Nil identifiers, nil names",
InputIdents: nil,
InputNames: nil,
ExpectIdents: []ACMEIdentifier{},
ExpectNames: []string{},
ExpectIdents: nil,
ExpectNames: nil,
},
}

Expand Down