Commit 893abf6
chenyangjun-xy
fix(gateway): separate auth check from device identity omission for auth-none
Separate two concerns that were conflated in callGatewayWithScopes:
1. **Shared-auth check** (hasLocalBackendSharedAuth): auth mode none satisfies
the local-backend shared-auth requirement → no error thrown
2. **Device identity omission** (omitDeviceIdentity): keep allowAuthNone in
shouldOmitDeviceIdentityForGatewayCall so auth-none triggers the existing
device-less self-pairing bypass (shouldSkipLocalBackendSelfPairing) on the
server side → device identity intentionally omitted, scopes preserved
The server-side shouldSkipLocalBackendSelfPairing returns true for auth
method none, which skips clearUnboundScopes and allows requested operator
scopes (including operator.write) to survive the handshake without requiring
paired-device checks. Keeping auth-none device-less preserves this contract.1 parent f876955 commit 893abf6
2 files changed
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
923 | 923 | | |
924 | 924 | | |
925 | 925 | | |
926 | | - | |
| 926 | + | |
927 | 927 | | |
928 | 928 | | |
929 | 929 | | |
| |||
940 | 940 | | |
941 | 941 | | |
942 | 942 | | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
943 | 946 | | |
944 | 947 | | |
945 | 948 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1153 | 1153 | | |
1154 | 1154 | | |
1155 | 1155 | | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
1156 | 1161 | | |
1157 | 1162 | | |
1158 | 1163 | | |
| 1164 | + | |
1159 | 1165 | | |
1160 | 1166 | | |
1161 | 1167 | | |
1162 | 1168 | | |
1163 | 1169 | | |
1164 | 1170 | | |
1165 | 1171 | | |
1166 | | - | |
| 1172 | + | |
1167 | 1173 | | |
1168 | 1174 | | |
1169 | 1175 | | |
| |||
0 commit comments