-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial Auth Next implementation in Soroban Host (#645)
* Update the common environment interface. - Remove functions that are not anticipated to be used/useful with Auth Next (mostly account-related functions, as well as some unimplemented helpers) - Add `require_auth` function that is the entry point to Auth Next. * Added support for `ScAddress`/`NonceKey` objects and removed support for `AccountId` as host object. * Implementation of `AuthorizationManager` and supporting functions. This is the core of the Auth Next implementation. `AuthorizationManager` allows enforcing the authorization requirements or recording them, as well as performs authentication when needed, keeps track of the call stacks etc. Also added the built-in account 'contract' that handles authentication for the classic accounts. This is a contract just conceptually, it doesn't mean to support the actual contract interface. * Host support for Auth Next. - Added `require_auth` function and functions to support the recording mode and testing - Updated the public env interface according to the common env changes. - Removed network_passphrase in order to be more consistent with Core and remove some confusion around which one should be used * Updated built-in token interface & implementation to be compatible with Auth Next. * Token test utils and test updates. Currently this provides most of the coverage for Auth Next in Host. Testing this is quite tricky. As a followup and after the respective SDK updates we should add more tests that use non-built-in contracts with various deep invocation trees, multiple accounts etc. * Test updates for replacing network passphrase with id. * Added a simple account contract and updated the tests contracts/Wasm files. * [removeme] Temporarily point at the XDR branch in order to make core buildable. * Update XDR version. * !fixup Condition vm-only test on vm presence. * !fixup Recording auth fixes. * !fixup Update env version and fix warnings. * !fixup MeteredClone cleanup * !fixup Typo fix * !fixup Removed unreachable code. * !fixup Cleanup rollback/reset logic - Store recording mode tracker pointers in rollback snapshots - In tests, reset the whole `AuthorizationManager` instead of relying on cleaning up/storing individual fields * ! fixup Create new recording trackers for the new trees.
- Loading branch information
Showing
56 changed files
with
3,184 additions
and
2,686 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.