envware 1.3.3 ā 1.3.4
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/README.md +1 -0
- package/dist/app.module.js +2 -0
- package/dist/app.module.js.map +1 -1
- package/dist/commands/approve.command.d.ts +1 -0
- package/dist/commands/approve.command.js +63 -5
- package/dist/commands/approve.command.js.map +1 -1
- package/dist/commands/fingerprint.command.d.ts +8 -0
- package/dist/commands/fingerprint.command.js +97 -0
- package/dist/commands/fingerprint.command.js.map +1 -0
- package/dist/commands/keys.command.d.ts +2 -1
- package/dist/commands/keys.command.js +84 -66
- package/dist/commands/keys.command.js.map +1 -1
- package/dist/commands/team-invite.command.d.ts +1 -0
- package/dist/commands/team-invite.command.js +61 -7
- package/dist/commands/team-invite.command.js.map +1 -1
- package/dist/services/api.service.js +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -47,6 +47,7 @@ npx envware pull
|
|
|
47
47
|
- `sync-access`: Sync all your approved project accesses across devices.
|
|
48
48
|
- `team-invite <team> <email> [--all]`: Invite a user to a team. Use `--all` for instant project access.
|
|
49
49
|
- `keys`: Manage your authorized SSH keys and devices.
|
|
50
|
+
- `fingerprint`: Show your device identity (SHA256 fingerprint) for security verification.
|
|
50
51
|
- `status`: Check your plan, team, and usage.
|
|
51
52
|
|
|
52
53
|
## Security
|
package/dist/app.module.js
CHANGED
|
@@ -16,6 +16,7 @@ const pull_command_1 = require("./commands/pull.command");
|
|
|
16
16
|
const request_command_1 = require("./commands/request.command");
|
|
17
17
|
const approve_command_1 = require("./commands/approve.command");
|
|
18
18
|
const sync_access_command_1 = require("./commands/sync-access.command");
|
|
19
|
+
const fingerprint_command_1 = require("./commands/fingerprint.command");
|
|
19
20
|
const team_command_1 = require("./commands/team.command");
|
|
20
21
|
const team_invite_command_1 = require("./commands/team-invite.command");
|
|
21
22
|
const verify_command_1 = require("./commands/verify.command");
|
|
@@ -44,6 +45,7 @@ exports.AppModule = AppModule = __decorate([
|
|
|
44
45
|
request_command_1.RequestCommand,
|
|
45
46
|
approve_command_1.ApproveCommand,
|
|
46
47
|
sync_access_command_1.SyncAccessCommand,
|
|
48
|
+
fingerprint_command_1.FingerprintCommand,
|
|
47
49
|
team_command_1.TeamCommand,
|
|
48
50
|
team_invite_command_1.TeamInviteCommand,
|
|
49
51
|
verify_command_1.VerifyCommand,
|
package/dist/app.module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,8DAA0D;AAC1D,4DAAwD;AACxD,gEAA4D;AAC5D,0DAAsD;AACtD,0DAAsD;AACtD,gEAA4D;AAC5D,gEAA4D;AAC5D,wEAAmE;AACnE,0DAAsD;AACtD,wEAAmE;AACnE,8DAA0D;AAC1D,0DAAsD;AACtD,gEAA4D;AAC5D,gEAA4D;AAC5D,8DAA0D;AAC1D,8DAA0D;AAC1D,gEAA4D;AAC5D,0DAAsD;AACtD,0DAAsD;AACtD,wDAAoD;AACpD,8DAA0D;AAC1D,sEAAkE;
|
|
1
|
+
{"version":3,"file":"app.module.js","sourceRoot":"","sources":["../src/app.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,8DAA0D;AAC1D,4DAAwD;AACxD,gEAA4D;AAC5D,0DAAsD;AACtD,0DAAsD;AACtD,gEAA4D;AAC5D,gEAA4D;AAC5D,wEAAmE;AACnE,wEAAoE;AACpE,0DAAsD;AACtD,wEAAmE;AACnE,8DAA0D;AAC1D,0DAAsD;AACtD,gEAA4D;AAC5D,gEAA4D;AAC5D,8DAA0D;AAC1D,8DAA0D;AAC1D,gEAA4D;AAC5D,0DAAsD;AACtD,0DAAsD;AACtD,wDAAoD;AACpD,8DAA0D;AAC1D,sEAAkE;AA6B3D,IAAM,SAAS,GAAf,MAAM,SAAS;CAAG,CAAA;AAAZ,8BAAS;oBAAT,SAAS;IA3BrB,IAAA,eAAM,EAAC;QACN,SAAS,EAAE;YACT,8BAAa;YACb,4BAAY;YACZ,gCAAc;YACd,0BAAW;YACX,0BAAW;YACX,gCAAc;YACd,gCAAc;YACd,uCAAiB;YACjB,wCAAkB;YAClB,0BAAW;YACX,uCAAiB;YACjB,8BAAa;YACb,0BAAW;YACX,gCAAc;YACd,gCAAc;YACd,8BAAa;YACb,8BAAa;YACb,gCAAc;YACd,0BAAW;YACX,0BAAW;YACX,wBAAU;YACV,8BAAa;YACb,sCAAiB;SAClB;KACF,CAAC;GACW,SAAS,CAAG"}
|
|
@@ -7,5 +7,6 @@ export declare class ApproveCommand extends CommandRunner {
|
|
|
7
7
|
private configService;
|
|
8
8
|
private encryptionService;
|
|
9
9
|
constructor(apiService: ApiService, configService: ConfigService, encryptionService: EncryptionService);
|
|
10
|
+
private getFingerprint;
|
|
10
11
|
run(passedParams: string[]): Promise<void>;
|
|
11
12
|
}
|
|
@@ -1,10 +1,43 @@
|
|
|
1
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
2
18
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
19
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
20
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
21
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
22
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
23
|
};
|
|
24
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
+
var ownKeys = function(o) {
|
|
26
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
+
var ar = [];
|
|
28
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
+
return ar;
|
|
30
|
+
};
|
|
31
|
+
return ownKeys(o);
|
|
32
|
+
};
|
|
33
|
+
return function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
8
41
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
42
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
43
|
};
|
|
@@ -18,6 +51,7 @@ const api_service_1 = require("../services/api.service");
|
|
|
18
51
|
const config_service_1 = require("../services/config.service");
|
|
19
52
|
const encryption_service_1 = require("../services/encryption.service");
|
|
20
53
|
const chalk_1 = __importDefault(require("chalk"));
|
|
54
|
+
const crypto = __importStar(require("crypto"));
|
|
21
55
|
let ApproveCommand = class ApproveCommand extends nest_commander_1.CommandRunner {
|
|
22
56
|
apiService;
|
|
23
57
|
configService;
|
|
@@ -28,6 +62,21 @@ let ApproveCommand = class ApproveCommand extends nest_commander_1.CommandRunner
|
|
|
28
62
|
this.configService = configService;
|
|
29
63
|
this.encryptionService = encryptionService;
|
|
30
64
|
}
|
|
65
|
+
getFingerprint(publicKey) {
|
|
66
|
+
try {
|
|
67
|
+
const parts = publicKey.trim().split(' ');
|
|
68
|
+
const keyData = parts.length > 1 ? parts[1] : parts[0];
|
|
69
|
+
const binaryKey = Buffer.from(keyData, 'base64');
|
|
70
|
+
return crypto
|
|
71
|
+
.createHash('sha256')
|
|
72
|
+
.update(binaryKey)
|
|
73
|
+
.digest('base64')
|
|
74
|
+
.replace(/=+$/, '');
|
|
75
|
+
}
|
|
76
|
+
catch {
|
|
77
|
+
return 'invalid-key-format';
|
|
78
|
+
}
|
|
79
|
+
}
|
|
31
80
|
async run(passedParams) {
|
|
32
81
|
const [requestId] = passedParams;
|
|
33
82
|
try {
|
|
@@ -37,11 +86,13 @@ let ApproveCommand = class ApproveCommand extends nest_commander_1.CommandRunner
|
|
|
37
86
|
console.log(chalk_1.default.yellow('No pending access requests found. šø'));
|
|
38
87
|
return;
|
|
39
88
|
}
|
|
40
|
-
console.log(chalk_1.default.cyan('
|
|
89
|
+
console.log(chalk_1.default.cyan('\nPending Access Requests:'));
|
|
41
90
|
requests.forEach(req => {
|
|
42
|
-
|
|
91
|
+
const fingerprint = this.getFingerprint(req.publicKey);
|
|
92
|
+
console.log(chalk_1.default.white(`- [${req.id}] ${chalk_1.default.bold(req.user.email)} ā ${req.projectId}`));
|
|
93
|
+
console.log(chalk_1.default.gray(` Fingerprint: SHA256:${fingerprint}`));
|
|
43
94
|
});
|
|
44
|
-
console.log(chalk_1.default.blue('\nRun "approve <id>" to grant access.'));
|
|
95
|
+
console.log(chalk_1.default.blue('\nRun "approve <id>" to grant access. Verify the fingerprint with the user! š”ļø'));
|
|
45
96
|
return;
|
|
46
97
|
}
|
|
47
98
|
const { data: request } = await this.apiService.instance.get(`/projects/requests/${requestId}`);
|
|
@@ -52,12 +103,19 @@ let ApproveCommand = class ApproveCommand extends nest_commander_1.CommandRunner
|
|
|
52
103
|
throw new Error('Project does not have an E2EE key. Push secrets first.');
|
|
53
104
|
}
|
|
54
105
|
const projectKey = this.encryptionService.decryptProjectKey(pullData.encryptedProjectKey);
|
|
55
|
-
|
|
106
|
+
const fingerprint = this.getFingerprint(request.publicKey);
|
|
107
|
+
console.log(chalk_1.default.yellow('\nš”ļø SECURITY VERIFICATION REQUIRED'));
|
|
108
|
+
console.log(`The secrets for ${chalk_1.default.bold(request.projectId)} will be encrypted for:`);
|
|
109
|
+
console.log(`User: ${chalk_1.default.cyan(request.user.email)}`);
|
|
110
|
+
console.log(`Key: ${chalk_1.default.green('SHA256:' + fingerprint)}`);
|
|
111
|
+
console.log(chalk_1.default.gray('\nOnly proceed if you have verified this fingerprint via a secure side-channel.'));
|
|
112
|
+
console.log(chalk_1.default.gray('If someone tampered with the database, this fingerprint will NOT match the user\'s real key.\n'));
|
|
113
|
+
console.log(chalk_1.default.blue(`Encrypting project key...`));
|
|
56
114
|
const encryptedForRecipient = this.encryptionService.encryptProjectKey(projectKey, request.publicKey);
|
|
57
115
|
await this.apiService.instance.post(`/projects/requests/${requestId}/approve`, {
|
|
58
116
|
encryptedProjectKey: encryptedForRecipient,
|
|
59
117
|
});
|
|
60
|
-
console.log(chalk_1.default.green(`ā Approved ${request.user.email}
|
|
118
|
+
console.log(chalk_1.default.green(`ā Approved! Access granted to ${request.user.email}. šøš`));
|
|
61
119
|
}
|
|
62
120
|
catch (error) {
|
|
63
121
|
const errorMessage = error.response?.data?.message || error.message;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"approve.command.js","sourceRoot":"","sources":["../../src/commands/approve.command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"approve.command.js","sourceRoot":"","sources":["../../src/commands/approve.command.ts"],"names":[],"mappings":";;;;;;;;;;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AC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,MAAM,YAAY,GAAG,KAAK,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,IAAI,KAAK,CAAC,OAAO,CAAC;YACpE,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,mBAAmB,GAAG,YAAY,CAAC,CAAC,CAAC;QAC7D,CAAC;IACH,CAAC;CACF,CAAA;AAzFY,wCAAc;yBAAd,cAAc;IAJ1B,IAAA,wBAAO,EAAC;QACP,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,mDAAmD;KACjE,CAAC;qCAGsB,wBAAU;QACP,8BAAa;QACT,sCAAiB;GAJnC,cAAc,CAyF1B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CommandRunner } from 'nest-commander';
|
|
2
|
+
import { EncryptionService } from '../services/encryption.service';
|
|
3
|
+
export declare class FingerprintCommand extends CommandRunner {
|
|
4
|
+
private encryptionService;
|
|
5
|
+
constructor(encryptionService: EncryptionService);
|
|
6
|
+
private getFingerprint;
|
|
7
|
+
run(): Promise<void>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
19
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
20
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
21
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
22
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
23
|
+
};
|
|
24
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
+
var ownKeys = function(o) {
|
|
26
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
+
var ar = [];
|
|
28
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
+
return ar;
|
|
30
|
+
};
|
|
31
|
+
return ownKeys(o);
|
|
32
|
+
};
|
|
33
|
+
return function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
41
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
42
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
43
|
+
};
|
|
44
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
45
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
46
|
+
};
|
|
47
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
+
exports.FingerprintCommand = void 0;
|
|
49
|
+
const nest_commander_1 = require("nest-commander");
|
|
50
|
+
const encryption_service_1 = require("../services/encryption.service");
|
|
51
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
52
|
+
const crypto = __importStar(require("crypto"));
|
|
53
|
+
let FingerprintCommand = class FingerprintCommand extends nest_commander_1.CommandRunner {
|
|
54
|
+
encryptionService;
|
|
55
|
+
constructor(encryptionService) {
|
|
56
|
+
super();
|
|
57
|
+
this.encryptionService = encryptionService;
|
|
58
|
+
}
|
|
59
|
+
getFingerprint(publicKey) {
|
|
60
|
+
try {
|
|
61
|
+
const parts = publicKey.trim().split(' ');
|
|
62
|
+
const keyData = parts.length > 1 ? parts[1] : parts[0];
|
|
63
|
+
const binaryKey = Buffer.from(keyData, 'base64');
|
|
64
|
+
return crypto
|
|
65
|
+
.createHash('sha256')
|
|
66
|
+
.update(binaryKey)
|
|
67
|
+
.digest('base64')
|
|
68
|
+
.replace(/=+$/, '');
|
|
69
|
+
}
|
|
70
|
+
catch {
|
|
71
|
+
return 'invalid-key-format';
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
async run() {
|
|
75
|
+
try {
|
|
76
|
+
const publicKey = this.encryptionService.getPublicKey();
|
|
77
|
+
const fingerprint = this.getFingerprint(publicKey);
|
|
78
|
+
console.log(chalk_1.default.bold('\nš Your Device Identity'));
|
|
79
|
+
console.log('-----------------------');
|
|
80
|
+
console.log(`Fingerprint: ${chalk_1.default.green('SHA256:' + fingerprint)}`);
|
|
81
|
+
console.log('\n' + chalk_1.default.gray('Give this fingerprint to project owners to verify your identity before they approve your access.'));
|
|
82
|
+
console.log(chalk_1.default.gray('This ensures your secrets are encrypted specifically for this device. šø\n'));
|
|
83
|
+
}
|
|
84
|
+
catch (error) {
|
|
85
|
+
console.log(chalk_1.default.red('Error: ' + error.message));
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
exports.FingerprintCommand = FingerprintCommand;
|
|
90
|
+
exports.FingerprintCommand = FingerprintCommand = __decorate([
|
|
91
|
+
(0, nest_commander_1.Command)({
|
|
92
|
+
name: 'fingerprint',
|
|
93
|
+
description: 'Show the SHA256 fingerprint of your local SSH public key',
|
|
94
|
+
}),
|
|
95
|
+
__metadata("design:paramtypes", [encryption_service_1.EncryptionService])
|
|
96
|
+
], FingerprintCommand);
|
|
97
|
+
//# sourceMappingURL=fingerprint.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fingerprint.command.js","sourceRoot":"","sources":["../../src/commands/fingerprint.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAwD;AACxD,uEAAmE;AACnE,kDAA0B;AAC1B,+CAAiC;AAM1B,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,8BAAa;IAC/B;IAApB,YAAoB,iBAAoC;QACtD,KAAK,EAAE,CAAC;QADU,sBAAiB,GAAjB,iBAAiB,CAAmB;IAExD,CAAC;IAEO,cAAc,CAAC,SAAiB;QACtC,IAAI,CAAC;YACH,MAAM,KAAK,GAAG,SAAS,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC1C,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACvD,MAAM,SAAS,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;YACjD,OAAO,MAAM;iBACV,UAAU,CAAC,QAAQ,CAAC;iBACpB,MAAM,CAAC,SAAS,CAAC;iBACjB,MAAM,CAAC,QAAQ,CAAC;iBAChB,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACxB,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,oBAAoB,CAAC;QAC9B,CAAC;IACH,CAAC;IAED,KAAK,CAAC,GAAG;QACP,IAAI,CAAC;YACH,MAAM,SAAS,GAAG,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,CAAC;YACxD,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;YAEnD,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAC,CAAC;YACrD,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;YACvC,OAAO,CAAC,GAAG,CAAC,gBAAgB,eAAK,CAAC,KAAK,CAAC,SAAS,GAAG,WAAW,CAAC,EAAE,CAAC,CAAC;YACpE,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,eAAK,CAAC,IAAI,CAAC,kGAAkG,CAAC,CAAC,CAAC;YACnI,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,IAAI,CAAC,4EAA4E,CAAC,CAAC,CAAC;QACxG,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QACpD,CAAC;IACH,CAAC;CACF,CAAA;AAlCY,gDAAkB;6BAAlB,kBAAkB;IAJ9B,IAAA,wBAAO,EAAC;QACP,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,0DAA0D;KACxE,CAAC;qCAEuC,sCAAiB;GAD7C,kBAAkB,CAkC9B"}
|
|
@@ -5,7 +5,8 @@ export declare class KeysCommand extends CommandRunner {
|
|
|
5
5
|
private apiService;
|
|
6
6
|
private encryptionService;
|
|
7
7
|
constructor(apiService: ApiService, encryptionService: EncryptionService);
|
|
8
|
+
private getFingerprint;
|
|
8
9
|
run(passedParams: string[]): Promise<void>;
|
|
10
|
+
private addKey;
|
|
9
11
|
private listKeys;
|
|
10
|
-
private removeKey;
|
|
11
12
|
}
|
|
@@ -1,10 +1,43 @@
|
|
|
1
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
2
18
|
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
19
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
20
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
21
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
22
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
23
|
};
|
|
24
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
+
var ownKeys = function(o) {
|
|
26
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
+
var ar = [];
|
|
28
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
+
return ar;
|
|
30
|
+
};
|
|
31
|
+
return ownKeys(o);
|
|
32
|
+
};
|
|
33
|
+
return function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
8
41
|
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
42
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
43
|
};
|
|
@@ -17,7 +50,7 @@ const nest_commander_1 = require("nest-commander");
|
|
|
17
50
|
const api_service_1 = require("../services/api.service");
|
|
18
51
|
const encryption_service_1 = require("../services/encryption.service");
|
|
19
52
|
const chalk_1 = __importDefault(require("chalk"));
|
|
20
|
-
const
|
|
53
|
+
const crypto = __importStar(require("crypto"));
|
|
21
54
|
let KeysCommand = class KeysCommand extends nest_commander_1.CommandRunner {
|
|
22
55
|
apiService;
|
|
23
56
|
encryptionService;
|
|
@@ -26,92 +59,77 @@ let KeysCommand = class KeysCommand extends nest_commander_1.CommandRunner {
|
|
|
26
59
|
this.apiService = apiService;
|
|
27
60
|
this.encryptionService = encryptionService;
|
|
28
61
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
62
|
+
getFingerprint(publicKey) {
|
|
63
|
+
try {
|
|
64
|
+
const parts = publicKey.trim().split(' ');
|
|
65
|
+
const keyData = parts.length > 1 ? parts[1] : parts[0];
|
|
66
|
+
const binaryKey = Buffer.from(keyData, 'base64');
|
|
67
|
+
return crypto
|
|
68
|
+
.createHash('sha256')
|
|
69
|
+
.update(binaryKey)
|
|
70
|
+
.digest('base64')
|
|
71
|
+
.replace(/=+$/, '');
|
|
33
72
|
}
|
|
34
|
-
|
|
35
|
-
|
|
73
|
+
catch {
|
|
74
|
+
return 'unknown';
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
async run(passedParams) {
|
|
78
|
+
const [action] = passedParams;
|
|
79
|
+
if (action === '--add' || action === 'add') {
|
|
80
|
+
await this.addKey();
|
|
36
81
|
}
|
|
37
82
|
else {
|
|
38
|
-
|
|
83
|
+
await this.listKeys();
|
|
39
84
|
}
|
|
40
85
|
}
|
|
41
|
-
async
|
|
86
|
+
async addKey() {
|
|
42
87
|
try {
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
console.log(chalk_1.default.bold('\nš Authorized SSH Keys / Devices:'));
|
|
51
|
-
console.log('-----------------------------------');
|
|
52
|
-
keys.forEach((k) => {
|
|
53
|
-
const isCurrent = k.publicKey === currentPublicKey;
|
|
54
|
-
const status = k.isVerified ? chalk_1.default.green('Verified') : chalk_1.default.yellow('Pending');
|
|
55
|
-
const prefix = isCurrent ? chalk_1.default.magenta('ā ') : ' ';
|
|
56
|
-
const label = isCurrent ? chalk_1.default.magenta(' (Current Device)') : '';
|
|
57
|
-
console.log(`${prefix}${chalk_1.default.cyan(k.id)}${label}`);
|
|
58
|
-
console.log(` Status: ${status}`);
|
|
59
|
-
console.log(` Key: ${k.publicKey.substring(0, 40)}...`);
|
|
60
|
-
console.log(` Added: ${new Date(k.createdAt).toLocaleDateString()}\n`);
|
|
88
|
+
const publicKey = this.encryptionService.getPublicKey();
|
|
89
|
+
const fingerprint = this.getFingerprint(publicKey);
|
|
90
|
+
console.log(chalk_1.default.blue('Registering your local SSH key...'));
|
|
91
|
+
console.log(chalk_1.default.yellow(`Your Fingerprint: ${chalk_1.default.bold('SHA256:' + fingerprint)}`));
|
|
92
|
+
await this.apiService.instance.post('/secrets/public-key', {
|
|
93
|
+
publicKey,
|
|
61
94
|
});
|
|
95
|
+
console.log(chalk_1.default.green('ā SSH Key registered successfully! šø'));
|
|
96
|
+
console.log(chalk_1.default.gray('Give the fingerprint above to project owners to verify your identity.'));
|
|
62
97
|
}
|
|
63
98
|
catch (error) {
|
|
64
|
-
console.log(chalk_1.default.red('Failed to
|
|
99
|
+
console.log(chalk_1.default.red('Failed to add key: ' + error.message));
|
|
65
100
|
}
|
|
66
101
|
}
|
|
67
|
-
async
|
|
102
|
+
async listKeys() {
|
|
68
103
|
try {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
const choices = keys.map((k) => ({
|
|
78
|
-
name: `${k.id} [${k.isVerified ? 'Verified' : 'Pending'}]${k.publicKey === currentPublicKey ? ' (Current Device)' : ''}`,
|
|
79
|
-
value: k.id,
|
|
80
|
-
}));
|
|
81
|
-
const answer = await inquirer_1.default.prompt([
|
|
82
|
-
{
|
|
83
|
-
type: 'list',
|
|
84
|
-
name: 'selectedId',
|
|
85
|
-
message: 'Select a key to REVOKE access:',
|
|
86
|
-
choices,
|
|
87
|
-
},
|
|
88
|
-
]);
|
|
89
|
-
idToDelete = answer.selectedId;
|
|
90
|
-
}
|
|
91
|
-
const { confirm } = await inquirer_1.default.prompt([
|
|
92
|
-
{
|
|
93
|
-
type: 'confirm',
|
|
94
|
-
name: 'confirm',
|
|
95
|
-
message: chalk_1.default.red(`Are you sure you want to REVOKE access for key ${idToDelete}? This device will no longer be able to push/pull secrets.`),
|
|
96
|
-
default: false,
|
|
97
|
-
},
|
|
98
|
-
]);
|
|
99
|
-
if (!confirm) {
|
|
100
|
-
console.log(chalk_1.default.yellow('Operation cancelled.'));
|
|
104
|
+
const { data: me } = await this.apiService.instance.get('/auth/me');
|
|
105
|
+
const { data: userData } = await this.apiService.instance.get('/secrets/public-key', {
|
|
106
|
+
params: { email: me.email }
|
|
107
|
+
});
|
|
108
|
+
console.log(chalk_1.default.blue('\nYour Registered SSH Keys: šø'));
|
|
109
|
+
const publicKeys = userData.publicKeys || [];
|
|
110
|
+
if (publicKeys.length === 0) {
|
|
111
|
+
console.log(chalk_1.default.yellow('No keys registered yet. Run "envw keys --add" to register this device.'));
|
|
101
112
|
return;
|
|
102
113
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
114
|
+
publicKeys.forEach((key, index) => {
|
|
115
|
+
const fingerprint = this.getFingerprint(key);
|
|
116
|
+
const isCurrent = key.trim() === this.encryptionService.getPublicKey().trim();
|
|
117
|
+
const prefix = isCurrent ? chalk_1.default.green('ā ') : ' ';
|
|
118
|
+
console.log(`${prefix}[${index}] SHA256:${chalk_1.default.cyan(fingerprint)}${isCurrent ? chalk_1.default.green(' (Current Device)') : ''}`);
|
|
119
|
+
});
|
|
120
|
+
console.log('');
|
|
106
121
|
}
|
|
107
122
|
catch (error) {
|
|
108
|
-
console.log(chalk_1.default.red('Failed to
|
|
123
|
+
console.log(chalk_1.default.red('Failed to list keys: ' + error.message));
|
|
109
124
|
}
|
|
110
125
|
}
|
|
111
126
|
};
|
|
112
127
|
exports.KeysCommand = KeysCommand;
|
|
113
128
|
exports.KeysCommand = KeysCommand = __decorate([
|
|
114
|
-
(0, nest_commander_1.Command)({
|
|
129
|
+
(0, nest_commander_1.Command)({
|
|
130
|
+
name: 'keys',
|
|
131
|
+
description: 'Manage your authorized SSH keys and devices',
|
|
132
|
+
}),
|
|
115
133
|
__metadata("design:paramtypes", [api_service_1.ApiService,
|
|
116
134
|
encryption_service_1.EncryptionService])
|
|
117
135
|
], KeysCommand);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keys.command.js","sourceRoot":"","sources":["../../src/commands/keys.command.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"keys.command.js","sourceRoot":"","sources":["../../src/commands/keys.command.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mDAAwD;AACxD,yDAAqD;AACrD,uEAAmE;AACnE,kDAA0B;AAC1B,+CAAiC;AAM1B,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,8BAAa;IAElC;IACA;IAFV,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E,CAAC,CAAC,CAAC;gBACpG,OAAO;YACT,CAAC;YAED,UAAU,CAAC,OAAO,CAAC,CAAC,GAAW,EAAE,KAAa,EAAE,EAAE;gBAChD,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;gBAC7C,MAAM,SAAS,GAAG,GAAG,CAAC,IAAI,EAAE,KAAK,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,CAAC;gBAC9E,MAAM,MAAM,GAAG,SAAS,CAAC,CAAC,CAAC,eAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;gBACpD,OAAO,CAAC,GAAG,CAAC,GAAG,MAAM,IAAI,KAAK,YAAY,eAAK,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,eAAK,CAAC,KAAK,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;YAC3H,CAAC,CAAC,CAAC;YACH,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAClB,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,GAAG,CAAC,uBAAuB,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;QAClE,CAAC;IACH,CAAC;CACF,CAAA;AA/EY,kCAAW;sBAAX,WAAW;IAJvB,IAAA,wBAAO,EAAC;QACP,IAAI,EAAE,MAAM;QACZ,WAAW,EAAE,6CAA6C;KAC3D,CAAC;qCAGsB,wBAAU;QACH,sCAAiB;GAHnC,WAAW,CA+EvB"}
|
|
@@ -11,6 +11,7 @@ export declare class TeamInviteCommand extends CommandRunner {
|
|
|
11
11
|
private encryptionService;
|
|
12
12
|
private configService;
|
|
13
13
|
constructor(apiService: ApiService, encryptionService: EncryptionService, configService: ConfigService);
|
|
14
|
+
private getFingerprint;
|
|
14
15
|
run(passedParams: string[], options?: TeamInviteOptions): Promise<void>;
|
|
15
16
|
parseRole(val: string): string;
|
|
16
17
|
parseAll(val: boolean): boolean;
|