Skip to content

Frontend: Add rotation alert banner to secret details page

What does this MR do and why?

This MR is a follow-up to !207183 (merged) adding two more small additional details that were missing from it:

  • Adds the rotation alert to the secret details page, when the secret rotation status is either APPROACHING or OVERDUE
  • Adds some form input validation for the rotation interval in the secrets form

References

#555422 (closed)

Screenshots or screen recordings

BANNER FOR SECRET DETAILS PAGE:

image

image

FORM VALIDATION:

image

How to set up and validate locally

Setup

  1. Make sure your gdk is on an Ultimate license.
  2. Set up openbao on your gdk.
  3. Enable the Secrets Manager on gdk.

Verification

  1. Visit /path/to/project/-/secrets (or go to your project and from the sidebar visit Secure > Secrets)
  2. 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.
  3. 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.

Note: In order for the rotation reminder banner to appear you will need to be within the rotation window, since the minimum interval that can be set is 7 days you would need to move your system clock forward a day to be in it. Alternatively you can hardcode the secret data in secret_details_wrapper.vue

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Relates to #555422 (closed)

Edited by Ahmad Hussein

Merge request reports

Loading