Commit 8446a90
committed
feat(provider): selective credential passthrough
Add an opt-in passthrough mechanism for provider credentials that bypass the
canonical openshell:resolve:env:* placeholder and L7 proxy substitution.
Provider gains a repeated string passthrough_credentials field listing
credential keys whose real value should be injected directly into the agent
process environment. Required for SDKs that validate credential format
in-process (Slack xoxb-*/xapp-*), credentials consumed by in-process crypto
(HMAC signing secrets, signature verification), and transports the proxy
cannot rewrite (WebSocket payloads after HTTP 101 upgrade). Passthrough
drops the "agent never sees the real secret" invariant for the listed
keys; documented as a per-credential security trade-off.
Server: validation rejects keys not in credentials, invalid env var names,
duplicates, and over-cap. resolve_provider_environment returns a
ProviderEnvironment struct with the merged env map and the union of
passthrough keys; passthrough flag follows the winning value on duplicate
keys across providers. Update merge auto-prunes orphaned passthrough
entries when their credential is deleted in the same call (proto3 cannot
distinguish "field unset" from "set to empty list"), preserving the
"recover via update" path. Explicit non-empty incoming list still rejects
orphans as a caller bug.
Sandbox: SecretResolver::from_provider_env_with_passthrough handles the
new mode — passthrough keys go to child env as real values, resolver does
not learn them; non-passthrough keys still get the canonical placeholder.
CLI: provider create/update accept --passthrough KEY (repeatable);
provider get annotates passthrough keys, provider list adds a PASSTHROUGH
column.
Refs #894 (selective passthrough lands; custom-format placeholders deferred
to a follow-up).
Signed-off-by: Tinson Lai <tinsonl@nvidia.com>1 parent 9751872 commit 8446a90
17 files changed
Lines changed: 929 additions & 49 deletions
File tree
- architecture
- crates
- openshell-cli
- src
- tests
- openshell-sandbox/src
- openshell-server/src
- grpc
- openshell-tui/src
- docs/sandboxes
- e2e/python
- proto
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
38 | 41 | | |
39 | 42 | | |
40 | 43 | | |
| |||
363 | 366 | | |
364 | 367 | | |
365 | 368 | | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
366 | 455 | | |
367 | 456 | | |
368 | 457 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
709 | 709 | | |
710 | 710 | | |
711 | 711 | | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
712 | 721 | | |
713 | 722 | | |
714 | 723 | | |
| |||
757 | 766 | | |
758 | 767 | | |
759 | 768 | | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
760 | 778 | | |
761 | 779 | | |
762 | 780 | | |
| |||
2742 | 2760 | | |
2743 | 2761 | | |
2744 | 2762 | | |
| 2763 | + | |
2745 | 2764 | | |
2746 | 2765 | | |
2747 | 2766 | | |
| |||
2750 | 2769 | | |
2751 | 2770 | | |
2752 | 2771 | | |
| 2772 | + | |
2753 | 2773 | | |
2754 | 2774 | | |
2755 | 2775 | | |
| |||
2769 | 2789 | | |
2770 | 2790 | | |
2771 | 2791 | | |
| 2792 | + | |
2772 | 2793 | | |
2773 | 2794 | | |
2774 | 2795 | | |
2775 | 2796 | | |
2776 | 2797 | | |
2777 | 2798 | | |
2778 | 2799 | | |
| 2800 | + | |
2779 | 2801 | | |
2780 | 2802 | | |
2781 | 2803 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3576 | 3576 | | |
3577 | 3577 | | |
3578 | 3578 | | |
| 3579 | + | |
3579 | 3580 | | |
3580 | 3581 | | |
3581 | 3582 | | |
| |||
3616 | 3617 | | |
3617 | 3618 | | |
3618 | 3619 | | |
| 3620 | + | |
3619 | 3621 | | |
3620 | 3622 | | |
3621 | 3623 | | |
| |||
3676 | 3678 | | |
3677 | 3679 | | |
3678 | 3680 | | |
| 3681 | + | |
| 3682 | + | |
| 3683 | + | |
| 3684 | + | |
| 3685 | + | |
| 3686 | + | |
| 3687 | + | |
| 3688 | + | |
| 3689 | + | |
| 3690 | + | |
| 3691 | + | |
| 3692 | + | |
| 3693 | + | |
| 3694 | + | |
| 3695 | + | |
| 3696 | + | |
| 3697 | + | |
| 3698 | + | |
| 3699 | + | |
| 3700 | + | |
| 3701 | + | |
| 3702 | + | |
| 3703 | + | |
| 3704 | + | |
| 3705 | + | |
| 3706 | + | |
| 3707 | + | |
| 3708 | + | |
| 3709 | + | |
| 3710 | + | |
| 3711 | + | |
| 3712 | + | |
| 3713 | + | |
| 3714 | + | |
| 3715 | + | |
| 3716 | + | |
| 3717 | + | |
| 3718 | + | |
| 3719 | + | |
| 3720 | + | |
| 3721 | + | |
| 3722 | + | |
| 3723 | + | |
| 3724 | + | |
3679 | 3725 | | |
3680 | 3726 | | |
3681 | 3727 | | |
| |||
3712 | 3758 | | |
3713 | 3759 | | |
3714 | 3760 | | |
| 3761 | + | |
3715 | 3762 | | |
3716 | 3763 | | |
3717 | 3764 | | |
3718 | 3765 | | |
3719 | 3766 | | |
3720 | 3767 | | |
3721 | 3768 | | |
| 3769 | + | |
3722 | 3770 | | |
3723 | 3771 | | |
3724 | 3772 | | |
| |||
3735 | 3783 | | |
3736 | 3784 | | |
3737 | 3785 | | |
| 3786 | + | |
3738 | 3787 | | |
3739 | 3788 | | |
3740 | 3789 | | |
| |||
3762 | 3811 | | |
3763 | 3812 | | |
3764 | 3813 | | |
| 3814 | + | |
| 3815 | + | |
| 3816 | + | |
| 3817 | + | |
| 3818 | + | |
3765 | 3819 | | |
3766 | 3820 | | |
3767 | 3821 | | |
| |||
3774 | 3828 | | |
3775 | 3829 | | |
3776 | 3830 | | |
| 3831 | + | |
3777 | 3832 | | |
3778 | 3833 | | |
3779 | 3834 | | |
| |||
3806 | 3861 | | |
3807 | 3862 | | |
3808 | 3863 | | |
3809 | | - | |
3810 | | - | |
| 3864 | + | |
| 3865 | + | |
| 3866 | + | |
| 3867 | + | |
| 3868 | + | |
| 3869 | + | |
| 3870 | + | |
| 3871 | + | |
| 3872 | + | |
| 3873 | + | |
| 3874 | + | |
| 3875 | + | |
| 3876 | + | |
| 3877 | + | |
| 3878 | + | |
| 3879 | + | |
| 3880 | + | |
| 3881 | + | |
| 3882 | + | |
3811 | 3883 | | |
3812 | 3884 | | |
3813 | 3885 | | |
| |||
3878 | 3950 | | |
3879 | 3951 | | |
3880 | 3952 | | |
3881 | | - | |
| 3953 | + | |
3882 | 3954 | | |
3883 | 3955 | | |
3884 | 3956 | | |
| 3957 | + | |
3885 | 3958 | | |
3886 | 3959 | | |
3887 | 3960 | | |
3888 | 3961 | | |
3889 | 3962 | | |
3890 | | - | |
| 3963 | + | |
3891 | 3964 | | |
3892 | 3965 | | |
3893 | 3966 | | |
| 3967 | + | |
3894 | 3968 | | |
3895 | 3969 | | |
3896 | 3970 | | |
| |||
3904 | 3978 | | |
3905 | 3979 | | |
3906 | 3980 | | |
| 3981 | + | |
3907 | 3982 | | |
3908 | 3983 | | |
3909 | 3984 | | |
| |||
3916 | 3991 | | |
3917 | 3992 | | |
3918 | 3993 | | |
| 3994 | + | |
| 3995 | + | |
| 3996 | + | |
| 3997 | + | |
| 3998 | + | |
3919 | 3999 | | |
3920 | 4000 | | |
3921 | 4001 | | |
| |||
3960 | 4040 | | |
3961 | 4041 | | |
3962 | 4042 | | |
| 4043 | + | |
3963 | 4044 | | |
3964 | 4045 | | |
3965 | 4046 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
| |||
293 | 294 | | |
294 | 295 | | |
295 | 296 | | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
296 | 302 | | |
297 | 303 | | |
298 | 304 | | |
| |||
0 commit comments