Skip to content

[BUG][AUTH]: One time auth restricts multiple gateways with same URL #1448

@kevalmahajan

Description

@kevalmahajan

🐞 Bug Summary

When using one-time authentication, the system restricts adding multiple gateways that share the same URL. This happens because the duplicate-gateway detection logic compares URL and credentials, but with one-time auth enabled, credentials are not stored (set to None).
As a result, gateways with the same URL and no stored credentials appear as duplicates, even though they should be allowed.

This behavior is intended/implemented for open MCP servers with no auth, but not when one-time auth is intentionally used.


🧩 Affected Component

Select the area of the project impacted:

  • mcpgateway - API
  • mcpgateway - UI (admin panel)
  • mcpgateway.wrapper - stdio wrapper
  • Federation or Transports
  • CLI, Makefiles, or shell scripts
  • Container setup (Docker/Podman/Compose)
  • Other (explain below)

🔁 Steps to Reproduce

  1. Add a Server with One time Authentication enabled.
  2. Try to add the second server with same url but may have different tools as different authentication is provided with One time Authentication enabled.
  3. The second server will not be registered as we will get a duplicate gateway found error.

🤔 Expected Behavior

When one-time auth is enabled:

  • Skip duplicate-gateway checks that compare URL + credentials.
  • Only enforce duplicate name checks.
  • Allow multiple gateways pointing to the same URL (each prompting for one-time auth).

When one-time auth is disabled:

  • Perform the existing full duplicate gateway check (URL + credentials).

🧠 Environment Info

You can retrieve most of this from the /version endpoint.

Key Value
Version or commit e.g. v0.9.0 or main@a1b2c3d
Runtime e.g. Python 3.11, Gunicorn
Platform / OS e.g. Ubuntu 22.04, macOS
Container e.g. Docker, Podman, none

🧩 Additional Context (optional)

Add any configuration details, flags, or related issues.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingfrontendFrontend development (HTML, CSS, JavaScript)securityImproves securitywxowxo integration

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions