fix(infra): add ChatApiAgentIdentityId to Reporting.Api params#301
Merged
willvelida merged 2 commits intomainfrom Apr 19, 2026
Merged
fix(infra): add ChatApiAgentIdentityId to Reporting.Api params#301willvelida merged 2 commits intomainfrom
willvelida merged 2 commits intomainfrom
Conversation
- Set chatApiAgentIdentityId in dev bicepparam to restore Chat.Api authorization Signed-off-by: Will Velida <willvelida@hotmail.co.uk> agent: github-copilot model: Claude Opus 4.6 contribution: code-generation
|
You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool. What Enabling Code Scanning Means:
For more information about GitHub Code Scanning, check out the documentation. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR restores Chat.Api → Reporting.Api agent-to-agent authentication by ensuring the Reporting.Api dev deployment provisions the missing Biotrackr:ChatApiAgentIdentityId App Configuration value (used for azp claim validation).
Changes:
- Add
chatApiAgentIdentityIdtoinfra/apps/reporting-api/main.dev.bicepparamwith the dev Chat.Api agent identity GUID.
- Change claude-sonnet-4-6 to claude-sonnet-4.6 to match Copilot CLI naming Signed-off-by: Will Velida <willvelida@hotmail.co.uk> agent: github-copilot model: Claude Opus 4.6 contribution: code-generation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add the missing
chatApiAgentIdentityIdparameter to the Reporting.Api dev Bicep params file. This restores Chat.Api's ability to authenticate with Reporting.Api for report generation.Root Cause
PR #274 extended the Reporting.Api authorization policy to accept multiple agent identity callers via
azpclaim validation. ThechatApiAgentIdentityIdBicep parameter defaults to'', and the App Configuration keyBiotrackr:ChatApiAgentIdentityIdwas never provisioned via IaC. Without this key, the authorization policy rejects Chat.Api requests with 403 Forbidden — the JWT is valid but theazpclaim doesn't match any configured caller ID.Evidence
POST /api/reports/generate→ 403 ForbiddenBiotrackr:ChatApiAgentIdentityIdconfirmed missing from Azure App ConfigurationBiotrackr:ReportingSvcAgentIdentityIdwas set (from PR feat(reporting-svc): add scheduled health summary service #276), so the policy only accepted Reporting.SvcChanges
Modified
infra/apps/reporting-api/main.dev.bicepparam— Addedparam chatApiAgentIdentityId = '707307f7-ffc4-4744-a66b-19fa942c1c10'Validation
main.bicep(line 50)chatApiAgentIdentityIdis not empty