Skip to content

Normalize IDs to lowercase before querying OpenSearch#17

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/normalize-ids-to-lowercase
Draft

Normalize IDs to lowercase before querying OpenSearch#17
Copilot wants to merge 2 commits intomainfrom
copilot/normalize-ids-to-lowercase

Conversation

Copy link
Contributor

Copilot AI commented Feb 12, 2026

OpenSearch queries were case-sensitive for client_id, provider_id, and consortium_id parameters, causing queries with differently-cased IDs to return incorrect results.

Changes

  • Applied strings.ToLower() to all ID parameters in BuildBaseQuery() before adding them as OpenSearch term filters
// Before
filters = append(filters, osquery.Term("client.id", clientId))

// After  
filters = append(filters, osquery.Term("client.id", strings.ToLower(clientId)))

This ensures case-insensitive ID matching: ?client_id=ABC123 and ?client_id=abc123 now produce identical queries.

Original prompt

This section details on the original issue you should resolve

<issue_title>IDs should be normalized to lowercase before querying OpenSearch</issue_title>
<issue_description></issue_description>

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


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

Copilot AI changed the title [WIP] Normalize IDs to lowercase before querying OpenSearch Normalize IDs to lowercase before querying OpenSearch Feb 12, 2026
Copilot AI requested a review from bklaing2 February 12, 2026 22:21
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.

IDs should be normalized to lowercase before querying OpenSearch

2 participants