razzou-harness 0.4.0 → 0.4.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.
@@ -0,0 +1,428 @@
1
+ // Generated by scripts/aws-services.ts from botocore's data (AWS CLI 2.36.48): don't edit it by hand.
2
+ /** Every regional AWS service: its endpoint prefix, its signing name, and its host when not `{service}.{region}.{dnsSuffix}`. */
3
+ export const REGIONAL_SERVICES = [
4
+ ['a2i-runtime.sagemaker', 'sagemaker'],
5
+ ['access-analyzer', 'access-analyzer'],
6
+ ['account-access', 'account-access'],
7
+ ['acm', 'acm'],
8
+ ['acm-pca', 'acm-pca'],
9
+ ['aco-automation', 'aco-automation'],
10
+ ['admin.wickr', 'wickr'],
11
+ ['agent-registry', 'agent-registry'],
12
+ ['agent-registry-control', 'agent-registry'],
13
+ ['agenttoolkit', 'execute-api'],
14
+ ['agreement-marketplace', 'aws-marketplace'],
15
+ ['aidevops', 'aidevops'],
16
+ ['aiops', 'aiops'],
17
+ ['airflow', 'airflow'],
18
+ ['airflow-serverless', 'airflow-serverless'],
19
+ ['amplify', 'amplify'],
20
+ ['amplifybackend', 'amplifybackend'],
21
+ ['amplifyuibuilder', 'amplifyuibuilder'],
22
+ ['aoss', 'aoss'],
23
+ ['api.detective', 'detective'],
24
+ ['api.ecr', 'ecr'],
25
+ ['api.ecr-public', 'ecr-public'],
26
+ ['api.iotdeviceadvisor', 'iotdeviceadvisor'],
27
+ ['api.iotmanagedintegrations', 'iotmanagedintegrations'],
28
+ ['api.iotwireless', 'iotwireless'],
29
+ ['api.mediatailor', 'mediatailor'],
30
+ ['api.pricing', 'pricing'],
31
+ ['api.sagemaker', 'sagemaker'],
32
+ ['api.tunneling.iot', 'IoTSecuredTunneling'],
33
+ ['apigateway', 'apigateway'],
34
+ ['app-integrations', 'app-integrations'],
35
+ ['appconfig', 'appconfig'],
36
+ ['appconfigdata', 'appconfig'],
37
+ ['appfabric', 'appfabric'],
38
+ ['appflow', 'appflow'],
39
+ ['application-autoscaling', 'application-autoscaling'],
40
+ ['application-cost-profiler', 'application-cost-profiler'],
41
+ ['application-signals', 'application-signals'],
42
+ ['applicationinsights', 'applicationinsights'],
43
+ ['appmesh', 'appmesh'],
44
+ ['apprunner', 'apprunner'],
45
+ ['appstream2', 'appstream'],
46
+ ['appsync', 'appsync'],
47
+ ['aps', 'aps'],
48
+ ['arc-region-switch', 'arc-region-switch'],
49
+ ['arc-zonal-shift', 'arc-zonal-shift'],
50
+ ['artifact', 'artifact'],
51
+ ['athena', 'athena'],
52
+ ['auditmanager', 'auditmanager'],
53
+ ['autoscaling', 'autoscaling'],
54
+ ['autoscaling-plans', 'autoscaling-plans'],
55
+ ['b2bi', 'b2bi'],
56
+ ['backup', 'backup'],
57
+ ['backup-gateway', 'backup-gateway'],
58
+ ['backup-search', 'backup-search'],
59
+ ['batch', 'batch'],
60
+ ['bcm-dashboards', 'bcm-dashboards'],
61
+ ['bcm-data-exports', 'bcm-data-exports'],
62
+ ['bcm-pricing-calculator', 'bcm-pricing-calculator'],
63
+ ['bcm-recommended-actions', 'bcm-recommended-actions'],
64
+ ['bedrock', 'bedrock'],
65
+ ['bedrock-agent', 'bedrock'],
66
+ ['bedrock-agent-runtime', 'bedrock'],
67
+ ['bedrock-agentcore', 'bedrock-agentcore'],
68
+ ['bedrock-agentcore-control', 'bedrock-agentcore'],
69
+ ['bedrock-data-automation', 'bedrock'],
70
+ ['bedrock-data-automation-runtime', 'bedrock'],
71
+ ['bedrock-runtime', 'bedrock'],
72
+ ['billing', 'billing'],
73
+ ['braket', 'braket'],
74
+ ['cases', 'cases'],
75
+ ['cassandra', 'cassandra'],
76
+ ['cassandra-streams', 'cassandra'],
77
+ ['catalog.marketplace', 'aws-marketplace'],
78
+ ['chatbot', 'chatbot'],
79
+ ['cleanrooms', 'cleanrooms'],
80
+ ['cleanrooms-ml', 'cleanrooms-ml'],
81
+ ['cloud9', 'cloud9'],
82
+ ['cloudcontrolapi', 'cloudcontrolapi'],
83
+ ['clouddirectory', 'clouddirectory'],
84
+ ['cloudformation', 'cloudformation'],
85
+ ['cloudfront-keyvaluestore', 'cloudfront-keyvaluestore'],
86
+ ['cloudhsm', 'cloudhsm'],
87
+ ['cloudhsmv2', 'cloudhsm'],
88
+ ['cloudsearch', 'cloudsearch'],
89
+ ['cloudsearchdomain', 'cloudsearch'],
90
+ ['cloudtrail', 'cloudtrail'],
91
+ ['cloudtrail-data', 'cloudtrail-data'],
92
+ ['codeartifact', 'codeartifact'],
93
+ ['codebuild', 'codebuild'],
94
+ ['codecommit', 'codecommit'],
95
+ ['codeconnections', 'codeconnections'],
96
+ ['codedeploy', 'codedeploy'],
97
+ ['codeguru-profiler', 'codeguru-profiler'],
98
+ ['codeguru-reviewer', 'codeguru-reviewer'],
99
+ ['codeguru-security', 'codeguru-security'],
100
+ ['codepipeline', 'codepipeline'],
101
+ ['codestar-connections', 'codestar-connections'],
102
+ ['codestar-notifications', 'codestar-notifications'],
103
+ ['cognito-identity', 'cognito-identity'],
104
+ ['cognito-idp', 'cognito-idp'],
105
+ ['cognito-sync', 'cognito-sync'],
106
+ ['comprehend', 'comprehend'],
107
+ ['comprehendmedical', 'comprehendmedical'],
108
+ ['compute-optimizer', 'compute-optimizer'],
109
+ ['config', 'config'],
110
+ ['connect', 'connect'],
111
+ ['connect-campaigns', 'connect-campaigns'],
112
+ ['contact-lens', 'connect'],
113
+ ['controlcatalog', 'controlcatalog'],
114
+ ['controlplane.payment-cryptography', 'payment-cryptography'],
115
+ ['controltower', 'controltower'],
116
+ ['cost-optimization-hub', 'cost-optimization-hub'],
117
+ ['cur', 'cur'],
118
+ ['data-ats.iot', 'iotdata'],
119
+ ['data-signer', 'signer'],
120
+ ['data.iot', 'iotdata'],
121
+ ['data.jobs.iot', 'iot-jobs-data'],
122
+ ['data.mediastore', 'mediastore'],
123
+ ['data.qapps', 'qapps'],
124
+ ['databrew', 'databrew'],
125
+ ['dataexchange', 'dataexchange'],
126
+ ['datapipeline', 'datapipeline'],
127
+ ['dataplane.payment-cryptography', 'payment-cryptography'],
128
+ ['datasync', 'datasync'],
129
+ ['datazone', 'datazone'],
130
+ ['dax', 'dax'],
131
+ ['deadline', 'deadline'],
132
+ ['deployment-marketplace', 'aws-marketplace'],
133
+ ['devicefarm', 'devicefarm'],
134
+ ['devops-guru', 'devops-guru'],
135
+ ['directconnect', 'directconnect'],
136
+ ['discovery', 'discovery'],
137
+ ['discovery-marketplace', 'aws-marketplace'],
138
+ ['dlm', 'dlm'],
139
+ ['dms', 'dms'],
140
+ ['docdb', 'docdb'],
141
+ ['docdb-elastic', 'docdb-elastic'],
142
+ ['drs', 'drs'],
143
+ ['ds', 'ds'],
144
+ ['ds-data', 'ds-data'],
145
+ ['dsql', 'dsql'],
146
+ ['dynamodb', 'dynamodb'],
147
+ ['ebs', 'ebs'],
148
+ ['ec2', 'ec2'],
149
+ ['ec2-instance-connect', 'ec2-instance-connect'],
150
+ ['ecs', 'ecs'],
151
+ ['edge.sagemaker', 'sagemaker'],
152
+ ['eks', 'eks'],
153
+ ['eks-auth', 'eks-auth'],
154
+ ['elasticache', 'elasticache'],
155
+ ['elasticbeanstalk', 'elasticbeanstalk'],
156
+ ['elasticfilesystem', 'elasticfilesystem'],
157
+ ['elasticloadbalancing', 'elasticloadbalancing'],
158
+ ['elasticmapreduce', 'elasticmapreduce'],
159
+ ['elemental-inference', 'elemental-inference'],
160
+ ['email', 'ses'],
161
+ ['emr-containers', 'emr-containers'],
162
+ ['emr-serverless', 'emr-serverless'],
163
+ ['entitlement.marketplace', 'aws-marketplace'],
164
+ ['entityresolution', 'entityresolution'],
165
+ ['es', 'es'],
166
+ ['events', 'events'],
167
+ ['evs', 'evs'],
168
+ ['execute-api', 'execute-api'],
169
+ ['featurestore-runtime.sagemaker', 'sagemaker'],
170
+ ['finspace', 'finspace'],
171
+ ['finspace-api', 'finspace-api'],
172
+ ['firehose', 'firehose'],
173
+ ['fis', 'fis'],
174
+ ['fms', 'fms'],
175
+ ['forecast', 'forecast'],
176
+ ['forecastquery', 'forecast'],
177
+ ['frauddetector', 'frauddetector'],
178
+ ['freetier', 'freetier'],
179
+ ['fsx', 'fsx'],
180
+ ['gamelift', 'gamelift'],
181
+ ['gameliftstreams', 'gameliftstreams'],
182
+ ['geo', 'geo'],
183
+ ['geo-maps', 'geo-maps'],
184
+ ['geo-places', 'geo-places'],
185
+ ['geo-routes', 'geo-routes'],
186
+ ['glacier', 'glacier'],
187
+ ['globalaccelerator', 'globalaccelerator'],
188
+ ['glue', 'glue'],
189
+ ['grafana', 'grafana'],
190
+ ['greengrass', 'greengrass'],
191
+ ['groundstation', 'groundstation'],
192
+ ['guardduty', 'guardduty'],
193
+ ['health-agent', 'health-agent'],
194
+ ['healthlake', 'healthlake'],
195
+ ['iam-toolbox', 'iam'],
196
+ ['identity-chime', 'chime'],
197
+ ['identitystore', 'identitystore'],
198
+ ['imagebuilder', 'imagebuilder'],
199
+ ['ingest.timestream', 'timestream'],
200
+ ['inspector', 'inspector'],
201
+ ['inspector-scan', 'inspector-scan'],
202
+ ['inspector2', 'inspector2'],
203
+ ['interconnect', 'interconnect'],
204
+ ['internetmonitor', 'internetmonitor'],
205
+ ['invoicing', 'invoicing'],
206
+ ['iot', 'iot'],
207
+ ['iotfleetwise', 'iotfleetwise'],
208
+ ['iotsecuredtunneling', 'iotsecuredtunneling'],
209
+ ['iotsitewise', 'iotsitewise'],
210
+ ['iotthingsgraph', 'iotthingsgraph'],
211
+ ['iottwinmaker', 'iottwinmaker'],
212
+ ['iotwireless', 'iotwireless'],
213
+ ['ivs', 'ivs'],
214
+ ['ivschat', 'ivschat'],
215
+ ['ivsrealtime', 'ivs'],
216
+ ['job-runtime.sagemaker', 'sagemaker'],
217
+ ['kafka', 'kafka'],
218
+ ['kafkaconnect', 'kafkaconnect'],
219
+ ['kendra', 'kendra'],
220
+ ['kendra-ranking', 'kendra-ranking'],
221
+ ['kinesis', 'kinesis'],
222
+ ['kinesisanalytics', 'kinesisanalytics'],
223
+ ['kinesisvideo', 'kinesisvideo'],
224
+ ['kms', 'kms'],
225
+ ['lakeformation', 'lakeformation'],
226
+ ['lambda', 'lambda'],
227
+ ['launchwizard', 'launchwizard'],
228
+ ['license-manager', 'license-manager'],
229
+ ['license-manager-linux-subscriptions', 'license-manager-linux-subscriptions'],
230
+ ['license-manager-user-subscriptions', 'license-manager-user-subscriptions'],
231
+ ['lightsail', 'lightsail'],
232
+ ['logs', 'logs'],
233
+ ['lookoutequipment', 'lookoutequipment'],
234
+ ['m2', 'm2'],
235
+ ['machinelearning', 'machinelearning'],
236
+ ['macie2', 'macie2'],
237
+ ['mail-manager', 'ses'],
238
+ ['managedblockchain', 'managedblockchain'],
239
+ ['managedblockchain-query', 'managedblockchain-query'],
240
+ ['marketplacecommerceanalytics', 'marketplacecommerceanalytics'],
241
+ ['media-pipelines-chime', 'chime'],
242
+ ['mediaconnect', 'mediaconnect'],
243
+ ['mediaconvert', 'mediaconvert'],
244
+ ['medialive', 'medialive'],
245
+ ['mediapackage', 'mediapackage'],
246
+ ['mediapackage-vod', 'mediapackage-vod'],
247
+ ['mediapackagev2', 'mediapackagev2'],
248
+ ['mediastore', 'mediastore'],
249
+ ['medical-imaging', 'medical-imaging'],
250
+ ['meetings-chime', 'chime'],
251
+ ['memory-db', 'memorydb'],
252
+ ['messaging-chime', 'chime'],
253
+ ['metering.marketplace', 'aws-marketplace'],
254
+ ['metrics.sagemaker', 'sagemaker'],
255
+ ['mgh', 'mgh'],
256
+ ['mgn', 'mgn'],
257
+ ['migrationhub-config', 'mgh'],
258
+ ['migrationhub-orchestrator', 'migrationhub-orchestrator'],
259
+ ['migrationhub-strategy', 'migrationhub-strategy'],
260
+ ['mobileanalytics', 'mobileanalytics'],
261
+ ['models-v2-lex', 'lex'],
262
+ ['models.lex', 'lex'],
263
+ ['monitoring', 'monitoring'],
264
+ ['mpa', 'mpa'],
265
+ ['mq', 'mq'],
266
+ ['neptune', 'neptune'],
267
+ ['neptune-db', 'neptune-db'],
268
+ ['neptune-graph', 'neptune-graph'],
269
+ ['network-firewall', 'network-firewall'],
270
+ ['networkflowmonitor', 'networkflowmonitor'],
271
+ ['networkmonitor', 'networkmonitor'],
272
+ ['notifications', 'notifications'],
273
+ ['nova-act', 'nova-act'],
274
+ ['oam', 'oam'],
275
+ ['observabilityadmin', 'observabilityadmin'],
276
+ ['odb', 'odb'],
277
+ ['oidc', 'sso-oauth'],
278
+ ['omics', 'omics'],
279
+ ['osis', 'osis'],
280
+ ['outposts', 'outposts'],
281
+ ['participant.connect', 'execute-api'],
282
+ ['partnercentral-account', 'partnercentral-account'],
283
+ ['partnercentral-benefits', 'partnercentral-benefits'],
284
+ ['partnercentral-channel', 'partnercentral-channel'],
285
+ ['partnercentral-prm', 'partnercentral'],
286
+ ['partnercentral-selling', 'partnercentral-selling'],
287
+ ['pca-connector-ad', 'pca-connector-ad'],
288
+ ['pca-connector-scep', 'pca-connector-scep'],
289
+ ['pcs', 'pcs'],
290
+ ['personalize', 'personalize'],
291
+ ['personalize-events', 'personalize'],
292
+ ['personalize-runtime', 'personalize'],
293
+ ['pi', 'pi'],
294
+ ['pinpoint', 'mobiletargeting'],
295
+ ['pipes', 'pipes'],
296
+ ['polly', 'polly'],
297
+ ['portal.sso', 'awsssoportal'],
298
+ ['pricingplanmanager', 'pricingplanmanager'],
299
+ ['profile', 'profile'],
300
+ ['proton', 'proton'],
301
+ ['qbusiness', 'qbusiness'],
302
+ ['query.timestream', 'timestream'],
303
+ ['quicksight', 'quicksight'],
304
+ ['ram', 'ram'],
305
+ ['rbin', 'rbin'],
306
+ ['rds', 'rds'],
307
+ ['rds-data', 'rds-data'],
308
+ ['redshift', 'redshift'],
309
+ ['redshift-data', 'redshift-data'],
310
+ ['redshift-serverless', 'redshift-serverless'],
311
+ ['refactor-spaces', 'refactor-spaces'],
312
+ ['rekognition', 'rekognition'],
313
+ ['reporting-marketplace', 'aws-marketplace'],
314
+ ['repostspace', 'repostspace'],
315
+ ['resiliencehub', 'resiliencehub'],
316
+ ['resource-explorer-2', 'resource-explorer-2'],
317
+ ['resource-groups', 'resource-groups'],
318
+ ['rolesanywhere', 'rolesanywhere'],
319
+ ['route53-recovery-cluster', 'route53-recovery-cluster'],
320
+ ['route53-recovery-control-config', 'route53-recovery-control-config'],
321
+ ['route53-recovery-readiness', 'route53-recovery-readiness'],
322
+ ['route53domains', 'route53domains'],
323
+ ['route53globalresolver', 'route53globalresolver'],
324
+ ['route53profiles', 'route53profiles'],
325
+ ['route53resolver', 'route53resolver'],
326
+ ['rtbfabric', 'rtbfabric'],
327
+ ['rum', 'rum'],
328
+ ['runtime-v2-lex', 'lex'],
329
+ ['runtime.lex', 'lex'],
330
+ ['runtime.sagemaker', 'sagemaker'],
331
+ ['s3', 's3'],
332
+ ['s3-control', 's3'],
333
+ ['s3-outposts', 's3-outposts'],
334
+ ['s3files', 's3files'],
335
+ ['s3tables', 's3tables'],
336
+ ['s3vectors', 's3vectors'],
337
+ ['sagemaker-geospatial', 'sagemaker-geospatial'],
338
+ ['scheduler', 'scheduler'],
339
+ ['schemas', 'schemas'],
340
+ ['scn', 'scn'],
341
+ ['sdb', 'sdb'],
342
+ ['secretsmanager', 'secretsmanager'],
343
+ ['security-ir', 'security-ir'],
344
+ ['securityagent', 'securityagent'],
345
+ ['securityhub', 'securityhub'],
346
+ ['securitylake', 'securitylake'],
347
+ ['serverlessrepo', 'serverlessrepo'],
348
+ ['servicecatalog', 'servicecatalog'],
349
+ ['servicecatalog-appregistry', 'servicecatalog'],
350
+ ['servicediscovery', 'servicediscovery'],
351
+ ['servicequotas', 'servicequotas'],
352
+ ['signer', 'signer'],
353
+ ['signin', 'signin'],
354
+ ['sms-voice', 'sms-voice'],
355
+ ['sms-voice.pinpoint', 'sms-voice'],
356
+ ['snow-device-management', 'snow-device-management'],
357
+ ['snowball', 'snowball'],
358
+ ['sns', 'sns'],
359
+ ['social-messaging', 'social-messaging'],
360
+ ['sqs', 'sqs'],
361
+ ['ssm', 'ssm'],
362
+ ['ssm-contacts', 'ssm-contacts'],
363
+ ['ssm-guiconnect', 'ssm-guiconnect'],
364
+ ['ssm-incidents', 'ssm-incidents'],
365
+ ['ssm-quicksetup', 'ssm-quicksetup'],
366
+ ['ssm-sap', 'ssm-sap'],
367
+ ['sso', 'sso'],
368
+ ['states', 'states'],
369
+ ['storagegateway', 'storagegateway'],
370
+ ['streams.dynamodb', 'dynamodb'],
371
+ ['sts', 'sts'],
372
+ ['support', 'support'],
373
+ ['supportapp', 'supportapp'],
374
+ ['supportauthz', 'supportauthz'],
375
+ ['sustainability', 'sustainability'],
376
+ ['swf', 'swf'],
377
+ ['synthetics', 'synthetics'],
378
+ ['tagging', 'tagging'],
379
+ ['textract', 'textract'],
380
+ ['thinclient', 'thinclient'],
381
+ ['timestream-influxdb', 'timestream-influxdb'],
382
+ ['tnb', 'tnb'],
383
+ ['transcribe', 'transcribe'],
384
+ ['transcribestreaming', 'transcribestreaming'],
385
+ ['transfer', 'transfer'],
386
+ ['translate', 'translate'],
387
+ ['trustedadvisor', 'trustedadvisor'],
388
+ ['uxc', 'uxc'],
389
+ ['verifiedpermissions', 'verifiedpermissions'],
390
+ ['voice-chime', 'chime'],
391
+ ['voiceid', 'voiceid'],
392
+ ['vpc-lattice', 'vpc-lattice'],
393
+ ['waf-regional', 'waf-regional'],
394
+ ['wafv2', 'wafv2'],
395
+ ['wellarchitected', 'wellarchitected'],
396
+ ['wisdom', 'wisdom'],
397
+ ['workdocs', 'workdocs'],
398
+ ['workmail', 'workmail'],
399
+ ['workmailmessageflow', 'workmailmessageflow'],
400
+ ['workspaces', 'workspaces'],
401
+ ['workspaces-instances', 'workspaces-instances'],
402
+ ['workspaces-web', 'workspaces-web'],
403
+ ['xray', 'xray'],
404
+ ];
405
+ /** Every global AWS endpoint: the service, its host, its signing name, and the region it signs for. */
406
+ export const GLOBAL_SERVICES = [
407
+ ['account', 'account.us-east-1.amazonaws.com', 'account', 'us-east-1'],
408
+ ['billingconductor', 'billingconductor.us-east-1.amazonaws.com', 'billingconductor', 'us-east-1'],
409
+ ['budgets', 'budgets.amazonaws.com', 'budgets', 'us-east-1'],
410
+ ['ce', 'ce.us-east-1.amazonaws.com', 'ce', 'us-east-1'],
411
+ ['chime', 'chime.us-east-1.amazonaws.com', 'chime', 'us-east-1'],
412
+ ['cloudfront', 'cloudfront.amazonaws.com', 'cloudfront', 'us-east-1'],
413
+ ['codecatalyst', 'codecatalyst.global.api.aws', 'codecatalyst', 'us-east-1'],
414
+ ['health', 'global.health.amazonaws.com', 'health', 'us-east-1'],
415
+ ['iam', 'iam.amazonaws.com', 'iam', 'us-east-1'],
416
+ ['importexport', 'importexport.amazonaws.com', 'IngestionService', 'us-east-1'],
417
+ ['networkmanager', 'networkmanager.us-west-2.amazonaws.com', 'networkmanager', 'us-west-2'],
418
+ ['notifications-contacts', 'notifications-contacts.us-east-1.api.aws', 'notifications-contacts', 'us-east-1'],
419
+ ['organizations', 'organizations.us-east-1.amazonaws.com', 'organizations', 'us-east-1'],
420
+ ['route53', 'route53.amazonaws.com', 'route53', 'us-east-1'],
421
+ ['s3', 's3.amazonaws.com', 's3', 'us-east-1'],
422
+ ['savingsplans', 'savingsplans.amazonaws.com', 'savingsplans', 'us-east-1'],
423
+ ['shield', 'shield.us-east-1.amazonaws.com', 'shield', 'us-east-1'],
424
+ ['sts', 'sts.amazonaws.com', 'sts', 'us-east-1'],
425
+ ['support', 'support.us-east-1.amazonaws.com', 'support', 'us-east-1'],
426
+ ['tax', 'tax.us-east-1.amazonaws.com', 'tax', 'us-east-1'],
427
+ ['waf', 'waf.amazonaws.com', 'waf', 'us-east-1'],
428
+ ];
@@ -157,6 +157,21 @@ export class OpenShellDriver {
157
157
  throw new Error(`openshell logs failed: ${(result.stderr || result.stdout).trim().slice(0, 300)}`);
158
158
  return result.stdout;
159
159
  }
