indraq_cli 1.5.8 → 1.9.1
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/LICENSE +21 -21
- package/README.md +1517 -1686
- package/cloud-api/.dockerignore +18 -0
- package/cloud-api/.env.example +14 -0
- package/cloud-api/Dockerfile +19 -0
- package/cloud-api/README.md +141 -0
- package/cloud-api/package-lock.json +2250 -0
- package/cloud-api/package.json +29 -0
- package/cloud-api/sql/001_init.sql +8 -0
- package/cloud-api/sql/002_user_providers_and_project_resources.sql +40 -0
- package/cloud-api/sql/003_environment_infrastructure.sql +19 -0
- package/cloud-api/sql/004_managed_aws_credentials.sql +20 -0
- package/cloud-api/sql/005_project_members_and_resource_grants.sql +22 -0
- package/cloud-api/sql/006_catalog_identity_password_security.sql +96 -0
- package/cloud-api/sql/007_aws_access_key_rotation.sql +16 -0
- package/cloud-api/src/index.ts +1254 -0
- package/cloud-api/tsconfig.json +18 -0
- package/dist/cli/create-program.d.ts.map +1 -1
- package/dist/cli/create-program.js +21 -3
- package/dist/cli/create-program.js.map +1 -1
- package/dist/cli/doctor.command.d.ts +1 -1
- package/dist/cli/doctor.command.d.ts.map +1 -1
- package/dist/cli/doctor.command.js +70 -12
- package/dist/cli/doctor.command.js.map +1 -1
- package/dist/cli/help-content.d.ts +1 -1
- package/dist/cli/help-content.d.ts.map +1 -1
- package/dist/cli/help-content.js +256 -177
- package/dist/cli/help-content.js.map +1 -1
- package/dist/modules/access/commands/access.command.d.ts +3 -0
- package/dist/modules/access/commands/access.command.d.ts.map +1 -0
- package/dist/modules/access/commands/access.command.js +226 -0
- package/dist/modules/access/commands/access.command.js.map +1 -0
- package/dist/modules/access/index.d.ts +3 -0
- package/dist/modules/access/index.d.ts.map +1 -0
- package/dist/modules/access/index.js +11 -0
- package/dist/modules/access/index.js.map +1 -0
- package/dist/modules/aws/commands/configure-aws.command.d.ts +2 -0
- package/dist/modules/aws/commands/configure-aws.command.d.ts.map +1 -0
- package/dist/modules/aws/commands/configure-aws.command.js +7 -0
- package/dist/modules/aws/commands/configure-aws.command.js.map +1 -0
- package/dist/modules/aws/commands/dns.command.d.ts +22 -0
- package/dist/modules/aws/commands/dns.command.d.ts.map +1 -0
- package/dist/modules/aws/commands/dns.command.js +229 -0
- package/dist/modules/aws/commands/dns.command.js.map +1 -0
- package/dist/modules/aws/commands/healthcheck.command.d.ts +22 -0
- package/dist/modules/aws/commands/healthcheck.command.d.ts.map +1 -0
- package/dist/modules/aws/commands/healthcheck.command.js +125 -0
- package/dist/modules/aws/commands/healthcheck.command.js.map +1 -0
- package/dist/modules/aws/commands/iam.command.d.ts +24 -0
- package/dist/modules/aws/commands/iam.command.d.ts.map +1 -0
- package/dist/modules/aws/commands/iam.command.js +219 -0
- package/dist/modules/aws/commands/iam.command.js.map +1 -0
- package/dist/modules/aws/config/aws-config.d.ts +23 -0
- package/dist/modules/aws/config/aws-config.d.ts.map +1 -0
- package/dist/modules/aws/config/aws-config.js +72 -0
- package/dist/modules/aws/config/aws-config.js.map +1 -0
- package/dist/modules/aws/index.d.ts +3 -0
- package/dist/modules/aws/index.d.ts.map +1 -0
- package/dist/modules/aws/index.js +54 -0
- package/dist/modules/aws/index.js.map +1 -0
- package/dist/modules/aws/services/aws-clients.d.ts +9 -0
- package/dist/modules/aws/services/aws-clients.d.ts.map +1 -0
- package/dist/modules/aws/services/aws-clients.js +43 -0
- package/dist/modules/aws/services/aws-clients.js.map +1 -0
- package/dist/modules/aws/services/route53-lookup.service.d.ts +9 -0
- package/dist/modules/aws/services/route53-lookup.service.d.ts.map +1 -0
- package/dist/modules/aws/services/route53-lookup.service.js +57 -0
- package/dist/modules/aws/services/route53-lookup.service.js.map +1 -0
- package/dist/modules/cloud/commands/cloud.command.d.ts +38 -0
- package/dist/modules/cloud/commands/cloud.command.d.ts.map +1 -0
- package/dist/modules/cloud/commands/cloud.command.js +443 -0
- package/dist/modules/cloud/commands/cloud.command.js.map +1 -0
- package/dist/modules/cloud/commands/credentials.command.d.ts +5 -0
- package/dist/modules/cloud/commands/credentials.command.d.ts.map +1 -0
- package/dist/modules/cloud/commands/credentials.command.js +25 -0
- package/dist/modules/cloud/commands/credentials.command.js.map +1 -0
- package/dist/modules/cloud/commands/environment.command.d.ts +6 -0
- package/dist/modules/cloud/commands/environment.command.d.ts.map +1 -0
- package/dist/modules/cloud/commands/environment.command.js +75 -0
- package/dist/modules/cloud/commands/environment.command.js.map +1 -0
- package/dist/modules/cloud/commands/provider.command.d.ts +3 -0
- package/dist/modules/cloud/commands/provider.command.d.ts.map +1 -0
- package/dist/modules/cloud/commands/provider.command.js +193 -0
- package/dist/modules/cloud/commands/provider.command.js.map +1 -0
- package/dist/modules/cloud/config/cloud-config.d.ts +19 -0
- package/dist/modules/cloud/config/cloud-config.d.ts.map +1 -0
- package/dist/modules/cloud/config/cloud-config.js +53 -0
- package/dist/modules/cloud/config/cloud-config.js.map +1 -0
- package/dist/modules/cloud/index.d.ts +3 -0
- package/dist/modules/cloud/index.d.ts.map +1 -0
- package/dist/modules/cloud/index.js +62 -0
- package/dist/modules/cloud/index.js.map +1 -0
- package/dist/modules/cloud/services/cloud-api.service.d.ts +17 -0
- package/dist/modules/cloud/services/cloud-api.service.d.ts.map +1 -0
- package/dist/modules/cloud/services/cloud-api.service.js +61 -0
- package/dist/modules/cloud/services/cloud-api.service.js.map +1 -0
- package/dist/modules/cloud/services/cloud-aws.service.d.ts +23 -0
- package/dist/modules/cloud/services/cloud-aws.service.d.ts.map +1 -0
- package/dist/modules/cloud/services/cloud-aws.service.js +26 -0
- package/dist/modules/cloud/services/cloud-aws.service.js.map +1 -0
- package/dist/modules/cloud/services/cloud-ghcr.service.d.ts +12 -0
- package/dist/modules/cloud/services/cloud-ghcr.service.d.ts.map +1 -0
- package/dist/modules/cloud/services/cloud-ghcr.service.js +31 -0
- package/dist/modules/cloud/services/cloud-ghcr.service.js.map +1 -0
- package/dist/modules/cloud/services/cloud-jenkins.service.d.ts +29 -0
- package/dist/modules/cloud/services/cloud-jenkins.service.d.ts.map +1 -0
- package/dist/modules/cloud/services/cloud-jenkins.service.js +236 -0
- package/dist/modules/cloud/services/cloud-jenkins.service.js.map +1 -0
- package/dist/modules/cloud/services/cloud-npm.service.d.ts +3 -0
- package/dist/modules/cloud/services/cloud-npm.service.d.ts.map +1 -0
- package/dist/modules/cloud/services/cloud-npm.service.js +13 -0
- package/dist/modules/cloud/services/cloud-npm.service.js.map +1 -0
- package/dist/modules/cloud/services/environment.service.d.ts +25 -0
- package/dist/modules/cloud/services/environment.service.d.ts.map +1 -0
- package/dist/modules/cloud/services/environment.service.js +21 -0
- package/dist/modules/cloud/services/environment.service.js.map +1 -0
- package/dist/modules/cloud/services/managed-aws-credential.service.d.ts +36 -0
- package/dist/modules/cloud/services/managed-aws-credential.service.d.ts.map +1 -0
- package/dist/modules/cloud/services/managed-aws-credential.service.js +35 -0
- package/dist/modules/cloud/services/managed-aws-credential.service.js.map +1 -0
- package/dist/modules/cloud/services/project-cloud.service.d.ts +28 -0
- package/dist/modules/cloud/services/project-cloud.service.d.ts.map +1 -0
- package/dist/modules/cloud/services/project-cloud.service.js +50 -0
- package/dist/modules/cloud/services/project-cloud.service.js.map +1 -0
- package/dist/modules/cloud/services/user-provider.service.d.ts +17 -0
- package/dist/modules/cloud/services/user-provider.service.d.ts.map +1 -0
- package/dist/modules/cloud/services/user-provider.service.js +25 -0
- package/dist/modules/cloud/services/user-provider.service.js.map +1 -0
- package/dist/modules/configure/configure.command.d.ts.map +1 -1
- package/dist/modules/configure/configure.command.js +17 -94
- package/dist/modules/configure/configure.command.js.map +1 -1
- package/dist/modules/deploy/commands/build.command.d.ts +1 -2
- package/dist/modules/deploy/commands/build.command.d.ts.map +1 -1
- package/dist/modules/deploy/commands/build.command.js +82 -124
- package/dist/modules/deploy/commands/build.command.js.map +1 -1
- package/dist/modules/deploy/index.d.ts.map +1 -1
- package/dist/modules/deploy/index.js +10 -30
- package/dist/modules/deploy/index.js.map +1 -1
- package/dist/modules/deploy/services/docker.service.d.ts +6 -3
- package/dist/modules/deploy/services/docker.service.d.ts.map +1 -1
- package/dist/modules/deploy/services/docker.service.js +8 -11
- package/dist/modules/deploy/services/docker.service.js.map +1 -1
- package/dist/modules/dockerfile/commands/create-dockerfile.command.d.ts +13 -0
- package/dist/modules/dockerfile/commands/create-dockerfile.command.d.ts.map +1 -0
- package/dist/modules/dockerfile/commands/create-dockerfile.command.js +39 -0
- package/dist/modules/dockerfile/commands/create-dockerfile.command.js.map +1 -0
- package/dist/modules/dockerfile/index.d.ts +3 -0
- package/dist/modules/dockerfile/index.d.ts.map +1 -0
- package/dist/modules/dockerfile/index.js +7 -0
- package/dist/modules/dockerfile/index.js.map +1 -0
- package/dist/modules/jenkins/commands/admin.command.d.ts +22 -0
- package/dist/modules/jenkins/commands/admin.command.d.ts.map +1 -0
- package/dist/modules/jenkins/commands/admin.command.js +128 -0
- package/dist/modules/jenkins/commands/admin.command.js.map +1 -0
- package/dist/modules/jenkins/commands/create-deployment.command.d.ts +13 -0
- package/dist/modules/jenkins/commands/create-deployment.command.d.ts.map +1 -0
- package/dist/modules/jenkins/commands/create-deployment.command.js +115 -0
- package/dist/modules/jenkins/commands/create-deployment.command.js.map +1 -0
- package/dist/modules/jenkins/index.d.ts +3 -0
- package/dist/modules/jenkins/index.d.ts.map +1 -0
- package/dist/modules/jenkins/index.js +28 -0
- package/dist/modules/jenkins/index.js.map +1 -0
- package/dist/modules/mobile/commands/build-mobile.command.d.ts.map +1 -1
- package/dist/modules/mobile/commands/build-mobile.command.js +4 -22
- package/dist/modules/mobile/commands/build-mobile.command.js.map +1 -1
- package/dist/modules/mobile/commands/configure-mobile.command.d.ts +1 -1
- package/dist/modules/mobile/commands/configure-mobile.command.d.ts.map +1 -1
- package/dist/modules/mobile/commands/configure-mobile.command.js +11 -9
- package/dist/modules/mobile/commands/configure-mobile.command.js.map +1 -1
- package/dist/modules/mobile/services/jenkins-mobile.service.d.ts +2 -2
- package/dist/modules/mobile/services/jenkins-mobile.service.d.ts.map +1 -1
- package/dist/modules/mobile/services/jenkins-mobile.service.js +1 -2
- package/dist/modules/mobile/services/jenkins-mobile.service.js.map +1 -1
- package/dist/modules/mobile/services/project.service.d.ts +2 -2
- package/dist/modules/mobile/services/project.service.d.ts.map +1 -1
- package/dist/modules/prebuild/commands/prebuild.command.d.ts +13 -0
- package/dist/modules/prebuild/commands/prebuild.command.d.ts.map +1 -0
- package/dist/modules/prebuild/commands/prebuild.command.js +507 -0
- package/dist/modules/prebuild/commands/prebuild.command.js.map +1 -0
- package/dist/modules/prebuild/index.d.ts +3 -0
- package/dist/modules/prebuild/index.d.ts.map +1 -0
- package/dist/modules/prebuild/index.js +19 -0
- package/dist/modules/prebuild/index.js.map +1 -0
- package/dist/modules/proxy/commands/configure-proxy.command.d.ts +2 -0
- package/dist/modules/proxy/commands/configure-proxy.command.d.ts.map +1 -0
- package/dist/modules/proxy/commands/configure-proxy.command.js +7 -0
- package/dist/modules/proxy/commands/configure-proxy.command.js.map +1 -0
- package/dist/modules/proxy/commands/npm-user.command.d.ts +28 -0
- package/dist/modules/proxy/commands/npm-user.command.d.ts.map +1 -0
- package/dist/modules/proxy/commands/npm-user.command.js +77 -0
- package/dist/modules/proxy/commands/npm-user.command.js.map +1 -0
- package/dist/modules/proxy/commands/proxy.command.d.ts +22 -0
- package/dist/modules/proxy/commands/proxy.command.d.ts.map +1 -0
- package/dist/modules/proxy/commands/proxy.command.js +173 -0
- package/dist/modules/proxy/commands/proxy.command.js.map +1 -0
- package/dist/modules/proxy/config/npm-config.d.ts +17 -0
- package/dist/modules/proxy/config/npm-config.d.ts.map +1 -0
- package/dist/modules/proxy/config/npm-config.js +50 -0
- package/dist/modules/proxy/config/npm-config.js.map +1 -0
- package/dist/modules/proxy/index.d.ts +3 -0
- package/dist/modules/proxy/index.d.ts.map +1 -0
- package/dist/modules/proxy/index.js +21 -0
- package/dist/modules/proxy/index.js.map +1 -0
- package/dist/modules/proxy/services/npm-api.service.d.ts +76 -0
- package/dist/modules/proxy/services/npm-api.service.d.ts.map +1 -0
- package/dist/modules/proxy/services/npm-api.service.js +82 -0
- package/dist/modules/proxy/services/npm-api.service.js.map +1 -0
- package/dist/modules/scaffold/commands/init.command.d.ts +6 -0
- package/dist/modules/scaffold/commands/init.command.d.ts.map +1 -0
- package/dist/modules/scaffold/commands/init.command.js +193 -0
- package/dist/modules/scaffold/commands/init.command.js.map +1 -0
- package/dist/modules/scaffold/config/project-metadata.d.ts +9 -0
- package/dist/modules/scaffold/config/project-metadata.d.ts.map +1 -0
- package/dist/modules/scaffold/config/project-metadata.js +75 -0
- package/dist/modules/scaffold/config/project-metadata.js.map +1 -0
- package/dist/modules/scaffold/index.d.ts +3 -0
- package/dist/modules/scaffold/index.d.ts.map +1 -0
- package/dist/modules/scaffold/index.js +7 -0
- package/dist/modules/scaffold/index.js.map +1 -0
- package/dist/modules/scaffold/services/docker-template.service.d.ts +3 -0
- package/dist/modules/scaffold/services/docker-template.service.d.ts.map +1 -0
- package/dist/modules/scaffold/services/docker-template.service.js +131 -0
- package/dist/modules/scaffold/services/docker-template.service.js.map +1 -0
- package/dist/modules/scaffold/services/filesystem.service.d.ts +7 -0
- package/dist/modules/scaffold/services/filesystem.service.d.ts.map +1 -0
- package/dist/modules/scaffold/services/filesystem.service.js +97 -0
- package/dist/modules/scaffold/services/filesystem.service.js.map +1 -0
- package/dist/modules/scaffold/services/project-template.service.d.ts +4 -0
- package/dist/modules/scaffold/services/project-template.service.d.ts.map +1 -0
- package/dist/modules/scaffold/services/project-template.service.js +82 -0
- package/dist/modules/scaffold/services/project-template.service.js.map +1 -0
- package/dist/modules/scaffold/types.d.ts +65 -0
- package/dist/modules/scaffold/types.d.ts.map +1 -0
- package/dist/modules/scaffold/types.js +3 -0
- package/dist/modules/scaffold/types.js.map +1 -0
- package/dist/modules/users/commands/user.command.d.ts +22 -0
- package/dist/modules/users/commands/user.command.d.ts.map +1 -0
- package/dist/modules/users/commands/user.command.js +350 -0
- package/dist/modules/users/commands/user.command.js.map +1 -0
- package/dist/modules/users/index.d.ts +3 -0
- package/dist/modules/users/index.d.ts.map +1 -0
- package/dist/modules/users/index.js +34 -0
- package/dist/modules/users/index.js.map +1 -0
- package/dist/modules/users/providers/aws-user.provider.d.ts +11 -0
- package/dist/modules/users/providers/aws-user.provider.d.ts.map +1 -0
- package/dist/modules/users/providers/aws-user.provider.js +129 -0
- package/dist/modules/users/providers/aws-user.provider.js.map +1 -0
- package/dist/modules/users/providers/jenkins-user.provider.d.ts +6 -0
- package/dist/modules/users/providers/jenkins-user.provider.d.ts.map +1 -0
- package/dist/modules/users/providers/jenkins-user.provider.js +97 -0
- package/dist/modules/users/providers/jenkins-user.provider.js.map +1 -0
- package/dist/modules/users/providers/npm-user.provider.d.ts +4 -0
- package/dist/modules/users/providers/npm-user.provider.d.ts.map +1 -0
- package/dist/modules/users/providers/npm-user.provider.js +47 -0
- package/dist/modules/users/providers/npm-user.provider.js.map +1 -0
- package/dist/shared/config/config-files.d.ts.map +1 -1
- package/dist/shared/config/config-files.js +14 -10
- package/dist/shared/config/config-files.js.map +1 -1
- package/dist/shared/github/github-api.service.d.ts.map +1 -1
- package/dist/shared/github/github-api.service.js +25 -37
- package/dist/shared/github/github-api.service.js.map +1 -1
- package/dist/shared/jenkins/jenkins.service.d.ts +2 -0
- package/dist/shared/jenkins/jenkins.service.d.ts.map +1 -1
- package/dist/shared/jenkins/jenkins.service.js +30 -1
- package/dist/shared/jenkins/jenkins.service.js.map +1 -1
- package/dist/shared/listing.d.ts +9 -0
- package/dist/shared/listing.d.ts.map +1 -0
- package/dist/shared/listing.js +29 -0
- package/dist/shared/listing.js.map +1 -0
- package/docs/ARCHITECTURE.md +29 -0
- package/docs/CREATE-DEPLOYMENT-reference.groovy +1105 -0
- package/package.json +76 -59
- package/templates/jenkins/CREATE-DEPLOYMENT.groovy +1105 -0
- package/templates/jenkins/Jenkinsfile-Mobile-App +759 -759
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.deleteResourceUser = exports.addResourceUser = void 0;
|
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
const inquirer_1 = __importDefault(require("inquirer"));
|
|
9
|
+
const client_iam_1 = require("@aws-sdk/client-iam");
|
|
10
|
+
const cloud_api_service_1 = require("../../cloud/services/cloud-api.service");
|
|
11
|
+
const cloud_aws_service_1 = require("../../cloud/services/cloud-aws.service");
|
|
12
|
+
const cloud_jenkins_service_1 = require("../../cloud/services/cloud-jenkins.service");
|
|
13
|
+
const api = () => new cloud_api_service_1.CloudApiService();
|
|
14
|
+
const reasonPrompt = async (fallback) => (await inquirer_1.default.prompt([{
|
|
15
|
+
type: 'input', name: 'reason', message: 'Reason:', default: fallback,
|
|
16
|
+
validate: (v) => v.trim().length >= 3 || 'Reason must be at least 3 characters.'
|
|
17
|
+
}])).reason.trim();
|
|
18
|
+
const chooseProject = async () => {
|
|
19
|
+
const rows = await api().request('/projects');
|
|
20
|
+
if (!rows.length)
|
|
21
|
+
throw new Error('No projects are available.');
|
|
22
|
+
const id = (await inquirer_1.default.prompt([{ type: 'list', name: 'id', message: 'Project:', choices: rows.map((p) => ({ name: `${p.name} — ${p.kind}`, value: p.id })) }])).id;
|
|
23
|
+
return rows.find((p) => p.id === id);
|
|
24
|
+
};
|
|
25
|
+
const chooseUser = async () => {
|
|
26
|
+
const users = (await api().request('/users')).filter((u) => u.is_active && u.role === 'user');
|
|
27
|
+
if (!users.length)
|
|
28
|
+
throw new Error('No active normal users are available.');
|
|
29
|
+
const id = (await inquirer_1.default.prompt([{ type: 'list', name: 'id', message: 'User:', choices: users.map((u) => ({ name: `${u.email} — ${u.name}`, value: u.id })) }])).id;
|
|
30
|
+
return users.find((u) => u.id === id);
|
|
31
|
+
};
|
|
32
|
+
const chooseService = async () => (await inquirer_1.default.prompt([{ type: 'list', name: 'service', message: 'Service access:', choices: [
|
|
33
|
+
{ name: 'ALL — AWS + NPM + Jenkins resources', value: 'all' },
|
|
34
|
+
{ name: 'AWS — Route53 records + their health checks', value: 'aws' },
|
|
35
|
+
{ name: 'NPM — reverse proxy resources', value: 'npm' },
|
|
36
|
+
{ name: 'JENKINS — deployment pipelines', value: 'jenkins' }
|
|
37
|
+
] }])).service;
|
|
38
|
+
const matchesService = (resource, service) => {
|
|
39
|
+
if (service === 'all')
|
|
40
|
+
return resource.provider === 'aws' || resource.provider === 'npm' || resource.provider.startsWith('jenkins-');
|
|
41
|
+
if (service === 'jenkins')
|
|
42
|
+
return resource.provider.startsWith('jenkins-') || resource.resource_type.startsWith('jenkins-');
|
|
43
|
+
return resource.provider === service;
|
|
44
|
+
};
|
|
45
|
+
const resourceLabel = (r) => {
|
|
46
|
+
const detail = r.provider === 'aws'
|
|
47
|
+
? String(r.config?.domain || r.external_id || r.resource_type)
|
|
48
|
+
: r.provider === 'npm'
|
|
49
|
+
? String(r.config?.domain || r.external_id || r.resource_type)
|
|
50
|
+
: r.provider.startsWith('jenkins-')
|
|
51
|
+
? String(r.config?.jobName || r.external_id || r.resource_type)
|
|
52
|
+
: String(r.external_id || r.resource_type);
|
|
53
|
+
return `${r.provider.toUpperCase()} — ${detail} — ${r.environment}`;
|
|
54
|
+
};
|
|
55
|
+
const escapeRegex = (value) => value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
56
|
+
const awsGrantPolicy = (grants) => {
|
|
57
|
+
const aws = grants.filter((g) => g.provider === 'aws' && g.resource_type.startsWith('route53-'));
|
|
58
|
+
if (!aws.length)
|
|
59
|
+
return null;
|
|
60
|
+
const statements = [];
|
|
61
|
+
aws.forEach((grant, index) => {
|
|
62
|
+
const zoneId = String(grant.config?.zoneId || '').replace(/^\/hostedzone\//, '');
|
|
63
|
+
const domain = String(grant.config?.domain || grant.external_id || '').trim().toLowerCase().replace(/\.$/, '');
|
|
64
|
+
const recordType = String(grant.config?.recordType || 'A').toUpperCase();
|
|
65
|
+
if (zoneId && domain) {
|
|
66
|
+
statements.push({
|
|
67
|
+
Sid: `IndraQRecord${index + 1}`,
|
|
68
|
+
Effect: 'Allow', Action: 'route53:ChangeResourceRecordSets',
|
|
69
|
+
Resource: `arn:aws:route53:::hostedzone/${zoneId}`,
|
|
70
|
+
Condition: {
|
|
71
|
+
'ForAllValues:StringEquals': {
|
|
72
|
+
'route53:ChangeResourceRecordSetsNormalizedRecordNames': [domain],
|
|
73
|
+
'route53:ChangeResourceRecordSetsRecordTypes': [recordType],
|
|
74
|
+
'route53:ChangeResourceRecordSetsActions': ['CREATE', 'UPSERT', 'DELETE']
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
statements.push({ Sid: `IndraQZone${index + 1}`, Effect: 'Allow', Action: 'route53:GetHostedZone', Resource: `arn:aws:route53:::hostedzone/${zoneId}` });
|
|
79
|
+
}
|
|
80
|
+
const ids = [grant.config?.primaryHealthCheckId, grant.config?.secondaryHealthCheckId].map(String).filter((id) => id && id !== 'undefined' && id !== 'null');
|
|
81
|
+
if (ids.length) {
|
|
82
|
+
statements.push({
|
|
83
|
+
Sid: `IndraQHealth${index + 1}`, Effect: 'Allow',
|
|
84
|
+
Action: ['route53:GetHealthCheck', 'route53:GetHealthCheckStatus', 'route53:GetHealthCheckLastFailureReason'],
|
|
85
|
+
Resource: ids.map((id) => `arn:aws:route53:::healthcheck/${id}`)
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
return statements.length ? { Version: '2012-10-17', Statement: statements } : null;
|
|
90
|
+
};
|
|
91
|
+
const syncAwsNativeAccess = async (user) => {
|
|
92
|
+
const grants = await api().request(`/users/${user.id}/resource-grants`);
|
|
93
|
+
const credentials = await api().request(`/users/${user.id}/aws-credentials`);
|
|
94
|
+
const target = credentials.find((c) => c.aws_username.toLowerCase() === user.name.toLowerCase()) || credentials[0];
|
|
95
|
+
if (!target) {
|
|
96
|
+
console.log(chalk_1.default.yellow(`⚠ AWS native access was not synchronized because ${user.email} has no managed AWS IAM user in IndraQ Cloud.`));
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
const { iam } = await (0, cloud_aws_service_1.createCloudAwsClients)(`Synchronize AWS resource access for ${user.email}`);
|
|
100
|
+
const policy = awsGrantPolicy(grants);
|
|
101
|
+
if (!policy) {
|
|
102
|
+
try {
|
|
103
|
+
await iam.send(new client_iam_1.DeleteUserPolicyCommand({ UserName: target.aws_username, PolicyName: 'IndraQResourceAccess' }));
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
if (error?.name !== 'NoSuchEntityException' && error?.name !== 'NoSuchEntity')
|
|
107
|
+
throw error;
|
|
108
|
+
}
|
|
109
|
+
console.log(chalk_1.default.green(`✓ AWS resource policy cleared for ${target.aws_username}.`));
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
await iam.send(new client_iam_1.PutUserPolicyCommand({ UserName: target.aws_username, PolicyName: 'IndraQResourceAccess', PolicyDocument: JSON.stringify(policy) }));
|
|
113
|
+
console.log(chalk_1.default.green(`✓ AWS resource policy synchronized for ${target.aws_username}.`));
|
|
114
|
+
console.log(chalk_1.default.gray(' Route53 record changes are scoped to granted record names. AWS does not support hiding individual record listings while granting ListResourceRecordSets, so IndraQ intentionally does not grant that list permission to normal users.'));
|
|
115
|
+
};
|
|
116
|
+
const jenkinsRoleScript = (username, roleName, jobs) => {
|
|
117
|
+
const pattern = jobs.length ? `^(?:${jobs.map(escapeRegex).join('|')})$` : 'a^';
|
|
118
|
+
const enc = (v) => Buffer.from(v, 'utf8').toString('base64');
|
|
119
|
+
return `
|
|
120
|
+
import com.michelin.cio.hudson.plugins.rolestrategy.AuthorizationType
|
|
121
|
+
import com.michelin.cio.hudson.plugins.rolestrategy.PermissionEntry
|
|
122
|
+
import com.michelin.cio.hudson.plugins.rolestrategy.RoleBasedAuthorizationStrategy
|
|
123
|
+
import com.michelin.cio.hudson.plugins.rolestrategy.Role
|
|
124
|
+
import com.synopsys.arc.jenkins.plugins.rolestrategy.RoleType
|
|
125
|
+
import hudson.model.Item
|
|
126
|
+
import hudson.model.Run
|
|
127
|
+
import hudson.security.Permission
|
|
128
|
+
import jenkins.model.Jenkins
|
|
129
|
+
|
|
130
|
+
def decode = { String value -> new String(value.decodeBase64(), 'UTF-8') }
|
|
131
|
+
def username = decode('${enc(username)}')
|
|
132
|
+
def roleName = decode('${enc(roleName)}')
|
|
133
|
+
def pattern = decode('${enc(pattern)}')
|
|
134
|
+
def j = Jenkins.get()
|
|
135
|
+
def strategy = j.authorizationStrategy
|
|
136
|
+
if (!(strategy instanceof RoleBasedAuthorizationStrategy)) throw new IllegalStateException('Role Strategy plugin must be the active Jenkins authorization strategy')
|
|
137
|
+
def map = strategy.getRoleMap(RoleType.Project)
|
|
138
|
+
def old = map.getRole(roleName)
|
|
139
|
+
if (old != null) map.removeRole(old)
|
|
140
|
+
if (pattern != 'a^') {
|
|
141
|
+
Set<Permission> permissions = new HashSet<Permission>()
|
|
142
|
+
permissions.add(Item.DISCOVER)
|
|
143
|
+
permissions.add(Item.READ)
|
|
144
|
+
permissions.add(Item.BUILD)
|
|
145
|
+
permissions.add(Item.CANCEL)
|
|
146
|
+
permissions.add(Item.CONFIGURE)
|
|
147
|
+
permissions.add(Item.WORKSPACE)
|
|
148
|
+
Role role = new Role(roleName, pattern, permissions)
|
|
149
|
+
map.addRole(role)
|
|
150
|
+
map.assignRole(role, new PermissionEntry(AuthorizationType.USER, username))
|
|
151
|
+
}
|
|
152
|
+
j.save()
|
|
153
|
+
println 'OK|' + roleName + '|' + pattern
|
|
154
|
+
`;
|
|
155
|
+
};
|
|
156
|
+
const syncJenkinsNativeAccess = async (user) => {
|
|
157
|
+
const grants = await api().request(`/users/${user.id}/resource-grants`);
|
|
158
|
+
for (const stage of ['dev', 'prod']) {
|
|
159
|
+
const provider = stage === 'dev' ? 'jenkins-dev' : 'jenkins-prod';
|
|
160
|
+
const jobs = [...new Set(grants.filter((g) => g.provider === provider || (g.provider === 'jenkins' && stage === 'dev')).map((g) => String(g.config?.jobName || g.external_id || '')).filter(Boolean))];
|
|
161
|
+
try {
|
|
162
|
+
const connection = await (0, cloud_jenkins_service_1.getCloudJenkins)(stage, `Synchronize Jenkins item access for ${user.email}`);
|
|
163
|
+
const roleName = `indraq-${user.id.slice(0, 12)}-${stage}`;
|
|
164
|
+
await (0, cloud_jenkins_service_1.runCloudJenkinsGroovy)(connection, jenkinsRoleScript(user.name, roleName, jobs));
|
|
165
|
+
console.log(chalk_1.default.green(`✓ Jenkins ${stage} item role synchronized for ${user.name}${jobs.length ? `: ${jobs.join(', ')}` : ' (no jobs)'}.`));
|
|
166
|
+
}
|
|
167
|
+
catch (error) {
|
|
168
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
169
|
+
if (/not configured|Provider jenkins-/i.test(message))
|
|
170
|
+
continue;
|
|
171
|
+
console.log(chalk_1.default.yellow(`⚠ Jenkins ${stage} native role sync could not complete: ${message}`));
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
const syncNative = async (user, services) => {
|
|
176
|
+
if (services.has('aws'))
|
|
177
|
+
await syncAwsNativeAccess(user);
|
|
178
|
+
if (services.has('jenkins'))
|
|
179
|
+
await syncJenkinsNativeAccess(user);
|
|
180
|
+
if (services.has('npm')) {
|
|
181
|
+
console.log(chalk_1.default.yellow('⚠ NPM uses creator ownership for proxy hosts and does not provide a safe multi-owner ACL for one existing proxy host.'));
|
|
182
|
+
console.log(chalk_1.default.gray(' IndraQ records the grant for CLI/project authorization, but it does not broaden the NPM account to visibility=all because that would expose other users\' proxy hosts.'));
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
const addResourceUser = async () => {
|
|
186
|
+
const project = await chooseProject();
|
|
187
|
+
const user = await chooseUser();
|
|
188
|
+
const service = await chooseService();
|
|
189
|
+
const resources = (await api().request(`/projects/${project.id}/resources`)).filter((r) => matchesService(r, service));
|
|
190
|
+
if (!resources.length)
|
|
191
|
+
throw new Error(`No ${service === 'all' ? 'AWS/NPM/Jenkins' : service.toUpperCase()} resources exist in ${project.name}.`);
|
|
192
|
+
const ids = (await inquirer_1.default.prompt([{ type: 'checkbox', name: 'ids', message: 'Resources to grant:', choices: resources.map((r) => ({ name: resourceLabel(r), value: r.id })), validate: (v) => v.length > 0 || 'Select at least one resource.' }])).ids;
|
|
193
|
+
const reason = await reasonPrompt('Grant project resource access');
|
|
194
|
+
const members = await api().request(`/projects/${project.id}/members`);
|
|
195
|
+
if (!members.some((m) => m.user_id === user.id)) {
|
|
196
|
+
await api().request(`/projects/${project.id}/members`, { method: 'POST', body: JSON.stringify({ userId: user.id, reason }) });
|
|
197
|
+
console.log(chalk_1.default.gray(` ${user.email} was also added to the project.`));
|
|
198
|
+
}
|
|
199
|
+
const selected = resources.filter((r) => ids.includes(r.id));
|
|
200
|
+
for (const resource of selected) {
|
|
201
|
+
await api().request(`/projects/${project.id}/resources/${resource.id}/grants`, { method: 'POST', body: JSON.stringify({ userId: user.id, permission: 'manage', reason }) });
|
|
202
|
+
}
|
|
203
|
+
const services = new Set(selected.map((r) => r.provider === 'aws' ? 'aws' : r.provider === 'npm' ? 'npm' : r.provider.startsWith('jenkins-') ? 'jenkins' : ''));
|
|
204
|
+
await syncNative(user, services);
|
|
205
|
+
console.log(chalk_1.default.green(`✓ Granted ${user.email} access to ${selected.length} resource(s) in ${project.name}.`));
|
|
206
|
+
};
|
|
207
|
+
exports.addResourceUser = addResourceUser;
|
|
208
|
+
const deleteResourceUser = async () => {
|
|
209
|
+
const project = await chooseProject();
|
|
210
|
+
const user = await chooseUser();
|
|
211
|
+
const service = await chooseService();
|
|
212
|
+
const grants = (await api().request(`/projects/${project.id}/resource-grants?userId=${encodeURIComponent(user.id)}`)).filter((g) => matchesService(g, service));
|
|
213
|
+
if (!grants.length)
|
|
214
|
+
throw new Error(`${user.email} has no matching resource grants in ${project.name}.`);
|
|
215
|
+
const ids = (await inquirer_1.default.prompt([{ type: 'checkbox', name: 'ids', message: 'Resources to revoke:', choices: grants.map((g) => ({ name: resourceLabel({ ...g, id: g.project_resource_id }), value: g.project_resource_id })), validate: (v) => v.length > 0 || 'Select at least one resource.' }])).ids;
|
|
216
|
+
const reason = await reasonPrompt('Revoke project resource access');
|
|
217
|
+
const selected = grants.filter((g) => ids.includes(g.project_resource_id));
|
|
218
|
+
for (const grant of selected) {
|
|
219
|
+
await api().request(`/projects/${project.id}/resources/${grant.project_resource_id}/grants/${user.id}`, { method: 'DELETE', body: JSON.stringify({ reason }) });
|
|
220
|
+
}
|
|
221
|
+
const services = new Set(selected.map((r) => r.provider === 'aws' ? 'aws' : r.provider === 'npm' ? 'npm' : r.provider.startsWith('jenkins-') ? 'jenkins' : ''));
|
|
222
|
+
await syncNative(user, services);
|
|
223
|
+
console.log(chalk_1.default.green(`✓ Revoked ${user.email} from ${selected.length} resource(s) in ${project.name}.`));
|
|
224
|
+
};
|
|
225
|
+
exports.deleteResourceUser = deleteResourceUser;
|
|
226
|
+
//# sourceMappingURL=access.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"access.command.js","sourceRoot":"","sources":["../../../../src/modules/access/commands/access.command.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,wDAAgC;AAChC,oDAAoF;AACpF,8EAAyE;AACzE,8EAA+E;AAC/E,sFAAoG;AAapG,MAAM,GAAG,GAAG,GAAoB,EAAE,CAAC,IAAI,mCAAe,EAAE,CAAC;AACzD,MAAM,YAAY,GAAG,KAAK,EAAE,QAAgB,EAAmB,EAAE,CAAC,CAAC,MAAM,kBAAQ,CAAC,MAAM,CAAqB,CAAC;QAC5G,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,QA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Q,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAChK,MAAM,UAAU,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACjC,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,aAAa,IAAI,CAAC,KAAK,SAAS,QAAQ,CAAC,MAAM,mBAAmB,OAAO,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;AAC9G,CAAC,CAAC;AAfW,QAAA,kBAAkB,sBAe7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/access/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,eAAO,MAAM,oBAAoB,GAAI,SAAS,OAAO,KAAG,IAIvD,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.registerAccessModule = void 0;
|
|
4
|
+
const access_command_1 = require("./commands/access.command");
|
|
5
|
+
const registerAccessModule = (program) => {
|
|
6
|
+
const access = program.command('access').description('Grant/revoke users on project AWS, NPM and Jenkins resources with audited native permission sync.');
|
|
7
|
+
access.command('add').description('Grant resource access.').command('user').description('Add a user to one or more project resources.').action(access_command_1.addResourceUser);
|
|
8
|
+
access.command('delete').description('Revoke resource access.').command('user').description('Remove a user from one or more project resources.').action(access_command_1.deleteResourceUser);
|
|
9
|
+
};
|
|
10
|
+
exports.registerAccessModule = registerAccessModule;
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/access/index.ts"],"names":[],"mappings":";;;AACA,8DAAgF;AAEzE,MAAM,oBAAoB,GAAG,CAAC,OAAgB,EAAQ,EAAE;IAC7D,MAAM,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,mGAAmG,CAAC,CAAC;IAC1J,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,wBAAwB,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,8CAA8C,CAAC,CAAC,MAAM,CAAC,gCAAe,CAAC,CAAC;IAChK,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,CAAC,yBAAyB,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,mDAAmD,CAAC,CAAC,MAAM,CAAC,mCAAkB,CAAC,CAAC;AAC9K,CAAC,CAAC;AAJW,QAAA,oBAAoB,wBAI/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configure-aws.command.d.ts","sourceRoot":"","sources":["../../../../src/modules/aws/commands/configure-aws.command.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,YAAY,QAAa,OAAO,CAAC,IAAI,CAAiC,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.configureAws = void 0;
|
|
4
|
+
const provider_command_1 = require("../../cloud/commands/provider.command");
|
|
5
|
+
const configureAws = async () => (0, provider_command_1.configureUserProvider)('aws');
|
|
6
|
+
exports.configureAws = configureAws;
|
|
7
|
+
//# sourceMappingURL=configure-aws.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configure-aws.command.js","sourceRoot":"","sources":["../../../../src/modules/aws/commands/configure-aws.command.ts"],"names":[],"mappings":";;;AAAA,4EAA8E;AACvE,MAAM,YAAY,GAAG,KAAK,IAAmB,EAAE,CAAC,IAAA,wCAAqB,EAAC,KAAK,CAAC,CAAC;AAAvE,QAAA,YAAY,gBAA2D"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ListCliOptions } from '../../../shared/listing';
|
|
2
|
+
export declare const getHostedZones: () => Promise<{
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
}[]>;
|
|
6
|
+
export declare const listZones: () => Promise<void>;
|
|
7
|
+
export declare const listRecords: (zoneOption?: string, options?: ListCliOptions) => Promise<void>;
|
|
8
|
+
export interface RecordOptions extends ListCliOptions {
|
|
9
|
+
zone?: string;
|
|
10
|
+
ttl?: string;
|
|
11
|
+
value?: string;
|
|
12
|
+
yes?: boolean;
|
|
13
|
+
reason?: string;
|
|
14
|
+
type?: string;
|
|
15
|
+
routing?: string;
|
|
16
|
+
environment?: string;
|
|
17
|
+
secondaryEnvironment?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const createARecord: (name: string | undefined, options: RecordOptions) => Promise<void>;
|
|
20
|
+
export declare const updateARecord: (name: string | undefined, options: RecordOptions) => Promise<void>;
|
|
21
|
+
export declare const deleteARecord: (nameArg: string | undefined, options: RecordOptions) => Promise<void>;
|
|
22
|
+
//# sourceMappingURL=dns.command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dns.command.d.ts","sourceRoot":"","sources":["../../../../src/modules/aws/commands/dns.command.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAkB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAO9E,eAAO,MAAM,cAAc,QAAa,OAAO,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,CAI7E,CAAC;AACF,eAAO,MAAM,SAAS,QAAa,OAAO,CAAC,IAAI,CAAkL,CAAC;AAyBlO,eAAO,MAAM,WAAW,GAAU,aAAa,MAAM,EAAE,UAAS,cAAmB,KAAG,OAAO,CAAC,IAAI,CAMjG,CAAC;AAEF,MAAM,WAAW,aAAc,SAAQ,cAAc;IAAG,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAAE;AAqG5N,eAAO,MAAM,aAAa,GAAI,MAAM,MAAM,GAAG,SAAS,EAAE,SAAS,aAAa,kBAAkD,CAAC;AACjI,eAAO,MAAM,aAAa,GAAU,MAAM,MAAM,GAAG,SAAS,EAAE,SAAS,aAAa,KAAG,OAAO,CAAC,IAAI,CAAmG,CAAC;AACvM,eAAO,MAAM,aAAa,GAAU,SAAS,MAAM,GAAG,SAAS,EAAE,SAAS,aAAa,KAAG,OAAO,CAAC,IAAI,CAerG,CAAC"}
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.deleteARecord = exports.updateARecord = exports.createARecord = exports.listRecords = exports.listZones = exports.getHostedZones = void 0;
|
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
const inquirer_1 = __importDefault(require("inquirer"));
|
|
9
|
+
const node_net_1 = require("node:net");
|
|
10
|
+
const client_route_53_1 = require("@aws-sdk/client-route-53");
|
|
11
|
+
const aws_clients_1 = require("../services/aws-clients");
|
|
12
|
+
const cloud_config_1 = require("../../cloud/config/cloud-config");
|
|
13
|
+
const cloud_api_service_1 = require("../../cloud/services/cloud-api.service");
|
|
14
|
+
const cloud_aws_service_1 = require("../../cloud/services/cloud-aws.service");
|
|
15
|
+
const environment_service_1 = require("../../cloud/services/environment.service");
|
|
16
|
+
const healthcheck_command_1 = require("./healthcheck.command");
|
|
17
|
+
const listing_1 = require("../../../shared/listing");
|
|
18
|
+
const normalizeZoneId = (value) => value.replace(/^\/hostedzone\//, '');
|
|
19
|
+
const normalizeRecord = (value) => value.trim().endsWith('.') ? value.trim() : `${value.trim()}.`;
|
|
20
|
+
const subdomain = (record) => record.replace(/\.$/, '').split('.')[0]?.replace(/[^A-Za-z0-9_.-]/g, '-') || 'record';
|
|
21
|
+
const requireZone = async (option) => { const clients = await (0, cloud_aws_service_1.createCloudAwsClients)('Use AWS Route53 from CLI'); const zone = option || clients.hostedZoneId; if (!zone)
|
|
22
|
+
throw new Error('Hosted zone ID is required. Configure AWS or choose a zone interactively.'); return { route53: clients.route53, zoneId: normalizeZoneId(zone) }; };
|
|
23
|
+
const getHostedZones = async () => {
|
|
24
|
+
const { route53 } = await (0, cloud_aws_service_1.createCloudAwsClients)('List Route53 hosted zones');
|
|
25
|
+
const result = [];
|
|
26
|
+
let marker;
|
|
27
|
+
do {
|
|
28
|
+
const output = await route53.send(new client_route_53_1.ListHostedZonesCommand(marker ? { Marker: marker } : {}));
|
|
29
|
+
for (const zone of output.HostedZones || [])
|
|
30
|
+
if (zone.Id && zone.Name)
|
|
31
|
+
result.push({ id: normalizeZoneId(zone.Id), name: zone.Name });
|
|
32
|
+
marker = output.IsTruncated ? output.NextMarker : undefined;
|
|
33
|
+
} while (marker);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
exports.getHostedZones = getHostedZones;
|
|
37
|
+
const listZones = async () => { try {
|
|
38
|
+
for (const zone of await (0, exports.getHostedZones)())
|
|
39
|
+
console.log(`${zone.id}\t${zone.name}`);
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
throw new Error((0, aws_clients_1.describeAwsError)(error), { cause: error });
|
|
43
|
+
} };
|
|
44
|
+
exports.listZones = listZones;
|
|
45
|
+
const allRecords = async (zoneOption) => {
|
|
46
|
+
const { route53, zoneId } = await requireZone(zoneOption);
|
|
47
|
+
const records = [];
|
|
48
|
+
let name;
|
|
49
|
+
let type;
|
|
50
|
+
do {
|
|
51
|
+
const output = await route53.send(new client_route_53_1.ListResourceRecordSetsCommand({ HostedZoneId: zoneId, ...(name ? { StartRecordName: name } : {}), ...(type ? { StartRecordType: type } : {}) }));
|
|
52
|
+
records.push(...(output.ResourceRecordSets || []));
|
|
53
|
+
name = output.IsTruncated ? output.NextRecordName : undefined;
|
|
54
|
+
type = output.IsTruncated ? output.NextRecordType : undefined;
|
|
55
|
+
} while (name);
|
|
56
|
+
return { route53, zoneId, records };
|
|
57
|
+
};
|
|
58
|
+
const recordLabel = (record) => {
|
|
59
|
+
const values = record.ResourceRecords?.map((item) => item.Value ?? '').join(', ') || record.AliasTarget?.DNSName || '';
|
|
60
|
+
return `${record.Type} ${record.Name} ${record.SetIdentifier || 'simple'} → ${values}`;
|
|
61
|
+
};
|
|
62
|
+
const selectRecordName = async (zoneOption, options) => {
|
|
63
|
+
const { records } = await allRecords(zoneOption);
|
|
64
|
+
const shown = (0, listing_1.filterAndLimit)(records, options, (r) => recordLabel(r));
|
|
65
|
+
if (!shown.length)
|
|
66
|
+
throw new Error('No matching Route53 records were found.');
|
|
67
|
+
return (await inquirer_1.default.prompt([{ type: 'list', name: 'name', message: 'Route53 record:', pageSize: 15, choices: shown.map((r) => ({ name: recordLabel(r), value: String(r.Name || '').replace(/\.$/, '') })) }])).name;
|
|
68
|
+
};
|
|
69
|
+
const listRecords = async (zoneOption, options = {}) => {
|
|
70
|
+
try {
|
|
71
|
+
const { records } = await allRecords(zoneOption);
|
|
72
|
+
const shown = (0, listing_1.filterAndLimit)(records, options, (r) => recordLabel(r));
|
|
73
|
+
console.table(shown.map((record) => ({ type: record.Type, name: record.Name, ttl: record.TTL ?? '', id: record.SetIdentifier || '', routing: record.Failover || (record.Weight ?? record.Region ?? 'SIMPLE'), values: record.ResourceRecords?.map((i) => i.Value ?? '').join(', ') || record.AliasTarget?.DNSName || '' })));
|
|
74
|
+
}
|
|
75
|
+
catch (error) {
|
|
76
|
+
throw new Error((0, aws_clients_1.describeAwsError)(error), { cause: error });
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
exports.listRecords = listRecords;
|
|
80
|
+
const pickZone = async (option) => {
|
|
81
|
+
if (option)
|
|
82
|
+
return option;
|
|
83
|
+
const configured = (await (0, cloud_aws_service_1.createCloudAwsClients)('Select Route53 hosted zone')).hostedZoneId;
|
|
84
|
+
if (configured)
|
|
85
|
+
return configured;
|
|
86
|
+
const zones = await (0, exports.getHostedZones)();
|
|
87
|
+
if (!zones.length)
|
|
88
|
+
throw new Error('No Route53 hosted zones are available.');
|
|
89
|
+
return (await inquirer_1.default.prompt([{ type: 'list', name: 'zone', message: 'Hosted zone:', choices: zones.map((z) => ({ name: `${z.name} (${z.id})`, value: z.id })) }])).zone;
|
|
90
|
+
};
|
|
91
|
+
const auditCloud = async (action, record, reason, metadata) => {
|
|
92
|
+
if (!(0, cloud_config_1.getCloudConfig)()?.token)
|
|
93
|
+
return;
|
|
94
|
+
try {
|
|
95
|
+
await new cloud_api_service_1.CloudApiService().request('/audit', { method: 'POST', body: JSON.stringify({ action, resourceType: 'route53-record', resourceId: record, reason, metadata }) });
|
|
96
|
+
}
|
|
97
|
+
catch (error) {
|
|
98
|
+
console.warn(chalk_1.default.yellow(`⚠ DNS changed in AWS, but audit logging failed: ${error instanceof Error ? error.message : String(error)}`));
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
const validateRecordValue = (type, value) => {
|
|
102
|
+
if (!value.trim())
|
|
103
|
+
return 'Value is required.';
|
|
104
|
+
if (type === 'A' && (0, node_net_1.isIP)(value.trim()) !== 4)
|
|
105
|
+
return 'Enter a valid IPv4 address.';
|
|
106
|
+
return true;
|
|
107
|
+
};
|
|
108
|
+
const customValue = async (label, type, defaultValue) => (await inquirer_1.default.prompt([{ type: 'input', name: 'value', message: label, default: defaultValue, validate: (v) => validateRecordValue(type, v) }])).value.trim();
|
|
109
|
+
const selectTarget = async (label, type, requested, excludeEnvironmentId) => {
|
|
110
|
+
if (type !== 'A')
|
|
111
|
+
return { value: await customValue(`${label} value:`, type) };
|
|
112
|
+
const environments = await (0, environment_service_1.listEnvironments)();
|
|
113
|
+
const usable = environments.filter((item) => item.id !== excludeEnvironmentId);
|
|
114
|
+
if (requested && requested.trim().toLowerCase() !== 'custom') {
|
|
115
|
+
const found = usable.find((item) => item.name.toLowerCase() === requested.trim().toLowerCase());
|
|
116
|
+
if (found)
|
|
117
|
+
return { value: found.ipv4, environment: found, ...(found.region !== undefined ? { region: found.region } : {}) };
|
|
118
|
+
console.log(chalk_1.default.yellow(`⚠ Environment ${requested} was not found.`));
|
|
119
|
+
}
|
|
120
|
+
if (requested?.trim().toLowerCase() === 'custom' || !usable.length) {
|
|
121
|
+
return { value: await customValue(`${label} IPv4:`, 'A') };
|
|
122
|
+
}
|
|
123
|
+
const choice = (await inquirer_1.default.prompt([{ type: 'list', name: 'id', message: `${label} target:`, choices: [
|
|
124
|
+
...usable.map((item) => ({ name: `${item.name} — ${item.ipv4}${item.region ? ` (${item.region})` : ''}`, value: item.id })),
|
|
125
|
+
{ name: 'Enter custom IPv4', value: '__custom__' }
|
|
126
|
+
] }])).id;
|
|
127
|
+
if (choice === '__custom__')
|
|
128
|
+
return { value: await customValue(`${label} IPv4:`, 'A') };
|
|
129
|
+
const found = usable.find((item) => item.id === choice);
|
|
130
|
+
return { value: found.ipv4, environment: found, ...(found.region !== undefined ? { region: found.region } : {}) };
|
|
131
|
+
};
|
|
132
|
+
const createOrUpdateRecord = async (action, recordArg, options) => {
|
|
133
|
+
const zone = await pickZone(options.zone);
|
|
134
|
+
const answers = await inquirer_1.default.prompt([
|
|
135
|
+
{ type: 'input', name: 'record', message: 'DNS record/subdomain:', default: recordArg, when: !recordArg, validate: (v) => !!v.trim() || 'Required' },
|
|
136
|
+
{ type: 'list', name: 'type', message: 'Record type:', choices: ['A', 'CNAME', 'TXT', 'MX'], default: options.type || 'A', when: !options.type },
|
|
137
|
+
{ type: 'list', name: 'routing', message: 'Routing policy:', choices: ['FAILOVER', 'SIMPLE', 'WEIGHTED', 'LATENCY'], default: options.routing || 'FAILOVER', when: !options.routing },
|
|
138
|
+
{ type: 'number', name: 'ttl', message: 'TTL seconds:', default: Number(options.ttl || 60), validate: (v) => (Number.isInteger(v) && v > 0) || 'TTL must be positive.' },
|
|
139
|
+
{ type: 'input', name: 'reason', message: 'Reason for DNS change:', default: options.reason || `${action === 'CREATE' ? 'Create' : 'Update'} Route53 record`, validate: (v) => v.trim().length >= 3 || 'Reason is required.' }
|
|
140
|
+
]);
|
|
141
|
+
const record = (recordArg || answers.record).trim();
|
|
142
|
+
const type = (options.type || answers.type || 'A').toUpperCase();
|
|
143
|
+
const routing = (options.routing || answers.routing || 'FAILOVER').toUpperCase();
|
|
144
|
+
const ttl = answers.ttl;
|
|
145
|
+
const { route53, zoneId } = await requireZone(zone);
|
|
146
|
+
const changes = [];
|
|
147
|
+
let auditTargets = null;
|
|
148
|
+
try {
|
|
149
|
+
if (routing === 'FAILOVER') {
|
|
150
|
+
const primary = options.value ? { value: options.value } : await selectTarget('PRIMARY', type, options.environment);
|
|
151
|
+
const secondary = await selectTarget('SECONDARY', type, options.secondaryEnvironment, primary.environment?.id);
|
|
152
|
+
if (primary.value === secondary.value && type === 'A')
|
|
153
|
+
console.log(chalk_1.default.yellow('⚠ PRIMARY and SECONDARY resolve to the same IPv4; failover will not provide host redundancy.'));
|
|
154
|
+
let primaryHealthId;
|
|
155
|
+
let secondaryHealthId;
|
|
156
|
+
if (type === 'A' || type === 'CNAME') {
|
|
157
|
+
console.log(chalk_1.default.gray(' Select existing Route53 health checks. Only IndraQ admins can create/delete health checks with `indraq healthcheck create|delete`.'));
|
|
158
|
+
primaryHealthId = await (0, healthcheck_command_1.selectExistingHealthCheck)('PRIMARY health check:');
|
|
159
|
+
secondaryHealthId = await (0, healthcheck_command_1.selectExistingHealthCheck)('SECONDARY health check:');
|
|
160
|
+
if (primaryHealthId === secondaryHealthId)
|
|
161
|
+
console.log(chalk_1.default.yellow('⚠ PRIMARY and SECONDARY use the same health check; failover isolation may be reduced.'));
|
|
162
|
+
}
|
|
163
|
+
const setBase = subdomain(record).slice(0, 110);
|
|
164
|
+
changes.push({ Action: action, ResourceRecordSet: { Name: normalizeRecord(record), Type: type, TTL: ttl, ResourceRecords: [{ Value: primary.value }], SetIdentifier: `${setBase}-primary`, Failover: 'PRIMARY', ...(primaryHealthId ? { HealthCheckId: primaryHealthId } : {}) } });
|
|
165
|
+
changes.push({ Action: action, ResourceRecordSet: { Name: normalizeRecord(record), Type: type, TTL: ttl, ResourceRecords: [{ Value: secondary.value }], SetIdentifier: `${setBase}-secondary`, Failover: 'SECONDARY', ...(secondaryHealthId ? { HealthCheckId: secondaryHealthId } : {}) } });
|
|
166
|
+
auditTargets = { primaryEnvironment: primary.environment?.name || 'custom', primary: primary.value, secondaryEnvironment: secondary.environment?.name || 'custom', secondary: secondary.value };
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
const target = options.value ? { value: options.value } : await selectTarget('Record', type, options.environment);
|
|
170
|
+
const rr = { Name: normalizeRecord(record), Type: type, TTL: ttl, ResourceRecords: [{ Value: target.value }] };
|
|
171
|
+
if (routing === 'WEIGHTED') {
|
|
172
|
+
const weight = (await inquirer_1.default.prompt([{ type: 'number', name: 'weight', message: 'Weight (0-255):', default: 100, validate: (v) => (Number.isInteger(v) && v >= 0 && v <= 255) || 'Use 0-255.' }])).weight;
|
|
173
|
+
rr.SetIdentifier = `${subdomain(record)}-weighted-${target.environment?.name || 'custom'}`.slice(0, 128);
|
|
174
|
+
rr.Weight = weight;
|
|
175
|
+
}
|
|
176
|
+
else if (routing === 'LATENCY') {
|
|
177
|
+
const region = target.region || (await inquirer_1.default.prompt([{ type: 'input', name: 'region', message: 'AWS region:', validate: (v) => !!v.trim() || 'Required' }])).region;
|
|
178
|
+
rr.SetIdentifier = `${subdomain(record)}-latency-${region}`.slice(0, 128);
|
|
179
|
+
rr.Region = region;
|
|
180
|
+
}
|
|
181
|
+
if ((type === 'A' || type === 'CNAME') && routing !== 'SIMPLE') {
|
|
182
|
+
const attach = (await inquirer_1.default.prompt([{ type: 'confirm', name: 'enabled', message: `Attach an existing Route53 health check to this ${routing} record?`, default: false }])).enabled;
|
|
183
|
+
if (attach) {
|
|
184
|
+
const healthCheckId = await (0, healthcheck_command_1.selectExistingHealthCheck)('Health check:', true);
|
|
185
|
+
if (healthCheckId)
|
|
186
|
+
rr.HealthCheckId = healthCheckId;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
else if (routing === 'SIMPLE') {
|
|
190
|
+
console.log(chalk_1.default.gray(' SIMPLE routing does not attach a Route53 health check.'));
|
|
191
|
+
}
|
|
192
|
+
changes.push({ Action: action, ResourceRecordSet: rr });
|
|
193
|
+
auditTargets = { environment: target.environment?.name || 'custom', value: target.value };
|
|
194
|
+
}
|
|
195
|
+
await route53.send(new client_route_53_1.ChangeResourceRecordSetsCommand({ HostedZoneId: zoneId, ChangeBatch: { Changes: changes } }));
|
|
196
|
+
}
|
|
197
|
+
catch (error) {
|
|
198
|
+
throw error;
|
|
199
|
+
}
|
|
200
|
+
await auditCloud(action === 'CREATE' ? 'dns.create' : 'dns.update', record, answers.reason, { zoneId, type, routing, targets: auditTargets });
|
|
201
|
+
console.log(chalk_1.default.green(`✓ Route53 ${routing} ${type} record ${record} ${action === 'CREATE' ? 'created' : 'updated'}.`));
|
|
202
|
+
};
|
|
203
|
+
const createARecord = (name, options) => createOrUpdateRecord('CREATE', name, options);
|
|
204
|
+
exports.createARecord = createARecord;
|
|
205
|
+
const updateARecord = async (name, options) => createOrUpdateRecord('UPSERT', name || await selectRecordName(options.zone, options), options);
|
|
206
|
+
exports.updateARecord = updateARecord;
|
|
207
|
+
const deleteARecord = async (nameArg, options) => {
|
|
208
|
+
const zone = await pickZone(options.zone);
|
|
209
|
+
const record = nameArg || await selectRecordName(zone, options);
|
|
210
|
+
const { route53, zoneId } = await requireZone(zone);
|
|
211
|
+
const output = await route53.send(new client_route_53_1.ListResourceRecordSetsCommand({ HostedZoneId: zoneId, StartRecordName: normalizeRecord(record) }));
|
|
212
|
+
const matches = (output.ResourceRecordSets || []).filter((r) => r.Name === normalizeRecord(record));
|
|
213
|
+
if (!matches.length)
|
|
214
|
+
throw new Error(`No Route53 record found for ${record}.`);
|
|
215
|
+
const choices = matches.map((r, i) => ({ name: `${r.Type} ${r.SetIdentifier || 'simple'} ${r.Failover || (r.Weight ?? r.Region ?? '')} → ${r.ResourceRecords?.map((x) => x.Value).join(',') || ''}`, value: String(i) }));
|
|
216
|
+
const indexes = matches.length === 1 ? ['0'] : (await inquirer_1.default.prompt([{ type: 'checkbox', name: 'indexes', message: 'Records to delete:', choices, validate: (v) => v.length > 0 || 'Select at least one.' }])).indexes;
|
|
217
|
+
const selected = indexes.map((i) => matches[Number(i)]).filter(Boolean);
|
|
218
|
+
const reason = options.reason || (await inquirer_1.default.prompt([{ type: 'input', name: 'reason', message: 'Reason for DNS deletion:', validate: (v) => v.trim().length >= 3 || 'Reason required.' }])).reason;
|
|
219
|
+
if (!options.yes) {
|
|
220
|
+
const c = await inquirer_1.default.prompt([{ type: 'confirm', name: 'ok', message: `Delete ${selected.length} Route53 record set(s) for ${record}?`, default: false }]);
|
|
221
|
+
if (!c.ok)
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
await route53.send(new client_route_53_1.ChangeResourceRecordSetsCommand({ HostedZoneId: zoneId, ChangeBatch: { Changes: selected.map((rr) => ({ Action: 'DELETE', ResourceRecordSet: rr })) } }));
|
|
225
|
+
await auditCloud('dns.delete', record, reason, { zoneId, count: selected.length });
|
|
226
|
+
console.log(chalk_1.default.green(`✓ ${selected.length} Route53 record set(s) deleted.`));
|
|
227
|
+
};
|
|
228
|
+
exports.deleteARecord = deleteARecord;
|
|
229
|
+
//# sourceMappingURL=dns.command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dns.command.js","sourceRoot":"","sources":["../../../../src/modules/aws/commands/dns.command.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,wDAAgC;AAChC,uCAAgC;AAChC,8DAMkC;AAClC,yDAA2D;AAC3D,kEAAiE;AACjE,8EAAyE;AACzE,8EAA+E;AAC/E,kFAAmG;AACnG,+DAAkE;AAClE,qDAA8E;AAE9E,MAAM,eAAe,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;AACxF,MAAM,eAAe,GAAG,CAAC,KAAa,EAAU,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,IAAI,EAAE,GAAG,CAAC;AAClH,MAAM,SAAS,GAAG,CAAC,MAAc,EAAU,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,kBAAkB,EAAE,GAAG,CAAC,IAAI,QAAQ,CAAC;AACpI,MAAM,WAAW,GAAG,KAAK,EAAE,MAAe,EAAE,EAAE,GAAG,MAAM,OAAO,GAAG,MAAM,IAAA,yCAAqB,EAAC,0BAA0B,CAAC,CAAC,CAAC,MAAM,IAAI,GAAG,MAAM,IAAI,OAAO,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,IAAI;IAAE,MAAM,IAAI,KAAK,CAAC,2EAA2E,CAAC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AY,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IACnF,OAAO,CAAC,GAAG,CAAC,eAAK,CAAC,KAAK,CAAC,KAAK,QAAQ,CAAC,MAAM,iCAAiC,CAAC,CAAC,CAAC;AAClF,CAAC,CAAC;AAfW,QAAA,aAAa,iBAexB"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface ListOptions {
|
|
2
|
+
search?: string;
|
|
3
|
+
limit?: string;
|
|
4
|
+
all?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface HealthCheckChoice {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
type: string;
|
|
10
|
+
target: string;
|
|
11
|
+
port?: number;
|
|
12
|
+
path?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const getHealthChecks: (options?: ListOptions) => Promise<HealthCheckChoice[]>;
|
|
15
|
+
export declare const listHealthChecks: (options: ListOptions) => Promise<void>;
|
|
16
|
+
export declare const selectExistingHealthCheck: (message: string, allowNone?: boolean) => Promise<string | undefined>;
|
|
17
|
+
export declare const createHealthCheck: () => Promise<void>;
|
|
18
|
+
export declare const deleteHealthCheck: (idArg: string | undefined, options: {
|
|
19
|
+
yes?: boolean;
|
|
20
|
+
search?: string;
|
|
21
|
+
}) => Promise<void>;
|
|
22
|
+
//# sourceMappingURL=healthcheck.command.d.ts.map
|