feat: expose signed HTTP client for consumer use #2

Closed
opened 2026-05-29 09:25:53 +00:00 by GKaszewski · 0 comments
Owner

Problem

Consumers that need to fetch remote actor profiles or collections (e.g. followers list, outbox pages) currently use raw reqwest::Client without HTTP Signatures. This fails on instances with authorized-fetch (Secure Mode) enabled — a growing share of the fediverse.

k-ap already has the signing infrastructure internally (for inbox delivery), but doesn't expose a signed fetch method for consumer use.

Suggested API

impl ActivityPubService {
    /// Fetch a remote AP resource with HTTP Signatures.
    pub async fn signed_fetch(
        &self,
        signing_actor_id: uuid::Uuid,
        url: &url::Url,
    ) -> Result<serde_json::Value>;
}

This would let consumers call ap_service.signed_fetch(local_user_id, &collection_url) instead of raw reqwest, automatically signing the request with the local actor's keypair.

## Problem Consumers that need to fetch remote actor profiles or collections (e.g. followers list, outbox pages) currently use raw `reqwest::Client` without HTTP Signatures. This fails on instances with authorized-fetch (Secure Mode) enabled — a growing share of the fediverse. k-ap already has the signing infrastructure internally (for inbox delivery), but doesn't expose a signed fetch method for consumer use. ## Suggested API ```rust impl ActivityPubService { /// Fetch a remote AP resource with HTTP Signatures. pub async fn signed_fetch( &self, signing_actor_id: uuid::Uuid, url: &url::Url, ) -> Result<serde_json::Value>; } ``` This would let consumers call `ap_service.signed_fetch(local_user_id, &collection_url)` instead of raw reqwest, automatically signing the request with the local actor's keypair.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GKaszewski/k-ap#2