-
Notifications
You must be signed in to change notification settings - Fork 383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Account Sessions System (Cookie-Like) #1499
Comments
@moul @dongwon8247 pls feedback |
demo_H.264.mp4We made a sample demo follow our solution. You can see in video, we made a smart contract, we can link with main account with session account. After that, the main account can authorize session accounts to perform actions on chain. |
@jaekwon Should we build a feature that is only an account session, or should we build a feature that is similar to account abstraction on ETH? gnolang/hackerspace#58 |
@moul @jaekwon @zivkovicmilos @Nhatran94 @AnhVAR Can Onbloc also work on this Account Session feature? I'm personally interested in what this will bring to the Web3 wallets in terms of UX, and this could be one of the unique features that Gno offers to the ecosystem. |
of course @dongwon8247 we would love to have you join us on this. |
The diagram below shows a rough flow of the Account Session that I have in mind. sequenceDiagram
participant User
participant Client
participant SessionAccount
participant PrimaryAccount
participant ACL
User->>Client: Login request
Client->>PrimaryAccount: User authentication request
PrimaryAccount->>Client: Authentication result returned
Client->>SessionAccount: SessionAccount creation request
SessionAccount->>PrimaryAccount: Permission delegation request
PrimaryAccount->>ACL: Permission verification request
ACL->>PrimaryAccount: Permission verification result returned
PrimaryAccount->>SessionAccount: Permission delegation approved
SessionAccount->>Client: SessionAccount creation completed
loop User request processing
User->>Client: Service request
Client->>SessionAccount: Signature request
SessionAccount->>PrimaryAccount: Signature permission verification request
PrimaryAccount->>ACL: Permission verification request
ACL->>PrimaryAccount: Permission verification result returned
PrimaryAccount->>SessionAccount: Signature permission verification result returned
alt Signature permission granted
SessionAccount->>PrimaryAccount: Signature request
PrimaryAccount->>PrimaryAccount: Signature processing
PrimaryAccount->>SessionAccount: Signature result returned
SessionAccount->>Client: Signature result returned
Client->>User: Service response
else Signature permission denied
SessionAccount->>Client: Signature permission denied error returned
Client->>User: Error response
end
end
User->>Client: Logout request
Client->>SessionAccount: Session termination request
SessionAccount->>PrimaryAccount: Permission revocation request
PrimaryAccount->>ACL: Permission revocation request
ACL->>PrimaryAccount: Permission revocation completed
PrimaryAccount->>SessionAccount: Permission revocation completed
SessionAccount->>Client: Session termination completed
It would be good to use ACL (Account Control List) to grant access permissions or assign arbitrary roles to certain groups or users and grant permissions based on those roles. [1] Expanding on this concept, we can allow the Primary Account (PA) to grant the Session Account (SA) the arbitrary to sign under certain conditions. With this apporach, the users can interact with dApps using the SA without directly accessing the PA. Using a DAO as an example, Tier1DAO can grant Tier2DAO the authority to sign within a certaiin amount, and Tier2DAO can grant Tier3DAO the authority to sign within an even smailler amount and so on. Furthermore, as much as this concept is used to enhance security, it is crucial to throughly separate them so that even if a lower-level session is attacked, it does not affect the root accounts (or, higher-level account). Moreover, to ensure the consistency, even when a session is used, the actual signing must occur in the PA. cc: @zivkovicmilos @dongwon8247 [1] I think we can use the |
Here are a few ideas I have regarding session accounts:
|
I never shared the previous workshop's results on GitHub. It may be challenging to understand without an explanation, but it includes several concepts to keep in mind. Things seem complex. Let's clarify major components and steps at a high level first, then focus on smaller details. Can someone propose something, or else we can resort to a workshop. I add to my to-do list to propose something if nobody else does first. |
Based on what @moul has drawn, I can imagine and want to improve by using SSO service to help users start sessions more conveniently instead of using QR codes. I propose the following. Please contribute further: We will build a deep account session system within the core blockchain. This system is designed in the direction of a Single Sign-On (SSO) service. The use of secondary accounts to access assets of the primary account will be determined by the validator (we will update Tendermint 2 for it). The Dapps must integrate SSO. This involves logging in by signing a message on the primary account. User Experience:
Permission scopes: To ensure the security of the primary wallet, Dapps will request scopes for each session. Users will review these scopes and sign off on them.
Session Expiration:
Consensus Modifications: It will be a new concept when one account can sign transactions for another account. We need to update Tendermint 2 to allow validators to accept those signatures. Additionally, information related to sessions will also be stored on the blockchain to provide Tendermint 2 with confirmation information. Security:
|
@moul What do you think above our team idea? |
@moul @dongwon8247 can we create a workshop to move it forward? cc @AnhVAR @jamesnguyentech |
A similar concept introduced by Starknet/Argent https://support.argent.xyz/hc/en-us/articles/19662145575325-v0-4-0-contract-upgrade-for-Argent-X |
We are preparing for an upcoming discussion on the session system that we want to develop in the account module of tm2.
Please note that the @gnolang/berty and VarMeta teams will be discussing this in the next few days. I will also provide more information here shortly.
Related with #1375
TODO(manfred): explain more this list:
The text was updated successfully, but these errors were encountered: