|
1364 | 1364 | </span> |
1365 | 1365 | </a> |
1366 | 1366 |
|
| 1367 | +</li> |
| 1368 | + |
| 1369 | + <li class="md-nav__item"> |
| 1370 | + <a href="#gateway-seed-security" class="md-nav__link"> |
| 1371 | + <span class="md-ellipsis"> |
| 1372 | + |
| 1373 | + Gateway Seed Security |
| 1374 | + |
| 1375 | + </span> |
| 1376 | + </a> |
| 1377 | + |
| 1378 | + <nav class="md-nav" aria-label="Gateway Seed Security"> |
| 1379 | + <ul class="md-nav__list"> |
| 1380 | + |
| 1381 | + <li class="md-nav__item"> |
| 1382 | + <a href="#threat-gateway-seed-compromise" class="md-nav__link"> |
| 1383 | + <span class="md-ellipsis"> |
| 1384 | + |
| 1385 | + Threat: Gateway Seed Compromise |
| 1386 | + |
| 1387 | + </span> |
| 1388 | + </a> |
| 1389 | + |
| 1390 | +</li> |
| 1391 | + |
| 1392 | + <li class="md-nav__item"> |
| 1393 | + <a href="#mitigation-1-hsm-kms-for-key-storage-should" class="md-nav__link"> |
| 1394 | + <span class="md-ellipsis"> |
| 1395 | + |
| 1396 | + Mitigation 1: HSM / KMS for Key Storage (SHOULD) |
| 1397 | + |
| 1398 | + </span> |
| 1399 | + </a> |
| 1400 | + |
| 1401 | +</li> |
| 1402 | + |
| 1403 | + <li class="md-nav__item"> |
| 1404 | + <a href="#mitigation-2-xrpl-credential-based-gateway-authorization-should" class="md-nav__link"> |
| 1405 | + <span class="md-ellipsis"> |
| 1406 | + |
| 1407 | + Mitigation 2: XRPL Credential-Based Gateway Authorization (SHOULD) |
| 1408 | + |
| 1409 | + </span> |
| 1410 | + </a> |
| 1411 | + |
| 1412 | +</li> |
| 1413 | + |
| 1414 | + <li class="md-nav__item"> |
| 1415 | + <a href="#mitigation-3-on-chain-monitoring-and-alerting-should" class="md-nav__link"> |
| 1416 | + <span class="md-ellipsis"> |
| 1417 | + |
| 1418 | + Mitigation 3: On-Chain Monitoring and Alerting (SHOULD) |
| 1419 | + |
| 1420 | + </span> |
| 1421 | + </a> |
| 1422 | + |
| 1423 | +</li> |
| 1424 | + |
| 1425 | + <li class="md-nav__item"> |
| 1426 | + <a href="#defense-in-depth-summary" class="md-nav__link"> |
| 1427 | + <span class="md-ellipsis"> |
| 1428 | + |
| 1429 | + Defense-in-Depth Summary |
| 1430 | + |
| 1431 | + </span> |
| 1432 | + </a> |
| 1433 | + |
| 1434 | +</li> |
| 1435 | + |
| 1436 | + </ul> |
| 1437 | + </nav> |
| 1438 | + |
1367 | 1439 | </li> |
1368 | 1440 |
|
1369 | 1441 | <li class="md-nav__item"> |
|
2128 | 2200 | </span> |
2129 | 2201 | </a> |
2130 | 2202 |
|
| 2203 | +</li> |
| 2204 | + |
| 2205 | + <li class="md-nav__item"> |
| 2206 | + <a href="#gateway-seed-security" class="md-nav__link"> |
| 2207 | + <span class="md-ellipsis"> |
| 2208 | + |
| 2209 | + Gateway Seed Security |
| 2210 | + |
| 2211 | + </span> |
| 2212 | + </a> |
| 2213 | + |
| 2214 | + <nav class="md-nav" aria-label="Gateway Seed Security"> |
| 2215 | + <ul class="md-nav__list"> |
| 2216 | + |
| 2217 | + <li class="md-nav__item"> |
| 2218 | + <a href="#threat-gateway-seed-compromise" class="md-nav__link"> |
| 2219 | + <span class="md-ellipsis"> |
| 2220 | + |
| 2221 | + Threat: Gateway Seed Compromise |
| 2222 | + |
| 2223 | + </span> |
| 2224 | + </a> |
| 2225 | + |
| 2226 | +</li> |
| 2227 | + |
| 2228 | + <li class="md-nav__item"> |
| 2229 | + <a href="#mitigation-1-hsm-kms-for-key-storage-should" class="md-nav__link"> |
| 2230 | + <span class="md-ellipsis"> |
| 2231 | + |
| 2232 | + Mitigation 1: HSM / KMS for Key Storage (SHOULD) |
| 2233 | + |
| 2234 | + </span> |
| 2235 | + </a> |
| 2236 | + |
| 2237 | +</li> |
| 2238 | + |
| 2239 | + <li class="md-nav__item"> |
| 2240 | + <a href="#mitigation-2-xrpl-credential-based-gateway-authorization-should" class="md-nav__link"> |
| 2241 | + <span class="md-ellipsis"> |
| 2242 | + |
| 2243 | + Mitigation 2: XRPL Credential-Based Gateway Authorization (SHOULD) |
| 2244 | + |
| 2245 | + </span> |
| 2246 | + </a> |
| 2247 | + |
| 2248 | +</li> |
| 2249 | + |
| 2250 | + <li class="md-nav__item"> |
| 2251 | + <a href="#mitigation-3-on-chain-monitoring-and-alerting-should" class="md-nav__link"> |
| 2252 | + <span class="md-ellipsis"> |
| 2253 | + |
| 2254 | + Mitigation 3: On-Chain Monitoring and Alerting (SHOULD) |
| 2255 | + |
| 2256 | + </span> |
| 2257 | + </a> |
| 2258 | + |
| 2259 | +</li> |
| 2260 | + |
| 2261 | + <li class="md-nav__item"> |
| 2262 | + <a href="#defense-in-depth-summary" class="md-nav__link"> |
| 2263 | + <span class="md-ellipsis"> |
| 2264 | + |
| 2265 | + Defense-in-Depth Summary |
| 2266 | + |
| 2267 | + </span> |
| 2268 | + </a> |
| 2269 | + |
| 2270 | +</li> |
| 2271 | + |
| 2272 | + </ul> |
| 2273 | + </nav> |
| 2274 | + |
2131 | 2275 | </li> |
2132 | 2276 |
|
2133 | 2277 | <li class="md-nav__item"> |
@@ -2399,12 +2543,100 @@ <h2 id="trust-gateway-as-mandatory-actor">Trust Gateway as Mandatory Actor</h2> |
2399 | 2543 | Bundle so offline merchants can verify that an SBA was produced by an entity operating under a |
2400 | 2544 | registered gateway. (See roadmap: Gateway key in Trust Bundle.)</p> |
2401 | 2545 | <hr /> |
| 2546 | +<h2 id="gateway-seed-security">Gateway Seed Security</h2> |
| 2547 | +<h3 id="threat-gateway-seed-compromise">Threat: Gateway Seed Compromise</h3> |
| 2548 | +<p>The Trust Gateway holds an XRPL private key (seed) that controls the gateway account. If an |
| 2549 | +attacker obtains this seed, they can submit XRPL transactions on behalf of the gateway — |
| 2550 | +draining all active escrows simultaneously.</p> |
| 2551 | +<p>Per-grant escrow limits exposure per individual grant (each escrow locks only <code>budgetMinor</code> |
| 2552 | +XRP), but an attacker with the seed can finish or drain every active escrow at once. The |
| 2553 | +aggregate exposure is the sum of all active grants' <code>budgetMinor</code> values.</p> |
| 2554 | +<h3 id="mitigation-1-hsm-kms-for-key-storage-should">Mitigation 1: HSM / KMS for Key Storage (SHOULD)</h3> |
| 2555 | +<p>Production gateway deployments SHOULD store the XRPL private key in a Hardware Security Module |
| 2556 | +(HSM) or cloud Key Management Service (KMS). The key SHOULD never exist in plaintext on disk |
| 2557 | +or in environment variables.</p> |
| 2558 | +<p>Benefits:</p> |
| 2559 | +<ul> |
| 2560 | +<li>The private key cannot be extracted — signing operations are performed inside the HSM</li> |
| 2561 | +<li>Access to signing is gated by authentication and audit logging</li> |
| 2562 | +<li>Key material survives host compromise (attacker gains shell access but cannot export the key)</li> |
| 2563 | +</ul> |
| 2564 | +<p>Implementations that cannot use an HSM SHOULD at minimum encrypt the key at rest and restrict |
| 2565 | +file permissions to the gateway process user.</p> |
| 2566 | +<h3 id="mitigation-2-xrpl-credential-based-gateway-authorization-should">Mitigation 2: XRPL Credential-Based Gateway Authorization (SHOULD)</h3> |
| 2567 | +<p>For XRPL deployments, the PA SHOULD issue an on-chain credential to the gateway account using |
| 2568 | +XLS-70 Credentials, binding the gateway's authorization to a verifiable on-chain attestation:</p> |
| 2569 | +<ul> |
| 2570 | +<li><code>Issuer</code> = PA's XRPL address</li> |
| 2571 | +<li><code>Subject</code> = Gateway's XRPL address</li> |
| 2572 | +<li><code>CredentialType</code> = hex-encoded <code>"mpcp:authorized-gateway"</code></li> |
| 2573 | +<li>Optional <code>Expiration</code> aligned with the deployment lifecycle</li> |
| 2574 | +</ul> |
| 2575 | +<p><strong>On compromise:</strong> The PA deletes the gateway credential via <code>CredentialDelete</code>. Even though |
| 2576 | +the attacker holds the seed, actors that verify the gateway's credential (other gateways, |
| 2577 | +Permissioned Domains, monitoring systems) will see that the credential no longer exists and |
| 2578 | +reject interactions with the compromised gateway.</p> |
| 2579 | +<p>This does not prevent the attacker from submitting raw XRPL transactions (the seed still |
| 2580 | +controls the account), but it invalidates the gateway's MPCP authorization — new PolicyGrants |
| 2581 | +with <code>authorizedGateway</code> pointing to the compromised address will not be issued, and actors |
| 2582 | +that check the credential will refuse to interact.</p> |
| 2583 | +<h3 id="mitigation-3-on-chain-monitoring-and-alerting-should">Mitigation 3: On-Chain Monitoring and Alerting (SHOULD)</h3> |
| 2584 | +<p>Gateway operators SHOULD monitor on-chain activity for anomalous payment patterns that may |
| 2585 | +indicate seed compromise:</p> |
| 2586 | +<ul> |
| 2587 | +<li>XRPL payments from the gateway account that do not have a corresponding SBA in the gateway's |
| 2588 | + audit log</li> |
| 2589 | +<li>Payments missing the <code>mpcp/grant-id</code> memo, or with memo values that do not match any known |
| 2590 | + active grant</li> |
| 2591 | +<li>Sudden spikes in transaction volume or aggregate spend across grants</li> |
| 2592 | +<li><code>EscrowFinish</code> transactions for grants that the gateway did not initiate</li> |
| 2593 | +</ul> |
| 2594 | +<p>When anomalies are detected, operators SHOULD:</p> |
| 2595 | +<ol> |
| 2596 | +<li>Revoke the gateway's on-chain credential (Mitigation 2)</li> |
| 2597 | +<li>Revoke all active PolicyGrants that reference the compromised <code>authorizedGateway</code> address</li> |
| 2598 | +<li>Rotate to a new gateway account and reissue grants</li> |
| 2599 | +</ol> |
| 2600 | +<h3 id="defense-in-depth-summary">Defense-in-Depth Summary</h3> |
| 2601 | +<table> |
| 2602 | +<thead> |
| 2603 | +<tr> |
| 2604 | +<th>Layer</th> |
| 2605 | +<th>Mechanism</th> |
| 2606 | +<th>Effect</th> |
| 2607 | +</tr> |
| 2608 | +</thead> |
| 2609 | +<tbody> |
| 2610 | +<tr> |
| 2611 | +<td>Prevention</td> |
| 2612 | +<td>HSM / KMS</td> |
| 2613 | +<td>Seed cannot be extracted from host</td> |
| 2614 | +</tr> |
| 2615 | +<tr> |
| 2616 | +<td>Authorization</td> |
| 2617 | +<td>XRPL Credential</td> |
| 2618 | +<td>PA can revoke gateway's on-chain authorization instantly</td> |
| 2619 | +</tr> |
| 2620 | +<tr> |
| 2621 | +<td>Containment</td> |
| 2622 | +<td>Per-grant escrow</td> |
| 2623 | +<td>Each grant's exposure is bounded by its <code>budgetMinor</code></td> |
| 2624 | +</tr> |
| 2625 | +<tr> |
| 2626 | +<td>Detection</td> |
| 2627 | +<td>On-chain monitoring</td> |
| 2628 | +<td>Unauthorized transactions are flagged for response</td> |
| 2629 | +</tr> |
| 2630 | +</tbody> |
| 2631 | +</table> |
| 2632 | +<hr /> |
2402 | 2633 | <h2 id="see-also">See Also</h2> |
2403 | 2634 | <ul> |
2404 | 2635 | <li><a href="../../architecture/actors/">Actors</a> — Actor definitions including Trust Gateway</li> |
2405 | 2636 | <li><a href="../PolicyGrant/">PolicyGrant</a> — PA-signed grant fields</li> |
2406 | 2637 | <li><a href="../trust-bundles/">Trust Bundles</a> — Offline key distribution</li> |
2407 | 2638 | <li><a href="../rails/">Rails</a> — Rail extensibility and escrow URI scheme</li> |
| 2639 | +<li><a href="../key-resolution/#key-revocation">Key Revocation</a> — PA key revocation mechanisms</li> |
2408 | 2640 | </ul> |
2409 | 2641 |
|
2410 | 2642 |
|
|
0 commit comments