Skip to main content
GET

Authentication

Conditional (Line 116): [AllowAnonymous] Public sharing enabled: Authentication optional for public/unlisted threads Private threads: Authentication required JWT Claims Extraction (Lines 138-142):

Path Parameters

string
required
Thread UUIDFormat: Valid GUIDValidation: Route constraint :guid (Line 115)

Response

string
UUID identifier
string
Owner UUID
string
Thread title
string
"private", "public", or "unlisted"
string
ISO8601 UTC timestamp
string
ISO8601 UTC timestamp

Authorization Logic

Feature Flag Check (Line 134):
Access Decision Tree (Lines 150-179):

PUBLIC_SHARING Feature Flag States

Side Effects

Database Reads (Lines 121, 134):
  • SELECT from threads table WHERE thread_id = {id}
  • SELECT from system_settings table WHERE key = 'public_sharing'
No Database Writes: Read-only endpoint

Permissions

Who Can Read:
  1. Public threads (when public_sharing = true): Anyone
  2. Unlisted threads (when public_sharing = true): Anyone with the link
  3. Private threads: Owner only
  4. Any visibility (when public_sharing = false): Owner only
Visibility Semantics:
  • private: Requires auth + ownership
  • public: Visible to all when feature enabled
  • unlisted: Visible to all when feature enabled, but not listed in search/discovery

Edge Cases

  1. Thread doesn’t exist: 404 (Lines 123-131)
  2. Invalid GUID format: 400 (route constraint, not in controller code)
  3. Deleted thread: 404 (service returns null)
  4. Feature flag missing: Treated as false (default behavior assumed)
  5. User ID claim missing for public thread: Allowed (auth optional, Lines 137-142)
  6. User ID claim present but thread private: Ownership check applies (Line 169)

Error Conditions

Exception Handling (Lines 181-189):

Behavioral Guarantees

Visibility Check Order:
  1. Thread existence (404 if not found)
  2. Feature flag + visibility (public access allowed here)
  3. Authentication (401 if required but missing)
  4. Ownership (403 if private + wrong owner)
Authentication Optional: Only for public/unlisted threads with feature flag enabled Ownership Enforcement: Always checked for private threads, regardless of feature flag Feature Flag Dependency: public_sharing setting controls anonymous access

Security Implications

Public Exposure Risk: When public_sharing = true:
  • Public threads visible without authentication
  • Unlisted threads accessible via direct link (URL guessing possible)
  • No rate limiting documented
Privacy Guarantee: Private threads NEVER accessible by non-owners Auth Bypass: Public/unlisted threads accessible anonymously ONLY when feature enabled