Repository navigation
Commit 29a2b8e
feat(providers): report bounded token-grant failures (#4427)
* feat(providers): report bounded token-grant failures
Signed-off-by: Shiju <shiju@nvidia.com>
* test(providers): align policy metadata and TLS lockfile
Signed-off-by: Shiju <shiju@nvidia.com>
* test(providers): fix trusted grant recovery fixture
Signed-off-by: Shiju <shiju@nvidia.com>
* test(providers): enable denial API in recovery fixture
Signed-off-by: Shiju <shiju@nvidia.com>
* refactor(providers): simplify token-grant failure reporting
Remove duplication and dead paths from the token-grant failure
reporting without changing classification, the workload-visible
502 response, or the wire format.
- Build the gRPC failure envelope with tonic-types, store the typed
failure in EndpointFailure, and share one request-ID rule and one
endpoint-status authority check.
- Merge the gateway exchange client wrapper, drop forwarding
validators, and name the request field when a reported cause is
rejected.
- Inject fallback credentials only from live provider state and
delete the unread per-connection credential copy. Keep one 502
writer per path and restore the base token-cache handling.
- Check the token endpoint after the cache lookup, still before any
credential acquisition.
- Document 429 and 5xx classification as implemented, and drop tests
that repeat retained assertions through the same code path.
Signed-off-by: Shiju <shiju@nvidia.com>
* refactor(providers): trim token-grant failure tests and supervisor API
Cut the token-grant failure tests to one test per distinct behavior
across core, gateway, supervisor, CLI and Go, and replace the 794-line
closure E2E with status assertions in the existing route-recovery E2E:
the refused grant appears in sandbox status with the response's
request ID, code, stage and upstream status, and the matching grant's
later success clears it.
- Pin the live provider snapshot with one helper used by inspected and
fallback forwarding, and inject selector-matched grants through
inject_for_selectors, which borrows the pinned context. Move the
test-only wrapper into test_support.
- Drop the 35-second wrappers around the gateway grant RPC. The shared
channel bounds the connection attempt and the gateway bounds its
token-service calls.
- Log the token service's OAuth error and error_description, without
control characters and limited to 256 characters each, with the
request ID in the gateway or supervisor log. Status and the workload
response still carry only the bounded cause.
- Keep one check that an untrusted token-service certificate cannot
assert a cause.
Signed-off-by: Shiju <shiju@nvidia.com>
* fix(providers): restore test import and features lockfile
The injection tests named EndpointObservationSender through the parent
module, which no longer imports it. The features suite lockfile kept the
tonic TLS dependency that the removed E2E fixture added.
Signed-off-by: Shiju <shiju@nvidia.com>
* test(providers): fix body-bound fixture width and table type
Pass the response-size width as a named argument; an implicitly captured
constant panics at runtime. Name the mutation type in the validation
table for Clippy.
Signed-off-by: Shiju <shiju@nvidia.com>
* test(providers): pad exact-bound body without a format width
MAX_TOKEN_RESPONSE_BYTES exceeds u16::MAX, the largest format width, so
the padded fixture panicked. Pad with repeat_n as before.
Signed-off-by: Shiju <shiju@nvidia.com>
* test(server): update public RPC schema hash after rebase
Main added the ListProvidersRequest label selector. The merged public
schema hash comes from the Branch Checks storage_proto test output.
Signed-off-by: Shiju <shiju@nvidia.com>
* fix(providers): keep token-service error text out of grant logs
A token service can echo a submitted credential in its OAuth error or
error_description. Log only the classified failure code, HTTP status and
request ID, and cover the canary echo in a dedicated test binary.
Signed-off-by: Shiju <shiju@nvidia.com>
* docs(providers): tighten token grant failure documentation
Signed-off-by: Shiju <shiju@nvidia.com>
* docs(providers): condense token grant failure guidance
Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>
---------
Signed-off-by: Shiju <shiju@nvidia.com>
Signed-off-by: John Myers <9696606+johntmyers@users.noreply.github.com>
Co-authored-by: John Myers <9696606+johntmyers@users.noreply.github.com>1 parent 01087a4 commit 29a2b8e
48 files changed
Lines changed: 6318 additions & 1868 deletions
File tree
- crates
- openshell-cli/src
- commands
- openshell-core
- src
- tests
- openshell-server/src
- compute
- grpc
- policy
- openshell-supervisor-network
- src
- l7
- relay
- token_grant_injection
- proxy
- tests
- openshell-supervisor/src
- docs
- how-it-works
- providers
- sandboxes
- observability
- e2e/rust/tests
- proto
- sdk/go
- docs/src/api
- openshell/v1
- fake
- internal/converter
- types
- proto/openshellv1
- skills/debug-openshell-cluster
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2118 | 2118 | | |
2119 | 2119 | | |
2120 | 2120 | | |
2121 | | - | |
| 2121 | + | |
2122 | 2122 | | |
2123 | 2123 | | |
2124 | 2124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1808 | 1808 | | |
1809 | 1809 | | |
1810 | 1810 | | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
| 1815 | + | |
| 1816 | + | |
| 1817 | + | |
| 1818 | + | |
| 1819 | + | |
| 1820 | + | |
| 1821 | + | |
1811 | 1822 | | |
1812 | 1823 | | |
1813 | 1824 | | |
| |||
3037 | 3048 | | |
3038 | 3049 | | |
3039 | 3050 | | |
| 3051 | + | |
3040 | 3052 | | |
3041 | 3053 | | |
3042 | 3054 | | |
3043 | 3055 | | |
| 3056 | + | |
| 3057 | + | |
| 3058 | + | |
| 3059 | + | |
| 3060 | + | |
| 3061 | + | |
| 3062 | + | |
| 3063 | + | |
| 3064 | + | |
| 3065 | + | |
| 3066 | + | |
3044 | 3067 | | |
3045 | 3068 | | |
3046 | 3069 | | |
| |||
3097 | 3120 | | |
3098 | 3121 | | |
3099 | 3122 | | |
| 3123 | + | |
3100 | 3124 | | |
3101 | 3125 | | |
3102 | 3126 | | |
| |||
3154 | 3178 | | |
3155 | 3179 | | |
3156 | 3180 | | |
| 3181 | + | |
| 3182 | + | |
| 3183 | + | |
| 3184 | + | |
| 3185 | + | |
| 3186 | + | |
| 3187 | + | |
| 3188 | + | |
| 3189 | + | |
| 3190 | + | |
| 3191 | + | |
| 3192 | + | |
| 3193 | + | |
| 3194 | + | |
| 3195 | + | |
| 3196 | + | |
| 3197 | + | |
| 3198 | + | |
| 3199 | + | |
| 3200 | + | |
| 3201 | + | |
| 3202 | + | |
| 3203 | + | |
| 3204 | + | |
| 3205 | + | |
| 3206 | + | |
| 3207 | + | |
| 3208 | + | |
| 3209 | + | |
| 3210 | + | |
| 3211 | + | |
| 3212 | + | |
| 3213 | + | |
| 3214 | + | |
| 3215 | + | |
| 3216 | + | |
| 3217 | + | |
| 3218 | + | |
| 3219 | + | |
| 3220 | + | |
| 3221 | + | |
| 3222 | + | |
| 3223 | + | |
| 3224 | + | |
| 3225 | + | |
| 3226 | + | |
| 3227 | + | |
| 3228 | + | |
| 3229 | + | |
| 3230 | + | |
| 3231 | + | |
| 3232 | + | |
| 3233 | + | |
| 3234 | + | |
| 3235 | + | |
| 3236 | + | |
| 3237 | + | |
| 3238 | + | |
| 3239 | + | |
| 3240 | + | |
| 3241 | + | |
| 3242 | + | |
| 3243 | + | |
| 3244 | + | |
| 3245 | + | |
| 3246 | + | |
| 3247 | + | |
| 3248 | + | |
| 3249 | + | |
| 3250 | + | |
| 3251 | + | |
| 3252 | + | |
| 3253 | + | |
| 3254 | + | |
| 3255 | + | |
| 3256 | + | |
| 3257 | + | |
3157 | 3258 | | |
3158 | 3259 | | |
3159 | 3260 | | |
| |||
3179 | 3280 | | |
3180 | 3281 | | |
3181 | 3282 | | |
3182 | | - | |
| 3283 | + | |
3183 | 3284 | | |
3184 | 3285 | | |
3185 | 3286 | | |
3186 | 3287 | | |
3187 | 3288 | | |
3188 | | - | |
3189 | | - | |
| 3289 | + | |
| 3290 | + | |
| 3291 | + | |
| 3292 | + | |
| 3293 | + | |
| 3294 | + | |
3190 | 3295 | | |
3191 | 3296 | | |
3192 | 3297 | | |
| |||
8678 | 8783 | | |
8679 | 8784 | | |
8680 | 8785 | | |
| 8786 | + | |
8681 | 8787 | | |
8682 | 8788 | | |
8683 | 8789 | | |
| |||
8725 | 8831 | | |
8726 | 8832 | | |
8727 | 8833 | | |
| 8834 | + | |
8728 | 8835 | | |
8729 | 8836 | | |
8730 | 8837 | | |
| |||
8739 | 8846 | | |
8740 | 8847 | | |
8741 | 8848 | | |
| 8849 | + | |
8742 | 8850 | | |
8743 | 8851 | | |
8744 | 8852 | | |
| |||
8760 | 8868 | | |
8761 | 8869 | | |
8762 | 8870 | | |
| 8871 | + | |
8763 | 8872 | | |
8764 | 8873 | | |
8765 | 8874 | | |
| |||
8787 | 8896 | | |
8788 | 8897 | | |
8789 | 8898 | | |
| 8899 | + | |
8790 | 8900 | | |
8791 | 8901 | | |
8792 | 8902 | | |
8793 | 8903 | | |
8794 | 8904 | | |
| 8905 | + | |
| 8906 | + | |
| 8907 | + | |
| 8908 | + | |
| 8909 | + | |
| 8910 | + | |
| 8911 | + | |
| 8912 | + | |
| 8913 | + | |
| 8914 | + | |
| 8915 | + | |
| 8916 | + | |
| 8917 | + | |
| 8918 | + | |
| 8919 | + | |
| 8920 | + | |
| 8921 | + | |
| 8922 | + | |
| 8923 | + | |
| 8924 | + | |
| 8925 | + | |
| 8926 | + | |
| 8927 | + | |
| 8928 | + | |
| 8929 | + | |
| 8930 | + | |
| 8931 | + | |
| 8932 | + | |
| 8933 | + | |
| 8934 | + | |
| 8935 | + | |
| 8936 | + | |
| 8937 | + | |
| 8938 | + | |
| 8939 | + | |
| 8940 | + | |
| 8941 | + | |
| 8942 | + | |
| 8943 | + | |
| 8944 | + | |
| 8945 | + | |
| 8946 | + | |
| 8947 | + | |
| 8948 | + | |
| 8949 | + | |
| 8950 | + | |
| 8951 | + | |
| 8952 | + | |
| 8953 | + | |
| 8954 | + | |
| 8955 | + | |
| 8956 | + | |
| 8957 | + | |
| 8958 | + | |
| 8959 | + | |
| 8960 | + | |
| 8961 | + | |
| 8962 | + | |
| 8963 | + | |
| 8964 | + | |
| 8965 | + | |
| 8966 | + | |
| 8967 | + | |
| 8968 | + | |
| 8969 | + | |
| 8970 | + | |
| 8971 | + | |
| 8972 | + | |
| 8973 | + | |
| 8974 | + | |
| 8975 | + | |
| 8976 | + | |
| 8977 | + | |
| 8978 | + | |
| 8979 | + | |
| 8980 | + | |
| 8981 | + | |
| 8982 | + | |
| 8983 | + | |
8795 | 8984 | | |
8796 | 8985 | | |
8797 | 8986 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
| 71 | + | |
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
| 55 | + | |
54 | 56 | | |
55 | 57 | | |
56 | 58 | | |
| |||
0 commit comments