@onkernel/sdk 0.149.0 → 0.151.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/client.d.mts +29 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +29 -4
- package/client.d.ts.map +1 -1
- package/client.js +32 -3
- package/client.js.map +1 -1
- package/client.mjs +32 -3
- package/client.mjs.map +1 -1
- package/lib/credentials/client-auth.d.mts +88 -0
- package/lib/credentials/client-auth.d.mts.map +1 -0
- package/lib/credentials/client-auth.d.ts +88 -0
- package/lib/credentials/client-auth.d.ts.map +1 -0
- package/lib/credentials/client-auth.js +166 -0
- package/lib/credentials/client-auth.js.map +1 -0
- package/lib/credentials/client-auth.mjs +162 -0
- package/lib/credentials/client-auth.mjs.map +1 -0
- package/lib/credentials/credential-chain.d.mts +20 -0
- package/lib/credentials/credential-chain.d.mts.map +1 -0
- package/lib/credentials/credential-chain.d.ts +20 -0
- package/lib/credentials/credential-chain.d.ts.map +1 -0
- package/lib/credentials/credential-chain.js +81 -0
- package/lib/credentials/credential-chain.js.map +1 -0
- package/lib/credentials/credential-chain.mjs +77 -0
- package/lib/credentials/credential-chain.mjs.map +1 -0
- package/lib/credentials/identity-token.d.mts +59 -0
- package/lib/credentials/identity-token.d.mts.map +1 -0
- package/lib/credentials/identity-token.d.ts +59 -0
- package/lib/credentials/identity-token.d.ts.map +1 -0
- package/lib/credentials/identity-token.js +243 -0
- package/lib/credentials/identity-token.js.map +1 -0
- package/lib/credentials/identity-token.mjs +202 -0
- package/lib/credentials/identity-token.mjs.map +1 -0
- package/lib/credentials/oidc-federation.d.mts +65 -0
- package/lib/credentials/oidc-federation.d.mts.map +1 -0
- package/lib/credentials/oidc-federation.d.ts +65 -0
- package/lib/credentials/oidc-federation.d.ts.map +1 -0
- package/lib/credentials/oidc-federation.js +200 -0
- package/lib/credentials/oidc-federation.js.map +1 -0
- package/lib/credentials/oidc-federation.mjs +196 -0
- package/lib/credentials/oidc-federation.mjs.map +1 -0
- package/lib/credentials/token-cache.d.mts +64 -0
- package/lib/credentials/token-cache.d.mts.map +1 -0
- package/lib/credentials/token-cache.d.ts +64 -0
- package/lib/credentials/token-cache.d.ts.map +1 -0
- package/lib/credentials/token-cache.js +147 -0
- package/lib/credentials/token-cache.js.map +1 -0
- package/lib/credentials/token-cache.mjs +143 -0
- package/lib/credentials/token-cache.mjs.map +1 -0
- package/lib/credentials/types.d.mts +126 -0
- package/lib/credentials/types.d.mts.map +1 -0
- package/lib/credentials/types.d.ts +126 -0
- package/lib/credentials/types.d.ts.map +1 -0
- package/lib/credentials/types.js +182 -0
- package/lib/credentials/types.js.map +1 -0
- package/lib/credentials/types.mjs +169 -0
- package/lib/credentials/types.mjs.map +1 -0
- package/lib/credentials.d.mts +6 -0
- package/lib/credentials.d.mts.map +1 -0
- package/lib/credentials.d.ts +6 -0
- package/lib/credentials.d.ts.map +1 -0
- package/lib/credentials.js +19 -0
- package/lib/credentials.js.map +1 -0
- package/lib/credentials.mjs +6 -0
- package/lib/credentials.mjs.map +1 -0
- package/package.json +9 -1
- package/resources/api-keys.d.mts +192 -16
- package/resources/api-keys.d.mts.map +1 -1
- package/resources/api-keys.d.ts +192 -16
- package/resources/api-keys.d.ts.map +1 -1
- package/resources/api-keys.js +19 -7
- package/resources/api-keys.js.map +1 -1
- package/resources/api-keys.mjs +19 -7
- package/resources/api-keys.mjs.map +1 -1
- package/resources/auth/auth.d.mts +2 -2
- package/resources/auth/auth.d.mts.map +1 -1
- package/resources/auth/auth.d.ts +2 -2
- package/resources/auth/auth.d.ts.map +1 -1
- package/resources/auth/auth.js.map +1 -1
- package/resources/auth/auth.mjs.map +1 -1
- package/resources/auth/connections.d.mts +16 -2
- package/resources/auth/connections.d.mts.map +1 -1
- package/resources/auth/connections.d.ts +16 -2
- package/resources/auth/connections.d.ts.map +1 -1
- package/resources/auth/context.d.mts +69 -3
- package/resources/auth/context.d.mts.map +1 -1
- package/resources/auth/context.d.ts +69 -3
- package/resources/auth/context.d.ts.map +1 -1
- package/resources/auth/index.d.mts +1 -1
- package/resources/auth/index.d.mts.map +1 -1
- package/resources/auth/index.d.ts +1 -1
- package/resources/auth/index.d.ts.map +1 -1
- package/resources/auth/index.js.map +1 -1
- package/resources/auth/index.mjs.map +1 -1
- package/resources/browser-pools.d.mts +41 -6
- package/resources/browser-pools.d.mts.map +1 -1
- package/resources/browser-pools.d.ts +41 -6
- package/resources/browser-pools.d.ts.map +1 -1
- package/resources/browsers/browsers.d.mts +105 -45
- package/resources/browsers/browsers.d.mts.map +1 -1
- package/resources/browsers/browsers.d.ts +105 -45
- package/resources/browsers/browsers.d.ts.map +1 -1
- package/resources/browsers/browsers.js.map +1 -1
- package/resources/browsers/browsers.mjs.map +1 -1
- package/resources/browsers/index.d.mts +1 -1
- package/resources/browsers/index.d.mts.map +1 -1
- package/resources/browsers/index.d.ts +1 -1
- package/resources/browsers/index.d.ts.map +1 -1
- package/resources/browsers/index.js.map +1 -1
- package/resources/browsers/index.mjs.map +1 -1
- package/resources/browsers/telemetry.d.mts +4 -4
- package/resources/browsers/telemetry.d.mts.map +1 -1
- package/resources/browsers/telemetry.d.ts +4 -4
- package/resources/browsers/telemetry.d.ts.map +1 -1
- package/resources/index.d.mts +6 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +6 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +9 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +4 -0
- package/resources/index.mjs.map +1 -1
- package/resources/invocations.d.mts +13 -1
- package/resources/invocations.d.mts.map +1 -1
- package/resources/invocations.d.ts +13 -1
- package/resources/invocations.d.ts.map +1 -1
- package/resources/service-accounts.d.mts +73 -0
- package/resources/service-accounts.d.mts.map +1 -0
- package/resources/service-accounts.d.ts +73 -0
- package/resources/service-accounts.d.ts.map +1 -0
- package/resources/service-accounts.js +50 -0
- package/resources/service-accounts.js.map +1 -0
- package/resources/service-accounts.mjs +46 -0
- package/resources/service-accounts.mjs.map +1 -0
- package/resources/vaults/items.d.mts +68 -2
- package/resources/vaults/items.d.mts.map +1 -1
- package/resources/vaults/items.d.ts +68 -2
- package/resources/vaults/items.d.ts.map +1 -1
- package/resources/workload-identity-authentication-events.d.mts +36 -0
- package/resources/workload-identity-authentication-events.d.mts.map +1 -0
- package/resources/workload-identity-authentication-events.d.ts +36 -0
- package/resources/workload-identity-authentication-events.d.ts.map +1 -0
- package/resources/workload-identity-authentication-events.js +16 -0
- package/resources/workload-identity-authentication-events.js.map +1 -0
- package/resources/workload-identity-authentication-events.mjs +12 -0
- package/resources/workload-identity-authentication-events.mjs.map +1 -0
- package/resources/workload-identity-federation-rules.d.mts +194 -0
- package/resources/workload-identity-federation-rules.d.mts.map +1 -0
- package/resources/workload-identity-federation-rules.d.ts +194 -0
- package/resources/workload-identity-federation-rules.d.ts.map +1 -0
- package/resources/workload-identity-federation-rules.js +47 -0
- package/resources/workload-identity-federation-rules.js.map +1 -0
- package/resources/workload-identity-federation-rules.mjs +43 -0
- package/resources/workload-identity-federation-rules.mjs.map +1 -0
- package/resources/workload-identity-issuers.d.mts +169 -0
- package/resources/workload-identity-issuers.d.mts.map +1 -0
- package/resources/workload-identity-issuers.d.ts +169 -0
- package/resources/workload-identity-issuers.d.ts.map +1 -0
- package/resources/workload-identity-issuers.js +54 -0
- package/resources/workload-identity-issuers.js.map +1 -0
- package/resources/workload-identity-issuers.mjs +50 -0
- package/resources/workload-identity-issuers.mjs.map +1 -0
- package/src/client.ts +134 -1
- package/src/lib/credentials/client-auth.ts +194 -0
- package/src/lib/credentials/credential-chain.ts +95 -0
- package/src/lib/credentials/identity-token.ts +284 -0
- package/src/lib/credentials/oidc-federation.ts +304 -0
- package/src/lib/credentials/token-cache.ts +172 -0
- package/src/lib/credentials/types.ts +267 -0
- package/src/lib/credentials.ts +30 -0
- package/src/resources/api-keys.ts +217 -15
- package/src/resources/auth/auth.ts +6 -2
- package/src/resources/auth/connections.ts +17 -2
- package/src/resources/auth/context.ts +81 -3
- package/src/resources/auth/index.ts +1 -1
- package/src/resources/browser-pools.ts +46 -6
- package/src/resources/browsers/browsers.ts +115 -44
- package/src/resources/browsers/index.ts +1 -0
- package/src/resources/browsers/telemetry.ts +4 -3
- package/src/resources/index.ts +42 -0
- package/src/resources/invocations.ts +15 -1
- package/src/resources/service-accounts.ts +128 -0
- package/src/resources/vaults/items.ts +80 -2
- package/src/resources/workload-identity-authentication-events.ts +72 -0
- package/src/resources/workload-identity-federation-rules.ts +314 -0
- package/src/resources/workload-identity-issuers.ts +273 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -12,8 +12,13 @@ import { path } from '../internal/utils/path';
|
|
|
12
12
|
*/
|
|
13
13
|
export class APIKeys extends APIResource {
|
|
14
14
|
/**
|
|
15
|
-
* Create a
|
|
16
|
-
*
|
|
15
|
+
* Create a personal API key, or link a key to an organization-owned service
|
|
16
|
+
* account. Service-account keys require an organization administrator, explicit
|
|
17
|
+
* project and nonempty policy. An optional `policy` scopes the key to its listed
|
|
18
|
+
* actions and resources, and each statement may carry a `condition`. A `source_ip`
|
|
19
|
+
* condition restricts the statement to requests whose client address falls inside
|
|
20
|
+
* its CIDR networks, so a key limited to your egress IP ranges only works from
|
|
21
|
+
* your network, even if its secret leaks.
|
|
17
22
|
*
|
|
18
23
|
* @example
|
|
19
24
|
* ```ts
|
|
@@ -44,13 +49,18 @@ export class APIKeys extends APIResource {
|
|
|
44
49
|
}
|
|
45
50
|
|
|
46
51
|
/**
|
|
47
|
-
* Update an API key's name
|
|
52
|
+
* Update an API key's name, or replace its permissions by attaching a new policy
|
|
53
|
+
* in place: the key's credential never changes, so consumers keep the same secret.
|
|
54
|
+
* The replacement policy may carry `source_ip` conditions, so you can add, change,
|
|
55
|
+
* or remove IP allowlisting on an existing key without rotating its credential. A
|
|
56
|
+
* present `policy` fully replaces the key's policy and takes effect for new
|
|
57
|
+
* requests within the authorization cache; requests from outside a condition's
|
|
58
|
+
* networks get `403` and are recorded in the audit log with the client address.
|
|
59
|
+
* Requires api_keys:write to rename; api_keys:set_policy to replace permissions.
|
|
48
60
|
*
|
|
49
61
|
* @example
|
|
50
62
|
* ```ts
|
|
51
|
-
* const apiKey = await client.apiKeys.update('id'
|
|
52
|
-
* name: 'new-api-name',
|
|
53
|
-
* });
|
|
63
|
+
* const apiKey = await client.apiKeys.update('id');
|
|
54
64
|
* ```
|
|
55
65
|
*/
|
|
56
66
|
update(id: string, body: APIKeyUpdateParams, options?: RequestOptions): APIPromise<APIKey> {
|
|
@@ -99,7 +109,9 @@ export class APIKeys extends APIResource {
|
|
|
99
109
|
* expire_in_days set to 0, browser sessions attributed to the old key are ended
|
|
100
110
|
* asynchronously and unsaved profile changes are discarded. Grace-period and
|
|
101
111
|
* natural expiry do not end existing browsers. If cleanup cannot be registered, an
|
|
102
|
-
* immediate rotation is not committed.
|
|
112
|
+
* immediate rotation is not committed. Service-account keys retain their service
|
|
113
|
+
* principal and policy; the rotating administrator is recorded separately for
|
|
114
|
+
* audit.
|
|
103
115
|
*
|
|
104
116
|
* @example
|
|
105
117
|
* ```ts
|
|
@@ -128,7 +140,11 @@ export interface APIKey {
|
|
|
128
140
|
*/
|
|
129
141
|
created_at: string;
|
|
130
142
|
|
|
131
|
-
|
|
143
|
+
/**
|
|
144
|
+
* Human audit creator, or null after creator deletion. Not the service
|
|
145
|
+
* credential's principal.
|
|
146
|
+
*/
|
|
147
|
+
created_by: APIKey.CreatedBy | null;
|
|
132
148
|
|
|
133
149
|
/**
|
|
134
150
|
* When the API key was deleted (soft-deleted). Null for keys that have not been
|
|
@@ -174,9 +190,20 @@ export interface APIKey {
|
|
|
174
190
|
* unrestricted access within its organization or project.
|
|
175
191
|
*/
|
|
176
192
|
policy?: APIKey.Policy | null;
|
|
193
|
+
|
|
194
|
+
principal?: APIKeyPrincipal;
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Organization-owned service principal, when linked.
|
|
198
|
+
*/
|
|
199
|
+
service_account_id?: string;
|
|
177
200
|
}
|
|
178
201
|
|
|
179
202
|
export namespace APIKey {
|
|
203
|
+
/**
|
|
204
|
+
* Human audit creator, or null after creator deletion. Not the service
|
|
205
|
+
* credential's principal.
|
|
206
|
+
*/
|
|
180
207
|
export interface CreatedBy {
|
|
181
208
|
/**
|
|
182
209
|
* Kernel user ID of the creator.
|
|
@@ -217,10 +244,48 @@ export namespace APIKey {
|
|
|
217
244
|
* Wildcards are supported.
|
|
218
245
|
*/
|
|
219
246
|
resource: string;
|
|
247
|
+
|
|
248
|
+
/**
|
|
249
|
+
* A condition narrows a policy statement to requests matching its constraint: the
|
|
250
|
+
* request attribute, a comparison operator, and that operator's values.
|
|
251
|
+
*/
|
|
252
|
+
condition?: Statement.Condition;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export namespace Statement {
|
|
256
|
+
/**
|
|
257
|
+
* A condition narrows a policy statement to requests matching its constraint: the
|
|
258
|
+
* request attribute, a comparison operator, and that operator's values.
|
|
259
|
+
*/
|
|
260
|
+
export interface Condition {
|
|
261
|
+
/**
|
|
262
|
+
* Request attribute the condition constrains. `source_ip` restricts the statement
|
|
263
|
+
* to requests whose client address falls inside one of `values`.
|
|
264
|
+
*/
|
|
265
|
+
key: 'source_ip';
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Comparison the condition applies between the request attribute and values.
|
|
269
|
+
*/
|
|
270
|
+
operator: 'in';
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Values the request attribute must match. For `source_ip`, CIDR networks: a bare
|
|
274
|
+
* address without a mask is rejected, and so are an entry with host bits set and
|
|
275
|
+
* an IPv4 network written in IPv6 notation.
|
|
276
|
+
*/
|
|
277
|
+
values: Array<string>;
|
|
278
|
+
}
|
|
220
279
|
}
|
|
221
280
|
}
|
|
222
281
|
}
|
|
223
282
|
|
|
283
|
+
export interface APIKeyPrincipal {
|
|
284
|
+
id: string;
|
|
285
|
+
|
|
286
|
+
type: 'user' | 'service_account';
|
|
287
|
+
}
|
|
288
|
+
|
|
224
289
|
/**
|
|
225
290
|
* API key returned immediately after creation. Includes the plaintext key once.
|
|
226
291
|
*/
|
|
@@ -251,7 +316,8 @@ export interface APIKeyCreateParams {
|
|
|
251
316
|
|
|
252
317
|
/**
|
|
253
318
|
* Issue a scoped key that may only perform the listed actions on the listed
|
|
254
|
-
* resources.
|
|
319
|
+
* resources. A statement may carry a condition; a `source_ip` condition restricts
|
|
320
|
+
* the statement to requests from inside its CIDR networks.
|
|
255
321
|
*/
|
|
256
322
|
policy?: APIKeyCreateParams.Policy;
|
|
257
323
|
|
|
@@ -259,12 +325,19 @@ export interface APIKeyCreateParams {
|
|
|
259
325
|
* Unique project identifier
|
|
260
326
|
*/
|
|
261
327
|
project_id?: string | null;
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* Link to an active same-organization service account. Requires an organization
|
|
331
|
+
* administrator, explicit project and nonempty policy. Omit for a personal key.
|
|
332
|
+
*/
|
|
333
|
+
service_account_id?: string;
|
|
262
334
|
}
|
|
263
335
|
|
|
264
336
|
export namespace APIKeyCreateParams {
|
|
265
337
|
/**
|
|
266
338
|
* Issue a scoped key that may only perform the listed actions on the listed
|
|
267
|
-
* resources.
|
|
339
|
+
* resources. A statement may carry a condition; a `source_ip` condition restricts
|
|
340
|
+
* the statement to requests from inside its CIDR networks.
|
|
268
341
|
*/
|
|
269
342
|
export interface Policy {
|
|
270
343
|
/**
|
|
@@ -285,6 +358,38 @@ export namespace APIKeyCreateParams {
|
|
|
285
358
|
* Wildcards are supported.
|
|
286
359
|
*/
|
|
287
360
|
resource: string;
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* A condition narrows a policy statement to requests matching its constraint: the
|
|
364
|
+
* request attribute, a comparison operator, and that operator's values.
|
|
365
|
+
*/
|
|
366
|
+
condition?: Statement.Condition;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
export namespace Statement {
|
|
370
|
+
/**
|
|
371
|
+
* A condition narrows a policy statement to requests matching its constraint: the
|
|
372
|
+
* request attribute, a comparison operator, and that operator's values.
|
|
373
|
+
*/
|
|
374
|
+
export interface Condition {
|
|
375
|
+
/**
|
|
376
|
+
* Request attribute the condition constrains. `source_ip` restricts the statement
|
|
377
|
+
* to requests whose client address falls inside one of `values`.
|
|
378
|
+
*/
|
|
379
|
+
key: 'source_ip';
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* Comparison the condition applies between the request attribute and values.
|
|
383
|
+
*/
|
|
384
|
+
operator: 'in';
|
|
385
|
+
|
|
386
|
+
/**
|
|
387
|
+
* Values the request attribute must match. For `source_ip`, CIDR networks: a bare
|
|
388
|
+
* address without a mask is rejected, and so are an entry with host bits set and
|
|
389
|
+
* an IPv4 network written in IPv6 notation.
|
|
390
|
+
*/
|
|
391
|
+
values: Array<string>;
|
|
392
|
+
}
|
|
288
393
|
}
|
|
289
394
|
}
|
|
290
395
|
}
|
|
@@ -301,10 +406,90 @@ export interface APIKeyUpdateParams {
|
|
|
301
406
|
/**
|
|
302
407
|
* New API key name
|
|
303
408
|
*/
|
|
304
|
-
name
|
|
409
|
+
name?: string;
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Permissions that fully replace the key's policy. Attaching a policy to a key
|
|
413
|
+
* without one makes the key scoped: every action and resource the policy does not
|
|
414
|
+
* list is denied. The key's credential, name, project, and expiry are unchanged,
|
|
415
|
+
* so consumers never need the key redistributed. A `source_ip` condition adds or
|
|
416
|
+
* changes IP allowlisting without rotating the credential. Requires
|
|
417
|
+
* api_keys:set_policy on the key.
|
|
418
|
+
*/
|
|
419
|
+
policy?: APIKeyUpdateParams.Policy;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
export namespace APIKeyUpdateParams {
|
|
423
|
+
/**
|
|
424
|
+
* Permissions that fully replace the key's policy. Attaching a policy to a key
|
|
425
|
+
* without one makes the key scoped: every action and resource the policy does not
|
|
426
|
+
* list is denied. The key's credential, name, project, and expiry are unchanged,
|
|
427
|
+
* so consumers never need the key redistributed. A `source_ip` condition adds or
|
|
428
|
+
* changes IP allowlisting without rotating the credential. Requires
|
|
429
|
+
* api_keys:set_policy on the key.
|
|
430
|
+
*/
|
|
431
|
+
export interface Policy {
|
|
432
|
+
/**
|
|
433
|
+
* Allow statements. Every action and resource not listed is denied.
|
|
434
|
+
*/
|
|
435
|
+
statements: Array<Policy.Statement>;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
export namespace Policy {
|
|
439
|
+
export interface Statement {
|
|
440
|
+
/**
|
|
441
|
+
* Permitted action, such as browsers:use or vaults:read.
|
|
442
|
+
*/
|
|
443
|
+
action: string;
|
|
444
|
+
|
|
445
|
+
/**
|
|
446
|
+
* Resource the action applies to, in the format projects/{project_id}/{kind}/{id}.
|
|
447
|
+
* Wildcards are supported.
|
|
448
|
+
*/
|
|
449
|
+
resource: string;
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* A condition narrows a policy statement to requests matching its constraint: the
|
|
453
|
+
* request attribute, a comparison operator, and that operator's values.
|
|
454
|
+
*/
|
|
455
|
+
condition?: Statement.Condition;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
export namespace Statement {
|
|
459
|
+
/**
|
|
460
|
+
* A condition narrows a policy statement to requests matching its constraint: the
|
|
461
|
+
* request attribute, a comparison operator, and that operator's values.
|
|
462
|
+
*/
|
|
463
|
+
export interface Condition {
|
|
464
|
+
/**
|
|
465
|
+
* Request attribute the condition constrains. `source_ip` restricts the statement
|
|
466
|
+
* to requests whose client address falls inside one of `values`.
|
|
467
|
+
*/
|
|
468
|
+
key: 'source_ip';
|
|
469
|
+
|
|
470
|
+
/**
|
|
471
|
+
* Comparison the condition applies between the request attribute and values.
|
|
472
|
+
*/
|
|
473
|
+
operator: 'in';
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* Values the request attribute must match. For `source_ip`, CIDR networks: a bare
|
|
477
|
+
* address without a mask is rejected, and so are an entry with host bits set and
|
|
478
|
+
* an IPv4 network written in IPv6 notation.
|
|
479
|
+
*/
|
|
480
|
+
values: Array<string>;
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
}
|
|
305
484
|
}
|
|
306
485
|
|
|
307
486
|
export interface APIKeyListParams extends OffsetPaginationParams {
|
|
487
|
+
/**
|
|
488
|
+
* Return only keys created by this user ID. This is the same person the key's
|
|
489
|
+
* created_by field describes.
|
|
490
|
+
*/
|
|
491
|
+
created_by?: string;
|
|
492
|
+
|
|
308
493
|
/**
|
|
309
494
|
* Deprecated: use status=all instead. When true, include deleted (soft-deleted)
|
|
310
495
|
* API keys in the results for audit purposes.
|
|
@@ -319,12 +504,28 @@ export interface APIKeyListParams extends OffsetPaginationParams {
|
|
|
319
504
|
*/
|
|
320
505
|
name?: string;
|
|
321
506
|
|
|
507
|
+
/**
|
|
508
|
+
* Return only keys that act as a user, or only keys that act as a service account.
|
|
509
|
+
*/
|
|
510
|
+
principal_type?: 'user' | 'service_account';
|
|
511
|
+
|
|
512
|
+
/**
|
|
513
|
+
* Return only keys scoped to this project ID. The value "org" returns keys that
|
|
514
|
+
* are not scoped to a project.
|
|
515
|
+
*/
|
|
516
|
+
project_id?: string;
|
|
517
|
+
|
|
322
518
|
/**
|
|
323
519
|
* Case-insensitive substring match against API key name, creator, and project. API
|
|
324
520
|
* key identifiers and masked keys match by exact value or prefix.
|
|
325
521
|
*/
|
|
326
522
|
query?: string;
|
|
327
523
|
|
|
524
|
+
/**
|
|
525
|
+
* Return only keys that belong to this service account.
|
|
526
|
+
*/
|
|
527
|
+
service_account_id?: string;
|
|
528
|
+
|
|
328
529
|
/**
|
|
329
530
|
* Field to sort API keys by. Keys with no expiry or no recorded use sort last for
|
|
330
531
|
* expires_at and last_used_at in either direction.
|
|
@@ -337,11 +538,11 @@ export interface APIKeyListParams extends OffsetPaginationParams {
|
|
|
337
538
|
sort_direction?: 'asc' | 'desc';
|
|
338
539
|
|
|
339
540
|
/**
|
|
340
|
-
* Filter API keys by status. "active" returns keys that are
|
|
341
|
-
* expired
|
|
342
|
-
* soft-deleted keys, "all" returns
|
|
541
|
+
* Filter API keys by status. "active" returns keys that are neither deleted nor
|
|
542
|
+
* expired (default), "expired" returns keys that are not deleted and whose expiry
|
|
543
|
+
* has passed, "deleted" returns only soft-deleted keys, "all" returns every key.
|
|
343
544
|
*/
|
|
344
|
-
status?: 'active' | 'deleted' | 'all';
|
|
545
|
+
status?: 'active' | 'expired' | 'deleted' | 'all';
|
|
345
546
|
}
|
|
346
547
|
|
|
347
548
|
export interface APIKeyRotateParams {
|
|
@@ -361,6 +562,7 @@ export interface APIKeyRotateParams {
|
|
|
361
562
|
export declare namespace APIKeys {
|
|
362
563
|
export {
|
|
363
564
|
type APIKey as APIKey,
|
|
565
|
+
type APIKeyPrincipal as APIKeyPrincipal,
|
|
364
566
|
type CreatedAPIKey as CreatedAPIKey,
|
|
365
567
|
type APIKeysOffsetPagination as APIKeysOffsetPagination,
|
|
366
568
|
type APIKeyCreateParams as APIKeyCreateParams,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
SubmitFieldsResponse,
|
|
25
25
|
} from './connections';
|
|
26
26
|
import * as ContextAPI from './context';
|
|
27
|
-
import { AuthContext, Context } from './context';
|
|
27
|
+
import { AuthContext, AuthContextWorkloadIdentity, Context } from './context';
|
|
28
28
|
|
|
29
29
|
export class Auth extends APIResource {
|
|
30
30
|
context: ContextAPI.Context = new ContextAPI.Context(this._client);
|
|
@@ -35,7 +35,11 @@ Auth.Context = Context;
|
|
|
35
35
|
Auth.Connections = Connections;
|
|
36
36
|
|
|
37
37
|
export declare namespace Auth {
|
|
38
|
-
export {
|
|
38
|
+
export {
|
|
39
|
+
Context as Context,
|
|
40
|
+
type AuthContext as AuthContext,
|
|
41
|
+
type AuthContextWorkloadIdentity as AuthContextWorkloadIdentity,
|
|
42
|
+
};
|
|
39
43
|
|
|
40
44
|
export {
|
|
41
45
|
Connections as Connections,
|
|
@@ -943,6 +943,16 @@ export namespace ManagedAuth {
|
|
|
943
943
|
* URL, kiosk mode, and viewport.
|
|
944
944
|
*/
|
|
945
945
|
export interface ManagedAuthBrowserConfig {
|
|
946
|
+
/**
|
|
947
|
+
* Automatic CAPTCHA solving for managed auth browser sessions. When provided
|
|
948
|
+
* without stealth, stealth no longer defaults to true. Enabling it does not select
|
|
949
|
+
* a proxy: a connection on direct egress stays there; set proxy.mode=default for
|
|
950
|
+
* Kernel's default stealth proxy. Turning it off on a connection that uses
|
|
951
|
+
* Kernel's default stealth proxy moves it to direct egress. Omit on update to keep
|
|
952
|
+
* the current setting, or on login to inherit it.
|
|
953
|
+
*/
|
|
954
|
+
captcha_solver?: BrowsersAPI.BrowserCaptchaSolver;
|
|
955
|
+
|
|
946
956
|
/**
|
|
947
957
|
* Browser locale for the connection's login, reauthentication, and health-check
|
|
948
958
|
* sessions. Set on create or update; not supported on login.
|
|
@@ -964,8 +974,13 @@ export interface ManagedAuthBrowserConfig {
|
|
|
964
974
|
region?: 'us-east' | 'us-west' | 'eu-west' | 'ap-southeast';
|
|
965
975
|
|
|
966
976
|
/**
|
|
967
|
-
* Whether managed auth browser sessions use stealth mode
|
|
968
|
-
*
|
|
977
|
+
* @deprecated Whether managed auth browser sessions use stealth mode: CAPTCHA
|
|
978
|
+
* solving with Kernel's default stealth proxy unless proxy is set. Defaults to
|
|
979
|
+
* true when neither stealth nor captcha_solver is provided. Cannot be combined
|
|
980
|
+
* with captcha_solver.enabled=false. Setting it does not change an existing proxy,
|
|
981
|
+
* including direct egress; use proxy.mode=default for Kernel's default stealth
|
|
982
|
+
* proxy. Reports true for a connection with only captcha_solver enabled; proxy
|
|
983
|
+
* shows its egress. Deprecated in favor of captcha_solver and proxy.
|
|
969
984
|
*/
|
|
970
985
|
stealth?: boolean;
|
|
971
986
|
|
|
@@ -38,6 +38,8 @@ export interface AuthContext {
|
|
|
38
38
|
organization: AuthContext.Organization;
|
|
39
39
|
|
|
40
40
|
principal: AuthContext.Principal;
|
|
41
|
+
|
|
42
|
+
workload_identity?: AuthContextWorkloadIdentity;
|
|
41
43
|
}
|
|
42
44
|
|
|
43
45
|
export namespace AuthContext {
|
|
@@ -74,6 +76,12 @@ export namespace AuthContext {
|
|
|
74
76
|
* organization-wide scope.
|
|
75
77
|
*/
|
|
76
78
|
effective_scope: Authorization.EffectiveScope;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Current effective paired policy for a service-account principal. Omitted for
|
|
82
|
+
* legacy human/client identities.
|
|
83
|
+
*/
|
|
84
|
+
effective_policy?: Authorization.EffectivePolicy;
|
|
77
85
|
}
|
|
78
86
|
|
|
79
87
|
export namespace Authorization {
|
|
@@ -98,6 +106,64 @@ export namespace AuthContext {
|
|
|
98
106
|
*/
|
|
99
107
|
project_id: string | null;
|
|
100
108
|
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Current effective paired policy for a service-account principal. Omitted for
|
|
112
|
+
* legacy human/client identities.
|
|
113
|
+
*/
|
|
114
|
+
export interface EffectivePolicy {
|
|
115
|
+
/**
|
|
116
|
+
* Allow statements. Every action and resource not listed is denied.
|
|
117
|
+
*/
|
|
118
|
+
statements: Array<EffectivePolicy.Statement>;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export namespace EffectivePolicy {
|
|
122
|
+
export interface Statement {
|
|
123
|
+
/**
|
|
124
|
+
* Permitted action, such as browsers:use or vaults:read.
|
|
125
|
+
*/
|
|
126
|
+
action: string;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Resource the action applies to, in the format projects/{project_id}/{kind}/{id}.
|
|
130
|
+
* Wildcards are supported.
|
|
131
|
+
*/
|
|
132
|
+
resource: string;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* A condition narrows a policy statement to requests matching its constraint: the
|
|
136
|
+
* request attribute, a comparison operator, and that operator's values.
|
|
137
|
+
*/
|
|
138
|
+
condition?: Statement.Condition;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export namespace Statement {
|
|
142
|
+
/**
|
|
143
|
+
* A condition narrows a policy statement to requests matching its constraint: the
|
|
144
|
+
* request attribute, a comparison operator, and that operator's values.
|
|
145
|
+
*/
|
|
146
|
+
export interface Condition {
|
|
147
|
+
/**
|
|
148
|
+
* Request attribute the condition constrains. `source_ip` restricts the statement
|
|
149
|
+
* to requests whose client address falls inside one of `values`.
|
|
150
|
+
*/
|
|
151
|
+
key: 'source_ip';
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Comparison the condition applies between the request attribute and values.
|
|
155
|
+
*/
|
|
156
|
+
operator: 'in';
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* Values the request attribute must match. For `source_ip`, CIDR networks: a bare
|
|
160
|
+
* address without a mask is rejected, and so are an entry with host bits set and
|
|
161
|
+
* an IPv4 network written in IPv6 notation.
|
|
162
|
+
*/
|
|
163
|
+
values: Array<string>;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
101
167
|
}
|
|
102
168
|
|
|
103
169
|
export interface Organization {
|
|
@@ -109,17 +175,29 @@ export namespace AuthContext {
|
|
|
109
175
|
|
|
110
176
|
export interface Principal {
|
|
111
177
|
/**
|
|
112
|
-
* The API key
|
|
178
|
+
* The authenticated API key, user or organization-owned service-account ID.
|
|
113
179
|
*/
|
|
114
180
|
id: string;
|
|
115
181
|
|
|
116
182
|
/**
|
|
117
183
|
* The kind of principal authenticated for the request.
|
|
118
184
|
*/
|
|
119
|
-
type: 'api_key' | 'user';
|
|
185
|
+
type: 'api_key' | 'user' | 'service_account';
|
|
120
186
|
}
|
|
121
187
|
}
|
|
122
188
|
|
|
189
|
+
export interface AuthContextWorkloadIdentity {
|
|
190
|
+
/**
|
|
191
|
+
* Digest of the verified external subject. Never the original assertion or
|
|
192
|
+
* arbitrary claims.
|
|
193
|
+
*/
|
|
194
|
+
external_subject_digest: string;
|
|
195
|
+
|
|
196
|
+
federation_rule_id: string;
|
|
197
|
+
|
|
198
|
+
issuer_id: string;
|
|
199
|
+
}
|
|
200
|
+
|
|
123
201
|
export declare namespace Context {
|
|
124
|
-
export { type AuthContext as AuthContext };
|
|
202
|
+
export { type AuthContext as AuthContext, type AuthContextWorkloadIdentity as AuthContextWorkloadIdentity };
|
|
125
203
|
}
|
|
@@ -22,4 +22,4 @@ export {
|
|
|
22
22
|
type ManagedAuthsOffsetPagination,
|
|
23
23
|
type ManagedAuthTimelineEventsOffsetPagination,
|
|
24
24
|
} from './connections';
|
|
25
|
-
export { Context, type AuthContext } from './context';
|
|
25
|
+
export { Context, type AuthContext, type AuthContextWorkloadIdentity } from './context';
|
|
@@ -227,6 +227,11 @@ export namespace BrowserPool {
|
|
|
227
227
|
*/
|
|
228
228
|
size: number;
|
|
229
229
|
|
|
230
|
+
/**
|
|
231
|
+
* Automatic CAPTCHA solving configuration.
|
|
232
|
+
*/
|
|
233
|
+
captcha_solver?: BrowsersAPI.BrowserCaptchaSolver;
|
|
234
|
+
|
|
230
235
|
/**
|
|
231
236
|
* Custom Chrome enterprise policy overrides applied to all browsers in this pool.
|
|
232
237
|
* Keys are Chrome enterprise policy names; values must match their expected types.
|
|
@@ -311,8 +316,10 @@ export namespace BrowserPool {
|
|
|
311
316
|
start_url?: string;
|
|
312
317
|
|
|
313
318
|
/**
|
|
314
|
-
*
|
|
315
|
-
*
|
|
319
|
+
* @deprecated Whether browsers in this pool use stealth mode, which is CAPTCHA
|
|
320
|
+
* solving with Kernel's default stealth proxy unless proxy_id is set. A pool with
|
|
321
|
+
* only captcha_solver enabled reports false. Deprecated in favor of captcha_solver
|
|
322
|
+
* and proxy_id.
|
|
316
323
|
*/
|
|
317
324
|
stealth?: boolean;
|
|
318
325
|
|
|
@@ -369,6 +376,11 @@ export namespace BrowserPool {
|
|
|
369
376
|
}
|
|
370
377
|
|
|
371
378
|
export interface BrowserPoolAcquireResponse {
|
|
379
|
+
/**
|
|
380
|
+
* Automatic CAPTCHA solving configuration.
|
|
381
|
+
*/
|
|
382
|
+
captcha_solver: BrowsersAPI.BrowserCaptchaSolver;
|
|
383
|
+
|
|
372
384
|
/**
|
|
373
385
|
* Websocket URL for Chrome DevTools Protocol connections to the browser session
|
|
374
386
|
*/
|
|
@@ -400,7 +412,10 @@ export interface BrowserPoolAcquireResponse {
|
|
|
400
412
|
session_id: string;
|
|
401
413
|
|
|
402
414
|
/**
|
|
403
|
-
* Whether the browser session
|
|
415
|
+
* @deprecated Whether the browser session has CAPTCHA solving enabled, in which
|
|
416
|
+
* case proxy.mode=default uses Kernel's default stealth proxy. A browser created
|
|
417
|
+
* with only captcha_solver reports true with proxy.mode=direct. Deprecated in
|
|
418
|
+
* favor of captcha_solver and proxy.
|
|
404
419
|
*/
|
|
405
420
|
stealth: boolean;
|
|
406
421
|
|
|
@@ -437,6 +452,12 @@ export interface BrowserPoolAcquireResponse {
|
|
|
437
452
|
*/
|
|
438
453
|
deleted_at?: string;
|
|
439
454
|
|
|
455
|
+
/**
|
|
456
|
+
* Fingerprint applied to this browser session. Omitted when the session was
|
|
457
|
+
* created without one.
|
|
458
|
+
*/
|
|
459
|
+
fingerprint?: BrowsersAPI.BrowserFingerprint;
|
|
460
|
+
|
|
440
461
|
/**
|
|
441
462
|
* Whether GPU acceleration is enabled for the browser session (only supported for
|
|
442
463
|
* headful sessions).
|
|
@@ -599,6 +620,13 @@ export interface BrowserPoolCreateParams {
|
|
|
599
620
|
*/
|
|
600
621
|
size: number;
|
|
601
622
|
|
|
623
|
+
/**
|
|
624
|
+
* Automatic CAPTCHA solving for browsers in this pool. Disabled by default.
|
|
625
|
+
* Enabling it does not select a proxy: when proxy_id is omitted, browsers use
|
|
626
|
+
* direct egress unless stealth=true.
|
|
627
|
+
*/
|
|
628
|
+
captcha_solver?: BrowsersAPI.BrowserCaptchaSolver;
|
|
629
|
+
|
|
602
630
|
/**
|
|
603
631
|
* Custom Chrome enterprise policy overrides applied to all browsers in this pool.
|
|
604
632
|
* Keys are Chrome enterprise policy names; values must match their expected types.
|
|
@@ -693,8 +721,10 @@ export interface BrowserPoolCreateParams {
|
|
|
693
721
|
start_url?: string;
|
|
694
722
|
|
|
695
723
|
/**
|
|
696
|
-
* If true,
|
|
697
|
-
*
|
|
724
|
+
* @deprecated If true, enables the CAPTCHA solver and, when proxy_id is omitted,
|
|
725
|
+
* uses Kernel's default stealth proxy. Defaults to false. Cannot be combined with
|
|
726
|
+
* captcha_solver.enabled=false. Deprecated in favor of captcha_solver and
|
|
727
|
+
* proxy_id.
|
|
698
728
|
*/
|
|
699
729
|
stealth?: boolean;
|
|
700
730
|
|
|
@@ -863,6 +893,13 @@ export namespace BrowserPoolCreateParams {
|
|
|
863
893
|
}
|
|
864
894
|
|
|
865
895
|
export interface BrowserPoolUpdateParams {
|
|
896
|
+
/**
|
|
897
|
+
* If provided, replaces whether browsers in this pool automatically solve
|
|
898
|
+
* CAPTCHAs. Enabling it on a pool with direct egress keeps direct egress unless
|
|
899
|
+
* proxy_id or stealth=true is also set.
|
|
900
|
+
*/
|
|
901
|
+
captcha_solver?: BrowsersAPI.BrowserCaptchaSolver;
|
|
902
|
+
|
|
866
903
|
/**
|
|
867
904
|
* If provided, replaces the custom Chrome enterprise policy overrides applied to
|
|
868
905
|
* all browsers in this pool. Empty object clears any previously-set policy. Keys
|
|
@@ -991,7 +1028,10 @@ export interface BrowserPoolUpdateParams {
|
|
|
991
1028
|
start_url?: string;
|
|
992
1029
|
|
|
993
1030
|
/**
|
|
994
|
-
* If provided, replaces whether browsers launch in stealth mode.
|
|
1031
|
+
* @deprecated If provided, replaces whether browsers launch in stealth mode.
|
|
1032
|
+
* stealth=true without proxy_id moves a pool on direct egress to Kernel's default
|
|
1033
|
+
* stealth proxy. Cannot be combined with captcha_solver.enabled=false. Deprecated
|
|
1034
|
+
* in favor of captcha_solver and proxy_id.
|
|
995
1035
|
*/
|
|
996
1036
|
stealth?: boolean;
|
|
997
1037
|
|