Skip to content

Conversation

kmruiz
Copy link
Collaborator

@kmruiz kmruiz commented Aug 25, 2025

This is necessary for clients that can use kerberos. It's registered as an optional dependency so clients that can't use kerberos because they don't have the required system dependencies can still use the MCP Server w/o kerberos support.

Proposed changes

Checklist

This is necessary for clients that can use kerberos. It's registered
as an optional dependency so clients that can't use kerberos because
they don't have the required system dependencies can still use the
MCP Server w/o kerberos support.
@Copilot Copilot AI review requested due to automatic review settings August 25, 2025 14:05
@kmruiz kmruiz requested a review from a team as a code owner August 25, 2025 14:05
@kmruiz kmruiz self-assigned this Aug 25, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds Kerberos authentication support to the MCP Server by including the kerberos package as an optional dependency. This allows clients with the necessary system dependencies to utilize Kerberos authentication while ensuring the server remains functional for clients without Kerberos support.

  • Adds kerberos as an optional dependency to enable authentication for compatible clients
  • Maintains backward compatibility for environments without Kerberos system dependencies

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

This test requires loading eventual consistent data, and sometimes
it returns undefined even if the connection was successful.
@kmruiz kmruiz changed the title chore: add dependency to kerberos chore: add dependency to kerberos MCP-89 Aug 25, 2025
Copy link
Collaborator

@nirinchev nirinchev left a comment

Choose a reason for hiding this comment

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

Is there anything we should do to handle the case where kerberos cannot be installed or will the error messages of trying to use kerberos auth bubble up nicely? If it works automagically, then let's 🚢 🇮🇹

@kmruiz
Copy link
Collaborator Author

kmruiz commented Aug 26, 2025

We already show a decent error message when we can't load kerberos :D that says that kerberos is not available and the system error (that comes from Kerberos itself): https://github.com/mongodb-js/mongosh/blob/main/packages/service-provider-node-driver/src/node-driver-service-provider.ts#L372C11-L374C14

@kmruiz kmruiz merged commit 55d9304 into main Aug 26, 2025
26 of 29 checks passed
@kmruiz kmruiz deleted the chore/mcp-89 branch August 26, 2025 11:47
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.

2 participants