@collective-intelligence/cli 0.2.1 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -31
- package/dist/cli.js +15 -15
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -48,7 +48,6 @@ ci orgs use <organization-id>
|
|
|
48
48
|
ci apps enroll \
|
|
49
49
|
--fqn <your.app.fqn> \
|
|
50
50
|
--redirect-uri <your-app-callback-url> \
|
|
51
|
-
--scopes context:read \
|
|
52
51
|
--env-file .env.local
|
|
53
52
|
|
|
54
53
|
# Read the connection values of an existing application again. This changes
|
|
@@ -71,8 +70,10 @@ ci logout
|
|
|
71
70
|
one). A Profile never supplies a session for a different origin.
|
|
72
71
|
- `CI_MANAGEMENT_TOKEN` can be an Organization API key with the
|
|
73
72
|
`external_apps_manage` scope. The key fixes its Organization.
|
|
74
|
-
- `ci apps enroll` requires `--fqn
|
|
75
|
-
|
|
73
|
+
- `ci apps enroll` requires `--fqn` and `--redirect-uri` (repeatable). An
|
|
74
|
+
external app takes no OAuth scopes: CI writes its app gate, and grants of
|
|
75
|
+
the gate and the app's Max Privileges decide what its users may do.
|
|
76
|
+
Defaults: `--type public`, name = FQN, allowed origins = redirect
|
|
76
77
|
URI origins, audience = first redirect URI origin, primary redirect URI =
|
|
77
78
|
first `--redirect-uri`. `--primary-redirect-uri <uri>` picks another primary;
|
|
78
79
|
it must be one of the `--redirect-uri` values. `--allowed-origin <origin>`
|
|
@@ -80,7 +81,7 @@ ci logout
|
|
|
80
81
|
exact origin such as `https://<your-app-host>`. Loopback redirect URIs
|
|
81
82
|
(`http://localhost`, `http://127.0.0.1`, `http://[::1]`) need an explicit port.
|
|
82
83
|
- Output keys: `CI_ISSUER`, `CI_AUDIENCE`, `CI_APPLICATION_ID`, `CI_CLIENT_ID`,
|
|
83
|
-
`CI_ORGANIZATION_ID`, `CI_JWKS_URL`,
|
|
84
|
+
`CI_ORGANIZATION_ID`, `CI_JWKS_URL`, plus `CI_CLIENT_SECRET` for
|
|
84
85
|
`--type confidential`. `--env-file` updates only these keys; without it the
|
|
85
86
|
CLI prints dotenv; `--json` prints one object; `--prefix` replaces `CI_`.
|
|
86
87
|
- A re-run keeps the Application Id and Client Id. It keeps an existing
|
|
@@ -178,23 +179,20 @@ ci apps credentials rotate <app-fqn-or-id> --name pipeline --env-file .env.serve
|
|
|
178
179
|
ci apps credentials revoke <app-fqn-or-id> --name pipeline
|
|
179
180
|
|
|
180
181
|
# Sign in as an Organization Admin or Tenant Admin first.
|
|
181
|
-
ci api-keys upsert --principal <principal-fqn> --name pipeline --
|
|
182
|
+
ci api-keys upsert --principal <principal-fqn> --name pipeline --max-privileges <template-fqn> --env-file .env.pipeline
|
|
182
183
|
ci api-keys list --principal <principal-fqn>
|
|
183
184
|
ci api-keys get --principal <principal-fqn> --name pipeline
|
|
184
185
|
ci api-keys rotate --principal <principal-fqn> --name pipeline --env-file .env.pipeline
|
|
185
186
|
ci api-keys revoke --principal <principal-fqn> --name pipeline
|
|
186
187
|
```
|
|
187
188
|
|
|
188
|
-
`upsert` requires a name.
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
`organization_settings_manage`, `external_apps_manage` and
|
|
196
|
-
`organization_transfer`. A rerun updates only these grants and returns no
|
|
197
|
-
secret.
|
|
189
|
+
`upsert` requires a name. A Server Credential acts with the Access Grants of the
|
|
190
|
+
app's server (`{ applicationServer }` grants); it takes no role option, and the
|
|
191
|
+
CLI refuses `--server-role`. API keys require `--max-privileges` with the
|
|
192
|
+
FQN of a Max Privileges template (a profile with audience `max_privileges`,
|
|
193
|
+
declared by a package): the key never acts beyond it, whatever its service
|
|
194
|
+
principal holds. There are no API key scopes. A rerun updates only these
|
|
195
|
+
grants and returns no secret.
|
|
198
196
|
`upsert --rotate` explicitly rotates an existing credential; creating a missing
|
|
199
197
|
credential already issues its first secret. Rotation retains the previous secret
|
|
200
198
|
for the backend's grace period; revocation ends both secrets immediately.
|
|
@@ -209,19 +207,14 @@ Server credential files use `CI_CLIENT_SECRET`; API-key files use
|
|
|
209
207
|
identity fields match. If no matching secret is saved, use `--rotate`; the CLI
|
|
210
208
|
cannot retrieve a stored secret. Keep these files private.
|
|
211
209
|
|
|
212
|
-
Server Credentials belong to the selected app
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
check. It adds no permission that a run uses. The key owner adds the other API
|
|
221
|
-
Key Scopes that a run needs, for example `knowledge_read`. None is added by
|
|
222
|
-
default. The Organization Role of the service principal still bounds what it
|
|
223
|
-
can do, and the API Key Scopes of the key narrow that further. Backend role and
|
|
224
|
-
scope checks remain authoritative.
|
|
210
|
+
Server Credentials belong to the selected app. They are separate from the
|
|
211
|
+
sign-in credential produced by `ci apps enroll`; use separate env files for
|
|
212
|
+
these two credentials. Managing Server Credentials needs `admin.externalApps`
|
|
213
|
+
at manage. API keys belong to an existing service principal selected by its
|
|
214
|
+
exact FQN; creating, rotating or revoking one needs `admin.apiKeys` at manage,
|
|
215
|
+
and no API key manages API keys, whatever its Max Privileges. A key acts with
|
|
216
|
+
the Access Grants of its service principal, cut to its Max Privileges template.
|
|
217
|
+
Backend checks remain authoritative.
|
|
225
218
|
|
|
226
219
|
## Manage Redirect URIs and Trusted Websites
|
|
227
220
|
|
|
@@ -449,9 +442,10 @@ downgrades; targeted package and rollback commands remain available separately.
|
|
|
449
442
|
Use `--accept-breaking-changes` only to explicitly acknowledge a breaking change
|
|
450
443
|
under the Organization's authority.
|
|
451
444
|
|
|
452
|
-
A
|
|
453
|
-
|
|
454
|
-
|
|
445
|
+
A service principal that a declared grant makes an administrator (a grant of
|
|
446
|
+
`core.profiles.organization-admin`, or of a package profile that holds an
|
|
447
|
+
`admin` capability at manage) requires `--allow-admin-principals` or an
|
|
448
|
+
affirmative interactive confirmation for each such principal. The prompt defaults to refusal; `--non-interactive` never
|
|
455
449
|
prompts and refuses without the flag, naming the principal and parameter.
|
|
456
450
|
For directly declared principals, confirmation happens before publication or
|
|
457
451
|
installation. The Backend also
|