-
Notifications
You must be signed in to change notification settings - Fork 27
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
Implement gRPC Sessions #1082
Merged
Merged
Implement gRPC Sessions #1082
Conversation
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
feat: Improve script formatting in Dockerfile style: Fix indentation in README.md refactor: Remove unused htmx package in middleware style: Remove unused daiad.go package
Refactored the actor package to enhance the signature functionality. Added new types for requests and responses and refactored the controllerActor. Removed unnecessary code from validator and actor files. Implemented new sign protocol in the controllerActor for message processing.
…efactor context related functions Add context parameter to the NewCredentialClaims function in the credentials.go file to handle context-related operations efficiently. Refactor context-related functions in the local package for better organization and clarity.
Added github.com/asynkron/protoactor-go as a direct dependency and removed it as an indirect dependency.
Removed unused package "addr" and removed redundant newline in encrypt.go file.
…sion type Introduced `authorizedSession` type to extend the existing `session` type and added a new `Session` interface with methods for authentication and validation.
Renamed functions in the local package to `SetLocalChainID` and `SetLocalValidatorAddress` for clarity and consistency. Removed unused variables and functions related to cache setup.
…rizedSession instead of session to provide more information.
The changes in this commit make it possible to fetch the public key directly from the SecretKey struct, without requiring an external curve object. This simplifies the API and makes the code more self-contained.
The changes remove the `controller` package from the codebase. The `controller` package was previously used to handle the signing and refreshing of the keyshares, but this functionality has now been moved directly into the `vault` package. The removal of the `controller` package simplifies the codebase and eliminates the need for a separate controller component.
This commit introduces the `Generate` function to create a new vault with generated credentials. The vault now includes a `credentials` field of type `props.Credentials` to store the generated credentials. Additionally, the `wallet` field has been moved to be a member of the `vault` struct.
The changes in this commit move the credential management functionality from the `props` package to a new `auth` package. This is done to better separate concerns and make the codebase more modular. The key changes are: - Moved the `Credentials` struct and related methods from `pkg/vault/props/creds.go` to `pkg/vault/auth/creds.go`. - Updated the `vault` package to use the new `auth.NewCredentials()` method instead of `props.NewCredentials()`. - Removed the `pkg/auth/credential.go` file as its contents have been integrated into the new `auth` package. This change will improve the maintainability and testability of the credential management functionality in the Vault.
The changes in this commit improve the way sessions are retrieved from the cache. The `GetSession` function has been moved to the `SonrContext` struct, and it now uses the session ID from the context to fetch the session from the cache. This change makes the session retrieval more explicit and tied to the context, improving the overall code organization and readability.
Creates a new wallet instance using the provided keyshares and a new file system instance using the first wallet account address. This allows the vault to manage the user's credentials, properties, and secure file storage.
The changes in this commit add error handling to the `LinkCredential` function in the `Credentials` struct. Specifically: - If the `origin` parameter is an empty string, the function will return an error. - The function will now return an error in addition to modifying the `Credentials` map. This ensures that calling code can properly handle errors when trying to link a new credential.
…nd properties Create vaultFS struct in fs.go to encapsulate Wallet, Credentials, and Properties. Update vault struct in vault.go to use vaultFS instead of individual fields.
feat: Implement GetInfoFile and ToFileMap methods in vaultFS feat: Add AddFileMap method to virtual file system fix: Update vault struct initialization in Generate function feat: Add NewFSWithKss method to create VFS with kss keys feat: Update VFS interface to include AddFileMap method
feat: Add Register Options for WebAuthn authentication feat: Add EncryptedSet interface for keyshare set
This commit adds the ability to encrypt keyshares using a password in the keyshares struct and encryptedSet struct.
…ndle in kss and set files
Update the vaultFS struct fields and methods to use auth package. Add necessary imports and update the GetInfoFile method.
Update the Cache struct to include Set and Get methods for adding and retrieving values from the cache using string-constrained keys.
This commit introduces two new structs: `CredentialClaims` and `Account`. The `CredentialClaims` struct represents the claims for a credential, including registered claims and a list of credential descriptors. The `NewCredentialClaims` function returns a new instance of `CredentialClaims` with some default values set. The `Account` struct represents a wallet account, containing the address, public key, index, and coin type. The `NewAccount` function creates a new `Account` instance from a public key, coin, and index. Additionally, the `Wallet` struct has been updated to use the `Account` struct instead of the `chain.Account` struct. The `Credentials` and `Properties` fields have been removed, as they were not used in the provided code.
…rpcHeaders Update the metadata keys to use constants instead of literal strings in the fetchSessionPeerID, fetchSessionUserAddress, and refreshGrpcHeaders functions.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issues Closed: