Frontend: Secret Rotation UI for Indicators and Alerts
Why are we doing this work
Users should be able to see a handy list of all secrets that whose rotation interval is about the pass (within 7 days). To remind the user, the UI will be updated with the following:
- Add a reminder alert in the index page with a list of secrets that need manual rotation soon (this will also be used for expiration reminders in the future)
- In the secrets table, the row including secrets that need manual rotation will also have a warning icon with a tooltip
- In the secret details page, add a reminder alert if rotation date is within 7 days
Implementation plan
-
Create new query to fetch the list of secrets that need to be manually rotated soon -
Render alert that lists these secrets -
Add warning icon and tooltip in the secrets table -
Update secret details page with reminder alert
Implementation Table
Verification steps
Setup
- Make sure your gdk is on an Ultimate license.
- Set up openbao on your gdk.
- Enable the Secrets Manager on gdk.
Verification
- Visit
/path/to/project/-/secrets(or go to your project and from the sidebar visit Secure > Secrets) - If there are no secrets whose rotation reminders are within 7 days, you can create a new secret by clicking the Add secret button on the top right. You can also edit an existing secret through the actions column.
- After creating/updating a secret, you will be redirected to the secret details page. If the rotation interval is within 7 days, the reminder alert should show up.
- Go to the index page for the Secrets manager and verify that the reminder alert includes the list of secrets that need to be rotated soon. In the table, the row including these secrets will also have a warning icon with a tooltip.
Edited by Mireya Andres