Commit 36fd89f
committed
node: services are declared in configuration, never registered at runtime
Remove the /sam/service/register and /sam/service/unregister endpoints:
anything a caller can mutate at runtime is an interface it can abuse, and
every legitimate use was a declaration in disguise. Services now only
exist by declaration at startup — the node's --config services block, or
the FFI start configuration on mobile — and the probe gates advertisement,
so readiness is observed rather than asserted.
The former endpoint paths fall through to the egress proxy like any other
/sam/ path, with no special handling; the sandbox boundary still refuses
them before the node is ever reached, which the boundary tests keep
pinning. Validation moves into SamNode.RegisterService, the one funnel the
config and FFI paths share.
Tests, harnesses, the mobile app, the Cloud Run example and the
architecture doc's ingress section all migrate to declaring backends
before their node starts. Runtime-written config files are chmod 644: the
node container runs as a non-root user and a restrictive umask would make
the mounted config unreadable inside it.1 parent ae97f2a commit 36fd89f
23 files changed
Lines changed: 605 additions & 916 deletions
File tree
- .github/k8s
- internal/node
- mobile
- sam-node-app
- integration_test
- lib
- sam-node-ffi/ffi
- site/content/docs
- user
- tests
- e2e
- integration
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
150 | | - | |
| 150 | + | |
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1580 | 1580 | | |
1581 | 1581 | | |
1582 | 1582 | | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
1583 | 1592 | | |
1584 | 1593 | | |
1585 | 1594 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | 26 | | |
28 | 27 | | |
29 | 28 | | |
| |||
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
41 | | - | |
42 | 40 | | |
43 | 41 | | |
44 | 42 | | |
| |||
57 | 55 | | |
58 | 56 | | |
59 | 57 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
66 | 62 | | |
67 | 63 | | |
68 | 64 | | |
| |||
448 | 444 | | |
449 | 445 | | |
450 | 446 | | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | 447 | | |
456 | 448 | | |
457 | 449 | | |
458 | 450 | | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
468 | | - | |
469 | | - | |
470 | | - | |
471 | | - | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
490 | | - | |
491 | | - | |
492 | | - | |
493 | | - | |
494 | | - | |
495 | | - | |
496 | | - | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | | - | |
506 | | - | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | 451 | | |
536 | 452 | | |
537 | 453 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
| |||
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
37 | | - | |
38 | 36 | | |
39 | 37 | | |
40 | 38 | | |
| |||
406 | 404 | | |
407 | 405 | | |
408 | 406 | | |
409 | | - | |
410 | | - | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
411 | 412 | | |
412 | 413 | | |
413 | 414 | | |
414 | 415 | | |
415 | | - | |
416 | 416 | | |
417 | | - | |
418 | 417 | | |
419 | 418 | | |
420 | 419 | | |
| |||
514 | 513 | | |
515 | 514 | | |
516 | 515 | | |
517 | | - | |
| 516 | + | |
518 | 517 | | |
519 | 518 | | |
520 | 519 | | |
| |||
555 | 554 | | |
556 | 555 | | |
557 | 556 | | |
558 | | - | |
| 557 | + | |
559 | 558 | | |
560 | 559 | | |
561 | 560 | | |
562 | | - | |
563 | | - | |
564 | | - | |
565 | | - | |
566 | | - | |
567 | | - | |
568 | | - | |
569 | | - | |
570 | | - | |
571 | | - | |
572 | | - | |
573 | | - | |
| 561 | + | |
| 562 | + | |
574 | 563 | | |
575 | 564 | | |
576 | 565 | | |
| |||
584 | 573 | | |
585 | 574 | | |
586 | 575 | | |
587 | | - | |
| 576 | + | |
588 | 577 | | |
589 | 578 | | |
590 | 579 | | |
591 | 580 | | |
592 | 581 | | |
593 | | - | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | | - | |
600 | | - | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
| 582 | + | |
| 583 | + | |
606 | 584 | | |
607 | 585 | | |
608 | 586 | | |
| |||
797 | 775 | | |
798 | 776 | | |
799 | 777 | | |
800 | | - | |
| 778 | + | |
801 | 779 | | |
802 | 780 | | |
803 | 781 | | |
804 | 782 | | |
805 | 783 | | |
806 | | - | |
807 | | - | |
808 | | - | |
| 784 | + | |
| 785 | + | |
809 | 786 | | |
810 | 787 | | |
811 | 788 | | |
812 | 789 | | |
813 | 790 | | |
814 | 791 | | |
815 | | - | |
816 | 792 | | |
817 | 793 | | |
818 | 794 | | |
819 | 795 | | |
820 | 796 | | |
821 | 797 | | |
822 | 798 | | |
823 | | - | |
824 | 799 | | |
825 | 800 | | |
826 | 801 | | |
827 | 802 | | |
828 | 803 | | |
829 | 804 | | |
830 | 805 | | |
831 | | - | |
832 | 806 | | |
833 | 807 | | |
834 | 808 | | |
835 | 809 | | |
836 | 810 | | |
837 | 811 | | |
838 | | - | |
839 | 812 | | |
840 | 813 | | |
841 | 814 | | |
842 | 815 | | |
843 | 816 | | |
844 | | - | |
845 | | - | |
846 | | - | |
847 | | - | |
848 | | - | |
849 | | - | |
850 | | - | |
851 | | - | |
852 | | - | |
853 | | - | |
854 | | - | |
| 817 | + | |
| 818 | + | |
855 | 819 | | |
856 | 820 | | |
857 | 821 | | |
| |||
0 commit comments