Cert EspressoLearn. Practise. Find your flow.

A LITTLE FOCUS.
A BIG NEXT STEP.

Your pace. Your space.
ISC2 · ISC2 AI Security · BETA

Secure AI Architecture and Design

ISC2 AI Security · Lesson 18 of 34 · 2:28:34

YouTube loads only after you press play. This chapter opens at its timestamp in the full course. Watch on YouTube ↗

Learning with these videos? Subscribe for new courses and exam-style questions.

In this lesson

Lesson 18 of the free ISC2 AI security series (pilot exam, domain 4, secure AI architecture, engineering, and identity and access management (IAM)). In this lesson: security strategies for AI, threat modeling the architecture, architectural trade-offs, build versus buy, tools and MCP, and agents and A2A. With three quick checks and a recap, and Ravenmoor Payments, a fictional payment provider, as the running example.

Study notes

The text of this lesson, to read at your own pace. Information as of November 2026.

Before anyone writes code

Ravenmoor is designing a new merchant assistant: a language model, a retrieval layer over merchant agreements, and tools that can look up payments and open disputes. Before anyone writes code, the architects must decide where the trust boundaries are, and what each part may do. This lesson opens domain four, on architecture, engineering, and identity, starting with secure design.

Security strategies for AI

Classic security strategies still apply to AI, with new targets. Zero trust means no component is trusted by default: the model, the retrieval layer, each tool, and each agent must authenticate, and get only the access it needs, every time. Defense in depth stacks independent layers, such as input filters, a hardened system prompt, output checks, limited tools, and monitoring, so one failure does not open everything. Privacy by design limits the personal data that reaches the model, the index, and the logs. Secure defaults ship features off and permissions minimal, so that every extra capability is a deliberate choice.

Threat modeling the architecture

Threat model the architecture component by component, following the data. In a RAG system, the documents and the ingestion pipeline can carry poisoned content, or hidden instructions. The vector database holds embeddings that can leak the source text, so it needs access control, encryption, and filters based on each user's permissions. The inference layer faces prompt injection, extraction, and resource abuse, while tools and agents can turn a manipulated output into a real action. Mark each trust boundary, where data crosses from one component to another, because that is where controls belong.

Architectural trade-offs

Every architecture balances trade-offs. Latency matters for payments: a fraud check must answer in milliseconds, which may rule out a large model, or extra guardrail calls. Explainability may favor a simpler, interpretable model for credit decisions, even if a complex one is slightly more accurate. Cost grows with model size, tokens, and guardrail layers, so security controls must be budgeted from the start. Document each trade-off, and who accepted it, so that the residual risk stays visible.

Build versus buy

Build versus buy is also a security decision. A hosted model, bought as a service, is fast to adopt, and the provider secures the model and the platform, but your data leaves your boundary, and you depend on the provider's controls and changes. A self-managed model, open or built in-house, keeps data inside and gives full control, but you must secure the weights, the serving stack, and the patches yourself. Many organizations mix both by risk tier: hosted models for low-risk tasks, and self-managed ones for the most sensitive data. Apply the due diligence and shared responsibility of lesson ten to each choice.

Tools and MCP

Models reach tools and data through APIs, plugins, and protocols such as the Model Context Protocol, or MCP. With MCP, an AI application connects to servers that expose tools and data, so each server becomes a new piece of the supply chain. Approve and pin the servers you allow, run local servers in a sandbox, and show users which tools an agent may call. A server must never pass the user's token through to other services: it should use tokens issued for itself, scoped to what it needs. And validate everything a tool returns, since tool output can carry injected instructions.

Agents and A2A

Agents also talk to other agents. The Agent to Agent protocol, or A2A, lets an agent discover another through an Agent Card, a metadata file that lists its identity, skills, endpoint, and authentication requirements. Agents stay opaque to each other, so treat every remote agent as untrusted: authenticate it, authorize each task, and validate what it sends back. And log which agent asked which other agent to do what.

Recap

Let's recap. Zero trust, defense in depth, privacy by design, and secure defaults guide AI architecture. Threat model each component, from documents and the vector database to inference and tools, and place controls at trust boundaries. Balance latency, explainability, and cost, and document who accepted each trade-off. Choose between hosted and self-managed models by risk, and apply due diligence either way. And integrate tools through MCP, and agents through A2A, with approved servers, scoped tokens, and validated outputs.

Quick checks for this lesson

The 3 questions of this lesson, as plain text. The button above runs them with shuffled choices and the reason behind every choice.

  1. In Ravenmoor’s design, the merchant assistant can retrieve any merchant’s agreement from the vector database, whichever user is asking. What control is missing?

    • Retrieval filtered by the user’s permissions
    • A larger embedding model
    • A longer system prompt
    • Faster vector search
    Show the answer

    Retrieval filtered by the user’s permissions

    Retrieval must respect the permissions of the user, so each merchant only gets its own documents. “A larger embedding model” is wrong, since a larger embedding model changes search quality, not access. “A longer system prompt” is wrong, because instructions in a prompt are not an access control, and injection can override them. And “Faster vector search” is wrong, since speed has nothing to do with who may see which document.

  2. Ravenmoor’s credit model must give each declined applicant clear reasons, and a vendor offers a more accurate deep model that cannot explain its decisions. What should drive the choice?

    • Accuracy alone, since it is higher
    • The lowest cost per decision
    • The fastest response time
    • The need to explain each decision
    Show the answer

    The need to explain each decision

    Credit decisions must be explained, so explainability drives the choice, and the trade-off is documented. “Accuracy alone, since it is higher” is wrong, since higher accuracy does not remove the duty to explain declined applications. “The lowest cost per decision” is wrong, because cost matters, but it cannot override a requirement. And “The fastest response time” is wrong, since speed is not the constraint in this case.

  3. An MCP server that Ravenmoor uses receives the user’s access token, and forwards it unchanged to the payment system. What is wrong?

    • Nothing, since the user is authenticated
    • It should use its own, scoped token
    • The token should be longer
    • The server should log the token
    Show the answer

    It should use its own, scoped token

    Passing the user's token through breaks the trust boundary, so the server should use a token issued for itself, scoped to what it needs. “Nothing, since the user is authenticated” is wrong, since the payment system then cannot tell which component is acting, or limit it. “The token should be longer” is wrong, because token length is not the problem. And “The server should log the token” is wrong, since logging tokens would expose secrets.