Skip to content

Commit

Permalink
oci_key_manager: Add DeleteKey() functionality
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Colp <[email protected]>
  • Loading branch information
pjcolp committed Oct 25, 2024
1 parent 93bc23f commit 0bed7c7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions keymanager/oci_key_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ func (om *OCIManager) CreateKey(keyRequest *model.KeyRequest) (*model.KeyAttribu
}

func (om *OCIManager) DeleteKey(keyAttributes *model.KeyAttributes) error {
err := om.client.DeleteKey(keyAttributes.OciSecretId)
if err != nil {
log.Errorf("Error while deleting key: %s", err.Error())
return err
}

log.Infof("OCI: Deleting key: algorithm = %q; secret id = %q", keyAttributes.Algorithm, keyAttributes.OciSecretId)

return nil
}

Expand Down

0 comments on commit 0bed7c7

Please sign in to comment.