gateway: name magpie's CA route for the one-port page and read-only keys
4623f5419registered GET /magpie-ca.crt without classifying it, so TestClientPathCoversHandler and TestReadOnlyKeyEveryRoute have been red on ubuntu and macOS CI since (runs 42842906906, 42857020211). The CA is answered without a key (caFileOpen), so a read-only key may read it too, as it may the key and join pages; and `magpie web`'s port hands it to the gateway like those pages, so the other computer fetches it from the address it gives its agents. Run (wsl-run, magpie-desktop, -tags nogui, at this tree): go test -count=1 -run 'TestClientPath|TestReadOnlyKey|TestBrowserKey| TestHTTPS|TestKeyPage|TestJoin|TestOnePort' ./internal/gateway: ok. Red before: the two guards on CI atdb0f2f20dand5b28e8599. Not run: the whole gateway package (running after the push).
This commit is contained in:
@@ -33,6 +33,9 @@ var clientPrefixes = []string{
|
||||
KeyPagePath,
|
||||
// and the join page (JoinPagePath), at the same address
|
||||
JoinPagePath,
|
||||
// and magpie's CA (CAPath), which the other computer fetches from the
|
||||
// address it gives its agents
|
||||
CAPath,
|
||||
}
|
||||
|
||||
// ClientPath: p is one of the gateway's client routes, which `magpie web`
|
||||
|
||||
@@ -47,6 +47,8 @@ var readOnlyRoutes = map[string]bool{
|
||||
"GET " + JoinPagePath: true,
|
||||
"GET " + joinData: true,
|
||||
"POST " + joinData: true,
|
||||
// magpie's CA, answered without a key (https.go caFileOpen)
|
||||
"GET " + CAPath: true,
|
||||
// a proof carries no key, and answers none (remote_prove.go)
|
||||
"POST " + provider.RemoteProvePath: true,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user