import{r as p,k as e}from"./index-BVfpSx5Q.js";import{L as b}from"./layout-NiehYZnq.js";import{P as S,K as n,S as c,C as l,c as k}from"./ui-DGkmnhL-.js";const o="#c9b787",m={low:"#22c55e",medium:o,high:"#f97316",critical:"#ef4444"},x={active:"#22c55e",pending:"#f97316",revoked:"#ef4444"},d=[{id:"ais-live-api",name:"AIS Live API",vendor:"MarineTraffic",domain:"Maritime",category:"Operational Data",riskScore:18,riskLevel:"low",status:"approved",approvalRequired:!1,dataClasses:["vessel_position","eta","cargo_manifest"],allowedTools:["vessel_track","eta_lookup","port_congestion"],blockedTools:["cargo_manifest_write","flag_state_modify"],lastCall:"2026-04-26T14:28:00Z",callsToday:847,firewallEvents:3,outputSanitized:!0,promptInjectionScans:847,promptInjectionBlocked:0,trustScore:92,consentGranted:!0,schemaValidated:!0,tenant:"SZL Holdings / Vessels",note:"High-trust operational connector.",mtlsStatus:"active",spiffeId:"spiffe://a11oy.szl/connectors/ais-live",certExpiry:"2027-03-01"},{id:"bloomberg-feed",name:"Bloomberg Data Feed",vendor:"Bloomberg LP",domain:"Finance",category:"Market Data",riskScore:22,riskLevel:"low",status:"approved",approvalRequired:!1,dataClasses:["market_prices","company_financials","macro_indicators"],allowedTools:["price_lookup","financial_analysis","news_search"],blockedTools:["trade_execute","order_submit"],lastCall:"2026-04-26T14:15:00Z",callsToday:312,firewallEvents:1,outputSanitized:!0,promptInjectionScans:312,promptInjectionBlocked:0,trustScore:88,consentGranted:!0,schemaValidated:!0,tenant:"CrossBridge Capital",note:"Read-only financial connector.",mtlsStatus:"active",spiffeId:"spiffe://a11oy.szl/connectors/bloomberg",certExpiry:"2027-02-15"},{id:"court-docket-api",name:"Court Docket API",vendor:"PACER / CourtLink",domain:"Legal",category:"Legal Intelligence",riskScore:15,riskLevel:"low",status:"approved",approvalRequired:!1,dataClasses:["docket_entries","case_status","filing_deadlines"],allowedTools:["docket_search","deadline_monitor","document_retrieve"],blockedTools:["filing_submit","document_modify"],lastCall:"2026-04-26T13:45:00Z",callsToday:94,firewallEvents:0,outputSanitized:!0,promptInjectionScans:94,promptInjectionBlocked:0,trustScore:94,consentGranted:!0,schemaValidated:!0,tenant:"SZL Holdings / Counsel",note:"Legal docket connector with privilege gate.",mtlsStatus:"active",spiffeId:"spiffe://a11oy.szl/connectors/court-docket",certExpiry:"2027-04-01"},{id:"defense-intel-feed",name:"Defense Intelligence Feed",vendor:"Palantir / Gov API",domain:"Defense",category:"Intelligence Data",riskScore:12,riskLevel:"low",status:"approved",approvalRequired:!0,dataClasses:["threat_indicators","threat_actor_profiles","vulnerability_data"],allowedTools:["threat_lookup","indicator_enrich","cve_query"],blockedTools:["classified_retrieve","cisa_report_submit"],lastCall:"2026-04-26T14:00:00Z",callsToday:156,firewallEvents:8,outputSanitized:!0,promptInjectionScans:156,promptInjectionBlocked:2,trustScore:96,consentGranted:!0,schemaValidated:!0,tenant:"Northwind Labs",note:"Classified — Tier 3 approval required.",mtlsStatus:"active",spiffeId:"spiffe://a11oy.szl/connectors/defense-intel",certExpiry:"2027-01-01"},{id:"crm-platform",name:"CRM Platform",vendor:"Salesforce",domain:"Revenue",category:"Customer Data",riskScore:35,riskLevel:"medium",status:"approved",approvalRequired:!1,dataClasses:["account_data","opportunity_data","contact_data"],allowedTools:["account_lookup","pipeline_analyze","churn_score"],blockedTools:["account_delete","contact_email_bulk","deal_close"],lastCall:"2026-04-26T14:10:00Z",callsToday:203,firewallEvents:4,outputSanitized:!0,promptInjectionScans:203,promptInjectionBlocked:1,trustScore:87,consentGranted:!0,schemaValidated:!0,tenant:"Lyte Revenue",note:"PII redaction enforced.",mtlsStatus:"active",spiffeId:"spiffe://a11oy.szl/connectors/salesforce",certExpiry:"2027-03-15"},{id:"social-sentiment-api",name:"Social Sentiment API",vendor:"Brandwatch",domain:"Marketing",category:"Social Data",riskScore:58,riskLevel:"high",status:"pending_review",approvalRequired:!0,dataClasses:["social_posts","sentiment_scores"],allowedTools:[],blockedTools:["post_create","account_reply"],lastCall:null,callsToday:0,firewallEvents:12,outputSanitized:!1,promptInjectionScans:0,promptInjectionBlocked:0,trustScore:51,consentGranted:!1,schemaValidated:!1,tenant:null,note:"Pending review — schema not validated.",mtlsStatus:"pending",spiffeId:"spiffe://a11oy.szl/connectors/brandwatch",certExpiry:"N/A"},{id:"third-party-llm-api",name:"Third-Party LLM API",vendor:"Unknown",domain:"AI",category:"Model Inference",riskScore:94,riskLevel:"critical",status:"blocked",approvalRequired:!0,dataClasses:["prompts","model_outputs"],allowedTools:[],blockedTools:["inference_run","context_upload","model_fine_tune"],lastCall:null,callsToday:0,firewallEvents:156,outputSanitized:!1,promptInjectionScans:0,promptInjectionBlocked:44,trustScore:12,consentGranted:!1,schemaValidated:!1,tenant:null,note:"BLOCKED — 44 injection attempts.",mtlsStatus:"revoked",spiffeId:"N/A",certExpiry:"REVOKED"}],v=[{id:"ma-001",pattern:"System prompt extraction via role-play",severity:"critical",blocked:18,lastSeen:"2026-04-26T14:20:00Z",technique:"T1059.001 — Prompt Injection"},{id:"ma-002",pattern:"Base64-encoded instruction override",severity:"critical",blocked:12,lastSeen:"2026-04-26T13:45:00Z",technique:"T1027 — Obfuscated Payload"},{id:"ma-003",pattern:"Indirect injection via document embedding",severity:"high",blocked:8,lastSeen:"2026-04-26T12:30:00Z",technique:"T1204 — User Execution"},{id:"ma-004",pattern:"Jailbreak via multi-turn context window",severity:"high",blocked:5,lastSeen:"2026-04-25T22:00:00Z",technique:"T1190 — Context Overflow"},{id:"ma-005",pattern:"DAN/developer mode bypass attempt",severity:"medium",blocked:4,lastSeen:"2026-04-25T18:00:00Z",technique:"T1078 — Role Impersonation"}],g=[{from:"Cascade Navigator",to:"Guardian",protocol:"mTLS + A2A",status:"active",messagesPerMin:2.4,lastMessage:"Sanctions clearance check"},{from:"Pipeline Oracle",to:"Counsel Sentinel",protocol:"mTLS + A2A",status:"active",messagesPerMin:.8,lastMessage:"Contract review request"},{from:"Guardian",to:"Fabric Watchdog",protocol:"mTLS + internal",status:"active",messagesPerMin:4.2,lastMessage:"Perimeter verification"},{from:"Terra Analyst",to:"Pipeline Oracle",protocol:"mTLS + A2A",status:"idle",messagesPerMin:0,lastMessage:"Asset impact analysis"},{from:"Counsel Sentinel",to:"Cascade Navigator",protocol:"mTLS + A2A",status:"active",messagesPerMin:.3,lastMessage:"Demurrage clause query"}],N={critical:"#ef4444",high:"#f97316",medium:o};function T({level:s}){return e.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded font-mono",style:{color:m[s]??"#5e5e5e",backgroundColor:`${m[s]??"#5e5e5e"}18`,border:`1px solid ${m[s]??"#5e5e5e"}40`},children:s.toUpperCase()})}function L(){const[s,h]=p.useState(null),[r,y]=p.useState("registry"),[i,f]=p.useState("all"),u=d.filter(t=>i==="all"||t.riskLevel===i),j=v.reduce((t,a)=>t+a.blocked,0);return e.jsxs(b,{children:[e.jsx(S,{label:"AGENT GATEWAY",title:"Agent Gateway & Connector Firewall",subtitle:"Every connector is identity-verified (mTLS + SPIFFE), schema-validated, and consent-gated. Model Armor blocks prompt injection attacks. Air Traffic Control monitors all agent-to-agent communication flows.",status:"LIVE"}),e.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3 mb-8",children:[e.jsx(n,{label:"CONNECTORS",value:String(d.length),sub:"registered",accent:o}),e.jsx(n,{label:"mTLS ACTIVE",value:String(d.filter(t=>t.mtlsStatus==="active").length),sub:"secured",accent:"#22c55e"}),e.jsx(n,{label:"PENDING",value:String(d.filter(t=>t.status==="pending_review").length),sub:"review needed",accent:"#f97316"}),e.jsx(n,{label:"BLOCKED",value:String(d.filter(t=>t.status==="blocked").length),sub:"zero access",accent:"#ef4444"}),e.jsx(n,{label:"MODEL ARMOR",value:String(j),sub:"attacks blocked",accent:"#ef4444"}),e.jsx(n,{label:"AGENT FLOWS",value:String(g.filter(t=>t.status==="active").length),sub:"active channels",accent:o})]}),e.jsx("div",{className:"flex gap-1 mb-6",children:["registry","armor","atc"].map(t=>e.jsx("button",{onClick:()=>y(t),className:"px-4 py-2 rounded-lg text-[10px] font-mono uppercase tracking-widest transition-all",style:{background:r===t?"rgba(201,183,135,0.1)":"transparent",color:r===t?o:"#5e5e5e",border:`1px solid ${r===t?"rgba(201,183,135,0.2)":"transparent"}`,cursor:"pointer"},children:t==="registry"?"Gateway Registry":t==="armor"?"Model Armor":"Air Traffic Control"},t))}),r==="registry"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx("span",{className:"text-xs",style:{color:"var(--color-a11oy-text-ghost)"},children:"Risk:"}),["all","low","medium","high","critical"].map(t=>e.jsx("button",{onClick:()=>f(t),className:"text-xs px-2 py-0.5 rounded",style:{backgroundColor:i===t?"rgba(201,183,135,0.2)":"var(--color-a11oy-muted)",color:i===t?o:"var(--color-a11oy-text-ghost)",border:`1px solid ${i===t?"rgba(201,183,135,0.4)":"var(--color-a11oy-border)"}`,cursor:"pointer"},children:t},t))]}),e.jsxs("div",{className:"grid lg:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsxs(c,{children:["Gateway Registry (",u.length,")"]}),e.jsx("div",{className:"flex flex-col gap-2 max-h-[600px] overflow-y-auto pr-1",children:u.map(t=>e.jsxs(l,{className:`cursor-pointer hover:opacity-80 ${(s==null?void 0:s.id)===t.id?"ring-1 ring-blue-500/30":""}`,onClick:()=>h(t),children:[e.jsxs("div",{className:"flex items-start justify-between gap-2 mb-2",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-medium",style:{color:"var(--color-a11oy-text)"},children:t.name}),e.jsxs("div",{className:"text-xs",style:{color:"var(--color-a11oy-text-ghost)"},children:[t.vendor," · ",t.domain]})]}),e.jsxs("div",{className:"flex items-center gap-1.5 flex-shrink-0",children:[e.jsxs("span",{className:"text-[9px] font-mono px-1 py-0.5 rounded",style:{color:x[t.mtlsStatus],backgroundColor:`${x[t.mtlsStatus]}15`},children:["mTLS:",t.mtlsStatus]}),e.jsx(T,{level:t.riskLevel})]})]}),e.jsxs("div",{className:"grid grid-cols-4 gap-2 text-xs",children:[e.jsxs("div",{children:[e.jsx("div",{style:{color:"var(--color-a11oy-text-ghost)"},children:"trust"}),e.jsx("div",{style:{color:t.trustScore>=80?"#22c55e":o},children:t.trustScore})]}),e.jsxs("div",{children:[e.jsx("div",{style:{color:"var(--color-a11oy-text-ghost)"},children:"calls"}),e.jsx("div",{style:{color:"var(--color-a11oy-text-sub)"},children:t.callsToday})]}),e.jsxs("div",{children:[e.jsx("div",{style:{color:"var(--color-a11oy-text-ghost)"},children:"blocked"}),e.jsx("div",{style:{color:t.promptInjectionBlocked>0?"#ef4444":"var(--color-a11oy-text-sub)"},children:t.promptInjectionBlocked})]}),e.jsxs("div",{children:[e.jsx("div",{style:{color:"var(--color-a11oy-text-ghost)"},children:"cert"}),e.jsx("div",{style:{color:t.mtlsStatus==="active"?"#22c55e":"#ef4444"},children:t.certExpiry==="REVOKED"?"X":"✓"})]})]})]},t.id))})]}),e.jsx("div",{children:s?e.jsxs(e.Fragment,{children:[e.jsxs(c,{children:["Agent Identity — ",s.name]}),e.jsx(l,{children:e.jsxs("div",{className:"space-y-3 text-xs",children:[e.jsxs("div",{children:[e.jsx("div",{className:"font-mono mb-1",style:{color:"var(--color-a11oy-text-ghost)"},children:"SPIFFE ID"}),e.jsx("div",{className:"font-mono px-2 py-1.5 rounded",style:{backgroundColor:"var(--color-a11oy-deep)",border:"1px solid var(--color-a11oy-border)",color:o,wordBreak:"break-all"},children:s.spiffeId})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("div",{className:"font-mono mb-1",style:{color:"var(--color-a11oy-text-ghost)"},children:"mTLS STATUS"}),e.jsx("div",{style:{color:x[s.mtlsStatus]},children:s.mtlsStatus.toUpperCase()})]}),e.jsxs("div",{children:[e.jsx("div",{className:"font-mono mb-1",style:{color:"var(--color-a11oy-text-ghost)"},children:"CERT EXPIRY"}),e.jsx("div",{style:{color:"var(--color-a11oy-text-sub)"},children:s.certExpiry})]}),e.jsxs("div",{children:[e.jsx("div",{className:"font-mono mb-1",style:{color:"var(--color-a11oy-text-ghost)"},children:"TRUST SCORE"}),e.jsxs("div",{className:"font-mono",style:{color:s.trustScore>=80?"#22c55e":o},children:[s.trustScore,"/100"]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"font-mono mb-1",style:{color:"var(--color-a11oy-text-ghost)"},children:"RISK SCORE"}),e.jsxs("div",{className:"font-mono",style:{color:m[s.riskLevel]},children:[s.riskScore,"/100"]})]})]}),e.jsxs("div",{children:[e.jsx("div",{className:"font-mono mb-1",style:{color:"var(--color-a11oy-text-ghost)"},children:"ALLOWED TOOLS"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:s.allowedTools.length>0?s.allowedTools.map(t=>e.jsx("span",{className:"font-mono px-1.5 py-0.5 rounded",style:{backgroundColor:"rgba(34,197,94,0.08)",color:"#22c55e"},children:t},t)):e.jsx("span",{style:{color:"var(--color-a11oy-text-ghost)"},children:"None approved"})})]}),e.jsxs("div",{children:[e.jsx("div",{className:"font-mono mb-1",style:{color:"var(--color-a11oy-text-ghost)"},children:"BLOCKED TOOLS"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:s.blockedTools.map(t=>e.jsx("span",{className:"font-mono px-1.5 py-0.5 rounded",style:{backgroundColor:"rgba(239,68,68,0.08)",color:"#ef4444"},children:t},t))})]}),e.jsx("div",{className:"p-2 rounded",style:{backgroundColor:"var(--color-a11oy-muted)",color:"var(--color-a11oy-text-sub)"},children:s.note})]})})]}):e.jsxs(e.Fragment,{children:[e.jsx(c,{children:"Gateway Policy"}),e.jsxs(l,{children:[e.jsx("div",{className:"text-xs font-semibold mb-3",style:{color:"#ef4444"},children:"DEFAULT DENY — All connectors untrusted"}),e.jsx("div",{className:"space-y-2 text-xs",children:[{label:"mTLS enforcement",value:"required"},{label:"SPIFFE identity",value:"required"},{label:"Schema validation",value:"enforced"},{label:"Consent gate",value:"enforced"},{label:"Model Armor scanner",value:"active"},{label:"Output sanitizer",value:"active"},{label:"Tool allowlist",value:"enforced"}].map(t=>e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{style:{color:"var(--color-a11oy-text-sub)"},children:t.label}),e.jsx("span",{className:"font-mono",style:{color:"#22c55e"},children:t.value})]},t.label))})]})]})})]})]}),r==="armor"&&e.jsxs(e.Fragment,{children:[e.jsx(c,{children:"Model Armor — Blocked Attack Patterns"}),e.jsx("div",{className:"flex flex-col gap-3 mb-6",children:v.map(t=>{const a=N[t.severity];return e.jsx(l,{style:{borderLeft:`3px solid ${a}`},children:e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"text-[9px] font-mono px-1.5 py-0.5 rounded",style:{color:a,backgroundColor:`${a}15`},children:t.severity.toUpperCase()}),e.jsx("span",{className:"text-[9px] font-mono",style:{color:"var(--color-a11oy-text-ghost)"},children:t.technique})]}),e.jsx("div",{className:"text-sm font-medium mb-1",style:{color:"var(--color-a11oy-text)"},children:t.pattern}),e.jsxs("div",{className:"text-xs",style:{color:"var(--color-a11oy-text-ghost)"},children:["Last seen: ",new Date(t.lastSeen).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})]})]}),e.jsxs("div",{className:"text-right flex-shrink-0",children:[e.jsx("div",{className:"text-xl font-mono font-bold",style:{color:"#ef4444"},children:t.blocked}),e.jsx("div",{className:"text-xs",style:{color:"var(--color-a11oy-text-ghost)"},children:"blocked"})]})]})},t.id)})}),e.jsxs(l,{children:[e.jsx("div",{className:"text-xs font-semibold mb-2",style:{color:o},children:"Model Armor Coverage"}),e.jsx("div",{className:"space-y-2 text-xs",children:[{pattern:"Prompt injection (direct)",coverage:100},{pattern:"Prompt injection (indirect / doc)",coverage:98},{pattern:"Jailbreak / role-play",coverage:97},{pattern:"Obfuscated payload (Base64, Unicode)",coverage:96},{pattern:"Context window overflow",coverage:94},{pattern:"Multi-turn manipulation",coverage:92}].map(t=>e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsx("span",{style:{color:"var(--color-a11oy-text-sub)"},children:t.pattern}),e.jsxs("span",{className:"font-mono",style:{color:t.coverage>=95?"#22c55e":o},children:[t.coverage,"%"]})]}),e.jsx(k,{value:t.coverage,max:100,color:t.coverage>=95?"#22c55e":o})]},t.pattern))})]})]}),r==="atc"&&e.jsxs(e.Fragment,{children:[e.jsx(c,{children:"Air Traffic Control — Agent Communication Flows"}),e.jsx("div",{className:"flex flex-col gap-3 mb-6",children:g.map((t,a)=>e.jsxs(l,{children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[e.jsx("span",{className:"font-semibold",style:{color:o},children:t.from}),e.jsx("span",{style:{color:"var(--color-a11oy-text-ghost)"},children:"→"}),e.jsx("span",{className:"font-semibold",style:{color:o},children:t.to})]}),e.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[e.jsx("span",{className:"font-mono",style:{color:"#22c55e"},children:t.protocol}),e.jsxs("span",{className:"font-mono",style:{color:t.status==="active"?"#22c55e":"#5e5e5e"},children:[t.messagesPerMin,"/min"]}),e.jsx("span",{className:"w-2 h-2 rounded-full",style:{backgroundColor:t.status==="active"?"#22c55e":"#5e5e5e"}})]})]}),e.jsxs("div",{className:"text-xs mt-1",style:{color:"var(--color-a11oy-text-ghost)"},children:["Last: ",t.lastMessage]})]},a))}),e.jsxs(l,{children:[e.jsx("div",{className:"text-[9px] font-mono uppercase tracking-widest mb-3",style:{color:"var(--color-a11oy-text-ghost)"},children:"GATEWAY PRINCIPLES"}),e.jsx("div",{className:"space-y-2 text-xs",children:["Least-privilege: agents can only communicate with explicitly authorized peers","All flows are mTLS-encrypted with per-agent SPIFFE identities","Model Armor scans every message for prompt injection patterns","Flow anomalies trigger automatic rate limiting and CISO alert","Every message is logged to the Proof Ledger with sender/receiver attestation"].map(t=>e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full mt-1.5 flex-shrink-0",style:{backgroundColor:o}}),e.jsx("span",{style:{color:"var(--color-a11oy-text-sub)"},children:t})]},t))})]})]}),e.jsxs("div",{className:"mt-6 p-3 rounded-lg text-xs flex items-center gap-2",style:{backgroundColor:"rgba(201,183,135,0.06)",border:"1px solid rgba(201,183,135,0.15)",color:"var(--color-a11oy-text-ghost)"},children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-[var(--color-a11oy-blue)]"})," Agent Gateway — inspired by Google Cloud's Agent Gateway architecture. mTLS identity, Model Armor prompt injection blocking, and air traffic control for all agent communications."]})]})}export{L as ConnectorFirewall};