~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0

Release 0.7.0

Merged chadtmiller.com asked to merge into main from chadtmiller.com/group-host:release/next
.changeset/atproto-client.mddeleted+0−9
@@ -1,9 +0,0 @@
---
default: minor
---
# Identities, guarded requests and service tokens by atproto-client
The host resolves identities, asks the hosts others' data names, and checks a space's delegation tokens and a group's token for moving here with the `atproto-client` crate. Its requests to such hosts now share one pool of connections rather than a client each. Whose a handle is, it keeps five minutes as it keeps DID documents, but asks again to check a group's own domain or an account moving here. `HANDLE_RESOLVERS` names a handle's own `/.well-known/atproto-did` as `well-known`, asked over the scheme `DID_WEB_SCHEME` says, where it was `well-known:<scheme>`: the host refuses to start with the old form. With `DID_WEB_SCHEME=http`, as on a test network, a handle may be any name, as `127.0.0.1:2584`. `atgrp` calls hosts and its own PDS through the same crate.
Each call the host makes to resolve an identity or check a token is logged as a `call` line, attempt by attempt, in the trace of the request it is made for, and sends a `traceparent` naming that trace; a refusal it is answered with is logged as `refused`.
.changeset/console-one-oauth-client.mddeleted+0−10
@@ -1,10 +0,0 @@
---
default: patch
---
# The console signs in with one OAuth client, and checks service auth by atproto-client
The console signs people in, and signs in to accounts being moved here, with one OAuth client on atproto-client 0.6. A sign-in coming back to the other one's callback (the console's at a move's, or a move's at the console's) is refused as one this browser did not start, approved or not. A move finished or cancelled while its account's session was being refreshed stays ended: the refreshed tokens are given back, and the move answers `NotFound`.
Service auth sent to the host's own methods, to `notifyRepoUpdate` and `notifyCredentialsRevoked`, and an account's token for moving here, are checked with atproto-client's `verify_any`, for the audiences each took before. A token's audience and method are now checked before any key is read: `notifyRepoUpdate` checks its `space` is well formed first, and a token for an account not hosted here is refused by `notifyCredentialsRevoked` before its signature.
An account's token for moving here whose DID can't be resolved is refused `InvalidToken`, as one whose DID names no key is, where it was `InvalidRequest`.
.changeset/console-sign-in-by-atproto-client.mddeleted+0−11
@@ -1,11 +0,0 @@
---
default: minor
---
# The console signs people in with atproto-client's OAuth client
Signing in to the console, signing up, and signing in to an account to move here go through `atproto-client`'s OAuth client, which holds an authorization server to atproto's profile: it must require PAR, take client metadata documents, say who answers (`iss`, which a callback must carry), and list the methods the profile asks. Before the tokens are taken, at the callback and before each refresh of a move's session, the account's authorization server is read again from its DID and must be the one that issued them. A sign-in refused after its code was redeemed, as another account's, has its grant revoked. What a sign-in gives back is its refresh token, which ends the whole grant, where it was the access token.
The console's client metadata is a confidential web client's as atproto's profile has it, with a second redirect, `/console/move/callback`, for an account being moved here; it answers 500, saying why, where `CONSOLE_URL` is not https at a public name, as no authorization server takes such a client. A sign-in waiting for the browser is kept in the database whole, and a move keeps its account's session there by the account; a move under way when the host is upgraded is let go, to be signed in to again. An account's server is read at most 16 MiB an answer, and 256 MiB a repo or file, while it moves.
Each call the host makes to a host others' data names (sending a call on, telling a PDS or a syncer, reading a client's metadata, a group's own domain) is now logged as a `call` line and sends a `traceparent`, as identity calls were.
.changeset/lists-end-without-a-cursor.mddeleted+0−7
@@ -1,7 +0,0 @@
---
default: patch
---
# A list's last page names no cursor
The last page of a list names no `cursor`, where it named `"cursor": null`, which a lexicon's `cursor`, a string, does not allow, so a client checking answers against the lexicons (as `@atproto/lex` does) refused it. That was `com.atproto.repo.listRecords`, `com.atproto.sync.listRepos` and `listBlobs`, `com.atproto.space.listRecords`, `listRepoOps` and `listBlobs`, `org.atgrp.listJoinRequests`, `org.atgrp.internal.listInvites` and `org.atgrp.internal.listSpaceRecords`.
.changeset/migration-method-errors.mddeleted+0−7
@@ -1,7 +0,0 @@
---
default: patch
---
# Moving a group and revoking a token name their errors
The lexicons of `org.atgrp.internal.migratePrepare`, `migrateReceive`, `migrateComplete`, `migrateActivate` and `revokeGroupToken` now list the errors each answers beyond those any method may, with when, so a client can tell one refusal from another by its name: `NotController`, `NotAllowed`, `AlreadyHere`, `BadServiceJwt`, `HandleNotAvailable`, `SourceUnreadable`, `InvalidOperation`, `NotYet` and `NotFound`.
.changeset/read-spaces-to-come.mddeleted+0−7
@@ -1,7 +0,0 @@
---
default: minor
---
# An app keeps reading a space the group makes after approving it
Approval now keeps a scope that only reads spaces of a type (`space:T?action=read`), or of a type and key, where the group has no such space yet. Before, it was withheld, and a grant keeps its scope through every refresh, so an app approved before the group made the space could never read it without being approved again. Each credential still asks whether the member reads the space at that moment, so the scope reads nothing the member doesn't. A scope that writes, or reads a space the group already has that the roles don't read, is withheld as before. Grants already made keep the scope they were given: an app reads a space made since only once a member approves it again.
.changeset/scopes-by-atproto.mddeleted+0−13
@@ -1,13 +0,0 @@
---
default: patch
---
# Scopes read as atproto's reference reads them
The host reads OAuth scopes, roles' permissions and space policies' permissions with atproto 0.4.4's `scope` module, as atproto's permission spec and `@atproto/oauth-scopes` read them. A scope its grammar doesn't take is no scope: one naming an action there is none of (`repo:C?action=upsert`, where the unknown action was left out before), a parameter its resource doesn't take, a value it takes once named twice, a collection that isn't an NSID, or an `rpc:` audience with no `#service`. Approval withholds such a scope, and `createSpace` and `updateSpace` refuse a policy permission that is one (`InvalidRequest`).
A blob scope names one type or pattern: `blob:image/*,video/*` is no scope, where it was read as both. An upload's type is compared with the scope as written, not ignoring case, so `IMAGE/png` no longer passes `blob:image/*`. A token now keeps each blob scope it is given as one scope per type, lowercase (`blob?accept=Image/PNG` becomes `blob:image/png`).
An `rpc:` scope for one of the host's own methods names it at `<host DID>#atgrp` or `*`; the host's DID alone, which it took before, is no audience. `space?spaceType=T` is now kept at approval as `space:T` is.
Tokens already issued keep what they were granted: upgrading rewrites each grant's scope once so that it reads the same. A blob list becomes a scope per type, lowercase; unknown actions and parameters, and repeated values after the first, are dropped; and the host's DID alone as an audience of its own methods becomes `<host DID>#atgrp`. A scope that granted nothing before still does. Roles and space policies already written are records and are not rewritten: a permission in one that the grammar doesn't take now grants nothing. Those the console and `atgrp` write all read the same.
.changeset/service-auth-verify-with.mddeleted+0−7
@@ -1,7 +0,0 @@
---
default: patch
---
# Service auth is checked with atproto-client 0.7.1's `verify_with`
The host's service auth and an account's token for moving here are checked with atproto-client 0.7.1's `verify_with`, which judges a token's audience itself, and tells an issuer that can't be resolved from one naming no key. An account's token for moving here whose DID can't be resolved is refused `InvalidRequest` again, as before 0.6; one whose DID names no key, or whose signature doesn't hold, is still `InvalidToken`.
Cargo.lock+3−3
@@ -60,7 +60,7 @@ dependencies = [
[[package]]
name = "atgrp"
version = "0.6.1"
version = "0.7.0"
dependencies = [
"anyhow",
"atproto",
@@ -774,7 +774,7 @@ dependencies = [
[[package]]
name = "group-host"
version = "0.6.1"
version = "0.7.0"
dependencies = [
"anyhow",
"atproto",
@@ -799,7 +799,7 @@ dependencies = [
[[package]]
name = "group-host-mcp"
version = "0.6.1"
version = "0.7.0"
dependencies = [
"atproto",
"serde_json",
Cargo.toml+1−1
@@ -3,7 +3,7 @@ members = ["crates/group-host", "crates/group-host-mcp", "crates/atgrp"]
resolver = "3"
[workspace.package]
version = "0.6.1"
version = "0.7.0"
edition = "2024"
license = "MIT OR Apache-2.0"
rust-version = "1.89"
CHANGELOG.md+53−0