Skip to content

Add JWKS/OIDC metrics to home page with feature flag configuration - #40

Draft
JaredHatfield with Copilot wants to merge 3 commits into
mainfrom
copilot/add-jwks-oidc-metrics
Draft

Add JWKS/OIDC metrics to home page with feature flag configuration#40
JaredHatfield with Copilot wants to merge 3 commits into
mainfrom
copilot/add-jwks-oidc-metrics

Conversation

Copilot AI commented Feb 28, 2026

Copy link
Copy Markdown
Contributor

Adds aggregate statistics computed from jwks-observer key data to the home page, with a data/metrics.yaml config file for toggling each metric independently.

Metrics added

  • Catalog Overview — total services, OIDC vs JWKS-only
  • Key Status Overview — active vs inactive key counts
  • Algorithm Distribution — RS256, ES256, RSA-OAEP, etc.
  • Key Type Distribution — RSA, EC, OKP, oct
  • Key Length Distribution — bit-length breakdown
  • Key Usage Distribution — sig vs enc
  • Elliptic Curve Distribution — P-256, P-384, Ed25519, etc.
  • Key Rotation Statistics — rotated key count, avg/min/max lifetime in days

Configuration

data/metrics.yaml controls which sections render. If the file is missing, all metrics default to enabled.

metrics:
  catalog_overview: true
  key_type_distribution: true
  algorithm_distribution: true
  key_length_distribution: false  # disable this one
  # ...

Changes

  • data/metrics.yaml — new feature flag config
  • main.goMetricsConfig, CatalogMetrics, computeMetrics() to aggregate key data across all services; loadAllKeyRecords() for unlimited aggregation (vs the per-service display limit); home template now receives HomePageData with metrics
  • templates/home.html — conditional metric sections gated on config flags and observer data availability
  • assets/style.css.metrics-grid, .metric-box, .metrics-table with mobile responsive variants

Observer-dependent sections gracefully hide when JWKS_OBSERVER_PATH is unset. Catalog overview (service counts) always renders.

Screenshots

Catalog Overview & Key Status

Catalog Overview

Algorithm Distribution

Algorithm Distribution

Key Length Distribution

Key Length Distribution

Key Rotation Statistics

Key Rotation Statistics


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits February 28, 2026 23:35
Co-authored-by: JaredHatfield <208119+JaredHatfield@users.noreply.github.com>
…e, use boolean flag for min lifetime

Co-authored-by: JaredHatfield <208119+JaredHatfield@users.noreply.github.com>
Copilot AI changed the title [WIP] Add metrics for JWKS and OIDC endpoints with configuration Add JWKS/OIDC metrics to home page with feature flag configuration Feb 28, 2026
@JaredHatfield JaredHatfield moved this from Todo to In Progress in UnitVectorY Labs Apr 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants