-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request juju#17354 from ycliuhw/implement-secret-rotated
juju#17354 This PR implements a secret rotated service and state methods to ensure the next rotation time for the provided secret stored in the Dqlite database. Driveby: 1. fixed the missing next rotation time update in SecretUpdate call. 2. add UNIQUE INDEX for secret_backend_type.type. 3. align fields for secrets DDL. ## Checklist - [x] Code style: imports ordered, good names, simple structure, etc - [x] Comments saying why design decisions were made - [x] Go unit tests, with comments saying what you're testing - [ ] ~[Integration tests](https://github.com/juju/juju/tree/main/tests), with comments saying what you're testing~ - [ ] ~[doc.go](https://discourse.charmhub.io/t/readme-in-packages/451) added or updated in changed packages~ ## QA steps Because the WatchSecretsRotationChanges watcher has not been implemented yet, we can only test the rotation policy changes. ``` juju exec --unit dummy-source/0 "secret-add data=foo" secret://2bfad23f-a54d-48ed-87ec-e2776e2ea0b4/cotiv4uc5e02l6npsdm0 juju exec --unit dummy-source/0 "secret-set cotiv4uc5e02l6npsdm0 --rotate hourly" ``` ``` dqlite> select prdesc from secret_rotation cotiv4uc5e02l6npsdm0|2024-05-08 07:57:02.922271014 +0000 UTC dqlite> select srp.policy from secret_metadata sm inner join secret_rotate_policy srp on sm.rotate_policy_id = srp.id hourly ``` ## Documentation changes No ## Links **Jira card:** JUJU-5897
- Loading branch information
Showing
9 changed files
with
667 additions
and
190 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.