@remnawave/backend-contract 3.4.5 → 3.4.6
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/build/backend/api/controllers/index.d.ts +1 -0
- package/build/backend/api/controllers/index.d.ts.map +1 -1
- package/build/backend/api/controllers/index.js +1 -0
- package/build/backend/api/controllers/node-ssh.d.ts +6 -0
- package/build/backend/api/controllers/node-ssh.d.ts.map +1 -0
- package/build/backend/api/controllers/node-ssh.js +8 -0
- package/build/backend/api/controllers-info.d.ts +5 -0
- package/build/backend/api/controllers-info.d.ts.map +1 -1
- package/build/backend/api/controllers-info.js +5 -0
- package/build/backend/api/routes.d.ts +4 -0
- package/build/backend/api/routes.d.ts.map +1 -1
- package/build/backend/api/routes.js +4 -0
- package/build/backend/commands/index.d.ts +1 -0
- package/build/backend/commands/index.d.ts.map +1 -1
- package/build/backend/commands/index.js +1 -0
- package/build/backend/commands/node-ssh/create-ssh-ticket.command.d.ts +19 -0
- package/build/backend/commands/node-ssh/create-ssh-ticket.command.d.ts.map +1 -0
- package/build/backend/commands/node-ssh/create-ssh-ticket.command.js +22 -0
- package/build/backend/commands/node-ssh/evaluate-vault.command.d.ts +17 -0
- package/build/backend/commands/node-ssh/evaluate-vault.command.d.ts.map +1 -0
- package/build/backend/commands/node-ssh/evaluate-vault.command.js +20 -0
- package/build/backend/commands/node-ssh/index.d.ts +3 -0
- package/build/backend/commands/node-ssh/index.d.ts.map +1 -0
- package/build/backend/commands/node-ssh/index.js +18 -0
- package/build/backend/constants/errors/errors.d.ts +10 -0
- package/build/backend/constants/errors/errors.d.ts.map +1 -1
- package/build/backend/constants/errors/errors.js +10 -0
- package/build/backend/models/index.d.ts +1 -0
- package/build/backend/models/index.d.ts.map +1 -1
- package/build/backend/models/index.js +1 -0
- package/build/backend/models/ssh-terminal.schema.d.ts +95 -0
- package/build/backend/models/ssh-terminal.schema.d.ts.map +1 -0
- package/build/backend/models/ssh-terminal.schema.js +74 -0
- package/build/frontend/api/controllers/index.js +1 -0
- package/build/frontend/api/controllers/node-ssh.js +8 -0
- package/build/frontend/api/controllers-info.js +5 -0
- package/build/frontend/api/routes.js +4 -0
- package/build/frontend/commands/index.js +1 -0
- package/build/frontend/commands/node-ssh/create-ssh-ticket.command.js +22 -0
- package/build/frontend/commands/node-ssh/evaluate-vault.command.js +20 -0
- package/build/frontend/commands/node-ssh/index.js +18 -0
- package/build/frontend/constants/errors/errors.js +10 -0
- package/build/frontend/models/index.js +1 -0
- package/build/frontend/models/ssh-terminal.schema.js +74 -0
- package/package.json +1 -1
|
@@ -12,6 +12,7 @@ export * from './keygen';
|
|
|
12
12
|
export * from './metadata';
|
|
13
13
|
export * from './node-integrations';
|
|
14
14
|
export * from './node-plugins';
|
|
15
|
+
export * from './node-ssh';
|
|
15
16
|
export * from './nodes';
|
|
16
17
|
export * from './passkeys';
|
|
17
18
|
export * from './remnawave-settings';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../api/controllers/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../api/controllers/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
|
|
@@ -28,6 +28,7 @@ __exportStar(require("./keygen"), exports);
|
|
|
28
28
|
__exportStar(require("./metadata"), exports);
|
|
29
29
|
__exportStar(require("./node-integrations"), exports);
|
|
30
30
|
__exportStar(require("./node-plugins"), exports);
|
|
31
|
+
__exportStar(require("./node-ssh"), exports);
|
|
31
32
|
__exportStar(require("./nodes"), exports);
|
|
32
33
|
__exportStar(require("./passkeys"), exports);
|
|
33
34
|
__exportStar(require("./remnawave-settings"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-ssh.d.ts","sourceRoot":"","sources":["../../../../api/controllers/node-ssh.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,EAAG,UAAmB,CAAC;AAEvD,eAAO,MAAM,eAAe;mCACF,MAAM;;CAEtB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NODE_SSH_ROUTES = exports.NODE_SSH_CONTROLLER = void 0;
|
|
4
|
+
exports.NODE_SSH_CONTROLLER = 'node-ssh';
|
|
5
|
+
exports.NODE_SSH_ROUTES = {
|
|
6
|
+
CREATE_TICKET: (uuid) => `${uuid}/ticket`, // post
|
|
7
|
+
EVALUATE_VAULT: 'vault/evaluate', // post
|
|
8
|
+
};
|
|
@@ -34,6 +34,11 @@ export declare const CONTROLLERS_INFO: {
|
|
|
34
34
|
readonly description: "";
|
|
35
35
|
readonly resource: "node-plugins";
|
|
36
36
|
};
|
|
37
|
+
readonly NODE_SSH: {
|
|
38
|
+
readonly tag: "Node SSH Controller";
|
|
39
|
+
readonly description: "";
|
|
40
|
+
readonly resource: "node-ssh";
|
|
41
|
+
};
|
|
37
42
|
readonly NODE_INTEGRATIONS: {
|
|
38
43
|
readonly tag: "Node Integrations Controller";
|
|
39
44
|
readonly description: "Management of Node Integrations.";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"controllers-info.d.ts","sourceRoot":"","sources":["../../../api/controllers-info.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB
|
|
1
|
+
{"version":3,"file":"controllers-info.d.ts","sourceRoot":"","sources":["../../../api/controllers-info.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqJnB,CAAC"}
|
|
@@ -37,6 +37,11 @@ exports.CONTROLLERS_INFO = {
|
|
|
37
37
|
description: '',
|
|
38
38
|
resource: 'node-plugins',
|
|
39
39
|
},
|
|
40
|
+
NODE_SSH: {
|
|
41
|
+
tag: 'Node SSH Controller',
|
|
42
|
+
description: '',
|
|
43
|
+
resource: 'node-ssh',
|
|
44
|
+
},
|
|
40
45
|
NODE_INTEGRATIONS: {
|
|
41
46
|
tag: 'Node Integrations Controller',
|
|
42
47
|
description: 'Management of Node Integrations.',
|
|
@@ -271,6 +271,10 @@ export declare const REST_API: {
|
|
|
271
271
|
readonly DELETE: (uuid: string) => string;
|
|
272
272
|
readonly CREATE: "/api/node-integrations/";
|
|
273
273
|
};
|
|
274
|
+
readonly NODE_SSH: {
|
|
275
|
+
readonly CREATE_TICKET: (uuid: string) => string;
|
|
276
|
+
readonly EVALUATE_VAULT: "/api/node-ssh/vault/evaluate";
|
|
277
|
+
};
|
|
274
278
|
readonly NODE_PLUGINS: {
|
|
275
279
|
readonly GET: (uuid: string) => string;
|
|
276
280
|
readonly GET_ALL: "/api/node-plugins/";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../../api/routes.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,EAAG,MAAe,CAAC;AACpC,eAAO,MAAM,YAAY,EAAG,UAAmB,CAAC;AAChD,eAAO,MAAM,WAAW,EAAG,SAAkB,CAAC;AAE9C,eAAO,MAAM,kBAAkB,EAAG,gBAAyB,CAAC;AAC5D,eAAO,MAAM,cAAc,EAAG,uBAAgC,CAAC;AAC/D,eAAO,MAAM,YAAY,EAAG,wBAAiC,CAAC;AAC9D,eAAO,MAAM,WAAW,EAAG,uBAAgC,CAAC;AAE5D,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;gCAyBE,MAAM;;;;;;;;;;;qCAcD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AIR,MAAM;6CAEA,MAAM,UAAU,MAAM;;;;+CAKpB,MAAM;qDAEA,MAAM;6CAEd,MAAM;qDAEE,MAAM;0CAEjB,MAAM;kDAEE,MAAM;;;;;iCAMvB,MAAM;oCAEH,MAAM;;;mCAIP,MAAM;sCAEH,MAAM;;;CAIzB,CAAC"}
|
|
@@ -308,6 +308,10 @@ exports.REST_API = {
|
|
|
308
308
|
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.NODE_INTEGRATIONS_CONTROLLER}/${CONTROLLERS.NODE_INTEGRATIONS_ROUTES.DELETE(uuid)}`,
|
|
309
309
|
CREATE: `${exports.ROOT}/${CONTROLLERS.NODE_INTEGRATIONS_CONTROLLER}/${CONTROLLERS.NODE_INTEGRATIONS_ROUTES.CREATE}`,
|
|
310
310
|
},
|
|
311
|
+
NODE_SSH: {
|
|
312
|
+
CREATE_TICKET: (uuid) => `${exports.ROOT}/${CONTROLLERS.NODE_SSH_CONTROLLER}/${CONTROLLERS.NODE_SSH_ROUTES.CREATE_TICKET(uuid)}`,
|
|
313
|
+
EVALUATE_VAULT: `${exports.ROOT}/${CONTROLLERS.NODE_SSH_CONTROLLER}/${CONTROLLERS.NODE_SSH_ROUTES.EVALUATE_VAULT}`,
|
|
314
|
+
},
|
|
311
315
|
NODE_PLUGINS: {
|
|
312
316
|
GET: (uuid) => `${exports.ROOT}/${CONTROLLERS.NODE_PLUGINS_CONTROLLER}/${CONTROLLERS.NODE_PLUGINS_ROUTES.GET(uuid)}`,
|
|
313
317
|
GET_ALL: `${exports.ROOT}/${CONTROLLERS.NODE_PLUGINS_CONTROLLER}/${CONTROLLERS.NODE_PLUGINS_ROUTES.GET_ALL}`,
|
|
@@ -12,6 +12,7 @@ export * from './keygen';
|
|
|
12
12
|
export * from './metadata';
|
|
13
13
|
export * from './node-integrations';
|
|
14
14
|
export * from './node-plugins';
|
|
15
|
+
export * from './node-ssh';
|
|
15
16
|
export * from './nodes';
|
|
16
17
|
export * from './passkeys';
|
|
17
18
|
export * from './remnawave-settings';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../commands/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../commands/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
|
|
@@ -28,6 +28,7 @@ __exportStar(require("./keygen"), exports);
|
|
|
28
28
|
__exportStar(require("./metadata"), exports);
|
|
29
29
|
__exportStar(require("./node-integrations"), exports);
|
|
30
30
|
__exportStar(require("./node-plugins"), exports);
|
|
31
|
+
__exportStar(require("./node-ssh"), exports);
|
|
31
32
|
__exportStar(require("./nodes"), exports);
|
|
32
33
|
__exportStar(require("./passkeys"), exports);
|
|
33
34
|
__exportStar(require("./remnawave-settings"), exports);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare namespace CreateSshTicketCommand {
|
|
3
|
+
const url: (uuid: string) => string;
|
|
4
|
+
const TSQ_url: string;
|
|
5
|
+
const endpointDetails: import("../../constants").EndpointDetails;
|
|
6
|
+
const RequestParamSchema: z.ZodObject<{
|
|
7
|
+
uuid: z.ZodUUID;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
const ResponseSchema: z.ZodObject<{
|
|
10
|
+
response: z.ZodObject<{
|
|
11
|
+
ticket: z.ZodString;
|
|
12
|
+
path: z.ZodString;
|
|
13
|
+
expiresInSeconds: z.ZodNumber;
|
|
14
|
+
}, z.core.$strip>;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
type RequestParam = z.infer<typeof RequestParamSchema>;
|
|
17
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=create-ssh-ticket.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-ssh-ticket.command.d.ts","sourceRoot":"","sources":["../../../../commands/node-ssh/create-ssh-ticket.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,sBAAsB,CAAC;IAC7B,MAAM,GAAG,0BAAkC,CAAC;IAC5C,MAAM,OAAO,QAAe,CAAC;IAE7B,MAAM,eAAe,2CAK3B,CAAC;IAEK,MAAM,kBAAkB;;qBAE7B,CAAC;IAEI,MAAM,cAAc;;;;;;qBAMzB,CAAC;IAEH,KAAY,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;IAC9D,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateSshTicketCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../api");
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
var CreateSshTicketCommand;
|
|
8
|
+
(function (CreateSshTicketCommand) {
|
|
9
|
+
CreateSshTicketCommand.url = api_1.REST_API.NODE_SSH.CREATE_TICKET;
|
|
10
|
+
CreateSshTicketCommand.TSQ_url = CreateSshTicketCommand.url(':uuid');
|
|
11
|
+
CreateSshTicketCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.NODE_SSH_ROUTES.CREATE_TICKET(':uuid'), 'post', 'Create a single-use ticket for opening an SSH terminal session', { scope: 'node-ssh', kind: 'write' });
|
|
12
|
+
CreateSshTicketCommand.RequestParamSchema = zod_1.z.object({
|
|
13
|
+
uuid: zod_1.z.uuid().describe('Node UUID'),
|
|
14
|
+
});
|
|
15
|
+
CreateSshTicketCommand.ResponseSchema = zod_1.z.object({
|
|
16
|
+
response: zod_1.z.object({
|
|
17
|
+
ticket: zod_1.z.string(),
|
|
18
|
+
path: zod_1.z.string(),
|
|
19
|
+
expiresInSeconds: zod_1.z.number(),
|
|
20
|
+
}),
|
|
21
|
+
});
|
|
22
|
+
})(CreateSshTicketCommand || (exports.CreateSshTicketCommand = CreateSshTicketCommand = {}));
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare namespace EvaluateVaultCommand {
|
|
3
|
+
const url: "/api/node-ssh/vault/evaluate";
|
|
4
|
+
const TSQ_url: "/api/node-ssh/vault/evaluate";
|
|
5
|
+
const endpointDetails: import("../../constants").EndpointDetails;
|
|
6
|
+
const RequestBodySchema: z.ZodObject<{
|
|
7
|
+
blinded: z.ZodBase64;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
const ResponseSchema: z.ZodObject<{
|
|
10
|
+
response: z.ZodObject<{
|
|
11
|
+
evaluated: z.ZodBase64;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
}, z.core.$strip>;
|
|
14
|
+
type RequestBody = z.infer<typeof RequestBodySchema>;
|
|
15
|
+
type Response = z.infer<typeof ResponseSchema>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=evaluate-vault.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evaluate-vault.command.d.ts","sourceRoot":"","sources":["../../../../commands/node-ssh/evaluate-vault.command.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,yBAAiB,oBAAoB,CAAC;IAC3B,MAAM,GAAG,gCAAmC,CAAC;IAC7C,MAAM,OAAO,gCAAM,CAAC;IAEpB,MAAM,eAAe,2CAK3B,CAAC;IAEK,MAAM,iBAAiB;;qBAE5B,CAAC;IAEI,MAAM,cAAc;;;;qBAIzB,CAAC;IAEH,KAAY,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;IAC5D,KAAY,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;CACzD"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EvaluateVaultCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../api");
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
var EvaluateVaultCommand;
|
|
8
|
+
(function (EvaluateVaultCommand) {
|
|
9
|
+
EvaluateVaultCommand.url = api_1.REST_API.NODE_SSH.EVALUATE_VAULT;
|
|
10
|
+
EvaluateVaultCommand.TSQ_url = EvaluateVaultCommand.url;
|
|
11
|
+
EvaluateVaultCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.NODE_SSH_ROUTES.EVALUATE_VAULT, 'post', 'Oblivious evaluation step for unlocking the SSH key vault', { scope: 'node-ssh', kind: 'write' });
|
|
12
|
+
EvaluateVaultCommand.RequestBodySchema = zod_1.z.object({
|
|
13
|
+
blinded: zod_1.z.base64().max(128),
|
|
14
|
+
});
|
|
15
|
+
EvaluateVaultCommand.ResponseSchema = zod_1.z.object({
|
|
16
|
+
response: zod_1.z.object({
|
|
17
|
+
evaluated: zod_1.z.base64(),
|
|
18
|
+
}),
|
|
19
|
+
});
|
|
20
|
+
})(EvaluateVaultCommand || (exports.EvaluateVaultCommand = EvaluateVaultCommand = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../commands/node-ssh/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./create-ssh-ticket.command"), exports);
|
|
18
|
+
__exportStar(require("./evaluate-vault.command"), exports);
|
|
@@ -1299,5 +1299,15 @@ export declare const ERRORS: {
|
|
|
1299
1299
|
httpCode: number;
|
|
1300
1300
|
};
|
|
1301
1301
|
};
|
|
1302
|
+
readonly EVALUATE_VAULT_ERROR: {
|
|
1303
|
+
readonly code: "A255";
|
|
1304
|
+
readonly message: "Vault evaluation refused";
|
|
1305
|
+
readonly httpCode: 429;
|
|
1306
|
+
};
|
|
1307
|
+
readonly CREATE_SSH_TICKET_ERROR: {
|
|
1308
|
+
readonly code: "A254";
|
|
1309
|
+
readonly message: "Create SSH ticket error";
|
|
1310
|
+
readonly httpCode: 500;
|
|
1311
|
+
};
|
|
1302
1312
|
};
|
|
1303
1313
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../constants/errors/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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
|
|
1280
|
+
message: 'Create SSH ticket error',
|
|
1281
|
+
httpCode: 500,
|
|
1282
|
+
},
|
|
1273
1283
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../models/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC;AAC9B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,kCAAkC,CAAC;AACjD,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uCAAuC,CAAC;AACtD,cAAc,uCAAuC,CAAC;AACtD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kCAAkC,CAAC;AACjD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uCAAuC,CAAC;AACtD,cAAc,yBAAyB,CAAC;AACxC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kBAAkB,CAAC;AACjC,cAAc,iCAAiC,CAAC;AAChD,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,sBAAsB,CAAC;AAC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,uBAAuB,CAAC"}
|
|
@@ -55,3 +55,4 @@ __exportStar(require("./webhook"), exports);
|
|
|
55
55
|
__exportStar(require("./xray-json-advanced"), exports);
|
|
56
56
|
__exportStar(require("./path-params.schema"), exports);
|
|
57
57
|
__exportStar(require("./host-mapper"), exports);
|
|
58
|
+
__exportStar(require("./ssh-terminal.schema"), exports);
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const SSH_TERMINAL_WS_PATH = "/api/node-ssh/ws";
|
|
3
|
+
export declare const SSH_TERMINAL_WS_PROTOCOL = "rw";
|
|
4
|
+
export declare const SshOpenMessageSchema: z.ZodObject<{
|
|
5
|
+
t: z.ZodLiteral<"open">;
|
|
6
|
+
host: z.ZodString;
|
|
7
|
+
port: z.ZodNumber;
|
|
8
|
+
username: z.ZodString;
|
|
9
|
+
cols: z.ZodNumber;
|
|
10
|
+
rows: z.ZodNumber;
|
|
11
|
+
}, z.core.$strip>;
|
|
12
|
+
export declare const SshResizeMessageSchema: z.ZodObject<{
|
|
13
|
+
t: z.ZodLiteral<"resize">;
|
|
14
|
+
cols: z.ZodNumber;
|
|
15
|
+
rows: z.ZodNumber;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
export declare const SshIdentitiesReplySchema: z.ZodObject<{
|
|
18
|
+
t: z.ZodLiteral<"identities">;
|
|
19
|
+
id: z.ZodNumber;
|
|
20
|
+
keys: z.ZodArray<z.ZodString>;
|
|
21
|
+
}, z.core.$strip>;
|
|
22
|
+
export declare const SshSignReplySchema: z.ZodObject<{
|
|
23
|
+
t: z.ZodLiteral<"sign">;
|
|
24
|
+
id: z.ZodNumber;
|
|
25
|
+
signature: z.ZodBase64;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
export declare const SshHostKeyReplySchema: z.ZodObject<{
|
|
28
|
+
t: z.ZodLiteral<"hostkey">;
|
|
29
|
+
id: z.ZodNumber;
|
|
30
|
+
accept: z.ZodBoolean;
|
|
31
|
+
}, z.core.$strip>;
|
|
32
|
+
export declare const SshClientErrorSchema: z.ZodObject<{
|
|
33
|
+
t: z.ZodLiteral<"error">;
|
|
34
|
+
id: z.ZodNumber;
|
|
35
|
+
message: z.ZodString;
|
|
36
|
+
}, z.core.$strip>;
|
|
37
|
+
/** Browser -> panel. */
|
|
38
|
+
export declare const SshClientMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
39
|
+
t: z.ZodLiteral<"open">;
|
|
40
|
+
host: z.ZodString;
|
|
41
|
+
port: z.ZodNumber;
|
|
42
|
+
username: z.ZodString;
|
|
43
|
+
cols: z.ZodNumber;
|
|
44
|
+
rows: z.ZodNumber;
|
|
45
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
46
|
+
t: z.ZodLiteral<"resize">;
|
|
47
|
+
cols: z.ZodNumber;
|
|
48
|
+
rows: z.ZodNumber;
|
|
49
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
50
|
+
t: z.ZodLiteral<"identities">;
|
|
51
|
+
id: z.ZodNumber;
|
|
52
|
+
keys: z.ZodArray<z.ZodString>;
|
|
53
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
54
|
+
t: z.ZodLiteral<"sign">;
|
|
55
|
+
id: z.ZodNumber;
|
|
56
|
+
signature: z.ZodBase64;
|
|
57
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
58
|
+
t: z.ZodLiteral<"hostkey">;
|
|
59
|
+
id: z.ZodNumber;
|
|
60
|
+
accept: z.ZodBoolean;
|
|
61
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
62
|
+
t: z.ZodLiteral<"error">;
|
|
63
|
+
id: z.ZodNumber;
|
|
64
|
+
message: z.ZodString;
|
|
65
|
+
}, z.core.$strip>], "t">;
|
|
66
|
+
/** Panel -> browser. */
|
|
67
|
+
export declare const SshServerMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
68
|
+
t: z.ZodLiteral<"agent-identities">;
|
|
69
|
+
id: z.ZodNumber;
|
|
70
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
71
|
+
t: z.ZodLiteral<"agent-sign">;
|
|
72
|
+
id: z.ZodNumber;
|
|
73
|
+
publicKey: z.ZodBase64;
|
|
74
|
+
data: z.ZodBase64;
|
|
75
|
+
hash: z.ZodNullable<z.ZodString>;
|
|
76
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
77
|
+
t: z.ZodLiteral<"hostkey">;
|
|
78
|
+
id: z.ZodNumber;
|
|
79
|
+
algo: z.ZodString;
|
|
80
|
+
fingerprint: z.ZodString;
|
|
81
|
+
key: z.ZodBase64;
|
|
82
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
83
|
+
t: z.ZodLiteral<"ready">;
|
|
84
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
85
|
+
t: z.ZodLiteral<"exit">;
|
|
86
|
+
code: z.ZodNullable<z.ZodNumber>;
|
|
87
|
+
signal: z.ZodNullable<z.ZodString>;
|
|
88
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
89
|
+
t: z.ZodLiteral<"error">;
|
|
90
|
+
message: z.ZodString;
|
|
91
|
+
}, z.core.$strip>], "t">;
|
|
92
|
+
export type TSshOpenMessage = z.infer<typeof SshOpenMessageSchema>;
|
|
93
|
+
export type TSshClientMessage = z.infer<typeof SshClientMessageSchema>;
|
|
94
|
+
export type TSshServerMessage = z.infer<typeof SshServerMessageSchema>;
|
|
95
|
+
//# sourceMappingURL=ssh-terminal.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ssh-terminal.schema.d.ts","sourceRoot":"","sources":["../../../models/ssh-terminal.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,oBAAoB,qBAAqB,CAAC;AAEvD,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAI7C,eAAO,MAAM,oBAAoB;;;;;;;iBAO/B,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;iBAIjC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;iBAInC,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;iBAI7B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;iBAIhC,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;iBAI/B,CAAC;AAEH,wBAAwB;AACxB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAOjC,CAAC;AAEH,wBAAwB;AACxB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;wBAuBjC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AACnE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACvE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SshServerMessageSchema = exports.SshClientMessageSchema = exports.SshClientErrorSchema = exports.SshHostKeyReplySchema = exports.SshSignReplySchema = exports.SshIdentitiesReplySchema = exports.SshResizeMessageSchema = exports.SshOpenMessageSchema = exports.SSH_TERMINAL_WS_PROTOCOL = exports.SSH_TERMINAL_WS_PATH = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.SSH_TERMINAL_WS_PATH = '/api/node-ssh/ws';
|
|
6
|
+
exports.SSH_TERMINAL_WS_PROTOCOL = 'rw';
|
|
7
|
+
const requestId = zod_1.z.number().int().nonnegative();
|
|
8
|
+
exports.SshOpenMessageSchema = zod_1.z.object({
|
|
9
|
+
t: zod_1.z.literal('open'),
|
|
10
|
+
host: zod_1.z.string().min(1).max(253),
|
|
11
|
+
port: zod_1.z.number().int().min(1).max(65535),
|
|
12
|
+
username: zod_1.z.string().min(1).max(64),
|
|
13
|
+
cols: zod_1.z.number().int().min(1).max(1000),
|
|
14
|
+
rows: zod_1.z.number().int().min(1).max(1000),
|
|
15
|
+
});
|
|
16
|
+
exports.SshResizeMessageSchema = zod_1.z.object({
|
|
17
|
+
t: zod_1.z.literal('resize'),
|
|
18
|
+
cols: zod_1.z.number().int().min(1).max(1000),
|
|
19
|
+
rows: zod_1.z.number().int().min(1).max(1000),
|
|
20
|
+
});
|
|
21
|
+
exports.SshIdentitiesReplySchema = zod_1.z.object({
|
|
22
|
+
t: zod_1.z.literal('identities'),
|
|
23
|
+
id: requestId,
|
|
24
|
+
keys: zod_1.z.array(zod_1.z.string().min(1).max(4096)).max(16),
|
|
25
|
+
});
|
|
26
|
+
exports.SshSignReplySchema = zod_1.z.object({
|
|
27
|
+
t: zod_1.z.literal('sign'),
|
|
28
|
+
id: requestId,
|
|
29
|
+
signature: zod_1.z.base64().max(2048),
|
|
30
|
+
});
|
|
31
|
+
exports.SshHostKeyReplySchema = zod_1.z.object({
|
|
32
|
+
t: zod_1.z.literal('hostkey'),
|
|
33
|
+
id: requestId,
|
|
34
|
+
accept: zod_1.z.boolean(),
|
|
35
|
+
});
|
|
36
|
+
exports.SshClientErrorSchema = zod_1.z.object({
|
|
37
|
+
t: zod_1.z.literal('error'),
|
|
38
|
+
id: requestId,
|
|
39
|
+
message: zod_1.z.string().max(500),
|
|
40
|
+
});
|
|
41
|
+
/** Browser -> panel. */
|
|
42
|
+
exports.SshClientMessageSchema = zod_1.z.discriminatedUnion('t', [
|
|
43
|
+
exports.SshOpenMessageSchema,
|
|
44
|
+
exports.SshResizeMessageSchema,
|
|
45
|
+
exports.SshIdentitiesReplySchema,
|
|
46
|
+
exports.SshSignReplySchema,
|
|
47
|
+
exports.SshHostKeyReplySchema,
|
|
48
|
+
exports.SshClientErrorSchema,
|
|
49
|
+
]);
|
|
50
|
+
/** Panel -> browser. */
|
|
51
|
+
exports.SshServerMessageSchema = zod_1.z.discriminatedUnion('t', [
|
|
52
|
+
zod_1.z.object({ t: zod_1.z.literal('agent-identities'), id: requestId }),
|
|
53
|
+
zod_1.z.object({
|
|
54
|
+
t: zod_1.z.literal('agent-sign'),
|
|
55
|
+
id: requestId,
|
|
56
|
+
publicKey: zod_1.z.base64().max(4096),
|
|
57
|
+
data: zod_1.z.base64().max(8192),
|
|
58
|
+
hash: zod_1.z.string().max(16).nullable(),
|
|
59
|
+
}),
|
|
60
|
+
zod_1.z.object({
|
|
61
|
+
t: zod_1.z.literal('hostkey'),
|
|
62
|
+
id: requestId,
|
|
63
|
+
algo: zod_1.z.string().max(64),
|
|
64
|
+
fingerprint: zod_1.z.string().max(128),
|
|
65
|
+
key: zod_1.z.base64().max(4096),
|
|
66
|
+
}),
|
|
67
|
+
zod_1.z.object({ t: zod_1.z.literal('ready') }),
|
|
68
|
+
zod_1.z.object({
|
|
69
|
+
t: zod_1.z.literal('exit'),
|
|
70
|
+
code: zod_1.z.number().int().nullable(),
|
|
71
|
+
signal: zod_1.z.string().max(32).nullable(),
|
|
72
|
+
}),
|
|
73
|
+
zod_1.z.object({ t: zod_1.z.literal('error'), message: zod_1.z.string().max(500) }),
|
|
74
|
+
]);
|
|
@@ -28,6 +28,7 @@ __exportStar(require("./keygen"), exports);
|
|
|
28
28
|
__exportStar(require("./metadata"), exports);
|
|
29
29
|
__exportStar(require("./node-integrations"), exports);
|
|
30
30
|
__exportStar(require("./node-plugins"), exports);
|
|
31
|
+
__exportStar(require("./node-ssh"), exports);
|
|
31
32
|
__exportStar(require("./nodes"), exports);
|
|
32
33
|
__exportStar(require("./passkeys"), exports);
|
|
33
34
|
__exportStar(require("./remnawave-settings"), exports);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NODE_SSH_ROUTES = exports.NODE_SSH_CONTROLLER = void 0;
|
|
4
|
+
exports.NODE_SSH_CONTROLLER = 'node-ssh';
|
|
5
|
+
exports.NODE_SSH_ROUTES = {
|
|
6
|
+
CREATE_TICKET: (uuid) => `${uuid}/ticket`, // post
|
|
7
|
+
EVALUATE_VAULT: 'vault/evaluate', // post
|
|
8
|
+
};
|
|
@@ -37,6 +37,11 @@ exports.CONTROLLERS_INFO = {
|
|
|
37
37
|
description: '',
|
|
38
38
|
resource: 'node-plugins',
|
|
39
39
|
},
|
|
40
|
+
NODE_SSH: {
|
|
41
|
+
tag: 'Node SSH Controller',
|
|
42
|
+
description: '',
|
|
43
|
+
resource: 'node-ssh',
|
|
44
|
+
},
|
|
40
45
|
NODE_INTEGRATIONS: {
|
|
41
46
|
tag: 'Node Integrations Controller',
|
|
42
47
|
description: 'Management of Node Integrations.',
|
|
@@ -308,6 +308,10 @@ exports.REST_API = {
|
|
|
308
308
|
DELETE: (uuid) => `${exports.ROOT}/${CONTROLLERS.NODE_INTEGRATIONS_CONTROLLER}/${CONTROLLERS.NODE_INTEGRATIONS_ROUTES.DELETE(uuid)}`,
|
|
309
309
|
CREATE: `${exports.ROOT}/${CONTROLLERS.NODE_INTEGRATIONS_CONTROLLER}/${CONTROLLERS.NODE_INTEGRATIONS_ROUTES.CREATE}`,
|
|
310
310
|
},
|
|
311
|
+
NODE_SSH: {
|
|
312
|
+
CREATE_TICKET: (uuid) => `${exports.ROOT}/${CONTROLLERS.NODE_SSH_CONTROLLER}/${CONTROLLERS.NODE_SSH_ROUTES.CREATE_TICKET(uuid)}`,
|
|
313
|
+
EVALUATE_VAULT: `${exports.ROOT}/${CONTROLLERS.NODE_SSH_CONTROLLER}/${CONTROLLERS.NODE_SSH_ROUTES.EVALUATE_VAULT}`,
|
|
314
|
+
},
|
|
311
315
|
NODE_PLUGINS: {
|
|
312
316
|
GET: (uuid) => `${exports.ROOT}/${CONTROLLERS.NODE_PLUGINS_CONTROLLER}/${CONTROLLERS.NODE_PLUGINS_ROUTES.GET(uuid)}`,
|
|
313
317
|
GET_ALL: `${exports.ROOT}/${CONTROLLERS.NODE_PLUGINS_CONTROLLER}/${CONTROLLERS.NODE_PLUGINS_ROUTES.GET_ALL}`,
|
|
@@ -28,6 +28,7 @@ __exportStar(require("./keygen"), exports);
|
|
|
28
28
|
__exportStar(require("./metadata"), exports);
|
|
29
29
|
__exportStar(require("./node-integrations"), exports);
|
|
30
30
|
__exportStar(require("./node-plugins"), exports);
|
|
31
|
+
__exportStar(require("./node-ssh"), exports);
|
|
31
32
|
__exportStar(require("./nodes"), exports);
|
|
32
33
|
__exportStar(require("./passkeys"), exports);
|
|
33
34
|
__exportStar(require("./remnawave-settings"), exports);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CreateSshTicketCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../api");
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
var CreateSshTicketCommand;
|
|
8
|
+
(function (CreateSshTicketCommand) {
|
|
9
|
+
CreateSshTicketCommand.url = api_1.REST_API.NODE_SSH.CREATE_TICKET;
|
|
10
|
+
CreateSshTicketCommand.TSQ_url = CreateSshTicketCommand.url(':uuid');
|
|
11
|
+
CreateSshTicketCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.NODE_SSH_ROUTES.CREATE_TICKET(':uuid'), 'post', 'Create a single-use ticket for opening an SSH terminal session', { scope: 'node-ssh', kind: 'write' });
|
|
12
|
+
CreateSshTicketCommand.RequestParamSchema = zod_1.z.object({
|
|
13
|
+
uuid: zod_1.z.uuid().describe('Node UUID'),
|
|
14
|
+
});
|
|
15
|
+
CreateSshTicketCommand.ResponseSchema = zod_1.z.object({
|
|
16
|
+
response: zod_1.z.object({
|
|
17
|
+
ticket: zod_1.z.string(),
|
|
18
|
+
path: zod_1.z.string(),
|
|
19
|
+
expiresInSeconds: zod_1.z.number(),
|
|
20
|
+
}),
|
|
21
|
+
});
|
|
22
|
+
})(CreateSshTicketCommand || (exports.CreateSshTicketCommand = CreateSshTicketCommand = {}));
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EvaluateVaultCommand = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
const api_1 = require("../../api");
|
|
6
|
+
const constants_1 = require("../../constants");
|
|
7
|
+
var EvaluateVaultCommand;
|
|
8
|
+
(function (EvaluateVaultCommand) {
|
|
9
|
+
EvaluateVaultCommand.url = api_1.REST_API.NODE_SSH.EVALUATE_VAULT;
|
|
10
|
+
EvaluateVaultCommand.TSQ_url = EvaluateVaultCommand.url;
|
|
11
|
+
EvaluateVaultCommand.endpointDetails = (0, constants_1.getEndpointDetails)(api_1.NODE_SSH_ROUTES.EVALUATE_VAULT, 'post', 'Oblivious evaluation step for unlocking the SSH key vault', { scope: 'node-ssh', kind: 'write' });
|
|
12
|
+
EvaluateVaultCommand.RequestBodySchema = zod_1.z.object({
|
|
13
|
+
blinded: zod_1.z.base64().max(128),
|
|
14
|
+
});
|
|
15
|
+
EvaluateVaultCommand.ResponseSchema = zod_1.z.object({
|
|
16
|
+
response: zod_1.z.object({
|
|
17
|
+
evaluated: zod_1.z.base64(),
|
|
18
|
+
}),
|
|
19
|
+
});
|
|
20
|
+
})(EvaluateVaultCommand || (exports.EvaluateVaultCommand = EvaluateVaultCommand = {}));
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./create-ssh-ticket.command"), exports);
|
|
18
|
+
__exportStar(require("./evaluate-vault.command"), exports);
|
|
@@ -1270,4 +1270,14 @@ exports.ERRORS = {
|
|
|
1270
1270
|
httpCode: 400,
|
|
1271
1271
|
}),
|
|
1272
1272
|
},
|
|
1273
|
+
EVALUATE_VAULT_ERROR: {
|
|
1274
|
+
code: 'A255',
|
|
1275
|
+
message: 'Vault evaluation refused',
|
|
1276
|
+
httpCode: 429,
|
|
1277
|
+
},
|
|
1278
|
+
CREATE_SSH_TICKET_ERROR: {
|
|
1279
|
+
code: 'A254',
|
|
1280
|
+
message: 'Create SSH ticket error',
|
|
1281
|
+
httpCode: 500,
|
|
1282
|
+
},
|
|
1273
1283
|
};
|
|
@@ -55,3 +55,4 @@ __exportStar(require("./webhook"), exports);
|
|
|
55
55
|
__exportStar(require("./xray-json-advanced"), exports);
|
|
56
56
|
__exportStar(require("./path-params.schema"), exports);
|
|
57
57
|
__exportStar(require("./host-mapper"), exports);
|
|
58
|
+
__exportStar(require("./ssh-terminal.schema"), exports);
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SshServerMessageSchema = exports.SshClientMessageSchema = exports.SshClientErrorSchema = exports.SshHostKeyReplySchema = exports.SshSignReplySchema = exports.SshIdentitiesReplySchema = exports.SshResizeMessageSchema = exports.SshOpenMessageSchema = exports.SSH_TERMINAL_WS_PROTOCOL = exports.SSH_TERMINAL_WS_PATH = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
exports.SSH_TERMINAL_WS_PATH = '/api/node-ssh/ws';
|
|
6
|
+
exports.SSH_TERMINAL_WS_PROTOCOL = 'rw';
|
|
7
|
+
const requestId = zod_1.z.number().int().nonnegative();
|
|
8
|
+
exports.SshOpenMessageSchema = zod_1.z.object({
|
|
9
|
+
t: zod_1.z.literal('open'),
|
|
10
|
+
host: zod_1.z.string().min(1).max(253),
|
|
11
|
+
port: zod_1.z.number().int().min(1).max(65535),
|
|
12
|
+
username: zod_1.z.string().min(1).max(64),
|
|
13
|
+
cols: zod_1.z.number().int().min(1).max(1000),
|
|
14
|
+
rows: zod_1.z.number().int().min(1).max(1000),
|
|
15
|
+
});
|
|
16
|
+
exports.SshResizeMessageSchema = zod_1.z.object({
|
|
17
|
+
t: zod_1.z.literal('resize'),
|
|
18
|
+
cols: zod_1.z.number().int().min(1).max(1000),
|
|
19
|
+
rows: zod_1.z.number().int().min(1).max(1000),
|
|
20
|
+
});
|
|
21
|
+
exports.SshIdentitiesReplySchema = zod_1.z.object({
|
|
22
|
+
t: zod_1.z.literal('identities'),
|
|
23
|
+
id: requestId,
|
|
24
|
+
keys: zod_1.z.array(zod_1.z.string().min(1).max(4096)).max(16),
|
|
25
|
+
});
|
|
26
|
+
exports.SshSignReplySchema = zod_1.z.object({
|
|
27
|
+
t: zod_1.z.literal('sign'),
|
|
28
|
+
id: requestId,
|
|
29
|
+
signature: zod_1.z.base64().max(2048),
|
|
30
|
+
});
|
|
31
|
+
exports.SshHostKeyReplySchema = zod_1.z.object({
|
|
32
|
+
t: zod_1.z.literal('hostkey'),
|
|
33
|
+
id: requestId,
|
|
34
|
+
accept: zod_1.z.boolean(),
|
|
35
|
+
});
|
|
36
|
+
exports.SshClientErrorSchema = zod_1.z.object({
|
|
37
|
+
t: zod_1.z.literal('error'),
|
|
38
|
+
id: requestId,
|
|
39
|
+
message: zod_1.z.string().max(500),
|
|
40
|
+
});
|
|
41
|
+
/** Browser -> panel. */
|
|
42
|
+
exports.SshClientMessageSchema = zod_1.z.discriminatedUnion('t', [
|
|
43
|
+
exports.SshOpenMessageSchema,
|
|
44
|
+
exports.SshResizeMessageSchema,
|
|
45
|
+
exports.SshIdentitiesReplySchema,
|
|
46
|
+
exports.SshSignReplySchema,
|
|
47
|
+
exports.SshHostKeyReplySchema,
|
|
48
|
+
exports.SshClientErrorSchema,
|
|
49
|
+
]);
|
|
50
|
+
/** Panel -> browser. */
|
|
51
|
+
exports.SshServerMessageSchema = zod_1.z.discriminatedUnion('t', [
|
|
52
|
+
zod_1.z.object({ t: zod_1.z.literal('agent-identities'), id: requestId }),
|
|
53
|
+
zod_1.z.object({
|
|
54
|
+
t: zod_1.z.literal('agent-sign'),
|
|
55
|
+
id: requestId,
|
|
56
|
+
publicKey: zod_1.z.base64().max(4096),
|
|
57
|
+
data: zod_1.z.base64().max(8192),
|
|
58
|
+
hash: zod_1.z.string().max(16).nullable(),
|
|
59
|
+
}),
|
|
60
|
+
zod_1.z.object({
|
|
61
|
+
t: zod_1.z.literal('hostkey'),
|
|
62
|
+
id: requestId,
|
|
63
|
+
algo: zod_1.z.string().max(64),
|
|
64
|
+
fingerprint: zod_1.z.string().max(128),
|
|
65
|
+
key: zod_1.z.base64().max(4096),
|
|
66
|
+
}),
|
|
67
|
+
zod_1.z.object({ t: zod_1.z.literal('ready') }),
|
|
68
|
+
zod_1.z.object({
|
|
69
|
+
t: zod_1.z.literal('exit'),
|
|
70
|
+
code: zod_1.z.number().int().nullable(),
|
|
71
|
+
signal: zod_1.z.string().max(32).nullable(),
|
|
72
|
+
}),
|
|
73
|
+
zod_1.z.object({ t: zod_1.z.literal('error'), message: zod_1.z.string().max(500) }),
|
|
74
|
+
]);
|
package/package.json
CHANGED