Skip to content

FRD-070: Secret Rotation Reminder Widget

FieldValue
OwnerDavid Holmes
StatusDraft
Last Updated2026-05-26
RelatedADR-027 (Default Tech Stack)
Target Releasev2.0.0 (P2)
T-Shirt SizeS
TypeWidget

Document Summary

A compact widget displaying secrets approaching their rotation deadline. Shows secret name, store, days until due, and an “Initiate rotation” CTA. Complements the existing SecretsStatusPanel which shows sync status rather than rotation lifecycle.


Introduction

Overview

Secret rotation is a critical security practice. Teams need visibility into which secrets are approaching or past their rotation deadlines. The existing SecretsStatusPanel shows sync status (synced, failed, refreshing) but not rotation lifecycle. This widget fills that gap by surfacing rotation-due secrets with urgency indicators and an action to initiate rotation.

Goals

  • Display secrets approaching rotation deadline in a compact list.
  • Show secret name, secret store, days until due, and urgency level.
  • Provide an “Initiate rotation” CTA per secret.
  • Color-code urgency: overdue (red), due soon (yellow), healthy (green).
  • Ship Storybook stories covering urgency states.

Non-Goals

  • Secret rotation execution (consumer handles via callback).
  • Secret value display or management.
  • Rotation policy configuration.
  • Integration with specific secret managers (Vault, AWS Secrets Manager, etc.).

Scope

In Scope

ItemDescription
SecretRotationReminder componentList of secrets with rotation status and CTA
Urgency indicatorsColor-coded badges: overdue, due-soon, healthy
Rotation CTA”Initiate rotation” button per secret; calls onInitiateRotation
Summary headerCount of overdue and due-soon secrets
Storybook storiesAllHealthy, DueSoon, Overdue, Mixed, Empty, Loading

Out of Scope

ItemRationale
Rotation executionConsumer triggers rotation via callback
Secret value displaySecurity concern; not shown in this widget
Policy managementAdmin configuration; separate UI
Secret store integrationConsumer normalizes data from their secret manager

Users and Pain Points

UserPain Point
SRE/security teamsNo dashboard-level visibility into rotation deadlines
DevOps engineersSecrets expire without warning, causing outages
Compliance officersCannot easily prove rotation policy adherence

Definitions

TermDefinition
Secret rotationThe practice of periodically replacing secret values (keys, tokens, passwords)
Rotation deadlineThe date by which a secret must be rotated per policy
Days until dueThe number of days remaining before the rotation deadline
Secret storeThe system storing the secret (e.g., Vault, AWS Secrets Manager, K8s Secret)

Current State

secrets-status-panel.tsx shows secrets with their sync status (synced, failed, refreshing, unknown) and last-synced timestamps. It includes a SecretEntry type with expiresAt field but does not calculate or display days until rotation. No rotation-specific urgency indicators or rotation CTAs exist.


Proposed Solution

Create a SecretRotationReminder widget at src/components/widgets/sre-devops/secret-rotation-reminder.tsx that:

  1. Accepts an array of RotationSecret objects with name, store, and rotation deadline.
  2. Calculates days until due from the deadline date.
  3. Color-codes each entry: overdue (past deadline), due-soon (within configurable threshold), healthy.
  4. Renders an “Initiate rotation” button per entry that calls onInitiateRotation(secretName).
  5. Shows a summary header with overdue and due-soon counts.

Requirements

The widget must calculate urgency from deadline dates at render time. The “due soon” threshold must be configurable. The widget must not store or display secret values.


Functional Requirements

IDRequirementPriority
FR-01Render a list of secrets with name, store, and days until rotation deadlineMust
FR-02Color-code entries: overdue (destructive), due-soon (warning), healthy (success)Must
FR-03Display a badge with urgency label (“Overdue”, “Due in X days”, “Healthy”)Must
FR-04Render “Initiate rotation” button per entryMust
FR-05Call onInitiateRotation(secretName, secretStore) when CTA is clickedMust
FR-06Show summary header with counts (e.g., “2 overdue, 3 due soon”)Should
FR-07Configurable “due soon” threshold via dueSoonDays prop (default 30)Should
FR-08Sort entries by urgency (overdue first, then due-soon, then healthy)Should
FR-09Show empty state when no secrets are providedMust
FR-10Support a loading prop with skeleton entriesShould

