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

coordinator: remove obsolete GetRecoveryData #788

Merged
merged 1 commit into from
Jan 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions coordinator/clientapi/clientapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -638,13 +638,6 @@ func (a *ClientAPI) UpdateManifest(ctx context.Context, rawUpdateManifest []byte
return fmt.Errorf("regenerating shared secrets for updated manifest: %w", err)
}

// Retrieve current recovery data before we seal the state again
currentRecoveryData, err := a.recovery.GetRecoveryData()
if err != nil {
a.log.Error("Could not retrieve the current recovery data from the recovery module. Cannot reseal the state, the update manifest will not be applied.")
return fmt.Errorf("retrieving current recovery data: %w", err)
}

a.updateLog.Reset()
for pkgName, pkg := range updateManifest.Packages {
a.updateLog.Info("SecurityVersion increased", zap.String("user", updater.Name()), zap.String("package", pkgName), zap.Uint("new version", *pkg.SecurityVersion))
Expand Down Expand Up @@ -679,7 +672,6 @@ func (a *ClientAPI) UpdateManifest(ctx context.Context, rawUpdateManifest []byte
a.log.Info("An update manifest overriding package settings from the original manifest was set.")
a.log.Info("Please restart your Marbles to enforce the update.")

a.txHandle.SetRecoveryData(currentRecoveryData)
if err := commit(ctx); err != nil {
return fmt.Errorf("updating manifest failed: committing store transaction: %w", err)
}
Expand Down
1 change: 0 additions & 1 deletion coordinator/recovery/recovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ type Recovery interface {
GenerateEncryptionKey(recoveryKeys map[string]string) ([]byte, error)
GenerateRecoveryData(recoveryKeys map[string]string) (map[string][]byte, []byte, error)
RecoverKey(secret []byte) (int, []byte, error)
GetRecoveryData() ([]byte, error)
SetRecoveryData(data []byte) error
}

Expand Down
5 changes: 0 additions & 5 deletions coordinator/recovery/single.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,6 @@ func (r *SinglePartyRecovery) RecoverKey(secret []byte) (int, []byte, error) {
return 0, secret, nil
}

// GetRecoveryData returns the current recovery hash map. Given that we do not need to store any additional data in the state for Single Party Recovery, it does nothing here.
func (r *SinglePartyRecovery) GetRecoveryData() ([]byte, error) {
return nil, nil
}

// SetRecoveryData sets the recovery hash map retrieved from the sealer on (failed) decryption. Given that we do not need to store any additional data in the state for Single Party Recovery, it does nothing here.
func (r *SinglePartyRecovery) SetRecoveryData(_ []byte) error {
return nil
Expand Down
Loading