indraq_cli 2.2.1 → 2.2.2
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/CHANGELOG_v2.1.0.md +27 -0
- package/CHANGELOG_v2.2.0.md +60 -0
- package/CHANGELOG_v2.2.1.md +19 -0
- package/CHANGELOG_v2.2.2.md +18 -0
- package/README.md +27 -14
- package/RELEASE_CHECKS_v2.2.0.md +27 -0
- package/RELEASE_CHECKS_v2.2.2.md +26 -0
- package/TEST_RESULTS_v2.2.1.txt +11 -0
- package/TEST_RESULTS_v2.2.2.txt +39 -0
- package/UPGRADE_v2.0_to_v2.1.md +68 -0
- package/UPGRADE_v2.1_to_v2.2.md +62 -0
- package/UPGRADE_v2.2.1_to_v2.2.2.md +15 -0
- package/cloud-api/README.md +101 -93
- package/cloud-api/dist/index.js +62 -7
- package/cloud-api/node_modules/.package-lock.json +1 -1
- package/cloud-api/package-lock.json +2 -2
- package/cloud-api/package.json +1 -1
- package/cloud-api/sql/010_persistent_auth_sessions.sql +12 -0
- package/cloud-api/src/index.ts +71 -9
- package/dist/cli/help-content.d.ts.map +1 -1
- package/dist/cli/help-content.js +27 -22
- package/dist/cli/help-content.js.map +1 -1
- package/dist/modules/cloud/commands/cloud.command.d.ts +1 -1
- package/dist/modules/cloud/commands/cloud.command.d.ts.map +1 -1
- package/dist/modules/cloud/commands/cloud.command.js +8 -4
- package/dist/modules/cloud/commands/cloud.command.js.map +1 -1
- package/dist/modules/cloud/config/cloud-config.d.ts +1 -0
- package/dist/modules/cloud/config/cloud-config.d.ts.map +1 -1
- package/dist/modules/cloud/config/cloud-config.js +14 -13
- package/dist/modules/cloud/config/cloud-config.js.map +1 -1
- package/dist/modules/cloud/services/cloud-api.service.d.ts +6 -0
- package/dist/modules/cloud/services/cloud-api.service.d.ts.map +1 -1
- package/dist/modules/cloud/services/cloud-api.service.js +56 -5
- package/dist/modules/cloud/services/cloud-api.service.js.map +1 -1
- package/dist/modules/deploy/index.d.ts.map +1 -1
- package/dist/modules/deploy/index.js +44 -7
- package/dist/modules/deploy/index.js.map +1 -1
- package/dist/modules/scopes/commands/scope.command.d.ts.map +1 -1
- package/dist/modules/scopes/commands/scope.command.js +8 -4
- package/dist/modules/scopes/commands/scope.command.js.map +1 -1
- package/package.json +14 -5
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# IndraQ CLI v2.1.0
|
|
2
|
+
|
|
3
|
+
## Highlights
|
|
4
|
+
|
|
5
|
+
- Added unlimited named provider scopes for AWS, NPM, Jenkins DEV/PROD and GHCR.
|
|
6
|
+
- Provider scopes are organization-owned and created only by admins.
|
|
7
|
+
- Added USE/MANAGE scope membership with manager-limited delegation.
|
|
8
|
+
- User creation now asks which manageable scopes to provision and supports multiple scopes at once.
|
|
9
|
+
- Users see only assigned scopes and can safely describe account/server metadata without secrets.
|
|
10
|
+
- Added per-user provider defaults and per-project/environment scope links.
|
|
11
|
+
- Added self-service AWS key rotation and NPM/Jenkins password rotation.
|
|
12
|
+
- Added audited scope add/remove/default/credential operations with mandatory reasons.
|
|
13
|
+
- Jenkins project access uses exact Role Strategy Item Roles with Discover/Read/Build/Cancel/Workspace only.
|
|
14
|
+
- Jenkins + GHCR are mandatory for deploy; Route53 and NPM are optional.
|
|
15
|
+
- Optional DNS/NPM supports Skip, Create/reconcile and Link existing.
|
|
16
|
+
- `--env` is explicitly an IndraQ project/resource environment selector, not a `.env` loader.
|
|
17
|
+
- Cloud API endpoint changed to `https://cli.indraq.com`.
|
|
18
|
+
- NPM networking/TLS/auth errors provide actionable diagnostics instead of only `fetch failed`.
|
|
19
|
+
- Rewritten README and command help around the scope model.
|
|
20
|
+
|
|
21
|
+
## Database
|
|
22
|
+
|
|
23
|
+
Adds `cloud-api/sql/008_provider_scopes.sql`.
|
|
24
|
+
|
|
25
|
+
## Compatibility
|
|
26
|
+
|
|
27
|
+
`indraq provider configure` remains as an admin compatibility alias for `indraq scope create`.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# IndraQ CLI v2.2.0
|
|
2
|
+
|
|
3
|
+
## Scope-first deployment completion
|
|
4
|
+
|
|
5
|
+
- Prebuild now requires shared admin-created environments; the project-local custom IPv4 deployment target path was removed.
|
|
6
|
+
- `prebuild` no longer exposes legacy `--host-port`, `--networks`, `--volumes`, or `--flags` options.
|
|
7
|
+
- Required GHCR and Jenkins scopes are linked to `project_environment_scopes` during setup and reused afterwards.
|
|
8
|
+
- `indraq deploy --env <env>` uses saved scope bindings without prompting on every deployment.
|
|
9
|
+
- `--select-scopes` is the explicit deployment-time override.
|
|
10
|
+
|
|
11
|
+
## Credential security
|
|
12
|
+
|
|
13
|
+
- `USE` members can no longer resolve the organization AWS/NPM/Jenkins management credential.
|
|
14
|
+
- AWS resolution returns the user's own IndraQ-managed IAM access key.
|
|
15
|
+
- NPM/Jenkins resolution returns the user's own encrypted native-account password.
|
|
16
|
+
- AWS key rotation and NPM/Jenkins password rotation are performed server-side with the scope management credential.
|
|
17
|
+
- GHCR remains a deliberate shared deployment credential scoped to assigned members and used by the CLI through an isolated temporary Docker login.
|
|
18
|
+
|
|
19
|
+
## Projects and authorization
|
|
20
|
+
|
|
21
|
+
- Managers are no longer implicit WRITE users for every organization project.
|
|
22
|
+
- Non-admin project visibility is limited to the creator or explicit project membership.
|
|
23
|
+
- Added `project rename`, `project archive`, `project restore`, and permanent `project delete`.
|
|
24
|
+
- Archived projects are blocked from scope mutation, infrastructure mutation, credential resolution for deployment, prebuild, and deploy until restored.
|
|
25
|
+
- Manager resource-grant inspection is limited to projects the manager can actually manage.
|
|
26
|
+
|
|
27
|
+
## User/scope operations
|
|
28
|
+
|
|
29
|
+
- Added `indraq user scopes [email]`.
|
|
30
|
+
- NPM/Jenkins scope-native account records now retain the user's encrypted password for personal resolution and self-rotation.
|
|
31
|
+
- Existing Jenkins Role Strategy Item Role synchronization remains the project-pipeline authorization mechanism.
|
|
32
|
+
|
|
33
|
+
## Database
|
|
34
|
+
|
|
35
|
+
Added `cloud-api/sql/009_scope_user_secrets_and_project_lifecycle.sql`:
|
|
36
|
+
|
|
37
|
+
- `scope_external_accounts.encrypted_secret`
|
|
38
|
+
- `projects.archived_at`
|
|
39
|
+
- `projects.archived_by`
|
|
40
|
+
|
|
41
|
+
## Strict TypeScript build compatibility fix — 2026-09-10
|
|
42
|
+
|
|
43
|
+
- Fixed 12 `exactOptionalPropertyTypes` build errors reported with the real AWS SDK 3.1123.0 declarations.
|
|
44
|
+
- Removed hand-written callback parameter shapes for AWS SDK `ResourceRecord`, `Tag`, `HostedZone`, and `AttachedPolicy` values and now let TypeScript infer the SDK-native callback types.
|
|
45
|
+
- Affected files:
|
|
46
|
+
- `src/modules/aws/commands/dns.command.ts`
|
|
47
|
+
- `src/modules/aws/commands/healthcheck.command.ts`
|
|
48
|
+
- `src/modules/aws/services/route53-lookup.service.ts`
|
|
49
|
+
- `src/modules/prebuild/commands/prebuild.command.ts`
|
|
50
|
+
- `src/modules/scopes/commands/scope.command.ts`
|
|
51
|
+
- `src/modules/users/providers/aws-user.provider.ts`
|
|
52
|
+
- Runtime behavior is unchanged; this is a source/type compatibility correction.
|
|
53
|
+
|
|
54
|
+
## Documentation/help synchronization
|
|
55
|
+
|
|
56
|
+
- Focused `help scope` now lists personal AWS credential/key and NPM/Jenkins password rotation commands.
|
|
57
|
+
- Focused `help users` now documents `user list`, `user scopes [email]`, and self-service Cloud password reset.
|
|
58
|
+
- Focused `help deploy` now explains saved scope reuse and the explicit `--select-scopes` override.
|
|
59
|
+
- Removed stale v2.1 wording from compatibility command descriptions.
|
|
60
|
+
- README now explicitly states that provider-management secrets are never returned to normal `USE` members.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# IndraQ CLI v2.2.1
|
|
2
|
+
|
|
3
|
+
Bug-fix release for project scope selection and shared-environment deployment.
|
|
4
|
+
|
|
5
|
+
## Fixed
|
|
6
|
+
|
|
7
|
+
- Project scope linking now always displays the eligible scopes, even when only one scope is visible.
|
|
8
|
+
- The selected scope is shown with provider/name/company/endpoint/access before it is linked.
|
|
9
|
+
- The audit-reason prompt now comes after scope selection so the account being linked is clear.
|
|
10
|
+
- `indraq deploy` now lists the available shared environments and lets the user choose one interactively.
|
|
11
|
+
- `indraq deploy --env <environment>` validates and deploys the exact shared environment used by prebuild.
|
|
12
|
+
- `indraq deployment run` can also prompt for an environment when `--env` is omitted.
|
|
13
|
+
- `deploy:dev` and `deploy:prod` remain compatibility aliases. If no matching dev/prod environment exists, they open the shared-environment picker instead of trying to deploy a nonexistent environment.
|
|
14
|
+
- Help and README examples now prefer real shared-environment names rather than assuming every organization has `dev` and `prod` environments.
|
|
15
|
+
|
|
16
|
+
## Validation
|
|
17
|
+
|
|
18
|
+
- 16/16 configured regression suites pass, including the new v2.2.1 environment/scope-selection regression.
|
|
19
|
+
- Updated emitted JavaScript files pass `node --check`.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# IndraQ CLI v2.2.2
|
|
2
|
+
|
|
3
|
+
## Persistent Cloud sessions
|
|
4
|
+
|
|
5
|
+
- Replaced the single 12-hour login JWT with a persistent server-side CLI session.
|
|
6
|
+
- Access JWTs are now short-lived (1 hour) and refresh automatically in the background.
|
|
7
|
+
- A refresh/session token is stored alongside the access token in `~/.indraq/cloud.json`.
|
|
8
|
+
- The refresh session has no time-based expiry: normal users stay signed in until they explicitly run `indraq logout`, their account is removed/disabled, or their Cloud password is reset.
|
|
9
|
+
- `indraq logout` now revokes the server-side session as well as clearing local credentials.
|
|
10
|
+
- Every session-backed Cloud request verifies that the server-side session has not been revoked.
|
|
11
|
+
- Existing still-valid v2.2.1 JWTs are automatically upgraded to persistent sessions on the next Cloud request, avoiding an unnecessary login during upgrade when possible.
|
|
12
|
+
- Cloud password reset/admin password reset revokes existing sessions. First-login password change keeps the current session and revokes any other temporary-password sessions.
|
|
13
|
+
|
|
14
|
+
## Cloud API
|
|
15
|
+
|
|
16
|
+
- Cloud API version: `0.8.0`.
|
|
17
|
+
- Added migration `010_persistent_auth_sessions.sql`.
|
|
18
|
+
- Added `/auth/session`, `/auth/refresh`, and `/auth/logout` endpoints.
|
package/README.md
CHANGED
|
@@ -212,7 +212,7 @@ indraq project link
|
|
|
212
212
|
### 7. Choose project provider defaults
|
|
213
213
|
|
|
214
214
|
```bash
|
|
215
|
-
indraq project scopes --env
|
|
215
|
+
indraq project scopes --env indraq-test-airtel
|
|
216
216
|
```
|
|
217
217
|
|
|
218
218
|
A project may use a different scope than your personal default.
|
|
@@ -220,27 +220,33 @@ A project may use a different scope than your personal default.
|
|
|
220
220
|
### 8. Reconcile infrastructure
|
|
221
221
|
|
|
222
222
|
```bash
|
|
223
|
-
indraq prebuild
|
|
223
|
+
indraq prebuild
|
|
224
|
+
# choose one of the shared environments shown by the CLI
|
|
224
225
|
```
|
|
225
226
|
|
|
226
227
|
### 9. Deploy
|
|
227
228
|
|
|
228
229
|
```bash
|
|
229
|
-
indraq deploy
|
|
230
|
-
#
|
|
231
|
-
|
|
230
|
+
indraq deploy
|
|
231
|
+
# choose one of the shared environments shown by the CLI
|
|
232
|
+
# or deploy directly:
|
|
233
|
+
indraq deploy --env indraq-test-airtel
|
|
232
234
|
```
|
|
233
235
|
|
|
234
236
|
Normal deploys reuse the scopes already saved for that project/environment. Use `--select-scopes` only when you intentionally want to review or change those bindings:
|
|
235
237
|
|
|
236
238
|
```bash
|
|
237
|
-
indraq deploy --env
|
|
239
|
+
indraq deploy --env indraq-test-airtel --select-scopes
|
|
238
240
|
```
|
|
239
241
|
|
|
240
242
|
---
|
|
241
243
|
|
|
242
244
|
## Provider scopes
|
|
243
245
|
|
|
246
|
+
### Scope selection is always visible
|
|
247
|
+
|
|
248
|
+
When linking a project to a provider scope, the CLI prints the eligible scopes and asks you to choose one even when only one scope is available. This prevents silent account selection and lets you verify company/account/endpoint before linking.
|
|
249
|
+
|
|
244
250
|
### Unlimited named scopes
|
|
245
251
|
|
|
246
252
|
```text
|
|
@@ -348,7 +354,7 @@ flowchart LR
|
|
|
348
354
|
Use:
|
|
349
355
|
|
|
350
356
|
```bash
|
|
351
|
-
indraq project scopes --env
|
|
357
|
+
indraq project scopes --env indraq-test-airtel
|
|
352
358
|
indraq project scopes --env prod
|
|
353
359
|
```
|
|
354
360
|
|
|
@@ -515,7 +521,7 @@ indraq help aws
|
|
|
515
521
|
| Command | Use |
|
|
516
522
|
|---|---|
|
|
517
523
|
| `indraq login` | Sign in |
|
|
518
|
-
| `indraq logout` |
|
|
524
|
+
| `indraq logout` | Revoke the persistent Cloud session and remove local session credentials |
|
|
519
525
|
| `indraq whoami` | Show current identity |
|
|
520
526
|
| `indraq doctor` | Diagnose Node/Java/Git/tar/PATH |
|
|
521
527
|
| `indraq logs` | Audit/log access where permitted |
|
|
@@ -572,9 +578,10 @@ indraq help aws
|
|
|
572
578
|
| Command | Use |
|
|
573
579
|
|---|---|
|
|
574
580
|
| `indraq prebuild --env <env>` | Reconcile infrastructure |
|
|
575
|
-
| `indraq deploy
|
|
576
|
-
| `indraq deploy
|
|
577
|
-
| `indraq deploy
|
|
581
|
+
| `indraq deploy` | Interactively choose an available shared environment and deploy |
|
|
582
|
+
| `indraq deploy --env <env>` | Deploy an exact shared environment using its saved scope bindings |
|
|
583
|
+
| `indraq deploy:dev` | Convenience alias if `dev`/`development` exists; otherwise opens the environment picker |
|
|
584
|
+
| `indraq deploy:prod` | Convenience alias if `prod`/`production` exists; otherwise opens the environment picker |
|
|
578
585
|
| `indraq deploy --env <env> --select-scopes` | Explicitly review/change project scope bindings before deploy |
|
|
579
586
|
| `indraq jenkins pipelines --stage dev` | List visible pipelines |
|
|
580
587
|
| `indraq jenkins run [job] --stage dev` | Run pipeline with discovered parameters |
|
|
@@ -596,6 +603,12 @@ indraq proxy create api.example.com
|
|
|
596
603
|
|
|
597
604
|
---
|
|
598
605
|
|
|
606
|
+
### Persistent login sessions
|
|
607
|
+
|
|
608
|
+
`indraq login` creates a persistent CLI session. The access token is refreshed automatically by the CLI, so normal users do **not** need to log in again every few hours or before each build/deployment. The session continues until `indraq logout` is run, the Cloud account is removed/disabled, or the Cloud password is reset. `indraq logout` revokes the server-side session and removes the local session credentials.
|
|
609
|
+
|
|
610
|
+
Existing v2.2.1 tokens are upgraded automatically when still valid; if an old token has already expired, one final login is required after upgrading.
|
|
611
|
+
|
|
599
612
|
## Common workflows
|
|
600
613
|
|
|
601
614
|
### Admin adds a new customer server
|
|
@@ -621,7 +634,7 @@ The manager can choose only a scope where they already have MANAGE access and ca
|
|
|
621
634
|
```bash
|
|
622
635
|
indraq scope list
|
|
623
636
|
indraq scope describe "AWS Client ABC"
|
|
624
|
-
indraq project scopes --env
|
|
637
|
+
indraq project scopes --env indraq-test-airtel
|
|
625
638
|
indraq prebuild --env dev
|
|
626
639
|
indraq deploy:dev
|
|
627
640
|
```
|
|
@@ -677,7 +690,7 @@ indraq scope add-user
|
|
|
677
690
|
Those two are mandatory. Add the user to the required scope and link/select it:
|
|
678
691
|
|
|
679
692
|
```bash
|
|
680
|
-
indraq project scopes --env
|
|
693
|
+
indraq project scopes --env indraq-test-airtel
|
|
681
694
|
```
|
|
682
695
|
|
|
683
696
|
### DNS is missing but deployment should continue
|
|
@@ -726,7 +739,7 @@ npm --prefix cloud-api run build
|
|
|
726
739
|
<div align="center">
|
|
727
740
|
<img src="docs/assets/indraq-mark.png" alt="IndraQ mark" width="70" />
|
|
728
741
|
|
|
729
|
-
**IndraQ CLI v2.2.
|
|
742
|
+
**IndraQ CLI v2.2.2**
|
|
730
743
|
|
|
731
744
|
Scope-based infrastructure access. Durable projects. Safer deployments.
|
|
732
745
|
</div>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# IndraQ CLI v2.2.0 Release Checks
|
|
2
|
+
|
|
3
|
+
## Completed in the release workspace
|
|
4
|
+
|
|
5
|
+
- `npm run build` passed under the project's real strict TypeScript configuration. The sandbox used declaration-only shims for unavailable package typings because DNS could not reach `registry.npmjs.org`; strictness was not disabled for this final build.
|
|
6
|
+
- `npm --prefix cloud-api run build` passed under its real TypeScript configuration using the same temporary declaration-only offline shim approach.
|
|
7
|
+
- `npm test` passed all configured regression suites after rebuilding `dist/`.
|
|
8
|
+
- The prebuild integration regression executes the rebuilt `dist/modules/prebuild/...` implementation and validates create/reuse/repair behavior.
|
|
9
|
+
- v2.2 regression checks cover the scope-secret boundary, personal AWS/NPM/Jenkins credential paths, project membership visibility, archive blocking, project lifecycle commands, saved scope deployment, and Jenkins Item Role preservation.
|
|
10
|
+
- `npm pack --dry-run` completed successfully in the offline build workspace before temporary shims were removed.
|
|
11
|
+
- All emitted CLI + Cloud API JavaScript is syntax-checked during final packaging.
|
|
12
|
+
|
|
13
|
+
## Publication / deployment gate
|
|
14
|
+
|
|
15
|
+
On a machine with npm registry access, run one clean dependency-backed verification before publishing:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
rm -rf node_modules cloud-api/node_modules
|
|
19
|
+
npm ci
|
|
20
|
+
npm --prefix cloud-api ci
|
|
21
|
+
npm run build
|
|
22
|
+
npm run build:cloud
|
|
23
|
+
npm test
|
|
24
|
+
npm pack --dry-run
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
The registry-access check is an environment/reproducibility gate; it does not change the v2.2 source included in this archive.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Release checks — v2.2.2
|
|
2
|
+
|
|
3
|
+
## Persistent login/session behavior
|
|
4
|
+
|
|
5
|
+
- [x] Login stores an access token plus a persistent refresh/session token.
|
|
6
|
+
- [x] Expired access token receives HTTP 401, refreshes through `/auth/refresh`, and retries the original Cloud request automatically.
|
|
7
|
+
- [x] `indraq logout` revokes the server-side session when Cloud is reachable and always clears local session credentials.
|
|
8
|
+
- [x] Server checks session revocation on every request for session-backed access tokens.
|
|
9
|
+
- [x] Existing still-valid v2.2.1 JWTs can upgrade via `/auth/session` without a password prompt.
|
|
10
|
+
- [x] Cloud password reset/admin password reset revokes existing sessions.
|
|
11
|
+
- [x] First-login password change keeps the current session and revokes other temporary-password sessions.
|
|
12
|
+
- [x] Refresh tokens are stored hashed in PostgreSQL, never plaintext.
|
|
13
|
+
- [x] Migration `010_persistent_auth_sessions.sql` is included and applied by the existing migration runner.
|
|
14
|
+
|
|
15
|
+
## Regression validation
|
|
16
|
+
|
|
17
|
+
- [x] Existing v2.2.1 environment/scope-selection regression remains green.
|
|
18
|
+
- [x] New v2.2.2 persistent-session source regression passes.
|
|
19
|
+
- [x] New v2.2.2 runtime regression passes against compiled `dist` and verifies login → expiry/refresh/retry → logout → legacy-session upgrade.
|
|
20
|
+
- [x] Full configured regression chain passes (18 commands/suites).
|
|
21
|
+
- [x] Changed CLI session core (`cloud-config.ts` + `cloud-api.service.ts`) passes strict TypeScript checking with `exactOptionalPropertyTypes` enabled.
|
|
22
|
+
- [x] Emitted changed JavaScript and Cloud API `dist/index.js` pass `node --check`.
|
|
23
|
+
|
|
24
|
+
## Build-environment note
|
|
25
|
+
|
|
26
|
+
The sandbox npm registry install timed out and left external dependency directories incomplete, so a dependency-backed full root/cloud `npm run build` could not be repeated here. The changed session core was strict-type-checked independently, Cloud API source was syntax-transpiled with TypeScript, and runtime/regression tests use the rebuilt changed `dist`. Run the normal clean build on the release machine before deployment/publish.
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
IndraQ CLI v2.2.1 validation
|
|
2
|
+
============================
|
|
3
|
+
|
|
4
|
+
Result: PASS
|
|
5
|
+
|
|
6
|
+
Configured regression suites: 16/16 PASS
|
|
7
|
+
New regression: v2.2.1 environment/scope-selection PASS
|
|
8
|
+
Updated emitted JavaScript syntax checks: PASS
|
|
9
|
+
|
|
10
|
+
Environment note:
|
|
11
|
+
A fully clean npm install could not complete inside the packaging sandbox because package-registry access timed out. The source package uses the same dependency versions as v2.2.0. Run `npm i && npm run build && npm test` on a normal machine with npm registry access before publishing.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
IndraQ CLI v2.2.2 test results
|
|
2
|
+
================================
|
|
3
|
+
|
|
4
|
+
PASS test:cloud-endpoint
|
|
5
|
+
PASS test:user-credentials
|
|
6
|
+
PASS test:infrastructure
|
|
7
|
+
PASS test:platform
|
|
8
|
+
PASS test:project-access
|
|
9
|
+
PASS test:project-create
|
|
10
|
+
PASS test:jenkins-crumb
|
|
11
|
+
PASS test:jenkins-port
|
|
12
|
+
PASS test:prebuild
|
|
13
|
+
PASS test:docker-context
|
|
14
|
+
PASS test:identity-security
|
|
15
|
+
PASS test:user-lifecycle-jenkins
|
|
16
|
+
PASS test:v2-lifecycle
|
|
17
|
+
PASS test:v21-scopes
|
|
18
|
+
PASS test:v22
|
|
19
|
+
PASS test:v221
|
|
20
|
+
PASS test:v222
|
|
21
|
+
PASS test:v222-runtime
|
|
22
|
+
|
|
23
|
+
Persistent-session runtime coverage:
|
|
24
|
+
- login stores access + refresh tokens
|
|
25
|
+
- expired access token -> /auth/refresh -> original request retry
|
|
26
|
+
- refreshed access token persisted locally
|
|
27
|
+
- logout calls /auth/logout and removes local credentials
|
|
28
|
+
- still-valid legacy v2.2.1 JWT upgrades through /auth/session without password prompt
|
|
29
|
+
|
|
30
|
+
Focused strict TypeScript check:
|
|
31
|
+
PASS src/modules/cloud/config/cloud-config.ts
|
|
32
|
+
PASS src/modules/cloud/services/cloud-api.service.ts
|
|
33
|
+
|
|
34
|
+
JavaScript syntax checks:
|
|
35
|
+
PASS changed CLI dist files
|
|
36
|
+
PASS cloud-api/dist/index.js
|
|
37
|
+
|
|
38
|
+
Environment limitation:
|
|
39
|
+
A clean npm dependency install could not complete in this sandbox because registry access timed out. See RELEASE_CHECKS_v2.2.2.md.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Upgrade: IndraQ CLI v2.0 → v2.1
|
|
2
|
+
|
|
3
|
+
v2.1 changes provider credentials from one-user/one-provider assumptions to organization provider scopes.
|
|
4
|
+
|
|
5
|
+
## 1. Back up Cloud DB
|
|
6
|
+
|
|
7
|
+
Back up the production IndraQ Cloud database before applying the migration.
|
|
8
|
+
|
|
9
|
+
## 2. Deploy the v2.1 Cloud API
|
|
10
|
+
|
|
11
|
+
Apply migrations in numeric order, including:
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
cloud-api/sql/008_provider_scopes.sql
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Build and restart the Cloud API.
|
|
18
|
+
|
|
19
|
+
## 3. Install/link CLI v2.1
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install
|
|
23
|
+
npm run build
|
|
24
|
+
npm test
|
|
25
|
+
npm link
|
|
26
|
+
indraq --version
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Expected: `2.1.0`.
|
|
30
|
+
|
|
31
|
+
## 4. Create scopes
|
|
32
|
+
|
|
33
|
+
Admins create named scopes for each real provider account/server:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
indraq scope create aws
|
|
37
|
+
indraq scope create npm
|
|
38
|
+
indraq scope create jenkins-dev
|
|
39
|
+
indraq scope create jenkins-prod
|
|
40
|
+
indraq scope create ghcr
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## 5. Add managers/users
|
|
44
|
+
|
|
45
|
+
Use `indraq scope add-user`. Admins may grant MANAGE to managers. Managers may grant USE to normal users only inside scopes they manage.
|
|
46
|
+
|
|
47
|
+
## 6. Link project environments
|
|
48
|
+
|
|
49
|
+
For every actively deployed project/environment:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
indraq project scopes --env dev
|
|
53
|
+
indraq project scopes --env prod
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Jenkins and GHCR are required. AWS/NPM can stay unlinked.
|
|
57
|
+
|
|
58
|
+
## 7. Reconcile
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
indraq prebuild --env dev
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
For existing DNS/proxy resources choose Link existing or Skip instead of creating duplicates.
|
|
65
|
+
|
|
66
|
+
## 8. Jenkins
|
|
67
|
+
|
|
68
|
+
Jenkins must use Role-Based Strategy. IndraQ grants project pipelines through Item Roles; do not manually give normal users Overall/Administer.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Upgrade: IndraQ CLI v2.1 → v2.2
|
|
2
|
+
|
|
3
|
+
Upgrade the CLI and Cloud API together.
|
|
4
|
+
|
|
5
|
+
## 1. Back up the Cloud database
|
|
6
|
+
|
|
7
|
+
Take a PostgreSQL backup before deploying the new Cloud API.
|
|
8
|
+
|
|
9
|
+
## 2. Deploy Cloud API v0.7.0
|
|
10
|
+
|
|
11
|
+
The Cloud API migration runner automatically applies SQL files in numeric order. On first v0.7.0 startup it will apply:
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
009_scope_user_secrets_and_project_lifecycle.sql
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
This adds encrypted per-user NPM/Jenkins scope secrets and project archive metadata.
|
|
18
|
+
|
|
19
|
+
## 3. Upgrade the CLI
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
npm install
|
|
23
|
+
npm run build
|
|
24
|
+
npm link
|
|
25
|
+
indraq --version
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Expected CLI version: `2.2.0`.
|
|
29
|
+
|
|
30
|
+
## 4. Re-provision old NPM/Jenkins memberships when necessary
|
|
31
|
+
|
|
32
|
+
v2.1 scope-native NPM/Jenkins rows did not store a personal encrypted password. If a v2.1 member receives an "identity is not fully provisioned" message after upgrade, a scope manager should remove and re-add that member, or have the member rotate the password after the native account is repaired.
|
|
33
|
+
|
|
34
|
+
AWS scope credentials already have a dedicated encrypted per-user credential table and do not require this migration step.
|
|
35
|
+
|
|
36
|
+
## 5. Save project scope bindings
|
|
37
|
+
|
|
38
|
+
For each environment, run once if bindings are missing:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
indraq project scopes --env dev
|
|
42
|
+
indraq prebuild --env dev
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Normal deploys then use:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
indraq deploy --env dev
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Use `--select-scopes` only when intentionally changing the saved bindings.
|
|
52
|
+
|
|
53
|
+
## 6. Project lifecycle
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
indraq project rename <name>
|
|
57
|
+
indraq project archive
|
|
58
|
+
indraq project restore
|
|
59
|
+
indraq project delete
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Archive blocks infrastructure/deployment mutation until the project is restored. Permanent delete remains manager/admin restricted and requires WRITE access to the project.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Upgrade v2.2.1 → v2.2.2
|
|
2
|
+
|
|
3
|
+
1. Deploy the updated `cloud-api` first.
|
|
4
|
+
2. Ensure startup migrations apply `cloud-api/sql/010_persistent_auth_sessions.sql`.
|
|
5
|
+
3. Install/link the v2.2.2 CLI.
|
|
6
|
+
4. Existing v2.2.1 logins that still have a valid 12-hour JWT are automatically converted into persistent sessions on the next Cloud request.
|
|
7
|
+
5. If the old JWT had already expired before the upgrade, log in one final time. After that the CLI automatically refreshes its access token until `indraq logout` is run.
|
|
8
|
+
|
|
9
|
+
Normal usage:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
indraq login
|
|
13
|
+
# ... use the CLI for days/weeks without logging in again ...
|
|
14
|
+
indraq logout
|
|
15
|
+
```
|