SShortSingh.
Back to feed

How to Use CNAMEs and Signed URLs for Secure, Tenant-Safe Asset Delivery

0
·1 views

A technical guide explains how platforms can let customers serve assets under their own subdomains by pointing a CNAME at the platform's asset host, while keeping access control entirely within signed URLs. The author emphasizes that a custom hostname is purely cosmetic routing and does not isolate one tenant's objects from another's — bucket policies and signing logic must still enforce per-tenant checks. During customer onboarding, the DNS record write should be implemented as an idempotent upsert to safely handle network timeouts and retry scenarios without creating duplicate records. A minimal Python example demonstrates the pattern, using exponential backoff for rate limits and a unique idempotency key on the DNS upsert call. The guide also warns that presigned download URLs must be returned as-is, without appending platform authorization headers, and that tenant-object verification must occur before any URL is issued.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Developer builds server-side memory preseeding to fix AI agent context amnesia

A developer running nine parallel Claude Code sessions found that AI agents repeatedly failed not due to lack of intelligence but because they forgot previously documented project context. The initial fix — instructing agents via system prompts to call a memory search tool — worked inconsistently, with some sessions skipping the step entirely. To solve this, the developer moved memory retrieval into the server layer, so relevant project notes are automatically injected into each task before the model ever receives it. The system uses local embeddings, an incremental SQLite index, and markdown files with YAML frontmatter to store and retrieve context deterministically. An end-to-end test verifies the setup by storing facts nowhere in the codebase and confirming that only memory-backed sessions answer correctly.

0
ProgrammingDEV Community ·

Why API Docs Need to Be Rewritten for AI Agents, Not Just Developers

A developer and API documentation writer found that over 50% of traffic to their documentation site now comes from AI agents, prompting a rethink of how OpenAPI specs should be written. Unlike human developers, AI agents cannot build a mental model of an API through tutorials or quick-start guides — they rely solely on a tool definition and a context window. This means vague operation summaries like 'Create encounter' can cause agents to misidentify the correct endpoint when multiple similar operations exist. The author argues that effective AI-facing documentation must convey intent, boundaries, and relationships between endpoints — not just technical implementation details. This shift, the author notes, is less about prompt engineering and more about writing clearer, more purposeful API documentation that serves both human and machine consumers.

0
ProgrammingDEV Community ·

How Engineers Are Building Reliable AI Agents for Hospital Appointment Intake

A technical blueprint published on DEV Community outlines the architecture of an autonomous AI concierge system designed for enterprise-level hospital networks. The system addresses common failures in standard chatbot pipelines, such as forgotten patient details, hallucinated scheduling data, and duplicate records in electronic health systems. The proposed design separates conversational language processing from deterministic state machines to ensure reliable, step-by-step patient intake. It incorporates sub-100ms external scheduling tool calls, idempotent database writes to prevent duplicate entries, and retrieval-augmented generation for grounded clinical FAQ responses. The architecture aims to make AI-driven healthcare intake safer and more predictable in production environments.

0
ProgrammingDEV Community ·

How to Set DeepSeek as the Default Model in ChatGPT Codex

Developers can configure OpenAI's Codex coding agent to use DeepSeek as its default model instead of the built-in option. The process involves generating a DeepSeek API key from the developer dashboard and setting it as an environment variable on the local machine. Users must then update the Codex configuration file at ~/.codex/config.toml to point to the DeepSeek API endpoint and a custom model catalog. A separate models.json file is created to define the model's capabilities, including context window size, reasoning levels, and tool support. Once both files are saved and Codex is restarted, DeepSeek-Flash appears as the active default model, switching billing from a flat monthly subscription to pay-per-use API charges.

How to Use CNAMEs and Signed URLs for Secure, Tenant-Safe Asset Delivery · ShortSingh