Non-Functional Requirements

IDRequirement
NFR-01Bundle size under 2 KB gzipped
NFR-02Full light/dark theme support
NFR-03Renders 50 secrets without perceptible lag

API / Interface Requirements

interface RotationSecret {
name: string;
secretStore: string;
rotationDeadline: string; // ISO 8601 date
lastRotatedAt?: string; // ISO 8601 date
owner?: string;
}
interface SecretRotationReminderProps {
secrets: RotationSecret[];
dueSoonDays?: number; // default 30
loading?: boolean;
emptyMessage?: string; // default "All secrets are within rotation policy"
onInitiateRotation?: (secretName: string, secretStore: string) => void;
className?: string;
}

Accessibility Requirements

IDRequirement
A11Y-01Secret list uses <ul> with descriptive aria-label
A11Y-02Urgency badges have accessible text (not just color)
A11Y-03”Initiate rotation” buttons have aria-label including secret name
A11Y-04Summary header is announced via role="status"
A11Y-05Overdue entries are conveyed to screen readers with urgency

Content and Documentation Requirements

  • Storybook doc page explaining rotation concepts and relationship to SecretsStatusPanel.
  • Stories: AllHealthy, DueSoon, Overdue, Mixed, Empty, Loading.
  • JSDoc on all exported types.

Dependencies

DependencyTypeNotes
BadgeInternalUrgency indicators
ButtonInternalRotation CTA
SecretEntry type referenceInternalAlignment with secrets-status-panel.tsx naming

Risks and Tradeoffs

RiskImpactMitigation
Timezone differences in deadline calculationWrong urgency classificationUse UTC for all date calculations; document timezone expectations
Stale data if not refreshedUsers see outdated deadlinesDocument that consumer should refresh data regularly
Rotation CTA without confirmationAccidental rotation triggersRecommend consumer adds a confirmation dialog before executing

Open Questions

  1. Should the widget support grouping by secret store?
  2. Do we need a “Snooze” option per secret to temporarily dismiss a reminder?
  3. Should there be a link to the SecretsStatusPanel for sync status context?

Acceptance Criteria

  • Secrets render with name, store, and days-until-due.
  • Urgency badges display correct colors and labels.
  • “Initiate rotation” button calls onInitiateRotation with correct arguments.
  • Summary header shows overdue and due-soon counts.
  • Entries are sorted by urgency.
  • Empty and loading states render correctly.
  • All Storybook stories render without errors.
  • Passes axe accessibility audit with zero violations.
  • Unit tests cover urgency calculation, sorting, CTA callback, and empty state.

LLM Handoff Instructions

When implementing this FRD:

  1. Create src/components/widgets/sre-devops/secret-rotation-reminder.tsx.
  2. Calculate days-until-due using Date arithmetic in UTC.
  3. Urgency thresholds: overdue = days < 0, due-soon = days <= dueSoonDays, healthy = days > dueSoonDays.
  4. Reference secrets-status-panel.tsx for styling conventions and badge patterns.
  5. Create src/components/widgets/sre-devops/secret-rotation-reminder.stories.tsx.
  6. Create src/components/widgets/sre-devops/secret-rotation-reminder.test.tsx.
  7. Sort: overdue first (most overdue at top), then due-soon (fewest days first), then healthy.

Decision Log

DateDecisionRationale
2026-05-26Separate from SecretsStatusPanelDifferent concerns: sync status vs. rotation lifecycle
2026-05-26Deadline-based calculation, not policy-basedSimpler API; consumer pre-calculates deadline from their rotation policy

Document History

DateVersionAuthorChanges
2026-05-260.1David HolmesInitial draft