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

Fix changing state of keys and key items to respect key state model #420

Closed
lubomirw opened this issue May 17, 2023 · 0 comments · Fixed by #428
Closed

Fix changing state of keys and key items to respect key state model #420

lubomirw opened this issue May 17, 2023 · 0 comments · Fixed by #428
Labels
bug Something isn't working

Comments

@lubomirw
Copy link
Contributor

lubomirw commented May 17, 2023

Changing key state should respect key state model which is not working now. For example, it is possible to destroy private key (key item) and then use operation compromise (key) to set private key back to compromise state since that operation is applied without check on all items

  • check if key state change is valid when making it on key (key item), applied to all key items. Such an operation should be applied only to key items where it is valid state transition
  • same is valid for enable/disable operation on whole key. Now it throws exception if you try to enable key and one of key items is already enabled
  • check if key state change behave correctly also for bulk operations
  • consolidate messages in event history for changing key state: Key is already DESTROYED and Key is already destroyed. Label of KeyState enum can be used.
  • rename KeyState enum COMPROMISED_DESTROYED to DESTROYED_COMPROMISED (also label and code)
  • add check before cryptographic operations in CryptographicOperationService if key used is enabled and in state Active
@lubomirw lubomirw converted this from a draft issue May 17, 2023
@lubomirw lubomirw added the bug Something isn't working label May 17, 2023
@dmaixner-moro dmaixner-moro moved this from Todo to In Progress in CZERTAINLY May 17, 2023
dmaixner-moro added a commit to dmaixner-moro/CZERTAINLY-Core that referenced this issue May 19, 2023
@dmaixner-moro dmaixner-moro moved this from In Progress to Review in CZERTAINLY May 22, 2023
@github-project-automation github-project-automation bot moved this from Review to Done in CZERTAINLY May 23, 2023
@3keyroman 3keyroman moved this to Done in CZERTAINLY Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant