Documentation
¶
Index ¶
- Constants
- func CheckMCPIDAccess(ctx context.Context, client kclient.Client, ...) (bool, error)
- func CheckVMCPComponentAccess(ctx context.Context, u kuser.Info, ownerID string, ...) error
- func IsVMCPAdministrator(u kuser.Info) bool
- func MCPIDIsAuthorized(ctx context.Context, client kclient.Client, authorizedMCPServers []string, ...) (bool, error)
- func UserCanConnectToMCP(ctx context.Context, client kclient.Client, ...) (bool, error)
- func UserCanConnectVMCP(u kuser.Info, vmcp *v1.VMCP) bool
- func UserCanManageVMCP(u kuser.Info, vmcp *v1.VMCP) bool
- func UserCanReadCatalogEntry(ctx context.Context, u kuser.Info, entry *v1.MCPServerCatalogEntry, ...) (bool, error)
- func UserCanReadVMCP(u kuser.Info, vmcp *v1.VMCP) bool
- func UserCanReadVMCPInstance(u kuser.Info, instance *v1.VMCPInstance, vmcp *v1.VMCP) bool
- func ValidateVMCPToolSelection(u kuser.Info, vmcp *v1.VMCP, selection map[string]types.VMCPComponentSet) error
- type Authorizer
- type GetVar
- type Resources
- type ResourcesAuthorized
- type User
Constants ¶
View Source
const ( MetricsGroup = "metrics" UnauthenticatedGroup = "unauthenticated" )
Variables ¶
This section is empty.
Functions ¶
func CheckMCPIDAccess ¶ added in v0.24.0
func CheckVMCPComponentAccess ¶ added in v0.26.0
func CheckVMCPComponentAccess(ctx context.Context, u kuser.Info, ownerID string, entry *v1.MCPServerCatalogEntry, helper *accesscontrolrule.Helper, userInfo func(context.Context, uint) (kuser.Info, error)) error
CheckVMCPComponentAccess restricts personal vMCP components to accessible entries.
func IsVMCPAdministrator ¶ added in v0.26.0
func MCPIDIsAuthorized ¶ added in v0.24.0
func UserCanConnectToMCP ¶ added in v0.26.0
func UserCanConnectToMCP(ctx context.Context, client kclient.Client, acrHelper *accesscontrolrule.Helper, user kuser.Info, mcpID string) (bool, error)
UserCanConnectToMCP applies the same current-user authorization used by the MCP gateway. API handlers that act on an MCP deployment without traversing /mcp-connect must call this rather than relying on management visibility.
func UserCanConnectVMCP ¶ added in v0.26.0
func UserCanReadCatalogEntry ¶ added in v0.26.0
func UserCanReadCatalogEntry(ctx context.Context, u kuser.Info, entry *v1.MCPServerCatalogEntry, helper *accesscontrolrule.Helper) (bool, error)
UserCanReadCatalogEntry checks access using the entry's stored scope.
func UserCanReadVMCP ¶ added in v0.26.0
UserCanReadVMCP applies the VMCP visibility model. A personal VMCP is only visible to its owner. A shared VMCP is visible to users matching at least one profile; catalog access is intentionally irrelevant.
func UserCanReadVMCPInstance ¶ added in v0.26.0
func ValidateVMCPToolSelection ¶ added in v0.26.0
func ValidateVMCPToolSelection(u kuser.Info, vmcp *v1.VMCP, selection map[string]types.VMCPComponentSet) error
ValidateVMCPToolSelection rejects explicit selections outside the profile union.
Types ¶
type Authorizer ¶
type Authorizer struct {
// contains filtered or unexported fields
}
func NewAuthorizer ¶
func NewAuthorizer(gatewayClient *client.Client, cache, uncached kclient.Client, devMode bool, acrHelper *accesscontrolrule.Helper, skillHelper *skillaccessrule.Helper, registryNoAuth bool) *Authorizer
type Resources ¶ added in v0.7.0
type Resources struct {
MCPServerID string
MCPServerInstanceID string
MCPServerCatalogEntryID string
VMCPComponentMCPID string
VMCPID string
VMCPInstanceID string
// MCPID identifies a vMCP, vMCP instance, or migrated alias. Internal requests may identify component servers or instances.
MCPID string
WorkspaceID string
SkillID string
DeviceScanID string
OAuthAuthRequestID string
Authorizated ResourcesAuthorized
}
type ResourcesAuthorized ¶ added in v0.7.0
type ResourcesAuthorized struct {
MCPServer *v1.MCPServer
MCPServerInstance *v1.MCPServerInstance
MCPServerCatalogEntry *v1.MCPServerCatalogEntry
VMCP *v1.VMCP
VMCPInstance *v1.VMCPInstance
PowerUserWorkspace *v1.PowerUserWorkspace
Skill *v1.Skill
}
Click to show internal directories.
Click to hide internal directories.