160
+ async providers() {
161
+ const names = [];
162
+ let token = '';
163
+ for (let page = 0; page < 20; page++) {
164
+ const result = await run(this.bin, ['provider', 'list', '--output', 'json', ...(token ? ['--page-token', token] : [])], { timeout: 30_000, killSignal: 'SIGKILL' });
165
+ if (result.code !== 0)
166
+ throw new Error(`openshell provider list failed: ${(result.stderr || result.stdout).trim().slice(0, 300)}`);
167
+ const listed = JSON.parse(result.stdout);
168
+ names.push(...(listed.providers ?? []).flatMap((p) => (typeof p.name === 'string' ? [p.name] : [])));
169
+ token = listed.next_page_token ?? '';
170
+ if (!token)
171
+ break;
172
+ }
173
+ return names;
174
+ }
160
175
  async gateway() {
161
176
  const result = await run(this.bin, ['status', '--output', 'json'], { timeout: 15_000, killSignal: 'SIGKILL' }).catch((error) => ({ code: 1, stdout: '', stderr: error.message }));
162
177
  if (result.code !== 0)
@@ -1,4 +1,5 @@
1
- import { BUNDLES, checkHost } from './allowlist.js';
1
+ import { BUNDLES, bundleNames, checkHost } from './allowlist.js';
2
+ import { GLOBAL_SERVICES, REGIONAL_SERVICES } from './aws-services.js';
2
3
  /** Services whose endpoints don't follow `<service>.<region>.amazonaws.com`. Global ones sign for us-east-1. */
3
4
  const AWS_SERVICES = {
4
5
  iam: { hosts: () => ['iam.amazonaws.com'], signing: 'iam', global: true },
@@ -8,26 +9,48 @@ const AWS_SERVICES = {
8
9
  cloudfront: { hosts: () => ['cloudfront.amazonaws.com'], signing: 'cloudfront', global: true },
9
10
  route53: { hosts: () => ['route53.amazonaws.com'], signing: 'route53', global: true },
10
11
  };
12
+ /** In `aws.services`, every AWS service: the view role alone then decides what agents read. */
13
+ export const ALL_SERVICES = 'all';
11
14
  /**
12
15
  * One signed endpoint per host. `access: full`, because most AWS APIs are POSTs: the
13
- * role itself is what allows only reads (spike 2).
16
+ * role itself is what allows only reads (spike 2). OpenShell signs only for endpoints
17
+ * named with their service, with no rule for every AWS host, so `all` names every one
18
+ * the AWS SDK knows (aws-services.ts), with the hosts that carry a bucket's or an
19
+ * account's name in front.
20
+ *
21
+ * Every service but S3 is signed with `sigv4:body`: the hash of the request's body, an
22
+ * empty one for a GET. OpenShell's automatic `sigv4` signs a request with neither a body
23
+ * nor `x-amz-content-sha256` as UNSIGNED-PAYLOAD, which only S3 accepts, so every other
24
+ * service's GET failed (NVIDIA/OpenShell#5375). S3 keeps it: its SDKs say how to sign.
14
25
  */
15
26
  function awsEndpoints(aws) {
16
- return aws.services.flatMap((service) => {
27
+ const signed = (host, service, region) => ({
28
+ host,
29
+ port: 443,
30
+ protocol: 'rest',
31
+ enforcement: 'enforce',
32
+ access: 'full',
33
+ credential_binding: { provider: aws.provider },
34
+ credential_signing: service === 's3' ? 'sigv4' : 'sigv4:body',
35
+ signing_service: service,
36
+ ...(region ? { signing_region: region } : {}),
37
+ });
38
+ const named = aws.services.filter((service) => service !== ALL_SERVICES).flatMap((service) => {
17
39
  const known = AWS_SERVICES[service];
18
40
  const hosts = known ? known.hosts(aws.region) : [`${service}.${aws.region}.amazonaws.com`];
19
- return hosts.map((host) => ({
20
- host,
21
- port: 443,
22
- protocol: 'rest',
23
- enforcement: 'enforce',
24
- access: 'full',
25
- credential_binding: { provider: aws.provider },
26
- credential_signing: 'sigv4',
27
- signing_service: known?.signing ?? service,
28
- ...(known?.global ? { signing_region: 'us-east-1' } : {}),
29
- }));
41
+ return hosts.map((host) => signed(host, known?.signing ?? service, known?.global ? 'us-east-1' : undefined));
30
42
  });
43
+ const all = aws.services.includes(ALL_SERVICES)
44
+ ? [
45
+ ...REGIONAL_SERVICES.map(([prefix, service, template]) => signed((template ?? '{service}.{region}.{dnsSuffix}').replace('{service}', prefix).replace('{region}', aws.region).replace('{dnsSuffix}', 'amazonaws.com'), service)),
46
+ signed(`*.s3.${aws.region}.amazonaws.com`, 's3'),
47
+ signed(`*.s3-control.${aws.region}.amazonaws.com`, 's3'),
48
+ ...GLOBAL_SERVICES.map(([, host, service, region]) => signed(host, service, region)),
49
+ ]
50
+ : [];
51
+ // One rule per host, a named service's first.
52
+ const endpoints = [...named, ...all];
53
+ return endpoints.filter((endpoint, i) => endpoints.findIndex((other) => other.host === endpoint.host) === i);
31
54
  }
32
55
  /**
33
56
  * Programs whose connections the rules cover. A rule also applies to the processes a
@@ -43,16 +66,21 @@ const BINARIES = ['/usr/local/bin/claude', '/usr/bin/bash', '/usr/bin/dash'];
43
66
  */
44
67
  export function buildPolicy(options) {
45
68
  const rules = [];
46
- for (const name of options.bundles) {
69
+ for (const name of bundleNames(options.bundles)) {
47
70
  const bundle = BUNDLES[name];
48
71
  if (!bundle)
49
- throw new Error(`unknown network bundle "${name}" (known: ${Object.keys(BUNDLES).join(', ')})`);
72
+ throw new Error(`unknown network bundle "${name}" (known: all, ${Object.keys(BUNDLES).join(', ')})`);
50
73
  rules.push(...bundle);
51
74
  }
52
75
  rules.push(...options.extraHosts.map((host) => ({ host, access: 'read' })));
53
76
  // A host's first rule wins: a bundle's, like github.com's with git, over an extra host's read-only one.
54
- const unique = rules.filter((rule, i) => rules.findIndex((r) => r.host === rule.host) === i);
77
+ // An API's own rule wins over both, so a host listed as an API takes every method.
78
+ const apis = options.apis ?? [];
79
+ const apiHosts = new Set(apis.map((api) => api.host));
80
+ const unique = rules.filter((rule, i) => rules.findIndex((r) => r.host === rule.host) === i && !apiHosts.has(rule.host));
55
81
  unique.forEach((rule) => checkHost(rule.host));
82
+ apis.forEach((api) => checkHost(api.host));
83
+ const keyless = apis.filter((api) => !api.key);
56
84
  const binaries = BINARIES.map((path) => ({ path }));
57
85
  return {
58
86
  version: 1,
@@ -65,9 +93,39 @@ export function buildPolicy(options) {
65
93
  read_only_web: { endpoints: unique.filter((r) => r.access === 'read').map(readEndpoint), binaries },
66
94
  git_fetch: { endpoints: unique.filter((r) => r.access === 'git').map(gitEndpoint), binaries },
67
95
  ...(options.aws ? { aws_view: { endpoints: awsEndpoints(options.aws), binaries } } : {}),
96
+ ...(keyless.length > 0 ? { third_party_apis: { endpoints: keyless.map((api) => apiEndpoint(api.host)), binaries } } : {}),
68
97
  },
69
98
  };
70
99
  }
100
+ /** A third-party API's host, open to every method: the project's code calls it as it would in production. */
101
+ function apiEndpoint(host) {
102
+ return { host, port: 443, protocol: 'rest', enforcement: 'enforce', access: 'full' };
103
+ }
104
+ /**
105
+ * The OpenShell provider, and its profile, that hold a third-party API's key for a
106
+ * project. Providers are per machine, so the name says whose and which.
107
+ */
108
+ export function apiProviderName(project, host) {
109
+ const safe = (text) => text.toLowerCase().replace(/[^a-z0-9-]+/g, '-').replace(/^-+|-+$/g, '');
110
+ return `api-${safe(project)}-${safe(host)}`;
111
+ }
112
+ /**
113
+ * The provider profile of a third-party API's key. A sandbox with the provider sees a
114
+ * placeholder in the variable, and OpenShell's proxy puts the key in its place on
115
+ * requests to the host alone: in any header, Basic auth included, and in the URL, but
116
+ * not in a request's body. The profile also opens the host to every method.
117
+ */
118
+ export function apiProfile(project, api) {
119
+ return {
120
+ id: apiProviderName(project, api.host),
121
+ display_name: `${api.host} for ${project}`,
122
+ description: `The key of ${api.host} that the harness's sandboxes of ${project} use, as ${api.key}`,
123
+ category: 'other',
124
+ credentials: [{ name: 'key', description: `The key of ${api.host}`, env_vars: [api.key], required: true, auth_style: 'bearer', header_name: 'authorization' }],
125
+ endpoints: [{ host: api.host, port: 443, protocol: 'rest', access: 'full', enforcement: 'enforce' }],
126
+ binaries: BINARIES,
127
+ };
128
+ }
71
129
  function readEndpoint(rule) {
72
130
  return {
73
131
  host: rule.host,