Skip to content

Add currentRole to Health Summary Report at /health#3158

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/add-current-role-to-health-summary
Draft

Add currentRole to Health Summary Report at /health#3158
Copilot wants to merge 2 commits intomainfrom
copilot/add-current-role-to-health-summary

Conversation

Copy link
Contributor

Copilot AI commented Feb 24, 2026

Why make this change?

Adds currentRole to the /health endpoint response header to surface the effective role of the requesting user, enabling easier authentication testing without needing external tooling to inspect request headers.

What is this change?

  • ComprehensiveHealthCheckReport: New currentRole string property (JSON: "currentRole") inserted after timestamp in the report header.
  • HealthCheckHelper.GetHealthCheckResponseAsync: Sets CurrentRole from the already-stored _incomingRoleHeader; falls back to "anonymous" when no role header is present.

Example response shape:

{
  "status": "Healthy",
  "version": "1.x.x",
  "app-name": "dab_oss_1.x.x",
  "timestamp": "2026-02-24T22:28:30Z",
  "currentRole": "anonymous",
  "configuration": { ... },
  "checks": [ ... ]
}

How was this tested?

  • Integration Tests
  • Unit Tests

Sample Request(s)

GET /health
X-MS-API-ROLE: authenticated

Response will include "currentRole": "authenticated" in the header section of the report. Omitting the header yields "currentRole": "anonymous".

Original prompt

This section details on the original issue you should resolve

<issue_title>[Enh]: Add to Health Summary</issue_title>
<issue_description>## What?

  1. Add to the header part of the Health Summary Report returned at /health a scalar property "currentRole" which returns the current role "anonymous", "authenticated", etc.

Why?

To help with authentication testing.</issue_description>

<agent_instructions>with as little new code as possible</agent_instructions>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: JerryNixon <1749983+JerryNixon@users.noreply.github.com>
Copilot AI changed the title [WIP] Add currentRole property to health summary report Add currentRole to Health Summary Report at /health Feb 24, 2026
Copilot AI requested a review from JerryNixon February 24, 2026 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Enh]: Add to Health Summary

2 participants