Skip to content

KMS-653: Add a client-id to all KMS calls#1465

Merged
htranho merged 7 commits intomainfrom
KMS-653
Mar 19, 2026
Merged

KMS-653: Add a client-id to all KMS calls#1465
htranho merged 7 commits intomainfrom
KMS-653

Conversation

@htranho
Copy link
Copy Markdown
Contributor

@htranho htranho commented Mar 10, 2026

Overview

What is the feature?

Add a client-id to all KMS calls

What is the Solution?

Add a client-id in headers to all KMS call

What areas of the application does this impact?

KeywordManager calls to KMS to fetch, update, insert and delete keywords. Also publish a new keyword version.

Testing

Request headers to kms should have as 'client-id' 'mmt-keyword-manager-$env'

Attachments

N/A

Checklist

  • I have added automated tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.15%. Comparing base (c681ac5) to head (07256b7).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1465   +/-   ##
=======================================
  Coverage   98.15%   98.15%           
=======================================
  Files         437      438    +1     
  Lines        7201     7204    +3     
  Branches     1544     1545    +1     
=======================================
+ Hits         7068     7071    +3     
  Misses        132      132           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread static.config.json Outdated
"edscHost": "https://search.sit.earthdata.nasa.gov",
"kmsHost": "https://cmr.sit.earthdata.nasa.gov/kms",
"kmsHost": "/see-vite-config-proxy",
"kmKmsClientID": "mmt-keyword-manager-development",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe keywordManagerClientId for the name?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, updated

Comment thread static.config.json
"mmtHost": "http://localhost:5173",
"edscHost": "https://search.sit.earthdata.nasa.gov",
"kmsHost": "https://cmr.sit.earthdata.nasa.gov/kms",
"kmsHost": "/see-vite-config-proxy",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kind of confused about this. Why do we need the proxy to pass the extra header?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The extra header, somehow, trigger CORS, so the proxy needed for local dev. In other env, 'kmsHost' is overwritten by the bamboo deployment script.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue came up as I test client-id on my local MMT pointing to cmr.sit.

@htranho htranho merged commit e0de526 into main Mar 19, 2026
6 of 7 checks passed
@htranho htranho deleted the KMS-653 branch March 19, 2026 16:13
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.

4 participants