Repository navigation
feat(web): verify accounts on Bluesky from the root account - #202
Merged
Merged
Conversation
Admins issue and revoke app.bsky.graph.verification records from the root account at /admin/verifications, with live status per account, re-issue after a rename, and shortcuts from approved self or member claims and from a project's managers. Verifications are audited as verification.grant and verification.revoke, and a test keeps the audit entry lexicon's knownValues in step with the code's lists.
Coverage Report for apps/web
File Coverage
SizeCompared with main. KiB are 1,024 bytes.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Rust coverageFrom run 342. Both are held to the thresholds in .cargo/config.toml.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
Admins can now issue Bluesky verifications (
app.bsky.graph.verification) from the root account, localnetwork.computer, under Staff → Verifications. The server already signs in as the root with its account password, so this needs no new credentials or OAuth scopes. Records are written to the root's public repo with the existing root session.Added:
VerificationServicelists the root's verifications, reads each account's current handle (checked both ways) and Bluesky display name, and grants or revokes. Granting copies the handle and display name as they are now and refuses an account with no working handle or no display name, since Bluesky never counts those. Re-verifying after a rename updates the existing record in place, because apps count one verification per issuer and account. Only admins can grant or revoke; a moderator's attempt is refused and audited as denied./admin/verifications(admin-only, in the staff nav): a table of issued verifications with a live status per row that streams in (verified, or out of date with the account's current handle and name), Re-issue and Remove buttons, and a form to verify by handle or DID. It shows an error state with a retry link if the root's records can't be read.listRecordson the root client, which throws when the PDS is down instead of returning nothing, so a failed read can't lead to a duplicate verification.verification.grantandverification.revokeaudit actions, with matchingknownValuesincomputer.localnetwork.audit.entry.VerificationTablestories: verified and out of date (wide and phone), checking, nobody verified, and couldn't load.Changed:
knownValuesagainst them, and the audit page's action filter is built from the same list instead of a hardcoded copy.app.bsky.graph.verificationis validated with the schema@atproto/apiships, alongsidestrongRef. It isn't published or sent to HappyView.ROOT_PASSWORDconfig error asked for an app password; it now asks for the account password, which the root needs to mint space credentials.Bluesky's own app only shows verifications from accounts it has made trusted verifiers, so badges won't appear there until localnetwork.computer is approved. Other apps can choose to trust it now.
After merging,
pnpm lexicons:publishpublishes the updated audit entry lexicon.How it was tested
verifications.test.ts): granting writes the record to the root's repo, re-issuing after a rename updates it in place, accounts with no working handle or no display name are refused, revoking deletes the record, moderators are denied and audited, unparseable records are skipped, and statuses come back null when the root's records can't be read. They also cover the matching rule against Bluesky's (exact strings, non-empty display name).knownValuesagainst the code's lists.pnpm format:check,pnpm lint,pnpm check,pnpm knip, andpnpm test:coverage.Screenshots
Checklist
docs/and--helpstill say what the code does