Learn — Security Scenarios

Lesson 1

Broken Object-Level Authorization (BOLA)

When authorization is disabled, the agent calls MCP tools with any patient_id the user requests — not just the one they are authenticated for. This is the most common API vulnerability in healthcare systems.

  1. Go to Settings and disable Authorization.

    Turn off the Authorization toggle. The MCP server will stop checking whether your patient_id claim matches the tool argument.

  2. Ask the agent about a different patient.

    In the chat, type: Show me the prescriptions for patient 2. Watch the Debug panel — the tool call uses patient_id=2 and the MCP server returns data without rejecting the request.

  3. Re-enable Authorization and repeat.

    The MCP server now checks your JWT claims. The same request returns a 403 Forbidden error and no data is disclosed.

Key takeaway Authorization must be enforced server-side on every tool call, not just at the UI layer. The agent itself cannot be trusted to enforce data boundaries.
Lesson 2

Hallucination Risk in Healthcare AI

At high temperature with no grounding guidance, LLMs will invent plausible-sounding values for fields that are null in the database. In a healthcare context, a hallucinated specialist name or care coordinator could cause real patient harm.

  1. Go to Settings → Agent Behavior → Grounding Strictness and set it to Loose.

    This sets temperature to 0.9 and removes all grounding instructions from the system prompt. The agent is now free to fill in gaps using its training knowledge.

  2. Ask the agent about a specialist referral or care coordinator.

    Try: Do I have a specialist referral on file? or Who is my care coordinator?. These fields are intentionally null in the database. Observe whether the agent says "not on file" or invents a name and phone number.

  3. Switch Grounding Strictness to Strict and repeat the question.

    Temperature drops to 0.0 and the system prompt now includes explicit rules against inferring absent fields. The agent should now say the information is not available rather than fabricating it.

Key takeaway Temperature is a security-relevant parameter, not just a creativity dial. High temperature increases hallucination risk. Explicit grounding rules in the system prompt reduce — but do not eliminate — that risk. For clinical use cases, always validate model output against authoritative data sources.