@p0security/cli 0.11.3 → 0.12.0
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/dist/commands/__tests__/login.test.js +34 -13
- package/dist/commands/__tests__/login.test.js.map +1 -1
- package/dist/commands/__tests__/ssh.test.js +23 -15
- package/dist/commands/__tests__/ssh.test.js.map +1 -1
- package/dist/commands/allow.js +1 -1
- package/dist/commands/allow.js.map +1 -1
- package/dist/commands/aws/role.js +2 -2
- package/dist/commands/aws/role.js.map +1 -1
- package/dist/commands/grant.js +1 -1
- package/dist/commands/grant.js.map +1 -1
- package/dist/commands/index.js +2 -0
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/kubeconfig.js +1 -1
- package/dist/commands/kubeconfig.js.map +1 -1
- package/dist/commands/login.js +10 -5
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/ls.js +3 -4
- package/dist/commands/ls.js.map +1 -1
- package/dist/commands/request.js +1 -1
- package/dist/commands/request.js.map +1 -1
- package/dist/commands/scp.js +1 -1
- package/dist/commands/scp.js.map +1 -1
- package/dist/commands/shared/request.d.ts +1 -0
- package/dist/commands/shared/request.js +9 -1
- package/dist/commands/shared/request.js.map +1 -1
- package/dist/commands/shared/ssh.js +11 -7
- package/dist/commands/shared/ssh.js.map +1 -1
- package/dist/commands/ssh-keygen.d.ts +2 -0
- package/dist/commands/ssh-keygen.js +28 -0
- package/dist/commands/ssh-keygen.js.map +1 -0
- package/dist/commands/ssh.js +1 -1
- package/dist/commands/ssh.js.map +1 -1
- package/dist/common/install.d.ts +3 -0
- package/dist/common/install.js +12 -1
- package/dist/common/install.js.map +1 -1
- package/dist/common/keys.d.ts +1 -0
- package/dist/common/keys.js +4 -3
- package/dist/common/keys.js.map +1 -1
- package/dist/drivers/api.d.ts +10 -0
- package/dist/drivers/api.js +2 -12
- package/dist/drivers/api.js.map +1 -1
- package/dist/drivers/auth.d.ts +1 -4
- package/dist/drivers/auth.js +5 -21
- package/dist/drivers/auth.js.map +1 -1
- package/dist/drivers/config.d.ts +15 -0
- package/dist/drivers/config.js +53 -0
- package/dist/drivers/config.js.map +1 -0
- package/dist/drivers/env.d.ts +1 -1
- package/dist/drivers/env.js +2 -2
- package/dist/drivers/env.js.map +1 -1
- package/dist/drivers/firestore.d.ts +16 -3
- package/dist/drivers/firestore.js +52 -22
- package/dist/drivers/firestore.js.map +1 -1
- package/dist/plugins/aws/ssh.js +4 -4
- package/dist/plugins/aws/ssh.js.map +1 -1
- package/dist/plugins/aws/types.d.ts +15 -15
- package/dist/plugins/azure/install.d.ts +1 -0
- package/dist/plugins/azure/install.js +33 -0
- package/dist/plugins/azure/install.js.map +1 -0
- package/dist/plugins/azure/ssh.d.ts +15 -0
- package/dist/plugins/azure/ssh.js +58 -0
- package/dist/plugins/azure/ssh.js.map +1 -0
- package/dist/plugins/azure/types.d.ts +41 -0
- package/dist/plugins/azure/types.js +3 -0
- package/dist/plugins/azure/types.js.map +1 -0
- package/dist/plugins/google/login.js +6 -4
- package/dist/plugins/google/login.js.map +1 -1
- package/dist/plugins/google/ssh.js +4 -4
- package/dist/plugins/google/ssh.js.map +1 -1
- package/dist/plugins/google/types.d.ts +5 -6
- package/dist/public/favicon.ico +0 -0
- package/dist/types/org.d.ts +3 -0
- package/dist/types/org.js +0 -10
- package/dist/types/org.js.map +1 -1
- package/dist/types/request.d.ts +3 -1
- package/dist/types/ssh.d.ts +5 -4
- package/dist/types/ssh.js +1 -1
- package/dist/types/ssh.js.map +1 -1
- package/dist/util.js +3 -1
- package/dist/util.js.map +1 -1
- package/package.json +2 -1
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ensureAzInstall = void 0;
|
|
13
|
+
/** Copyright © 2024-present P0 Security
|
|
14
|
+
|
|
15
|
+
This file is part of @p0security/cli
|
|
16
|
+
|
|
17
|
+
@p0security/cli is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License.
|
|
18
|
+
|
|
19
|
+
@p0security/cli is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
20
|
+
|
|
21
|
+
You should have received a copy of the GNU General Public License along with @p0security/cli. If not, see <https://www.gnu.org/licenses/>.
|
|
22
|
+
**/
|
|
23
|
+
const install_1 = require("../../common/install");
|
|
24
|
+
const AzItems = [...install_1.HomebrewItems, "az"];
|
|
25
|
+
const AzInstall = Object.assign(Object.assign({}, install_1.HomebrewInstall), { az: {
|
|
26
|
+
label: "Azure command-line interface",
|
|
27
|
+
commands: {
|
|
28
|
+
darwin: ["brew update", "brew install azure-cli"],
|
|
29
|
+
},
|
|
30
|
+
} });
|
|
31
|
+
const ensureAzInstall = () => __awaiter(void 0, void 0, void 0, function* () { return yield (0, install_1.ensureInstall)(AzItems, AzInstall); });
|
|
32
|
+
exports.ensureAzInstall = ensureAzInstall;
|
|
33
|
+
//# sourceMappingURL=install.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../../src/plugins/azure/install.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;GASG;AACH,kDAK8B;AAE9B,MAAM,OAAO,GAAG,CAAC,GAAG,uBAAa,EAAE,IAAI,CAAU,CAAC;AAGlD,MAAM,SAAS,mCACV,yBAAe,KAClB,EAAE,EAAE;QACF,KAAK,EAAE,8BAA8B;QACrC,QAAQ,EAAE;YACR,MAAM,EAAE,CAAC,aAAa,EAAE,wBAAwB,CAAC;SAClD;KACF,GACF,CAAC;AAEK,MAAM,eAAe,GAAG,GAAS,EAAE,kDACxC,OAAA,MAAM,IAAA,uBAAa,EAAC,OAAO,EAAE,SAAS,CAAC,CAAA,GAAA,CAAC;AAD7B,QAAA,eAAe,mBACc"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Copyright © 2024-present P0 Security
|
|
2
|
+
|
|
3
|
+
This file is part of @p0security/cli
|
|
4
|
+
|
|
5
|
+
@p0security/cli is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License.
|
|
6
|
+
|
|
7
|
+
@p0security/cli is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
8
|
+
|
|
9
|
+
You should have received a copy of the GNU General Public License along with @p0security/cli. If not, see <https://www.gnu.org/licenses/>.
|
|
10
|
+
**/
|
|
11
|
+
import { SshProvider } from "../../types/ssh";
|
|
12
|
+
import { AzureSshPermissionSpec, AzureSshRequest } from "./types";
|
|
13
|
+
export declare const azureSshProvider: SshProvider<AzureSshPermissionSpec, {
|
|
14
|
+
linuxUserName: string;
|
|
15
|
+
}, AzureSshRequest>;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.azureSshProvider = void 0;
|
|
13
|
+
const util_1 = require("../../util");
|
|
14
|
+
const ssh_key_1 = require("../google/ssh-key");
|
|
15
|
+
const install_1 = require("./install");
|
|
16
|
+
// TODO: Determine what this value should be for Azure
|
|
17
|
+
const PROPAGATION_TIMEOUT_LIMIT_MS = 2 * 60 * 1000;
|
|
18
|
+
exports.azureSshProvider = {
|
|
19
|
+
// TODO: Natively support Azure login in P0 CLI
|
|
20
|
+
cloudProviderLogin: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
21
|
+
// Always invoke `az login` before each SSH access. This is needed because
|
|
22
|
+
// Azure permissions are only updated upon login.
|
|
23
|
+
yield (0, util_1.exec)("az", ["login"]);
|
|
24
|
+
return undefined;
|
|
25
|
+
}),
|
|
26
|
+
ensureInstall: () => __awaiter(void 0, void 0, void 0, function* () {
|
|
27
|
+
if (!(yield (0, install_1.ensureAzInstall)())) {
|
|
28
|
+
throw "Please try again after installing the Azure CLI tool.";
|
|
29
|
+
}
|
|
30
|
+
}),
|
|
31
|
+
friendlyName: "Microsoft Azure",
|
|
32
|
+
loginRequiredMessage: "Please log in to Azure with 'az login' to continue.",
|
|
33
|
+
// TODO: Determine value
|
|
34
|
+
loginRequiredPattern: undefined,
|
|
35
|
+
propagationTimeoutMs: PROPAGATION_TIMEOUT_LIMIT_MS,
|
|
36
|
+
// TODO: Implement
|
|
37
|
+
preTestAccessPropagationArgs: () => undefined,
|
|
38
|
+
// TODO: Determine if necessary
|
|
39
|
+
proxyCommand: () => [],
|
|
40
|
+
// TODO: Determine if necessary
|
|
41
|
+
reproCommands: () => undefined,
|
|
42
|
+
// TODO: Placeholder
|
|
43
|
+
requestToSsh: (request) => ({
|
|
44
|
+
type: "azure",
|
|
45
|
+
id: request.permission.resource.instanceId,
|
|
46
|
+
instanceId: request.permission.resource.instanceId,
|
|
47
|
+
linuxUserName: request.cliLocalData.linuxUserName,
|
|
48
|
+
}),
|
|
49
|
+
// TODO: Implement
|
|
50
|
+
unprovisionedAccessPatterns: [],
|
|
51
|
+
// TODO: Placeholder
|
|
52
|
+
toCliRequest: (request, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
53
|
+
return (Object.assign(Object.assign({}, request), { cliLocalData: {
|
|
54
|
+
linuxUserName: yield (0, ssh_key_1.importSshKey)(request.permission.publicKey, options),
|
|
55
|
+
} }));
|
|
56
|
+
}),
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=ssh.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ssh.js","sourceRoot":"","sources":["../../../src/plugins/azure/ssh.ts"],"names":[],"mappings":";;;;;;;;;;;;AAWA,qCAAkC;AAClC,+CAAiD;AACjD,uCAA4C;AAG5C,sDAAsD;AACtD,MAAM,4BAA4B,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;AAEtC,QAAA,gBAAgB,GAIzB;IACF,+CAA+C;IAC/C,kBAAkB,EAAE,GAAS,EAAE;QAC7B,0EAA0E;QAC1E,iDAAiD;QACjD,MAAM,IAAA,WAAI,EAAC,IAAI,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;QAC5B,OAAO,SAAS,CAAC;IACnB,CAAC,CAAA;IAED,aAAa,EAAE,GAAS,EAAE;QACxB,IAAI,CAAC,CAAC,MAAM,IAAA,yBAAe,GAAE,CAAC,EAAE;YAC9B,MAAM,uDAAuD,CAAC;SAC/D;IACH,CAAC,CAAA;IAED,YAAY,EAAE,iBAAiB;IAE/B,oBAAoB,EAAE,qDAAqD;IAE3E,wBAAwB;IACxB,oBAAoB,EAAE,SAAS;IAE/B,oBAAoB,EAAE,4BAA4B;IAElD,kBAAkB;IAClB,4BAA4B,EAAE,GAAG,EAAE,CAAC,SAAS;IAE7C,+BAA+B;IAC/B,YAAY,EAAE,GAAG,EAAE,CAAC,EAAE;IAEtB,+BAA+B;IAC/B,aAAa,EAAE,GAAG,EAAE,CAAC,SAAS;IAE9B,oBAAoB;IACpB,YAAY,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;QAC1B,IAAI,EAAE,OAAO;QACb,EAAE,EAAE,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAU;QAC1C,UAAU,EAAE,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,UAAU;QAClD,aAAa,EAAE,OAAO,CAAC,YAAY,CAAC,aAAa;KAClD,CAAC;IAEF,kBAAkB;IAClB,2BAA2B,EAAE,EAAE;IAE/B,oBAAoB;IACpB,YAAY,EAAE,CAAO,OAAO,EAAE,OAAO,EAAE,EAAE;QAAC,OAAA,iCACrC,OAAO,KACV,YAAY,EAAE;gBACZ,aAAa,EAAE,MAAM,IAAA,sBAAY,EAAC,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,OAAO,CAAC;aACzE,IACD,CAAA;MAAA;CACH,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/** Copyright © 2024-present P0 Security
|
|
2
|
+
|
|
3
|
+
This file is part of @p0security/cli
|
|
4
|
+
|
|
5
|
+
@p0security/cli is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License.
|
|
6
|
+
|
|
7
|
+
@p0security/cli is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
8
|
+
|
|
9
|
+
You should have received a copy of the GNU General Public License along with @p0security/cli. If not, see <https://www.gnu.org/licenses/>.
|
|
10
|
+
**/
|
|
11
|
+
import { PermissionSpec } from "../../types/request";
|
|
12
|
+
import { CliPermissionSpec } from "../../types/ssh";
|
|
13
|
+
import { CommonSshPermissionSpec } from "../ssh/types";
|
|
14
|
+
export type AzureSshPermissionSpec = PermissionSpec<"ssh", AzureSshPermission>;
|
|
15
|
+
export type AzureSsh = CliPermissionSpec<AzureSshPermissionSpec, {
|
|
16
|
+
linuxUserName: string;
|
|
17
|
+
}>;
|
|
18
|
+
export type AzureSshPermission = CommonSshPermissionSpec & {
|
|
19
|
+
provider: "azure";
|
|
20
|
+
destination: string;
|
|
21
|
+
parent: string | undefined;
|
|
22
|
+
group: string | undefined;
|
|
23
|
+
resource: {
|
|
24
|
+
instanceName: string;
|
|
25
|
+
instanceId: string;
|
|
26
|
+
subscriptionId: string;
|
|
27
|
+
subscriptionName: string;
|
|
28
|
+
resourceGroupId: string;
|
|
29
|
+
region: string;
|
|
30
|
+
networkInterfaceIds: string[];
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export type AzureNodeSpec = {
|
|
34
|
+
type: "azure";
|
|
35
|
+
instanceId: string;
|
|
36
|
+
sudo?: boolean;
|
|
37
|
+
};
|
|
38
|
+
export type AzureSshRequest = AzureNodeSpec & {
|
|
39
|
+
id: string;
|
|
40
|
+
linuxUserName: string;
|
|
41
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/plugins/azure/types.ts"],"names":[],"mappings":""}
|
|
@@ -26,7 +26,7 @@ You should have received a copy of the GNU General Public License along with @p0
|
|
|
26
26
|
const oidc_1 = require("../../common/auth/oidc");
|
|
27
27
|
const server_1 = require("../../common/auth/server");
|
|
28
28
|
const fetch_1 = require("../../common/fetch");
|
|
29
|
-
const
|
|
29
|
+
const config_1 = require("../../drivers/config");
|
|
30
30
|
const stdio_1 = require("../../drivers/stdio");
|
|
31
31
|
const open_1 = __importDefault(require("open"));
|
|
32
32
|
const GOOGLE_OIDC_URL = "https://accounts.google.com/o/oauth2/v2/auth";
|
|
@@ -35,10 +35,11 @@ const GOOGLE_OIDC_REDIRECT_PORT = 52700;
|
|
|
35
35
|
const GOOGLE_OIDC_REDIRECT_URL = `http://127.0.0.1:${GOOGLE_OIDC_REDIRECT_PORT}`;
|
|
36
36
|
const PKCE_LENGTH = 128;
|
|
37
37
|
const requestAuth = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
38
|
+
const tenantConfig = (0, config_1.getTenantConfig)();
|
|
38
39
|
const pkceChallenge = (yield import("pkce-challenge")).default;
|
|
39
40
|
const pkce = yield pkceChallenge(PKCE_LENGTH);
|
|
40
41
|
const authBody = {
|
|
41
|
-
client_id:
|
|
42
|
+
client_id: tenantConfig.google.clientId,
|
|
42
43
|
code_challenge: pkce.code_challenge,
|
|
43
44
|
code_challenge_method: "S256",
|
|
44
45
|
redirect_uri: GOOGLE_OIDC_REDIRECT_URL,
|
|
@@ -54,9 +55,10 @@ ${url}`);
|
|
|
54
55
|
return pkce;
|
|
55
56
|
});
|
|
56
57
|
const requestToken = (code, pkce) => __awaiter(void 0, void 0, void 0, function* () {
|
|
58
|
+
const tenantConfig = (0, config_1.getTenantConfig)();
|
|
57
59
|
const body = {
|
|
58
|
-
client_id:
|
|
59
|
-
client_secret:
|
|
60
|
+
client_id: tenantConfig.google.clientId,
|
|
61
|
+
client_secret: tenantConfig.google.clientSecret,
|
|
60
62
|
code,
|
|
61
63
|
code_verifier: pkce.code_verifier,
|
|
62
64
|
grant_type: "authorization_code",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../../src/plugins/google/login.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;GASG;AACH,iDAAsD;AACtD,qDAA8D;AAC9D,8CAAiE;AACjE,
|
|
1
|
+
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../../src/plugins/google/login.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;;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C,aAAa,EAAE,YAAY,CAAC,MAAM,CAAC,YAAY;QAC/C,IAAI;QACJ,aAAa,EAAE,IAAI,CAAC,aAAa;QACjC,UAAU,EAAE,oBAAoB;QAChC,YAAY,EAAE,wBAAwB;KACvC,CAAC;IACF,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,wBAAwB,EAAE;QACrD,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,mBAAY;QACrB,IAAI,EAAE,IAAA,iBAAS,EAAC,IAAI,CAAC;KACtB,CAAC,CAAC;IACH,MAAM,KAAK,GAAG,MAAM,IAAA,wBAAgB,EAAC,QAAQ,CAAC,CAAC;IAC/C,OAAO,CAAC,MAAM,KAAK,CAAC,IAAI,EAAE,CAAkB,CAAC;AAC/C,CAAC,CAAA,CAAC;AAEK,MAAM,WAAW,GAAG,GAAS,EAAE;IACpC,OAAO,MAAM,IAAA,2BAAkB,EAC7B,GAAS,EAAE,kDAAC,OAAA,MAAM,WAAW,EAAE,CAAA,GAAA,EAC/B,CAAO,IAAI,EAAE,KAAK,EAAE,EAAE,kDAAC,OAAA,MAAM,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA,GAAA,EAC3D,EAAE,IAAI,EAAE,yBAAyB,EAAE,CACpC,CAAC;AACJ,CAAC,CAAA,CAAC;AANW,QAAA,WAAW,eAMtB"}
|
|
@@ -97,9 +97,9 @@ exports.gcpSshProvider = {
|
|
|
97
97
|
reproCommands: () => undefined,
|
|
98
98
|
requestToSsh: (request) => {
|
|
99
99
|
return {
|
|
100
|
-
id: request.permission.
|
|
101
|
-
projectId: request.permission.
|
|
102
|
-
zone: request.permission.
|
|
100
|
+
id: request.permission.resource.instanceName,
|
|
101
|
+
projectId: request.permission.resource.projectId,
|
|
102
|
+
zone: request.permission.zone,
|
|
103
103
|
linuxUserName: request.cliLocalData.linuxUserName,
|
|
104
104
|
type: "gcloud",
|
|
105
105
|
};
|
|
@@ -107,7 +107,7 @@ exports.gcpSshProvider = {
|
|
|
107
107
|
unprovisionedAccessPatterns,
|
|
108
108
|
toCliRequest: (request, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
109
109
|
return (Object.assign(Object.assign({}, request), { cliLocalData: {
|
|
110
|
-
linuxUserName: yield (0, ssh_key_1.importSshKey)(request.permission.
|
|
110
|
+
linuxUserName: yield (0, ssh_key_1.importSshKey)(request.permission.publicKey, options),
|
|
111
111
|
} }));
|
|
112
112
|
}),
|
|
113
113
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ssh.js","sourceRoot":"","sources":["../../../src/plugins/google/ssh.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;GASG;AACH,mDAA0D;AAE1D,uCAAgD;AAChD,uCAAyC;AAGzC,oGAAoG;AACpG,MAAM,4BAA4B,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;AAEnD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,2BAA2B,GAAG;IAClC,EAAE,OAAO,EAAE,iCAAiC,EAAE;IAC9C;QACE,mEAAmE;QACnE,OAAO,EAAE,uCAAuC;KACjD;IACD,EAAE,OAAO,EAAE,mDAAmD,EAAE;IAChE;QACE,OAAO,EAAE,+CAA+C;QACxD,kBAAkB,EAAE,IAAI;KACzB;IACD,EAAE,OAAO,EAAE,4DAA4D,EAAE;CACjE,CAAC;AAEE,QAAA,cAAc,GAIvB;IACF,uCAAuC;IACvC,kBAAkB,EAAE,GAAS,EAAE,kDAAC,OAAA,SAAS,CAAA,GAAA;IAEzC,aAAa,EAAE,GAAS,EAAE;QACxB,IAAI,CAAC,CAAC,MAAM,IAAA,6BAAmB,GAAE,CAAC,EAAE;YAClC,MAAM,8DAA8D,CAAC;SACtE;IACH,CAAC,CAAA;IAED,YAAY,EAAE,cAAc;IAE5B,oBAAoB,EAClB,2DAA2D;IAE7D,oBAAoB,EAAE,sDAAsD;IAE5E,oBAAoB,EAAE,4BAA4B;IAElD,4BAA4B,E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J,CAAC;IAED,2BAA2B;IAE3B,YAAY,EAAE,CAAO,OAAO,EAAE,OAAO,EAAE,EAAE;QAAC,OAAA,iCACrC,OAAO,KACV,YAAY,EAAE;gBACZ,aAAa,EAAE,MAAM,IAAA,sBAAY,EAAC,OAAO,CAAC,UAAU,CAAC,SAAS,EAAE,OAAO,CAAC;aACzE,IACD,CAAA;MAAA;CACH,CAAC"}
|
|
@@ -11,25 +11,24 @@ You should have received a copy of the GNU General Public License along with @p0
|
|
|
11
11
|
import { PermissionSpec } from "../../types/request";
|
|
12
12
|
import { CliPermissionSpec } from "../../types/ssh";
|
|
13
13
|
import { CommonSshPermissionSpec } from "../ssh/types";
|
|
14
|
-
export type GcpSshPermission = {
|
|
15
|
-
|
|
14
|
+
export type GcpSshPermission = CommonSshPermissionSpec & {
|
|
15
|
+
provider: "gcloud";
|
|
16
|
+
zone: string;
|
|
17
|
+
resource: {
|
|
16
18
|
instanceName: string;
|
|
17
19
|
projectId: string;
|
|
18
|
-
zone: string;
|
|
19
|
-
type: "gcloud";
|
|
20
20
|
};
|
|
21
|
-
type: "session";
|
|
22
21
|
};
|
|
23
22
|
export type GcpSshPermissionSpec = PermissionSpec<"ssh", GcpSshPermission>;
|
|
24
23
|
export type GcpSsh = CliPermissionSpec<GcpSshPermissionSpec, {
|
|
25
24
|
linuxUserName: string;
|
|
26
25
|
}>;
|
|
27
26
|
export type GcpSshRequest = {
|
|
27
|
+
type: "gcloud";
|
|
28
28
|
linuxUserName: string;
|
|
29
29
|
projectId: string;
|
|
30
30
|
zone: string;
|
|
31
31
|
id: string;
|
|
32
|
-
type: "gcloud";
|
|
33
32
|
};
|
|
34
33
|
type PosixAccount = {
|
|
35
34
|
username: string;
|
package/dist/public/favicon.ico
CHANGED
|
Binary file
|
package/dist/types/org.d.ts
CHANGED
|
@@ -8,12 +8,15 @@ This file is part of @p0security/cli
|
|
|
8
8
|
|
|
9
9
|
You should have received a copy of the GNU General Public License along with @p0security/cli. If not, see <https://www.gnu.org/licenses/>.
|
|
10
10
|
**/
|
|
11
|
+
import { bootstrapConfig } from "../drivers/env";
|
|
12
|
+
export type Config = typeof bootstrapConfig;
|
|
11
13
|
type BaseOrgData = {
|
|
12
14
|
clientId: string;
|
|
13
15
|
providerId: string;
|
|
14
16
|
providerDomain?: string;
|
|
15
17
|
ssoProvider: "azure-oidc" | "google-oidc" | "google" | "microsoft" | "oidc-pkce" | "okta";
|
|
16
18
|
tenantId: string;
|
|
19
|
+
config: Config;
|
|
17
20
|
};
|
|
18
21
|
/** Publicly readable organization data */
|
|
19
22
|
export type RawOrgData = BaseOrgData & ({
|
package/dist/types/org.js
CHANGED
|
@@ -1,13 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/** Copyright © 2024-present P0 Security
|
|
3
|
-
|
|
4
|
-
This file is part of @p0security/cli
|
|
5
|
-
|
|
6
|
-
@p0security/cli is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 of the License.
|
|
7
|
-
|
|
8
|
-
@p0security/cli is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
9
|
-
|
|
10
|
-
You should have received a copy of the GNU General Public License along with @p0security/cli. If not, see <https://www.gnu.org/licenses/>.
|
|
11
|
-
**/
|
|
12
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
3
|
//# sourceMappingURL=org.js.map
|
package/dist/types/org.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"org.js","sourceRoot":"","sources":["../../src/types/org.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"org.js","sourceRoot":"","sources":["../../src/types/org.ts"],"names":[],"mappings":""}
|
package/dist/types/request.d.ts
CHANGED
|
@@ -9,11 +9,13 @@ This file is part of @p0security/cli
|
|
|
9
9
|
You should have received a copy of the GNU General Public License along with @p0security/cli. If not, see <https://www.gnu.org/licenses/>.
|
|
10
10
|
**/
|
|
11
11
|
import { K8sPermissionSpec } from "../plugins/kubeconfig/types";
|
|
12
|
-
import { PluginSshRequest } from "./ssh";
|
|
12
|
+
import { PluginSshRequest, SupportedSshProvider } from "./ssh";
|
|
13
13
|
export declare const DONE_STATUSES: readonly ["DONE", "DONE_NOTIFIED"];
|
|
14
14
|
export declare const DENIED_STATUSES: readonly ["DENIED", "DENIED_NOTIFIED"];
|
|
15
15
|
export declare const ERROR_STATUSES: readonly ["ERRORED", "ERRORED", "ERRORED_NOTIFIED"];
|
|
16
16
|
export type PermissionSpec<K extends string, P extends {
|
|
17
|
+
provider: SupportedSshProvider;
|
|
18
|
+
} | {
|
|
17
19
|
type: string;
|
|
18
20
|
}, G extends object | undefined = undefined> = {
|
|
19
21
|
type: K;
|
package/dist/types/ssh.d.ts
CHANGED
|
@@ -10,15 +10,16 @@ You should have received a copy of the GNU General Public License along with @p0
|
|
|
10
10
|
**/
|
|
11
11
|
import { CommandArgs } from "../commands/shared/ssh";
|
|
12
12
|
import { AwsSsh, AwsSshPermissionSpec, AwsSshRequest } from "../plugins/aws/types";
|
|
13
|
+
import { AzureSsh, AzureSshPermissionSpec, AzureSshRequest } from "../plugins/azure/types";
|
|
13
14
|
import { GcpSsh, GcpSshPermissionSpec, GcpSshRequest } from "../plugins/google/types";
|
|
14
15
|
import { Authn } from "./identity";
|
|
15
16
|
import { Request } from "./request";
|
|
16
|
-
export type CliSshRequest = AwsSsh | GcpSsh;
|
|
17
|
-
export type PluginSshRequest = AwsSshPermissionSpec | GcpSshPermissionSpec;
|
|
17
|
+
export type CliSshRequest = AwsSsh | AzureSsh | GcpSsh;
|
|
18
|
+
export type PluginSshRequest = AwsSshPermissionSpec | AzureSshPermissionSpec | GcpSshPermissionSpec;
|
|
18
19
|
export type CliPermissionSpec<P extends PluginSshRequest, C extends object | undefined> = P & {
|
|
19
20
|
cliLocalData: C;
|
|
20
21
|
};
|
|
21
|
-
export declare const SupportedSshProviders: readonly ["aws", "gcloud"];
|
|
22
|
+
export declare const SupportedSshProviders: readonly ["aws", "azure", "gcloud"];
|
|
22
23
|
export type SupportedSshProvider = (typeof SupportedSshProviders)[number];
|
|
23
24
|
export type SshProvider<PR extends PluginSshRequest = PluginSshRequest, O extends object | undefined = undefined, SR extends SshRequest = SshRequest, C extends object | undefined = undefined> = {
|
|
24
25
|
/** Logs in the user to the cloud provider */
|
|
@@ -60,4 +61,4 @@ export type SshProvider<PR extends PluginSshRequest = PluginSshRequest, O extend
|
|
|
60
61
|
debug?: boolean;
|
|
61
62
|
}) => Promise<Request<CliSshRequest>>;
|
|
62
63
|
};
|
|
63
|
-
export type SshRequest = AwsSshRequest | GcpSshRequest;
|
|
64
|
+
export type SshRequest = AwsSshRequest | AzureSshRequest | GcpSshRequest;
|
package/dist/types/ssh.js
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SupportedSshProviders = void 0;
|
|
4
4
|
// The prefix of installed SSH accounts in P0 is the provider name
|
|
5
|
-
exports.SupportedSshProviders = ["aws", "gcloud"];
|
|
5
|
+
exports.SupportedSshProviders = ["aws", "azure", "gcloud"];
|
|
6
6
|
//# sourceMappingURL=ssh.js.map
|
package/dist/types/ssh.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ssh.js","sourceRoot":"","sources":["../../src/types/ssh.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ssh.js","sourceRoot":"","sources":["../../src/types/ssh.ts"],"names":[],"mappings":";;;AA0CA,kEAAkE;AACrD,QAAA,qBAAqB,GAAG,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,CAAU,CAAC"}
|
package/dist/util.js
CHANGED
|
@@ -27,7 +27,9 @@ const env_1 = require("./drivers/env");
|
|
|
27
27
|
const node_child_process_1 = __importDefault(require("node:child_process"));
|
|
28
28
|
const node_os_1 = __importDefault(require("node:os"));
|
|
29
29
|
const node_path_1 = __importDefault(require("node:path"));
|
|
30
|
-
exports.P0_PATH = node_path_1.default.join(node_os_1.default.homedir(), env_1.
|
|
30
|
+
exports.P0_PATH = node_path_1.default.join(node_os_1.default.homedir(), env_1.bootstrapConfig.environment === "production"
|
|
31
|
+
? ".p0"
|
|
32
|
+
: `.p0-${env_1.bootstrapConfig.environment}`);
|
|
31
33
|
/** Waits the specified delay (in ms)
|
|
32
34
|
*
|
|
33
35
|
* The returned promise is cancelable:
|
package/dist/util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;GASG;AACH,
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["../src/util.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;GASG;AACH,uCAAgD;AAChD,4EAA+C;AAC/C,sDAAyB;AACzB,0DAA6B;AAEhB,QAAA,OAAO,GAAG,mBAAI,CAAC,IAAI,CAC9B,iBAAE,CAAC,OAAO,EAAE,EACZ,qBAAe,CAAC,WAAW,KAAK,YAAY;IAC1C,CAAC,CAAC,KAAK;IACP,CAAC,CAAC,OAAO,qBAAe,CAAC,WAAW,EAAE,CACzC,CAAC;AAEF;;;;;;;;GAQG;AACI,MAAM,KAAK,GAAG,CAAC,aAAqB,EAAE,EAAE;IAC7C,IAAI,KAAK,GAA+B,SAAS,CAAC;IAClD,MAAM,OAAO,GAAG,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;QAC5C,KAAK,GAAG,UAAU,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AACvE,CAAC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AE,CAClC,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;AADvC,QAAA,KAAK,SACkC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@p0security/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "Execute infra CLI commands with P0 grants",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"repository": {
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
},
|
|
71
71
|
"scripts": {
|
|
72
72
|
"build": "tsc && cp -r public dist/",
|
|
73
|
+
"test:unit": "NODE_ENV=unit jest --color",
|
|
73
74
|
"clean": "rm -f tsconfig.tsbuildinfo && rm -rf dist/",
|
|
74
75
|
"lint": "yarn prettier --check . && yarn run eslint --max-warnings 0 .",
|
|
75
76
|
"p0": "node --no-deprecation ./p0",
|