fa-mcp-sdk 0.2.125 → 0.2.132
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/fa-mcp.js +46 -12
- package/cli-template/config/_local.yaml +29 -11
- package/cli-template/config/custom-environment-variables.yaml +0 -6
- package/cli-template/config/default.yaml +34 -14
- package/cli-template/fa-mcp-sdk-spec.md +396 -189
- package/dist/core/_types_/config.d.ts +4 -17
- package/dist/core/_types_/config.d.ts.map +1 -1
- package/dist/core/_types_/types.d.ts +12 -15
- package/dist/core/_types_/types.d.ts.map +1 -1
- package/dist/core/auth/middleware.d.ts +9 -37
- package/dist/core/auth/middleware.d.ts.map +1 -1
- package/dist/core/auth/middleware.js +31 -146
- package/dist/core/auth/middleware.js.map +1 -1
- package/dist/core/auth/multi-auth.d.ts +10 -14
- package/dist/core/auth/multi-auth.d.ts.map +1 -1
- package/dist/core/auth/multi-auth.js +133 -220
- package/dist/core/auth/multi-auth.js.map +1 -1
- package/dist/core/auth/types.d.ts +1 -7
- package/dist/core/auth/types.d.ts.map +1 -1
- package/dist/core/auth/types.js +1 -10
- package/dist/core/auth/types.js.map +1 -1
- package/dist/core/bootstrap/init-config.d.ts.map +1 -1
- package/dist/core/bootstrap/init-config.js +4 -0
- package/dist/core/bootstrap/init-config.js.map +1 -1
- package/dist/core/index.d.ts +6 -6
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +5 -4
- package/dist/core/index.js.map +1 -1
- package/dist/core/utils/utils.d.ts +6 -0
- package/dist/core/utils/utils.d.ts.map +1 -1
- package/dist/core/utils/utils.js +25 -0
- package/dist/core/utils/utils.js.map +1 -1
- package/dist/core/web/server-http.d.ts.map +1 -1
- package/dist/core/web/server-http.js +32 -18
- package/dist/core/web/server-http.js.map +1 -1
- package/package.json +1 -1
- package/cli-template/src/_examples/custom-basic-auth-example.ts +0 -252
- package/cli-template/src/_examples/multi-auth-examples.ts +0 -333
- package/cli-template/src/_types_/common.d.ts +0 -27
- package/cli-template/src/api/router.ts +0 -35
- package/cli-template/src/api/swagger.ts +0 -167
- package/cli-template/src/asset/favicon.svg +0 -3
- package/cli-template/src/custom-resources.ts +0 -12
- package/cli-template/src/prompts/agent-brief.ts +0 -8
- package/cli-template/src/prompts/agent-prompt.ts +0 -10
- package/cli-template/src/prompts/custom-prompts.ts +0 -12
- package/cli-template/src/start.ts +0 -71
- package/cli-template/src/tools/handle-tool-call.ts +0 -55
- package/cli-template/src/tools/tools.ts +0 -88
- package/cli-template/tests/jest-simple-reporter.js +0 -10
- package/cli-template/tests/mcp/sse/mcp-sse-client-handling.md +0 -111
- package/cli-template/tests/mcp/sse/test-sse-npm-package.js +0 -96
- package/cli-template/tests/mcp/test-cases.js +0 -143
- package/cli-template/tests/mcp/test-http.js +0 -63
- package/cli-template/tests/mcp/test-sse.js +0 -67
- package/cli-template/tests/mcp/test-stdio.js +0 -78
- package/cli-template/tests/utils.ts +0 -154
- package/cli-template/yarn.lock +0 -6375
|
@@ -2,20 +2,6 @@ import { TFileLogLevel } from 'af-logger-ts';
|
|
|
2
2
|
import { IAFDatabasesConfig } from 'af-db-ts';
|
|
3
3
|
import { IAFConsulConfig, IAccessPoints } from 'af-consul-ts';
|
|
4
4
|
import { IADConfig } from './active-directory-config.js';
|
|
5
|
-
export interface IBasicAuth {
|
|
6
|
-
type: 'basic';
|
|
7
|
-
username: string;
|
|
8
|
-
password: string;
|
|
9
|
-
}
|
|
10
|
-
export interface IOAuth2Auth {
|
|
11
|
-
type: 'oauth2';
|
|
12
|
-
clientId: string;
|
|
13
|
-
clientSecret: string;
|
|
14
|
-
accessToken: string;
|
|
15
|
-
refreshToken?: string;
|
|
16
|
-
redirectUri?: string;
|
|
17
|
-
tokenEndpoint?: string;
|
|
18
|
-
}
|
|
19
5
|
interface IWebServerConfig {
|
|
20
6
|
webServer: {
|
|
21
7
|
host: string;
|
|
@@ -23,9 +9,10 @@ interface IWebServerConfig {
|
|
|
23
9
|
originHosts: string[];
|
|
24
10
|
auth: {
|
|
25
11
|
enabled: boolean;
|
|
26
|
-
basic?:
|
|
27
|
-
|
|
28
|
-
|
|
12
|
+
basic?: {
|
|
13
|
+
username: string;
|
|
14
|
+
password: string;
|
|
15
|
+
};
|
|
29
16
|
jwtToken: {
|
|
30
17
|
encryptKey: string;
|
|
31
18
|
checkMCPName: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/core/_types_/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAGzD,
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/core/_types_/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAGzD,UAAU,gBAAgB;IACxB,SAAS,EAAE;QACT,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,EAAE,CAAC;QACtB,IAAI,EAAE;YACJ,OAAO,EAAE,OAAO,CAAC;YACjB,KAAK,CAAC,EAAE;gBACN,QAAQ,EAAE,MAAM,CAAC;gBACjB,QAAQ,EAAE,MAAM,CAAC;aAClB,CAAC;YACF,QAAQ,EAAE;gBACR,UAAU,EAAE,MAAM,CAAC;gBACnB,YAAY,EAAE,OAAO,CAAC;aACvB,CAAA;YACD,qBAAqB,E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
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
2
2
|
import { Router } from 'express';
|
|
3
|
+
import { AuthResult } from '../auth/types.js';
|
|
3
4
|
export interface IPromptData {
|
|
4
5
|
name: string;
|
|
5
6
|
description: string;
|
|
@@ -13,22 +14,18 @@ export interface IRequiredHttpHeader {
|
|
|
13
14
|
isOptional?: boolean;
|
|
14
15
|
}
|
|
15
16
|
export interface IResourceInfo {
|
|
16
|
-
uri: string;
|
|
17
|
-
name: string;
|
|
18
|
-
description: string;
|
|
19
|
-
mimeType: string;
|
|
20
|
-
}
|
|
21
|
-
export type TResourceContentFunction = (uri: string) => string | Promise<string>;
|
|
22
|
-
export type IResourceContent = string | object | TResourceContentFunction;
|
|
23
|
-
export interface IResourceData {
|
|
24
17
|
uri: string;
|
|
25
18
|
name: string;
|
|
26
19
|
title?: string;
|
|
27
20
|
description: string;
|
|
28
21
|
mimeType: string;
|
|
29
|
-
content: IResourceContent;
|
|
30
22
|
requireAuth?: boolean;
|
|
31
23
|
}
|
|
24
|
+
export interface IResourceData extends IResourceInfo {
|
|
25
|
+
content: IResourceContent;
|
|
26
|
+
}
|
|
27
|
+
export type TResourceContentFunction = (uri: string) => string | Promise<string>;
|
|
28
|
+
export type IResourceContent = string | object | TResourceContentFunction;
|
|
32
29
|
export interface IResource {
|
|
33
30
|
contents: [
|
|
34
31
|
{
|
|
@@ -44,12 +41,11 @@ export interface ISwaggerData {
|
|
|
44
41
|
swaggerUi: any;
|
|
45
42
|
}
|
|
46
43
|
/**
|
|
47
|
-
* Custom
|
|
48
|
-
* @param
|
|
49
|
-
* @
|
|
50
|
-
* @returns Promise<boolean> or boolean indicating if credentials are valid
|
|
44
|
+
* Custom Authentication validation function
|
|
45
|
+
* @param req - Express request object containing all authentication information
|
|
46
|
+
* @returns Promise<AuthResult> or AuthResult with detailed authentication result
|
|
51
47
|
*/
|
|
52
|
-
export type
|
|
48
|
+
export type CustomAuthValidator = (req: any) => Promise<AuthResult> | AuthResult;
|
|
53
49
|
/**
|
|
54
50
|
* All data that needs to be passed to initialize the MCP server
|
|
55
51
|
*/
|
|
@@ -58,13 +54,14 @@ export interface McpServerData {
|
|
|
58
54
|
toolHandler: (params: {
|
|
59
55
|
name: string;
|
|
60
56
|
arguments?: any;
|
|
57
|
+
headers?: Record<string, string>;
|
|
61
58
|
}) => Promise<any>;
|
|
62
59
|
agentBrief: string;
|
|
63
60
|
agentPrompt: string;
|
|
64
61
|
customPrompts?: IPromptData[];
|
|
65
62
|
requiredHttpHeaders?: IRequiredHttpHeader[] | null;
|
|
66
63
|
customResources?: IResourceData[] | null;
|
|
67
|
-
|
|
64
|
+
customAuthValidator?: CustomAuthValidator;
|
|
68
65
|
httpComponents?: {
|
|
69
66
|
apiRouter?: Router | null;
|
|
70
67
|
endpointsOn404?: IEndpointsOn404;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/_types_/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/core/_types_/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,EAAE,CAAC;IACd,OAAO,EAAE,cAAc,CAAC;IACxB,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb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AC;KACb,CAAC;IACF,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,eAAe;IAC9B,CAAC,CAAC,EAAE,MAAM,GAAG;QACX,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;KAClB,CAAC;CACH;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,CAAC,EAAE,eAAe,GAAG,SAAS,CAAC;IACzC,QAAQ,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAEhC,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACtB"}
|
|
@@ -1,47 +1,19 @@
|
|
|
1
1
|
import { NextFunction, Request, Response } from 'express';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* Otherwise, it will return the object with an error
|
|
6
|
-
*/
|
|
7
|
-
export declare const getAuthByTokenError: (req: Request) => {
|
|
8
|
-
code: number;
|
|
9
|
-
message: string;
|
|
10
|
-
} | undefined;
|
|
11
|
-
export declare const authByToken: (req: Request, res: Response) => boolean;
|
|
12
|
-
/**
|
|
13
|
-
* Create conditional auth middleware that checks for public MCP requests
|
|
14
|
-
*/
|
|
15
|
-
export declare const createConditionalAuthMiddleware: () => (req: Request, res: Response, next: NextFunction) => void;
|
|
16
|
-
export declare const authTokenMW: (req: Request, res: Response, next: NextFunction) => void;
|
|
17
|
-
/**
|
|
18
|
-
* Checks token authorization using all configured methods
|
|
19
|
-
* in ascending CPU load order
|
|
3
|
+
* Programmatic authentication checking - for manual auth validation in code
|
|
4
|
+
* Returns error object if authentication failed, undefined if successful
|
|
20
5
|
*/
|
|
21
6
|
export declare const getMultiAuthError: (req: Request) => Promise<{
|
|
22
7
|
code: number;
|
|
23
8
|
message: string;
|
|
24
9
|
} | undefined>;
|
|
10
|
+
interface AuthMiddlewareOptions {
|
|
11
|
+
mcpPaths?: string[];
|
|
12
|
+
logConfig?: boolean;
|
|
13
|
+
}
|
|
25
14
|
/**
|
|
26
|
-
*
|
|
27
|
-
* Automatically determines which system to use
|
|
28
|
-
*/
|
|
29
|
-
export declare const enhancedAuthTokenMW: (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
30
|
-
/**
|
|
31
|
-
* Middleware configurator - creates middleware with specified options
|
|
32
|
-
*/
|
|
33
|
-
export declare function createConfigurableAuthMiddleware(options?: {
|
|
34
|
-
forceMultiAuth?: boolean;
|
|
35
|
-
logConfiguration?: boolean;
|
|
36
|
-
}): (req: Request, res: Response, next: NextFunction) => Promise<void>;
|
|
37
|
-
/**
|
|
38
|
-
* Utility to get current authentication configuration information
|
|
15
|
+
* Universal authentication middleware - handles all authentication scenarios
|
|
39
16
|
*/
|
|
40
|
-
export declare function
|
|
41
|
-
|
|
42
|
-
configured: import("./types.js").AuthType[];
|
|
43
|
-
valid: import("./types.js").AuthType[];
|
|
44
|
-
errors: Record<string, string[]>;
|
|
45
|
-
usingMultiAuth: boolean;
|
|
46
|
-
};
|
|
17
|
+
export declare function createAuthMW(options?: AuthMiddlewareOptions): (req: Request, res: Response, next: NextFunction) => Promise<void | Response<any, Record<string, any>>>;
|
|
18
|
+
export {};
|
|
47
19
|
//# sourceMappingURL=middleware.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../../../src/core/auth/middleware.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../../../src/core/auth/middleware.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAqG1D;;;GAGG;AACH,eAAO,MAAM,iBAAiB,GAAU,KAAK,OAAO,KAAG,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAc3G,CAAC;AAMF,UAAU,qBAAqB;IAC7B,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAE,OAAO,GAAE,qBAA0B,IAMjD,KAAK,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,wDAkC9D"}
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { cyan, lBlue, magenta, red, reset } from 'af-color';
|
|
2
|
-
import { checkToken } from './jwt-validation.js';
|
|
3
2
|
import { debugTokenAuth } from '../debug.js';
|
|
4
3
|
import { appConfig } from '../bootstrap/init-config.js';
|
|
5
4
|
import { getResourcesList } from '../mcp/resources.js';
|
|
6
5
|
import { getPromptsList } from '../mcp/prompts.js';
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
return (req.headers.authorization || '').replace(/^Bearer */, '');
|
|
10
|
-
};
|
|
6
|
+
import { checkCombinedAuth, logAuthConfiguration, } from './multi-auth.js';
|
|
7
|
+
const { enabled: authEnabled } = appConfig.webServer.auth;
|
|
11
8
|
const SHOW_HEADERS_SET = new Set(['user', 'authorization', 'x-real-ip', 'x-mode', 'host']);
|
|
12
9
|
const debugAuth = (req, code, message) => {
|
|
13
10
|
if (debugTokenAuth.enabled) {
|
|
@@ -24,33 +21,7 @@ const debugAuth = (req, code, message) => {
|
|
|
24
21
|
}
|
|
25
22
|
return { code, message };
|
|
26
23
|
};
|
|
27
|
-
|
|
28
|
-
* Checks token authorization.
|
|
29
|
-
* If everything is OK, it will return undefined.
|
|
30
|
-
* Otherwise, it will return the object with an error
|
|
31
|
-
*/
|
|
32
|
-
export const getAuthByTokenError = (req) => {
|
|
33
|
-
if (!enabled) {
|
|
34
|
-
return undefined;
|
|
35
|
-
}
|
|
36
|
-
const token = getTokenFromHttpHeader(req);
|
|
37
|
-
if (!token) {
|
|
38
|
-
return debugAuth(req, 400, 'Missing authorization header');
|
|
39
|
-
}
|
|
40
|
-
const checkResult = checkToken({ token });
|
|
41
|
-
if (checkResult.errorReason) {
|
|
42
|
-
return debugAuth(req, 401, checkResult.errorReason);
|
|
43
|
-
}
|
|
44
|
-
return undefined;
|
|
45
|
-
};
|
|
46
|
-
export const authByToken = (req, res) => {
|
|
47
|
-
const authError = getAuthByTokenError(req);
|
|
48
|
-
if (authError) {
|
|
49
|
-
res.status(authError.code).send(authError.message);
|
|
50
|
-
return false;
|
|
51
|
-
}
|
|
52
|
-
return true;
|
|
53
|
-
};
|
|
24
|
+
// Legacy functions removed - use createAuthMW() instead
|
|
54
25
|
/**
|
|
55
26
|
* Check if a resource URI is public (doesn't require authentication)
|
|
56
27
|
*/
|
|
@@ -102,125 +73,53 @@ const isPublicMcpRequest = (req) => {
|
|
|
102
73
|
return false;
|
|
103
74
|
}
|
|
104
75
|
};
|
|
76
|
+
// Legacy middleware functions removed - use createAuthMW() instead
|
|
105
77
|
/**
|
|
106
|
-
*
|
|
107
|
-
|
|
108
|
-
export const createConditionalAuthMiddleware = () => {
|
|
109
|
-
return (req, res, next) => {
|
|
110
|
-
// Check if this is an MCP request (HTTP or SSE) that should be public
|
|
111
|
-
const isMcpRequest = req.path === '/mcp' || req.path === '/messages' || req.path === '/sse';
|
|
112
|
-
if (isMcpRequest && isPublicMcpRequest(req)) {
|
|
113
|
-
return next();
|
|
114
|
-
}
|
|
115
|
-
const authError = getAuthByTokenError(req);
|
|
116
|
-
if (authError) {
|
|
117
|
-
res.status(authError.code).send(authError.message);
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
next();
|
|
121
|
-
};
|
|
122
|
-
};
|
|
123
|
-
export const authTokenMW = (req, res, next) => {
|
|
124
|
-
// Check if this is a public MCP request
|
|
125
|
-
if (req.path === '/mcp' && isPublicMcpRequest(req)) {
|
|
126
|
-
return next();
|
|
127
|
-
}
|
|
128
|
-
const authError = getAuthByTokenError(req);
|
|
129
|
-
if (authError) {
|
|
130
|
-
res.status(authError.code).send(authError.message);
|
|
131
|
-
return;
|
|
132
|
-
}
|
|
133
|
-
next();
|
|
134
|
-
};
|
|
135
|
-
// ========================================================================
|
|
136
|
-
// MULTI-AUTHENTICATION - NEW FUNCTIONALITY
|
|
137
|
-
// ========================================================================
|
|
138
|
-
import { checkMultiAuth, detectAuthConfiguration, logAuthConfiguration } from './multi-auth.js';
|
|
139
|
-
/**
|
|
140
|
-
* Checks token authorization using all configured methods
|
|
141
|
-
* in ascending CPU load order
|
|
78
|
+
* Programmatic authentication checking - for manual auth validation in code
|
|
79
|
+
* Returns error object if authentication failed, undefined if successful
|
|
142
80
|
*/
|
|
143
81
|
export const getMultiAuthError = async (req) => {
|
|
144
|
-
|
|
145
|
-
if (!auth.enabled) {
|
|
82
|
+
if (!authEnabled) {
|
|
146
83
|
return undefined;
|
|
147
84
|
}
|
|
148
|
-
const
|
|
149
|
-
if (!token) {
|
|
150
|
-
return debugAuth(req, 400, 'Missing authorization header');
|
|
151
|
-
}
|
|
152
|
-
const authResult = await checkMultiAuth(token, auth);
|
|
85
|
+
const authResult = await checkCombinedAuth(req);
|
|
153
86
|
if (!authResult.success) {
|
|
154
87
|
return debugAuth(req, 401, authResult.error || 'Authentication failed');
|
|
155
88
|
}
|
|
156
89
|
// Add authentication information to request for use in application
|
|
157
|
-
req.authInfo = {
|
|
158
|
-
authType: authResult.authType,
|
|
159
|
-
tokenType: authResult.tokenType,
|
|
160
|
-
username: authResult.username,
|
|
161
|
-
accessToken: authResult.accessToken,
|
|
162
|
-
payload: authResult.payload,
|
|
163
|
-
};
|
|
90
|
+
req.authInfo = { ...authResult };
|
|
164
91
|
return undefined;
|
|
165
92
|
};
|
|
166
93
|
/**
|
|
167
|
-
*
|
|
168
|
-
*/
|
|
169
|
-
function shouldUseMultiAuth(auth) {
|
|
170
|
-
return !!(auth.pat || auth.basic || auth.oauth2);
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Enhanced middleware with multi-authentication support
|
|
174
|
-
* Automatically determines which system to use
|
|
175
|
-
*/
|
|
176
|
-
export const enhancedAuthTokenMW = async (req, res, next) => {
|
|
177
|
-
// Check if this is a public MCP request
|
|
178
|
-
if (req.path === '/mcp' && isPublicMcpRequest(req)) {
|
|
179
|
-
return next();
|
|
180
|
-
}
|
|
181
|
-
const auth = appConfig.webServer.auth;
|
|
182
|
-
try {
|
|
183
|
-
// If additional authentication types are configured - use multi-auth
|
|
184
|
-
const authError = shouldUseMultiAuth(auth)
|
|
185
|
-
? await getMultiAuthError(req) // 🆕 New system
|
|
186
|
-
: getAuthByTokenError(req); // ✅ Existing system
|
|
187
|
-
if (authError) {
|
|
188
|
-
res.status(authError.code).send(authError.message);
|
|
189
|
-
return;
|
|
190
|
-
}
|
|
191
|
-
next();
|
|
192
|
-
}
|
|
193
|
-
catch {
|
|
194
|
-
res.status(500).send('Authentication error');
|
|
195
|
-
return;
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
|
-
/**
|
|
199
|
-
* Middleware configurator - creates middleware with specified options
|
|
94
|
+
* Universal authentication middleware - handles all authentication scenarios
|
|
200
95
|
*/
|
|
201
|
-
export function
|
|
96
|
+
export function createAuthMW(options = {}) {
|
|
97
|
+
const { mcpPaths = ['/mcp', '/messages', '/sse'], logConfig = process.env.LOG_AUTH_CONFIG === 'true', } = options;
|
|
202
98
|
return async (req, res, next) => {
|
|
203
|
-
const auth = appConfig.webServer.auth;
|
|
204
99
|
// Log configuration on first request
|
|
205
|
-
if (
|
|
206
|
-
logAuthConfiguration(
|
|
207
|
-
|
|
100
|
+
if (logConfig && !createAuthMW._logged) {
|
|
101
|
+
logAuthConfiguration();
|
|
102
|
+
createAuthMW._logged = true;
|
|
103
|
+
}
|
|
104
|
+
// Check if this is a public MCP request on any of the configured paths
|
|
105
|
+
const isMcpRequest = mcpPaths.includes(req.path);
|
|
106
|
+
if (isMcpRequest && isPublicMcpRequest(req)) {
|
|
107
|
+
return next();
|
|
208
108
|
}
|
|
209
|
-
//
|
|
210
|
-
if (
|
|
109
|
+
// Skip authentication if disabled
|
|
110
|
+
if (!authEnabled) {
|
|
211
111
|
return next();
|
|
212
112
|
}
|
|
213
113
|
try {
|
|
214
|
-
//
|
|
215
|
-
const
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
if (authError) {
|
|
220
|
-
res.status(authError.code).send(authError.message);
|
|
221
|
-
return;
|
|
114
|
+
// Use enhanced combined authentication (standard + custom validator)
|
|
115
|
+
const authResult = await checkCombinedAuth(req);
|
|
116
|
+
if (!authResult.success) {
|
|
117
|
+
const errorDetails = debugAuth(req, 401, authResult.error || 'Authentication failed');
|
|
118
|
+
return res.status(errorDetails.code).send(errorDetails.message);
|
|
222
119
|
}
|
|
223
|
-
|
|
120
|
+
// Add authentication information to request for use in application
|
|
121
|
+
req.authInfo = authResult;
|
|
122
|
+
return next();
|
|
224
123
|
}
|
|
225
124
|
catch {
|
|
226
125
|
res.status(500).send('Authentication error');
|
|
@@ -229,19 +128,5 @@ export function createConfigurableAuthMiddleware(options = {}) {
|
|
|
229
128
|
};
|
|
230
129
|
}
|
|
231
130
|
// Static property for logging tracking
|
|
232
|
-
|
|
233
|
-
/**
|
|
234
|
-
* Utility to get current authentication configuration information
|
|
235
|
-
*/
|
|
236
|
-
export function getAuthInfo() {
|
|
237
|
-
const auth = appConfig.webServer.auth;
|
|
238
|
-
const detection = detectAuthConfiguration(auth);
|
|
239
|
-
return {
|
|
240
|
-
enabled: auth.enabled,
|
|
241
|
-
configured: detection.configured,
|
|
242
|
-
valid: detection.valid,
|
|
243
|
-
errors: detection.errors,
|
|
244
|
-
usingMultiAuth: shouldUseMultiAuth(auth),
|
|
245
|
-
};
|
|
246
|
-
}
|
|
131
|
+
createAuthMW._logged = false;
|
|
247
132
|
//# sourceMappingURL=middleware.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.js","sourceRoot":"","sources":["../../../src/core/auth/middleware.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"middleware.js","sourceRoot":"","sources":["../../../src/core/auth/middleware.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EACL,iBAAiB,EACjB,oBAAoB,GACrB,MAAM,iBAAiB,CAAC;AAIzB,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC;AAE1D,MAAM,gBAAgB,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;AAE3F,MAAM,SAAS,GAAG,CAAC,GAAY,EAAE,IAAY,EAAE,OAAe,EAAqC,EAAE;IACnG,IAAI,cAAc,CAAC,OAAO,EAAE,CAAC;QAC3B,IAAI,UAAU,GAAW,EAAE,CAAC;QAC5B,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC;YAChB,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC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,CAAC,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;YAClE,CAAC;YAED,mEAAmE;YAClE,GAAW,CAAC,QAAQ,GAAG,UAAU,CAAC;YACnC,OAAO,IAAI,EAAE,CAAC;QAChB,CAAC;QAAC,MAAM,CAAC;YACP,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;YAC7C,OAAO;QACT,CAAC;IACH,CAAC,CAAC;AACJ,CAAC;AAED,uCAAuC;AACtC,YAAoB,CAAC,OAAO,GAAG,KAAK,CAAC"}
|
|
@@ -1,27 +1,23 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Multi-authentication system core
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
import { AuthDetectionResult, AuthResult
|
|
4
|
+
import { Request } from 'express';
|
|
5
|
+
import { AuthDetectionResult, AuthResult } from './types.js';
|
|
6
|
+
export declare const getTokenFromHttpHeader: (req: Request) => string;
|
|
6
7
|
/**
|
|
7
|
-
* Detects configured authentication types
|
|
8
|
+
* Detects configured authentication types in priority order (ascending CPU load)
|
|
8
9
|
*/
|
|
9
|
-
export declare function detectAuthConfiguration(
|
|
10
|
+
export declare function detectAuthConfiguration(): AuthDetectionResult;
|
|
10
11
|
/**
|
|
11
|
-
*
|
|
12
|
+
* Checks auth using all configured authentication methods in ascending CPU load order
|
|
12
13
|
*/
|
|
13
|
-
export declare function
|
|
14
|
+
export declare function checkMultiAuth(req: Request): Promise<AuthResult>;
|
|
14
15
|
/**
|
|
15
|
-
*
|
|
16
|
+
* Enhanced authentication check that combines configured auth methods with custom validator
|
|
16
17
|
*/
|
|
17
|
-
export declare function
|
|
18
|
-
/**
|
|
19
|
-
* Checks token using all configured authentication methods
|
|
20
|
-
* in ascending CPU load order
|
|
21
|
-
*/
|
|
22
|
-
export declare function checkMultiAuth(token: string, authConfig: AppConfig['webServer']['auth']): Promise<AuthResult>;
|
|
18
|
+
export declare function checkCombinedAuth(req: Request): Promise<AuthResult>;
|
|
23
19
|
/**
|
|
24
20
|
* Logs authentication configuration (for debugging)
|
|
25
21
|
*/
|
|
26
|
-
export declare function logAuthConfiguration(
|
|
22
|
+
export declare function logAuthConfiguration(): void;
|
|
27
23
|
//# sourceMappingURL=multi-auth.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multi-auth.d.ts","sourceRoot":"","sources":["../../../src/core/auth/multi-auth.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"multi-auth.d.ts","sourceRoot":"","sources":["../../../src/core/auth/multi-auth.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGlC,OAAO,EAAE,mBAAmB,EAAE,UAAU,EAAY,MAAM,YAAY,CAAC;AAwBvE,eAAO,MAAM,sBAAsB,GAAI,KAAK,OAAO,KAAG,MAErD,CAAC;AAWF;;GAEG;AACH,wBAAgB,uBAAuB,IAAK,mBAAmB,CAqC9D;AAmCD;;GAEG;AACH,wBAAsB,cAAc,CAAE,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,CA6CvE;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CAAE,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,UAAU,CAAC,CAwD1E;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAK,IAAI,CAa5C"}
|