Skip to content
MCP

Chapter 10 Β· Operate

Security Model

The rules that keep this server safe in production: delegated identity, no standing credentials, a hardened gateway, redacted logs, and bounded responses. Read this before you deploy anything real.

🎯 What you'll be able to do

  • Recite the non-negotiable security rules
  • Trace where identity flows and where permissions are enforced
  • Map each asset to its threat and mitigation
  • Convert the server to a safe read-only deployment

Non-negotiable rules

Identity diagram

Permissions are enforced by Jira, using the user's own token β€” the server never decides what a user may see.

Threat model summary

AssetThreatMitigation
User Jira dataCross-user accessDelegated bearer token per request; Jira enforces user permissions.
Atlassian OAuth client secretLeakageStored in the Power Platform connector, not server code.
Gateway secretDirect app bypassKey Vault secret injected by APIM and checked by the app.
Public endpointAbuseAPIM rate limits, quotas, IP filtering, TLS.
Tokens in logsDisclosureRedacting logging filter.
Large Jira responsesAgent failureField projection and byte-budget trimming.
Container runtimePrivilege escalationNon-root runtime user.
Source repositorySecret leakage.env ignored and gitleaks in CI.
Defense in depth
Notice that no single control is trusted alone. Even if APIM is misconfigured, the app still checks the gateway token; even if a log line is careless, the redaction filter catches the token. Layers mean one mistake isn't a breach.

Read-only mode

For a read-only deployment:

  1. Remove write:jira-work from the connector scopes.
  2. Remove the write tools: jira_create_issue, jira_update_issue_summary, jira_add_comment, jira_transition_issue.
  3. Keep the read tools: jira_whoami, jira_search, jira_get_issue, jira_list_transitions, jira_get_projects.
  4. Update documentation and tests to match.
Tip
Read-only is an excellent first production deployment: it delivers value (search, lookups, project lists) while removing any chance of the agent modifying data while you build confidence.

❓ Concept check

Someone proposes adding a jira_run_jql tool that executes any JQL with no result cap, β€œfor power users.” Which two non-negotiable rules does this violate?

πŸ“Œ Chapter summary

  • No service accounts, no PATs, no stored refresh tokens, no token logging, no wildcard CORS, no unlimited search.
  • Jira enforces user permissions; the gateway secret blocks direct app access.
  • Read-only mode = drop write scopes and write tools, keep read tools.

βœ… End-of-chapter review

0/4 done