chadtmiller.com/group-host
atmosphere group host
0
0
The repo names knotless only where it is used to develop the host
.knotless/workflows/e2e.yml+1−1
| @@ -5,7 +5,7 @@ | ||
# seeded for the run (harness/e2e/setup.mjs). The tests show the host's | ||
# methods do what they say; this, that the console and the host and a PDS | ||
# do it together. Each flow that fails leaves the page as it was then | ||
# among the check's outputs, as a picture. As knotless's e2e.yml. | ||
# among the check's outputs, as a picture. | ||
# | ||
# Node, the packages, Chromium, the libraries it needs and the build are | ||
# kept between runs, as main's runs leave them: nothing is fetched again | ||
.knotless/workflows/test.yml+4−5
| @@ -3,11 +3,10 @@ | ||
# is counted as it runs, so it is told to stop rather than killed. | ||
# | ||
# The tests that reach the network run against the reference PDS and PLC | ||
# (harness/pds.mjs), on the space alpha built at ATPROTO_COMMIT, as | ||
# knotless's test.yml builds it: the same commit, so the host and knotless | ||
# are held to the same alpha. Node, the harness's packages, the alpha's | ||
# build, cargo-llvm-cov and the build are kept between runs; each is made | ||
# again only when what it is made from changes. | ||
# (harness/pds.mjs), on the space alpha built at ATPROTO_COMMIT. Node, | ||
# the harness's packages, the alpha's build, cargo-llvm-cov and the build | ||
# are kept between runs; each is made again only when what it is made from | ||
# changes. | ||
image: rust:1.98 | ||
# A pre-flight, as check is: the merge queue takes a pull into a batch only | ||
# once this has passed at its head. | ||
crates/atproto/src/did.rs+3−3
| @@ -1,6 +1,6 @@ | ||
//! DID documents, read as knotless reads them: the services and keys an | ||
//! account's document names, each found by the end of its id, as a | ||
//! document may write `#atproto` or `did:…#atproto`. | ||
//! DID documents: the services and keys an account's document names, each | ||
//! found by the end of its id, as a document may write `#atproto` or | ||
//! `did:…#atproto`. | ||
| ||
use crate::keys::{KeyError, PublicKey}; | ||
use serde_json::{Value, json}; | ||
crates/atproto/src/lib.rs+5−5
| @@ -1,9 +1,9 @@ | ||
//! The atproto a group host needs, written for it rather than taken from a | ||
//! framework, as knotless writes its own: DRISL (DAG-CBOR) and CIDs, the | ||
//! keys a repo and a PLC operation are signed with, the Merkle search tree | ||
//! a repo's records hang from, CAR files, PLC operations, the | ||
//! service-auth tokens one server hands another, and the JWKs and JWTs | ||
//! of OAuth's DPoP proofs and client assertions. | ||
//! framework: DRISL (DAG-CBOR) and CIDs, the keys a repo and a PLC | ||
//! operation are signed with, the Merkle search tree a repo's records hang | ||
//! from, CAR files, PLC operations, the service-auth tokens one server | ||
//! hands another, and the JWKs and JWTs of OAuth's DPoP proofs and client | ||
//! assertions. | ||
//! | ||
//! Each part is checked against atproto's interop test vectors, under | ||
//! `tests/interop`. The parts still to come are in `docs/design/README.md`. | ||
crates/atproto/src/service_auth.rs+1−2
| @@ -1,7 +1,6 @@ | ||
//! Service auth: the short-lived JWT one server hands another to say who | ||
//! is asking (`iss`), of whom (`aud`), and for which method (`lxm`), | ||
//! signed with the asker's signing key. As the reference PDS writes them, | ||
//! and as knotless checks them. | ||
//! signed with the asker's signing key, as the reference PDS writes them. | ||
| ||
use crate::keys::{Keypair, PublicKey}; | ||
use base64::Engine; | ||
crates/atproto/src/space.rs+1−1
| @@ -5,7 +5,7 @@ | ||
//! (a DHKEM over P-256); and a repo is sent whole as a STAR archive. | ||
//! | ||
//! As `@atproto/space` has them, checked against vectors made by running it | ||
//! (`tests/reference/space-vectors.json`) and against knotless's client. | ||
//! (`tests/reference/space-vectors.json`). | ||
| ||
use crate::cid::Cid; | ||
use crate::drisl::{self, Value}; | ||
crates/atproto/tests/reference/README.md+1−2
| @@ -6,8 +6,7 @@ against @did-plc/lib 0.0.4 and the space alpha's @atproto/crypto and | ||
@atproto/xrpc-server (0.0.0-spaces-alpha-20261022141228): PLC operations | ||
and the DIDs they make, the DID document the directory serves, and a | ||
service-auth JWT. `knotless.json` is a service-auth JWT knotless's own | ||
client signs (`knotless::crypto::P256Key::sign_jwt`), checked here as | ||
knotless checks one. | ||
client signs (`knotless::crypto::P256Key::sign_jwt`). | ||
| ||
`space-vectors.json` is pds.js's (`test/fixtures/space-vectors.json`), | ||
made by running `@atproto/space` (its `generatedFrom` names the build): the | ||
crates/atproto/tests/service_auth.rs+1−2
| @@ -1,7 +1,6 @@ | ||
//! Service-auth JWTs: one the reference PDS signs | ||
//! (tests/reference/identity.json), one knotless signs | ||
//! (tests/reference/knotless.json), and our own, checked as knotless | ||
//! checks them. | ||
//! (tests/reference/knotless.json), and our own. | ||
| ||
use atproto::keys::{Curve, Keypair, PublicKey}; | ||
use atproto::service_auth::{Claims, check, parts, sign, verify}; | ||
crates/group-host/src/actors.rs+2−3
| @@ -1,6 +1,5 @@ | ||
//! People, as the console shows them: who is asking (`getViewer`, as | ||
//! knotless's), a person (`getActor`), and the groups someone is in | ||
//! (`getActorGroups`). | ||
//! People, as the console shows them: who is asking (`getViewer`), a | ||
//! person (`getActor`), and the groups someone is in (`getActorGroups`). | ||
| ||
use crate::Host; | ||
use crate::api::{Params, page, param}; | ||
crates/group-host/src/console_login.rs+5−6
| @@ -1,11 +1,10 @@ | ||
//! Signing in to the console, as oneself. | ||
//! | ||
//! The host is a confidential OAuth client of each person's own PDS, as | ||
//! knotless-serve is of its accounts', under a client id of its own, its | ||
//! key derived from the host's secret. It asks for `atproto` alone: the | ||
//! console's methods act as the group, never as the person, so the host | ||
//! needs only to know who they are. Once their PDS says so, it revokes the | ||
//! token it was given, and keeps nothing of theirs. | ||
//! The host is a confidential OAuth client of each person's own PDS, under | ||
//! a client id of its own, its key derived from the host's secret. It asks | ||
//! for `atproto` alone: the console's methods act as the group, never as | ||
//! the person, so the host needs only to know who they are. Once their PDS | ||
//! says so, it revokes the token it was given, and keeps nothing of theirs. | ||
//! | ||
//! The browser holds only a cookie the host signed, naming the person, | ||
//! HttpOnly and SameSite=Lax. A sign-in is answered only in the browser | ||