Commit c925646
Validate auth entries before signing (#2530)
### What
The CLI currently relies on the RPC to check that no non-root auths are
included in simulation results. This PR adds an explicit, per-entry
validation step inside `sign_soroban_authorizations` that classifies
every `Address`-credential auth entry against the transaction's host
function before signing. Entries that don't match the host function
exactly require approval. This approval can be bypassed with a `--force`
flag.
Example output:
```
$ stellar contract invoke --source alice --id CA3WF5KPVE2TXQQSOEQPVD3J6GIZ7G74UA2H7BNQMHBQPOON6XV4PHT4 -- diff_auth_sub_auth --addr bob --val "Test" --subcall CAXDPLG2XWFA3LI3SUDG7AIQ7MF7ZJMFBEQYRGTZIGLT7OLZ243IU3FE
ℹ️ Simulating transaction…
1 parent 2f81472 commit c925646
16 files changed
Lines changed: 1386 additions & 24 deletions
File tree
- cmd
- crates/soroban-test
- src
- tests
- fixtures/test-wasms/auth
- src
- it
- integration
- soroban-cli/src
- commands/contract
- config
- log
- signer
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
| 281 | + | |
281 | 282 | | |
282 | 283 | | |
283 | 284 | | |
| |||
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
0 commit comments