upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs/reference
diff options
context:
space:
mode:
Diffstat (limited to 'docs/reference')
-rw-r--r--docs/reference/configuration.md92
1 files changed, 92 insertions, 0 deletions
diff --git a/docs/reference/configuration.md b/docs/reference/configuration.md
index b90686e..66f39f1 100644
--- a/docs/reference/configuration.md
+++ b/docs/reference/configuration.md
@@ -833,6 +833,98 @@ Blacklist does **not** affect NIP-11 metadata:
833 833
834--- 834---
835 835
836### Event Blacklist
837
838#### `NGIT_EVENT_BLACKLIST`
839
840**Description:** Blacklist events from specific authors (npubs)
841**Type:** Comma-separated list of npubs
842**Default:** Empty (no events are blacklisted by author)
843**Required:** No
844
845**Format:**
846- `npub1...` - Block all events from this author
847
848**Precedence:** Event blacklist takes precedence over **ALL** other validation:
849- Blacklisted events are rejected **before** any other policy checks
850- Applies to all event types (announcements, state events, PRs, etc.)
851- Events never reach purgatory (rejected immediately)
852- Overrides repository blacklist, whitelists, and all other policies
853
854**Examples:**
855
856```bash
857# Block all events from specific author
858NGIT_EVENT_BLACKLIST=npub1spam...
859
860# Block events from multiple authors
861NGIT_EVENT_BLACKLIST=npub1spam...,npub1abuser...,npub1troll...
862```
863
864**Rejection Reason:**
865
866The event blacklist provides a specific rejection reason:
867- **Format:** `"Event author <npub> is blacklisted"`
868
869This reason helps operators understand why an event was rejected without needing to flag it in metadata.
870
871**Behavior:**
872
873Event blacklist is checked **first** before all other validation:
8741. Check event blacklist → Reject if author is blacklisted
8752. Check repository blacklist (for announcements) → Reject if matched
8763. Check event-type specific policies → Accept/Reject based on policy
8774. Process event normally
878
879**Use Cases:**
880
881```bash
882# Block spam/abusive users
883NGIT_EVENT_BLACKLIST=npub1spammer...,npub1abuser...
884
885# Block malicious actors
886NGIT_EVENT_BLACKLIST=npub1malware...,npub1phisher...
887
888# Temporary block for investigation
889NGIT_EVENT_BLACKLIST=npub1suspicious...
890```
891
892**Comparison with Repository Blacklist:**
893
894| Configuration | Scope | Checked When | Applies To |
895|---------------|-------|--------------|------------|
896| Event Blacklist | Author-based | **First** (before all policies) | **All events** from author |
897| Repository Blacklist | Repo-based | Second (announcements only) | Specific repositories |
898
899**Event Blacklist vs Repository Blacklist:**
900
901```bash
902# Scenario: npub1alice is event-blacklisted
903NGIT_EVENT_BLACKLIST=npub1alice...
904
905# Result:
906# - ALL events from npub1alice are rejected (announcements, PRs, etc.)
907# - Events never reach relay or purgatory
908# - Rejection: "Event author npub1alice... is blacklisted"
909
910# Scenario: npub1alice/repo is repository-blacklisted
911NGIT_REPOSITORY_BLACKLIST=npub1alice.../malware
912
913# Result:
914# - Only announcements for npub1alice.../malware are rejected
915# - Other events from npub1alice are still processed normally
916# - PRs/state events for different repos from npub1alice are accepted
917```
918
919**NIP-11 Impact:**
920
921Event blacklist does **not** affect NIP-11 metadata:
922- No `curation` field changes (blacklist is operational, not policy)
923- Blacklist is transparent to clients (rejected with specific reason)
924- Operators can use blacklist without advertising moderation
925
926---
927
836### Logging Configuration 928### Logging Configuration
837 929
838#### `RUST_LOG` 930#### `RUST_LOG`