Skip to content

Commit 7f87980

Browse files
committed
Merge branch main into refactor-dns
2 parents f02b35c + 8019edf commit 7f87980

File tree

213 files changed

+6220
-2410
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

213 files changed

+6220
-2410
lines changed

.github/workflows/boulder-ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,19 @@ jobs:
5454
- "./t.sh --unit --enable-race-detection"
5555
- "./tn.sh --unit --enable-race-detection"
5656
- "./t.sh --start-py"
57+
# Same cases but backed by Vitess + MySQL 8 instead of ProxySQL + MariaDB
58+
- "./t.sh --use-vitess --integration"
59+
- "./tn.sh --use-vitess --integration"
60+
- "./t.sh --use-vitess --unit --enable-race-detection"
61+
- "./tn.sh --use-vitess --unit --enable-race-detection"
62+
- "./t.sh --use-vitess --start-py"
5763

5864
env:
5965
# This sets the docker image tag for the boulder-tools repository to
6066
# use in tests. It will be set appropriately for each tag in the list
6167
# defined in the matrix.
6268
BOULDER_TOOLS_TAG: ${{ matrix.BOULDER_TOOLS_TAG }}
69+
BOULDER_VTCOMBOSERVER_TAG: vitessv23.0.0_2025-12-02
6370

6471
# Sequence of tasks that will be executed as part of the job.
6572
steps:

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,11 @@ test/proxysql/*.log*
4343

4444
# Coverage files
4545
test/coverage
46+
47+
# DSN symlinks
48+
test/secrets/badkeyrevoker_dburl
49+
test/secrets/cert_checker_dburl
50+
test/secrets/incidents_dburl
51+
test/secrets/revoker_dburl
52+
test/secrets/sa_dburl
53+
test/secrets/sa_ro_dburl

cmd/ceremony/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ This tool always generates key pairs such that the public and private key are bo
4040
| Field | Description |
4141
| --- | --- |
4242
| `type` | Specifies the type of key to be generated, either `rsa` or `ecdsa`. If `rsa` the generated key will have an exponent of 65537 and a modulus length specified by `rsa-mod-length`. If `ecdsa` the curve is specified by `ecdsa-curve`. |
43-
| `ecdsa-curve` | Specifies the ECDSA curve to use when generating key, either `P-224`, `P-256`, `P-384`, or `P-521`. |
43+
| `ecdsa-curve` | Specifies the ECDSA curve to use when generating key, either `P-256`, `P-384`, or `P-521`. |
4444
| `rsa-mod-length` | Specifies the length of the RSA modulus, either `2048` or `4096`. |
4545

4646
- `outputs`: object containing paths to write outputs.
@@ -267,7 +267,7 @@ This config generates a CSR signed by a key in the HSM, identified by the object
267267
| Field | Description |
268268
| --- | --- |
269269
| `type` | Specifies the type of key to be generated, either `rsa` or `ecdsa`. If `rsa` the generated key will have an exponent of 65537 and a modulus length specified by `rsa-mod-length`. If `ecdsa` the curve is specified by `ecdsa-curve`. |
270-
| `ecdsa-curve` | Specifies the ECDSA curve to use when generating key, either `P-224`, `P-256`, `P-384`, or `P-521`. |
270+
| `ecdsa-curve` | Specifies the ECDSA curve to use when generating key, either `P-256`, `P-384`, or `P-521`. |
271271
| `rsa-mod-length` | Specifies the length of the RSA modulus, either `2048` or `4096`. |
272272

273273
- `outputs`: object containing paths to write outputs.

cmd/ceremony/ecdsa.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,13 @@ import (
1313
)
1414

1515
var stringToCurve = map[string]elliptic.Curve{
16-
elliptic.P224().Params().Name: elliptic.P224(),
1716
elliptic.P256().Params().Name: elliptic.P256(),
1817
elliptic.P384().Params().Name: elliptic.P384(),
1918
elliptic.P521().Params().Name: elliptic.P521(),
2019
}
2120

2221
// curveToOIDDER maps the name of the curves to their DER encoded OIDs
2322
var curveToOIDDER = map[string][]byte{
24-
elliptic.P224().Params().Name: {6, 5, 43, 129, 4, 0, 33},
2523
elliptic.P256().Params().Name: {6, 8, 42, 134, 72, 206, 61, 3, 1, 7},
2624
elliptic.P384().Params().Name: {6, 5, 43, 129, 4, 0, 34},
2725
elliptic.P521().Params().Name: {6, 5, 43, 129, 4, 0, 35},

cmd/ceremony/main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ type keyGenConfig struct {
101101
}
102102

103103
var allowedCurves = map[string]bool{
104-
"P-224": true,
105104
"P-256": true,
106105
"P-384": true,
107106
"P-521": true,
@@ -121,7 +120,7 @@ func (kgc keyGenConfig) validate() error {
121120
return errors.New("if key.type = 'rsa' then key.ecdsa-curve is not used")
122121
}
123122
if kgc.Type == "ecdsa" && !allowedCurves[kgc.ECDSACurve] {
124-
return errors.New("key.ecdsa-curve can only be 'P-224', 'P-256', 'P-384', or 'P-521'")
123+
return errors.New("key.ecdsa-curve can only be 'P-256', 'P-384', or 'P-521'")
125124
}
126125
if kgc.Type == "ecdsa" && kgc.RSAModLength != 0 {
127126
return errors.New("if key.type = 'ecdsa' then key.rsa-mod-length is not used")

cmd/ceremony/main_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ func TestKeyGenConfigValidate(t *testing.T) {
117117
Type: "ecdsa",
118118
ECDSACurve: "bad",
119119
},
120-
expectedError: "key.ecdsa-curve can only be 'P-224', 'P-256', 'P-384', or 'P-521'",
120+
expectedError: "key.ecdsa-curve can only be 'P-256', 'P-384', or 'P-521'",
121121
},
122122
{
123123
name: "key.type is ecdsa but key.rsa-mod-length is present",

ctpolicy/loglist/loglist.go

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ func usableForPurpose(s loglist3.LogStatus, p purpose) bool {
6565
return false
6666
}
6767

68+
// isTestLog returns true if the log type is test is "test" or "monitoring_only".
69+
// The schema documents a third option, "prod", which does not currently appear in Google's lists.
70+
func isTestLog(log Log) bool {
71+
return log.Type == "test" || log.Type == "monitoring_only"
72+
}
73+
6874
// New returns a LogList of all operators and all logs parsed from the file at
6975
// the given path. The file must conform to the JSON Schema published by Google:
7076
// https://www.gstatic.com/ct/log_list/v3/log_list_schema.json
@@ -186,10 +192,13 @@ func (ll List) forPurpose(p purpose, submitToTestLogs bool) (List, error) {
186192
// interprets this as "UndefinedLogStatus", which causes usableForPurpose()
187193
// to return false. To account for this, we skip this check for test logs.
188194
for _, log := range ll {
189-
if log.Type == "test" && !submitToTestLogs {
195+
// Only consider test logs if we are submitting to test logs:
196+
if isTestLog(log) && !submitToTestLogs {
190197
continue
191198
}
192-
if log.Type != "test" && !usableForPurpose(log.State, p) {
199+
// Check the log is usable for a purpose.
200+
// But test logs aren't ever marked Usable.
201+
if !isTestLog(log) && !usableForPurpose(log.State, p) {
193202
continue
194203
}
195204
res = append(res, log)

ctpolicy/loglist/loglist_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ func TestForPurpose(t *testing.T) {
9595
Log{Name: "Log A1", Operator: "A", State: loglist3.UsableLogStatus},
9696
Log{Name: "Log B1", Operator: "B", State: loglist3.UsableLogStatus},
9797
Log{Name: "Log T1", Operator: "T", Type: "test", State: loglist3.UndefinedLogStatus},
98+
Log{Name: "Log M1", Operator: "M", Type: "monitoring_only", State: loglist3.UndefinedLogStatus},
9899
}
99100
expected = List{
100101
Log{Name: "Log A1", Operator: "A", State: loglist3.UsableLogStatus},
@@ -108,6 +109,7 @@ func TestForPurpose(t *testing.T) {
108109
Log{Name: "Log A1", Operator: "A", State: loglist3.UsableLogStatus},
109110
Log{Name: "Log B1", Operator: "B", State: loglist3.UsableLogStatus},
110111
Log{Name: "Log T1", Operator: "T", Type: "test", State: loglist3.UndefinedLogStatus},
112+
Log{Name: "Log M1", Operator: "M", Type: "monitoring_only", State: loglist3.UndefinedLogStatus},
111113
}
112114
actual, err = input.forPurpose(Issuance, true)
113115
test.AssertNotError(t, err, "should have two acceptable logs with submitToTestLogs=[true]")

docker-compose.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,9 @@ services:
5050
- 4001:4001 # ACMEv2
5151
- 4003:4003 # SFE
5252
depends_on:
53-
- bmysql
53+
- bmariadb
5454
- bproxysql
55+
- bvitess
5556
- bredis_1
5657
- bredis_2
5758
- bconsul
@@ -74,12 +75,12 @@ services:
7475
# with a "docker compose up bsetup".
7576
- setup
7677

77-
bmysql:
78+
bmariadb:
7879
image: mariadb:10.11.13
7980
networks:
8081
bouldernet:
8182
aliases:
82-
- boulder-mysql
83+
- boulder-mariadb
8384
environment:
8485
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
8586
# Send slow queries to a table so we can check for them in the
@@ -101,7 +102,7 @@ services:
101102
volumes:
102103
- ./test/:/test/:cached
103104
depends_on:
104-
- bmysql
105+
- bmariadb
105106
networks:
106107
bouldernet:
107108
aliases:
@@ -144,6 +145,21 @@ services:
144145
networks:
145146
- bouldernet
146147

148+
bvitess:
149+
# The `letsencrypt/boulder-vtcomboserver:latest` tag is automatically built
150+
# in local dev environments. In CI a specific BOULDER_VTCOMBOSERVER_TAG is
151+
# passed, and it is pulled with `docker compose pull`.
152+
image: letsencrypt/boulder-vtcomboserver:${BOULDER_VTCOMBOSERVER_TAG:-latest}
153+
environment:
154+
# By specifying KEYSPACES vttestserver will create the corresponding
155+
# databases on startup.
156+
KEYSPACES: boulder_sa_test,boulder_sa_integration,incidents_sa_test,incidents_sa_integration
157+
NUM_SHARDS: 1,1,1,1
158+
networks:
159+
bouldernet:
160+
aliases:
161+
- boulder-vitess
162+
147163
networks:
148164
# This network represents the data-center internal network. It is used for
149165
# boulder services and their infrastructure, such as consul, mariadb, and

features/features.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ type Config struct {
8181
// during certificate issuance. This flag must be set to true in the
8282
// RA, VA, and WFE2 services for full functionality.
8383
DNSAccount01Enabled bool
84+
85+
// StoreAuthzsInOrders causes the SA to write to the `authzs`
86+
// column in NewOrder and read from it in GetOrder. It should be enabled
87+
// after the migration to add that column has been run.
88+
StoreAuthzsInOrders bool
8489
}
8590

8691
var fMu = new(sync.RWMutex)

0 commit comments

Comments
 (0)