Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split out moderation backend #1970

Merged
merged 96 commits into from
Jan 5, 2024
Merged

Split out moderation backend #1970

merged 96 commits into from
Jan 5, 2024

Conversation

dholms
Copy link
Collaborator

@dholms dholms commented Dec 15, 2023

This pulls the moderation backend out of the appview & into it's own service.

Mod service:

  • Basically a copy of the moderation service from within the appview
  • a few basic implementation changes:
    • refactored methods to use Map instead of Record (which we did recently on the appview & is quite nice)
    • Added some new classes for wrangling the all of the "subjectType" typeswitches we were doing
    • run event reversal in a separate daemon
  • larger architectural changes:
    • Goes out to the appview to hydrate in records (including profiles) and handles
    • We treat takedowns as "push events". We transactionally store them in push event tables & then the daemon routinely polls & attempts to push those out to downstream services (appview/PDS). It retries up to 10 times
    • For push events, the mod service uses a service jwt signed by it's own key (which is announced in it's did doc)

Appview

  • removed all existing admin routes
  • added simple routes for getting account info & getting/updating subject status (such as takedowns)
  • added a new service jwt auth method for an appointed admin service. This functions like user auth to the appview but it validates that the issuer is a trusted DID
  • auto-mod pushes all events out to ozone backend instead of tracking locally
    • cdn invalidation is no longer done by auto-mod, but is handled by the appview app instances when the takedown request comes through from ozone

PDS

  • We previously got in some of the admin service auth stuff into the PDS, but there was a strange semantic where the audience was set to the DID of the account that the action was about. This is updated so that it uses the PDS's DID
  • Proxies createReport to mod service now (instead of appview) & gives the PDS a config var for a trusted mod service & URL

Random other things that got wrapped up into this:

  • auth verifier in appview (refactored the api to look like the PDS's & added in an "admin service" verifier
    • refactored some of the auth checks for viewing takedowns in application routes (like getProfile) to use a new parseCreds util
  • moved appview test seeds to dev-env (for re-use in ozone)
    • it would be great to reuse the seeds in PDS as well, but there are some subtle differences between them that I didn't want to sort through righ tnow

Comment on lines +178 to +179
assert(env.modServiceUrl)
assert(env.modServiceDid)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should these be hard-required on the pds?

@dholms dholms merged commit de2dbc2 into main Jan 5, 2024
10 checks passed
@dholms dholms deleted the ozone-service branch January 5, 2024 23:06
sanko added a commit to sanko/At.pm that referenced this pull request Jan 8, 2024
sanko added a commit to sanko/At.pm that referenced this pull request Jan 9, 2024
Changelog diff is:

diff --git a/Changes b/Changes
index 2a66677..f675529 100644
--- a/Changes
+++ b/Changes
@@ -2,6 +2,8 @@ Revision history for Perl extension At.pm
 
 {{$NEXT}}
 
+0.05 2024-01-09T04:01:09Z
+
     - Update according to lexicon changes in bluesky-social/atproto#1970
        - new method: admin_getAccountsInfo
        - new field in class At::Lexicon::com::atproto::admin::accountView
sanko added a commit to sanko/At.pm that referenced this pull request Jan 19, 2024
Changelog diff is:

diff --git a/Changes b/Changes
index f675529..0ff2715 100644
--- a/Changes
+++ b/Changes
@@ -2,6 +2,11 @@ Revision history for Perl extension At.pm
 
 {{$NEXT}}
 
+0.06 2024-01-19T02:20:52Z
+
+    - Update according to lexicon changes in bluesky-social/atproto@e43396a
+       - phone verification support on account creation
+
 0.05 2024-01-09T04:01:09Z
 
     - Update according to lexicon changes in bluesky-social/atproto#1970
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants