Skip to content
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

Use IssuanceServices for signing and verifying data in agent_issuance #99

Closed
2 tasks
nanderstabel opened this issue Jul 29, 2024 · 0 comments · Fixed by #98
Closed
2 tasks

Use IssuanceServices for signing and verifying data in agent_issuance #99

nanderstabel opened this issue Jul 29, 2024 · 0 comments · Fixed by #98
Assignees
Labels
Enhancement New feature or improvement to an existing feature

Comments

@nanderstabel
Copy link
Collaborator

Description

At the moment this is how we implement Services related to 'issuer' functionality in several Aggregates command handlers in agent_issuance. The issuer variable can be used to sign and verify data.

               let issuer = {
                    let mut services = SecretManagerServices::new(None);
                    services.init().await.unwrap();
                    Arc::new(services.subject.unwrap())
                };

The downside of this method is that on every call of the command handler SecretManagerServices needs to be initialized again (which means a Stronghold file needs to be loaded which causes significant latency).

Instead, we need to implement a more efficient way of doing this by simply initializing the Stornghold file only once on startup of the UniCore instance, similar to how VerificationServices is implemented in agent_verification.

Motivation

Resolves significant amount of latency.

Resources

n/a

To-do List

  • Implement IssuanceServices
  • Remove unused code
@nanderstabel nanderstabel added the Enhancement New feature or improvement to an existing feature label Jul 29, 2024
@nanderstabel nanderstabel self-assigned this Jul 29, 2024
@nanderstabel nanderstabel linked a pull request Jul 29, 2024 that will close this issue
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or improvement to an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant