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,14 @@
|
|
|
1
|
+
PORT=4010
|
|
2
|
+
DATABASE_URL=postgresql://indraq:change-me@127.0.0.1:5432/indraq_cloud
|
|
3
|
+
JWT_SECRET=replace-with-64-random-characters
|
|
4
|
+
MASTER_KEY=replace-with-64-hex-characters
|
|
5
|
+
BOOTSTRAP_ADMIN_EMAIL=admin@example.com
|
|
6
|
+
BOOTSTRAP_ADMIN_PASSWORD=change-this-immediately
|
|
7
|
+
|
|
8
|
+
# Password-reset email (required for `indraq password reset`)
|
|
9
|
+
SMTP_HOST=smtp.example.com
|
|
10
|
+
SMTP_PORT=587
|
|
11
|
+
SMTP_SECURE=false
|
|
12
|
+
SMTP_USER=
|
|
13
|
+
SMTP_PASS=
|
|
14
|
+
SMTP_FROM=IndraQ <no-reply@example.com>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
FROM node:22-alpine AS build
|
|
2
|
+
WORKDIR /myapp
|
|
3
|
+
# Copy the complete project context. .dockerignore controls all exclusions.
|
|
4
|
+
COPY . .
|
|
5
|
+
RUN if [ -f package-lock.json ]; then npm ci; else npm install; fi
|
|
6
|
+
RUN npm run build
|
|
7
|
+
RUN npm prune --omit=dev
|
|
8
|
+
|
|
9
|
+
FROM node:22-alpine AS runtime
|
|
10
|
+
WORKDIR /myapp
|
|
11
|
+
RUN apk add --no-cache curl
|
|
12
|
+
ENV NODE_ENV=production PORT=4010
|
|
13
|
+
# Copy the complete filtered project from the build stage, including generated
|
|
14
|
+
# build output and production node_modules. No project filenames are guessed.
|
|
15
|
+
COPY --from=build --chown=node:node /myapp ./
|
|
16
|
+
USER node
|
|
17
|
+
EXPOSE 4010
|
|
18
|
+
HEALTHCHECK --interval=30s --timeout=3s CMD curl -fsS http://127.0.0.1:4010/health >/dev/null || exit 1
|
|
19
|
+
CMD ["npm", "start"]
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# IndraQ Cloud API
|
|
2
|
+
|
|
3
|
+
IndraQ Cloud API is the control plane used by IndraQ CLI. It provides authentication, RBAC, projects, shared environments, encrypted user-scoped provider credentials, managed AWS IAM credential recovery/rotation, first-login password enforcement, email-OTP password reset, project infrastructure associations, automatic PostgreSQL migrations, and audit logs.
|
|
4
|
+
|
|
5
|
+
## Requirements
|
|
6
|
+
|
|
7
|
+
- Node.js 22+
|
|
8
|
+
- PostgreSQL
|
|
9
|
+
|
|
10
|
+
## Configure
|
|
11
|
+
|
|
12
|
+
```powershell
|
|
13
|
+
npm install
|
|
14
|
+
Copy-Item .env.example .env
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Required environment values:
|
|
18
|
+
|
|
19
|
+
```env
|
|
20
|
+
PORT=4010
|
|
21
|
+
DATABASE_URL=postgresql://indraq:change-me@127.0.0.1:5432/indraq_cloud
|
|
22
|
+
JWT_SECRET=replace-with-at-least-32-random-characters
|
|
23
|
+
MASTER_KEY=replace-with-exactly-64-hex-characters
|
|
24
|
+
BOOTSTRAP_ADMIN_EMAIL=admin@example.com
|
|
25
|
+
BOOTSTRAP_ADMIN_PASSWORD=use-a-strong-password
|
|
26
|
+
|
|
27
|
+
# Required for `indraq password reset`
|
|
28
|
+
SMTP_HOST=smtp.example.com
|
|
29
|
+
SMTP_PORT=587
|
|
30
|
+
SMTP_SECURE=false
|
|
31
|
+
SMTP_USER=
|
|
32
|
+
SMTP_PASS=
|
|
33
|
+
SMTP_FROM=IndraQ <no-reply@example.com>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Rules:
|
|
37
|
+
|
|
38
|
+
- `JWT_SECRET` must be at least 32 characters.
|
|
39
|
+
- `MASTER_KEY` must be exactly 64 hexadecimal characters (32 bytes).
|
|
40
|
+
- `BOOTSTRAP_ADMIN_PASSWORD` must be at least 12 characters.
|
|
41
|
+
|
|
42
|
+
Generate a master key:
|
|
43
|
+
|
|
44
|
+
```powershell
|
|
45
|
+
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Start
|
|
49
|
+
|
|
50
|
+
Development:
|
|
51
|
+
|
|
52
|
+
```powershell
|
|
53
|
+
npm run build
|
|
54
|
+
npm run dev
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Production:
|
|
58
|
+
|
|
59
|
+
```powershell
|
|
60
|
+
npm run build
|
|
61
|
+
npm start
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Numbered migrations in `sql/` run automatically at startup.
|
|
65
|
+
|
|
66
|
+
## Bootstrap admin
|
|
67
|
+
|
|
68
|
+
When no admin exists, `BOOTSTRAP_ADMIN_EMAIL` and `BOOTSTRAP_ADMIN_PASSWORD` create the first administrator.
|
|
69
|
+
|
|
70
|
+
Keep `MASTER_KEY` stable. Existing encrypted provider credentials cannot be resolved with a different key.
|
|
71
|
+
|
|
72
|
+
## RBAC
|
|
73
|
+
|
|
74
|
+
Roles:
|
|
75
|
+
|
|
76
|
+
- `user`
|
|
77
|
+
- `manager`
|
|
78
|
+
- `admin`
|
|
79
|
+
|
|
80
|
+
Managers can create/manage normal users. Only admins can create managers/admins, change user roles, and manage shared environments. Managers/admins can view audit logs.
|
|
81
|
+
|
|
82
|
+
Authentication middleware rechecks the current database user state/role for protected requests rather than relying only on a stale role claim.
|
|
83
|
+
|
|
84
|
+
## User-scoped provider credentials
|
|
85
|
+
|
|
86
|
+
Reusable provider credentials are stored in `user_integrations` and keyed by `(user_id, provider)`.
|
|
87
|
+
|
|
88
|
+
Supported provider profiles:
|
|
89
|
+
|
|
90
|
+
- AWS
|
|
91
|
+
- NPM
|
|
92
|
+
- Jenkins Development
|
|
93
|
+
- Jenkins Production
|
|
94
|
+
- GHCR
|
|
95
|
+
|
|
96
|
+
Secrets use AES-256-GCM because provider APIs need the original credential later. Account passwords use bcrypt.
|
|
97
|
+
|
|
98
|
+
Users cannot resolve another user's provider credentials through the normal API. Provider resolution is audited and responses use `Cache-Control: no-store`.
|
|
99
|
+
|
|
100
|
+
## Managed AWS IAM credentials
|
|
101
|
+
|
|
102
|
+
When unified user creation generates an AWS access key, AWS returns the secret only at creation time. IndraQ can store that generated secret encrypted in `managed_aws_credentials` for the target Cloud user.
|
|
103
|
+
|
|
104
|
+
The target logged-in user can later resolve their own stored AWS credential. Users can rotate their own IndraQ-managed AWS key; managers/admins can rotate keys for users they are authorized to manage. Rotation creates the replacement key, stores it encrypted, updates the target provider credential, then deletes the previous managed key. Administrative creation/deletion/rotation and user resolution are audited.
|
|
105
|
+
|
|
106
|
+
## Password lifecycle
|
|
107
|
+
|
|
108
|
+
Users created through the management API receive `must_change_password=true`. The first successful login must be followed by `/auth/first-login-password` before normal protected operations are allowed. Managed NPM/Jenkins identities created through the unified workflow can be rotated to the new password as part of that first-login change.
|
|
109
|
+
|
|
110
|
+
Self-service password recovery uses `/auth/password-reset/request` and `/auth/password-reset/verify`. OTP values are bcrypt-hashed in PostgreSQL, expire after 10 minutes, are rate-limited, and have an attempt limit. SMTP must be configured for delivery. AWS is not a password-reset target because IndraQ AWS users are CLI/API access-key users.
|
|
111
|
+
|
|
112
|
+
## Shared environments
|
|
113
|
+
|
|
114
|
+
`environments` are admin-managed reusable server targets containing values such as:
|
|
115
|
+
|
|
116
|
+
- name
|
|
117
|
+
- description
|
|
118
|
+
- IPv4 address
|
|
119
|
+
- region
|
|
120
|
+
|
|
121
|
+
Environment names are arbitrary. Environments are reusable address targets only; Route53 health-check settings are chosen per DNS record. PRIMARY/SECONDARY roles are assigned by a project DNS routing configuration, not stored permanently on the environment.
|
|
122
|
+
|
|
123
|
+
## Projects and project resources
|
|
124
|
+
|
|
125
|
+
Projects are stored separately from reusable user credentials.
|
|
126
|
+
|
|
127
|
+
`project_resources` stores project-specific associations such as:
|
|
128
|
+
|
|
129
|
+
- GHCR image
|
|
130
|
+
- Jenkins job
|
|
131
|
+
- Route53 record/health-check metadata
|
|
132
|
+
- NPM proxy
|
|
133
|
+
- environment association
|
|
134
|
+
|
|
135
|
+
`project_members` controls WRITE membership. Every authenticated organization user can discover/view the project catalog, while creators/members with WRITE (and managers/admins) may run infrastructure-changing workflows. Managers/admins can add or remove members with an audit reason.
|
|
136
|
+
|
|
137
|
+
`project_resource_grants` records service/resource-level access granted by managers/admins. IndraQ synchronizes native access where the provider supports safe granularity (for example exact Route53 record/health-check permissions and Jenkins item roles) while retaining IndraQ Cloud as the authoritative access inventory.
|
|
138
|
+
|
|
139
|
+
## Audit logs
|
|
140
|
+
|
|
141
|
+
Administrative and sensitive actions are written to `audit_logs`. Audit log access is restricted to managers/admins.
|