Skip to content

Comments

refactor(auth): remove unused tool-scoped authorization middleware#633

Merged
matzew merged 1 commit intocontainers:mainfrom
marcnuri-forks:refactor/remove-deprecated-auth-logic
Jan 12, 2026
Merged

refactor(auth): remove unused tool-scoped authorization middleware#633
matzew merged 1 commit intocontainers:mainfrom
marcnuri-forks:refactor/remove-deprecated-auth-logic

Conversation

@manusa
Copy link
Member

@manusa manusa commented Jan 12, 2026

The toolScopedAuthorizationMiddleware was conceived for tool authorization but the feature was dropped in favor of implementing this in an MCP gateway. This removes:

  • The middleware function and its registration
  • TokenScopesContextKey constant and ContextKey type
  • Scopes propagation code in authorization middleware

Relates to:

@manusa manusa changed the title refactor(mcp): remove unused tool-scoped authorization middleware refactor(auth): remove unused tool-scoped authorization middleware Jan 12, 2026
The toolScopedAuthorizationMiddleware was conceived for tool authorization
but the feature was dropped in favor of implementing this in an MCP gateway.
This removes:
- The middleware function and its registration
- TokenScopesContextKey constant and ContextKey type
- Scopes propagation code in authorization middleware

Signed-off-by: Marc Nuri <marc@marcnuri.com>
@manusa manusa force-pushed the refactor/remove-deprecated-auth-logic branch from 77a002b to 3025ee7 Compare January 12, 2026 14:47
@manusa manusa added this to the 0.1.0 milestone Jan 12, 2026
Copy link
Collaborator

@matzew matzew left a comment

Choose a reason for hiding this comment

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

LGTM

@matzew matzew merged commit 01224c7 into containers:main Jan 12, 2026
6 checks passed
@manusa manusa deleted the refactor/remove-deprecated-auth-logic branch January 12, 2026 16:20
manusa added a commit to marcnuri-forks/kubernetes-mcp-server that referenced this pull request Jan 28, 2026
The toolScopedAuthorizationMiddleware was conceived for tool authorization
but the feature was dropped in favor of implementing this in an MCP gateway.

This removes:
- The middleware function and its registration
- TokenScopesContextKey constant and tokenScopesContextKeyType type
- Unused imports (fmt, slices) in middleware.go

This change was accidentally reverted in PR containers#590 and is now being
re-applied (originally from PR containers#633).

Signed-off-by: Marc Nuri <marc@marcnuri.com>
Cali0707 pushed a commit that referenced this pull request Jan 28, 2026
)

The toolScopedAuthorizationMiddleware was conceived for tool authorization
but the feature was dropped in favor of implementing this in an MCP gateway.

This removes:
- The middleware function and its registration
- TokenScopesContextKey constant and tokenScopesContextKeyType type
- Unused imports (fmt, slices) in middleware.go

This change was accidentally reverted in PR #590 and is now being
re-applied (originally from PR #633).

Signed-off-by: Marc Nuri <marc@marcnuri.com>
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