Skip to content

[RHIDP-12903] Remove Bearer From MCP HEADERS for Lightspeed - #2621

Merged
yangcao77 merged 3 commits into
redhat-developer:mainfrom
Jdubrick:lightspeed-mcp-fix-mar26
Mar 27, 2026
Merged

[RHIDP-12903] Remove Bearer From MCP HEADERS for Lightspeed#2621
yangcao77 merged 3 commits into
redhat-developer:mainfrom
Jdubrick:lightspeed-mcp-fix-mar26

Conversation

@Jdubrick

Copy link
Copy Markdown
Contributor

Hey, I just made a Pull Request!

  • Removes Bearer prefix from MCP headers on calls to Lightspeed Core as they do not want it there

https://redhat.atlassian.net/browse/RHIDP-12903

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or Updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)

@rhdh-gh-app

rhdh-gh-app Bot commented Mar 26, 2026

Copy link
Copy Markdown

Changed Packages

Package Name Package Path Changeset Bump Current Version
@red-hat-developer-hub/backstage-plugin-lightspeed-backend workspaces/lightspeed/plugins/lightspeed-backend patch v1.4.0

@rhdh-qodo-merge

Copy link
Copy Markdown

Review Summary by Qodo

Remove Bearer prefix from MCP authorization headers

🐞 Bug fix

Grey Divider

Walkthroughs

Description
• Removes Bearer prefix from MCP authorization headers
• Updates header format to send raw token instead
• Aligns with Lightspeed Core API requirements
• Includes test updates to reflect new header format
Diagram
flowchart LR
  A["MCP Header Configuration"] -->|Previously| B["Authorization: Bearer token"]
  A -->|Now| C["Authorization: token"]
  C --> D["Lightspeed Core API"]
Loading

Grey Divider

File Changes

1. workspaces/lightspeed/plugins/lightspeed-backend/src/service/router.ts 🐞 Bug fix +1/-1

Remove Bearer prefix from MCP headers

• Removes Bearer prefix from MCP authorization header construction
• Changes header format from Bearer ${token} to ${token}
• Affects MCP server configuration header generation

workspaces/lightspeed/plugins/lightspeed-backend/src/service/router.ts


2. workspaces/lightspeed/plugins/lightspeed-backend/src/service/router.test.ts 🧪 Tests +3/-3

Update MCP header tests for Bearer removal

• Updates test expectations to match new header format without Bearer
• Modifies three test cases to expect raw tokens instead of Bearer-prefixed tokens
• Ensures test coverage aligns with implementation changes

workspaces/lightspeed/plugins/lightspeed-backend/src/service/router.test.ts


3. workspaces/lightspeed/.changeset/rotten-papayas-add.md 📝 Documentation +5/-0

Add changeset for Bearer header removal

• Adds changeset documenting the Bearer removal change
• Marks as patch version bump for lightspeed-backend plugin
• Documents compliance with LCORE standard

workspaces/lightspeed/.changeset/rotten-papayas-add.md


Grey Divider

Qodo Logo

@rhdh-qodo-merge

rhdh-qodo-merge Bot commented Mar 26, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0) 📐 Spec deviations (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@Jdubrick
Jdubrick force-pushed the lightspeed-mcp-fix-mar26 branch from 00b8077 to 161b7da Compare March 26, 2026 21:29

@maysunfaisal maysunfaisal left a comment

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.

lgtm

Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
Signed-off-by: Jordan Dubrick <jdubrick@redhat.com>
@Jdubrick
Jdubrick force-pushed the lightspeed-mcp-fix-mar26 branch from 161b7da to 782db4d Compare March 27, 2026 13:40
@sonarqubecloud

Copy link
Copy Markdown

@yangcao77 yangcao77 left a comment

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.

lgtm as @maysunfaisal has approved this PR

@yangcao77
yangcao77 merged commit 7f44387 into redhat-developer:main Mar 27, 2026
10 checks passed
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.

3 participants