@fabrika/proxy-core 0.9.0-dev.7 → 0.9.0-dev.9
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/package.json +4 -4
- package/src/authorize.ts +23 -12
- package/src/manifest.ts +60 -1
- package/types/src/manifest.d.ts +55 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fabrika/proxy-core",
|
|
3
|
-
"version": "0.9.0-dev.
|
|
3
|
+
"version": "0.9.0-dev.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -48,9 +48,9 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"zod": "^3.25.76",
|
|
51
|
-
"@fabrika/auth-core": "0.9.0-dev.
|
|
52
|
-
"@fabrika/jwks": "0.9.0-dev.
|
|
51
|
+
"@fabrika/auth-core": "0.9.0-dev.9",
|
|
52
|
+
"@fabrika/jwks": "0.9.0-dev.9",
|
|
53
53
|
"jose": "^5.9.0",
|
|
54
|
-
"@fabrika/platform": "0.9.0-dev.
|
|
54
|
+
"@fabrika/platform": "0.9.0-dev.9"
|
|
55
55
|
}
|
|
56
56
|
}
|
package/src/authorize.ts
CHANGED
|
@@ -41,6 +41,7 @@ import { carriesPlatformKey, readBearer, readCookie } from './credentials'
|
|
|
41
41
|
import { createHandoffAttempt, type HandoffAttempt, handoffCookieName, setHandoffParams, unmatchedVerifier } from './handoff'
|
|
42
42
|
import { type DelegationIssuer, type IamGateway, IamUnavailableError } from './iam'
|
|
43
43
|
import {
|
|
44
|
+
audienceOf,
|
|
44
45
|
isApplicationEntry,
|
|
45
46
|
type ManifestEndpointRow,
|
|
46
47
|
type OAuthBearerChallenge,
|
|
@@ -416,7 +417,10 @@ export class Authorizer {
|
|
|
416
417
|
if (issuer === undefined || issuer === null) {
|
|
417
418
|
return { ok: true, grant: null }
|
|
418
419
|
}
|
|
419
|
-
const result = await this.callIam(
|
|
420
|
+
const result = await this.callIam(
|
|
421
|
+
'requestDelegation',
|
|
422
|
+
() => issuer.requestDelegation({ app: audienceOf(app), credential: token, requestId, endpoint }),
|
|
423
|
+
)
|
|
420
424
|
return result.ok && result.grant !== ''
|
|
421
425
|
? { ok: true, grant: result.grant }
|
|
422
426
|
: { ok: false, denial: { outcome: 'deny', status: 403, reason: 'delegation_refused' } }
|
|
@@ -432,7 +436,7 @@ export class Authorizer {
|
|
|
432
436
|
if (bearer === null) {
|
|
433
437
|
return { ok: false, denial: { outcome: 'deny', status: 401, reason: 'no_credential', challenge } }
|
|
434
438
|
}
|
|
435
|
-
const verified = await this.verifier.verify(bearer, { kind: 'resource', app: app
|
|
439
|
+
const verified = await this.verifier.verify(bearer, { kind: 'resource', app: audienceOf(app), resource: binding.resource.resource })
|
|
436
440
|
if (!verified.ok) {
|
|
437
441
|
return verified.reason === 'unavailable'
|
|
438
442
|
? { ok: false, denial: { outcome: 'deny', status: 503, reason: 'iam_unavailable' } }
|
|
@@ -458,7 +462,7 @@ export class Authorizer {
|
|
|
458
462
|
const key = cacheKey(app.id, 'key', bearer)
|
|
459
463
|
const cached = this.cache?.get(key)
|
|
460
464
|
if (cached !== undefined && cached.expiresAt - this.now() > TOKEN_REFRESH_SKEW_SECONDS) {
|
|
461
|
-
const verified = await this.verifier.verify(cached.token, app
|
|
465
|
+
const verified = await this.verifier.verify(cached.token, audienceOf(app))
|
|
462
466
|
if (verified.ok) {
|
|
463
467
|
return { ok: true, token: cached.token, claims: verified.claims }
|
|
464
468
|
}
|
|
@@ -472,11 +476,11 @@ export class Authorizer {
|
|
|
472
476
|
this.cache?.delete(key)
|
|
473
477
|
}
|
|
474
478
|
|
|
475
|
-
const minted = await this.callIam('mintFromKey', () => this.options.iam.mintFromKey({ app: app
|
|
479
|
+
const minted = await this.callIam('mintFromKey', () => this.options.iam.mintFromKey({ app: audienceOf(app), key: bearer, requestId }))
|
|
476
480
|
if (!minted.ok) {
|
|
477
481
|
return { ok: false, denial: { outcome: 'deny', status: minted.reason === 'invalid_key' ? 401 : 403, reason: minted.reason } }
|
|
478
482
|
}
|
|
479
|
-
const verified = await this.verifier.verify(minted.token, app
|
|
483
|
+
const verified = await this.verifier.verify(minted.token, audienceOf(app))
|
|
480
484
|
if (!verified.ok) {
|
|
481
485
|
// We just minted it, so a verification miss is a config/clock/key problem — not a client
|
|
482
486
|
// error. Either way: deny.
|
|
@@ -509,7 +513,7 @@ export class Authorizer {
|
|
|
509
513
|
const key = cacheKey(app.id, 'session', session)
|
|
510
514
|
const cached = this.cache?.get(key)
|
|
511
515
|
if (cached !== undefined && cached.expiresAt - now > TOKEN_REFRESH_SKEW_SECONDS) {
|
|
512
|
-
const verified = await this.verifier.verify(cached.token, app
|
|
516
|
+
const verified = await this.verifier.verify(cached.token, audienceOf(app))
|
|
513
517
|
if (verified.ok && verified.claims.ptype === 'user') {
|
|
514
518
|
return { ok: true, token: cached.token, claims: verified.claims }
|
|
515
519
|
}
|
|
@@ -521,13 +525,13 @@ export class Authorizer {
|
|
|
521
525
|
this.cache?.delete(key)
|
|
522
526
|
}
|
|
523
527
|
|
|
524
|
-
const minted = await this.callIam('mintToken', () => this.options.iam.mintToken({ app: app
|
|
528
|
+
const minted = await this.callIam('mintToken', () => this.options.iam.mintToken({ app: audienceOf(app), session, requestId: request.requestId }))
|
|
525
529
|
if (!minted.ok) {
|
|
526
530
|
return minted.reason === 'token_too_large'
|
|
527
531
|
? { ok: false, status: 'refused', reason: minted.reason }
|
|
528
532
|
: { ok: false, status: 'miss', reason: minted.reason }
|
|
529
533
|
}
|
|
530
|
-
const verified = await this.verifier.verify(minted.token, app
|
|
534
|
+
const verified = await this.verifier.verify(minted.token, audienceOf(app))
|
|
531
535
|
if (!verified.ok) {
|
|
532
536
|
// We just minted it, so this is a config/clock/key problem, not a bad session — and if the
|
|
533
537
|
// key set is unreachable it is an incident, not a reason to bounce the browser to login.
|
|
@@ -589,7 +593,7 @@ export class Authorizer {
|
|
|
589
593
|
const redeem = (presented: string) =>
|
|
590
594
|
this.callIam(
|
|
591
595
|
'exchangeAuthCode',
|
|
592
|
-
() => this.options.iam.exchangeAuthCode({ app: resolved.app
|
|
596
|
+
() => this.options.iam.exchangeAuthCode({ app: audienceOf(resolved.app), code, verifier: presented, requestId: request.requestId }),
|
|
593
597
|
)
|
|
594
598
|
if (verifier === null) {
|
|
595
599
|
// This browser did not start the sign-in the code belongs to. The code is spent, so whoever started it cannot
|
|
@@ -598,7 +602,8 @@ export class Authorizer {
|
|
|
598
602
|
return { outcome: 'deny', status: 403, reason: 'invalid_session', clearHandoffState: state }
|
|
599
603
|
}
|
|
600
604
|
const result = await redeem(verifier)
|
|
601
|
-
|
|
605
|
+
// IAM binds a code to its audience only, which several dev sandbox entries share: the return must be this host.
|
|
606
|
+
if (!result.ok || !returnsToHost(resolved.app, request.url, result.returnUrl)) {
|
|
602
607
|
return { outcome: 'deny', status: 403, reason: 'invalid_session', clearHandoffState: state }
|
|
603
608
|
}
|
|
604
609
|
return { outcome: 'handoff', status: 302, location: result.returnUrl, session: result.session, expiresAt: result.expiresAt, handoffState: state }
|
|
@@ -629,7 +634,7 @@ export class Authorizer {
|
|
|
629
634
|
this.cache?.delete(cacheKey(app.id, 'session', session))
|
|
630
635
|
}
|
|
631
636
|
const release = new URL(SIGNOUT_RELEASE_PATH, this.options.issuer.replace(/\/+$/, ''))
|
|
632
|
-
release.searchParams.set('app', app
|
|
637
|
+
release.searchParams.set('app', audienceOf(app))
|
|
633
638
|
release.searchParams.set(LOGIN_REDIRECT_PARAM, target)
|
|
634
639
|
return { outcome: 'signout', status: 302, location: release.toString() }
|
|
635
640
|
}
|
|
@@ -663,7 +668,7 @@ export class Authorizer {
|
|
|
663
668
|
// does not go through it (the Cloudflare Worker reads its env directly).
|
|
664
669
|
const issuer = this.options.issuer.replace(/\/+$/, '')
|
|
665
670
|
const login = new URL('/auth/login', issuer)
|
|
666
|
-
login.searchParams.set('app', app
|
|
671
|
+
login.searchParams.set('app', audienceOf(app))
|
|
667
672
|
login.searchParams.set(LOGIN_REDIRECT_PARAM, target.toString())
|
|
668
673
|
setHandoffParams(login, handoff)
|
|
669
674
|
return login.toString()
|
|
@@ -695,6 +700,12 @@ function sameOriginTarget(origin: string, path: string | null): string | null {
|
|
|
695
700
|
return target.origin === origin ? target.toString() : null
|
|
696
701
|
}
|
|
697
702
|
|
|
703
|
+
/** Whether a redeemed code's return URL is on the host the callback arrived at, and that host is one of the entry's. */
|
|
704
|
+
function returnsToHost(app: ProxyApp, callback: URL, returnUrl: string): boolean {
|
|
705
|
+
const target = URL.canParse(returnUrl) ? new URL(returnUrl) : null
|
|
706
|
+
return target !== null && target.hostname === callback.hostname && app.hosts.includes(target.hostname)
|
|
707
|
+
}
|
|
708
|
+
|
|
698
709
|
function isControlOrSpace(character: string): boolean {
|
|
699
710
|
const code = character.charCodeAt(0)
|
|
700
711
|
return code <= 0x20 || code === 0x7f
|
package/src/manifest.ts
CHANGED
|
@@ -63,6 +63,15 @@ export interface ContractProxyApp extends ProxyAppBase {
|
|
|
63
63
|
* endpoints"), from Control's registry, never from the contract; absent when it lists none.
|
|
64
64
|
*/
|
|
65
65
|
crossOrigins?: string[]
|
|
66
|
+
/** The IAM app id `<app>@<env>` a dev sandbox entry (`dev:<app>:<workspace>`) mints for; absent on every other entry. */
|
|
67
|
+
audience?: string
|
|
68
|
+
/** The `Host` the proxy sends upstream in place of the client's; absent, the client's passes. */
|
|
69
|
+
upstreamHost?: string
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/** The IAM app id an entry's tokens are minted for and verified against: its `audience`, or else its id. */
|
|
73
|
+
export function audienceOf(entry: Pick<ContractProxyApp, 'id' | 'audience'>): string {
|
|
74
|
+
return entry.audience ?? entry.id
|
|
66
75
|
}
|
|
67
76
|
|
|
68
77
|
/**
|
|
@@ -175,6 +184,48 @@ export function isProxyHost(host: string): boolean {
|
|
|
175
184
|
return host.length > 0 && host.length <= 253 && host.split('.').every((label) => label.length <= 63 && HOST_LABEL.test(label))
|
|
176
185
|
}
|
|
177
186
|
|
|
187
|
+
const DEV_SANDBOX_ID_PREFIX = 'dev'
|
|
188
|
+
/** The contract's application id rule (`CONTRACT_APP_ID_PATTERN` of `@fabrika/app`), which this module cannot import. */
|
|
189
|
+
const DEV_SANDBOX_APP_ID = /^[a-z0-9][a-z0-9-]*$/
|
|
190
|
+
const DEV_SANDBOX_WORKSPACE_ID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/
|
|
191
|
+
|
|
192
|
+
export interface DevSandboxEntryId {
|
|
193
|
+
readonly appId: string
|
|
194
|
+
readonly workspaceId: string
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/** The entry id of one workspace's dev sandbox, `dev:<appId>:<workspaceId>`. Throws on a part that would not parse back. */
|
|
198
|
+
export function devSandboxEntryId(appId: string, workspaceId: string): string {
|
|
199
|
+
const id = `${DEV_SANDBOX_ID_PREFIX}:${appId}:${workspaceId}`
|
|
200
|
+
if (parseDevSandboxEntryId(id) === null) throw new Error('a dev sandbox entry id needs a contract application id and a workspace UUID')
|
|
201
|
+
return id
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/** The parts of `dev:<appId>:<workspaceId>`, or null for any other string. */
|
|
205
|
+
export function parseDevSandboxEntryId(id: string): DevSandboxEntryId | null {
|
|
206
|
+
const parts = id.split(':')
|
|
207
|
+
if (parts.length !== 3) return null
|
|
208
|
+
const [prefix = '', appId = '', workspaceId = ''] = parts
|
|
209
|
+
return prefix === DEV_SANDBOX_ID_PREFIX && DEV_SANDBOX_APP_ID.test(appId) && DEV_SANDBOX_WORKSPACE_ID.test(workspaceId)
|
|
210
|
+
? { appId, workspaceId }
|
|
211
|
+
: null
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* A dev sandbox entry names its application's audience, and only it does: the id itself is no IAM app id. An `@` id is
|
|
216
|
+
* already its own audience, and a plain id is a platform audience.
|
|
217
|
+
*/
|
|
218
|
+
function checkAudience(app: Pick<ContractProxyApp, 'id' | 'audience'>, ctx: z.RefinementCtx): void {
|
|
219
|
+
const sandbox = parseDevSandboxEntryId(app.id)
|
|
220
|
+
if (sandbox === null) {
|
|
221
|
+
if (app.audience !== undefined) ctx.addIssue({ code: 'custom', path: ['audience'], message: 'only a dev sandbox entry names an audience' })
|
|
222
|
+
return
|
|
223
|
+
}
|
|
224
|
+
if (app.audience === undefined || parseAppEnvironmentId(app.audience)?.app !== sandbox.appId) {
|
|
225
|
+
ctx.addIssue({ code: 'custom', path: ['audience'], message: "a dev sandbox entry's audience is its application's environment" })
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
178
229
|
/** An id that holds `@` must be a whole `<app>@<env>`; a malformed one would mint for an app IAM never registered. */
|
|
179
230
|
const proxyAppIdSchema = z.string().min(1).refine((id) => !id.includes(APP_ENVIRONMENT_SEPARATOR) || parseAppEnvironmentId(id) !== null)
|
|
180
231
|
|
|
@@ -348,7 +399,10 @@ export const contractProxyAppSchema = z.object({
|
|
|
348
399
|
csp: cspOriginsSchema,
|
|
349
400
|
operationsOrigin: z.string().refine((value) => isPolicyOrigin(value, ['https:', 'http:'])).optional(),
|
|
350
401
|
crossOrigins: z.array(z.string().refine(isCrossOrigin)).nonempty().max(MAX_CROSS_ORIGINS).optional(),
|
|
402
|
+
audience: z.string().refine((value) => parseAppEnvironmentId(value) !== null).optional(),
|
|
403
|
+
upstreamHost: z.string().refine(isProxyHost).optional(),
|
|
351
404
|
}).strict().superRefine((app, ctx) => {
|
|
405
|
+
checkAudience(app, ctx)
|
|
352
406
|
checkCrossOrigins(app, ctx)
|
|
353
407
|
// Only the ops row lies under the ops prefix: another row there would be an application route at a platform path.
|
|
354
408
|
if (app.endpoints.some((row) => row.path.startsWith(OPS_PREFIX) && row.kind !== 'protocol')) {
|
|
@@ -494,6 +548,9 @@ export interface ContractEntryPlacement {
|
|
|
494
548
|
readonly operationsOrigin?: string
|
|
495
549
|
/** The environment's list from Control's registry; an empty one is omitted. */
|
|
496
550
|
readonly crossOrigins?: readonly string[]
|
|
551
|
+
/** A dev sandbox entry's `<app>@<env>`; see `ContractProxyApp.audience`. */
|
|
552
|
+
readonly audience?: string
|
|
553
|
+
readonly upstreamHost?: string
|
|
497
554
|
}
|
|
498
555
|
|
|
499
556
|
/**
|
|
@@ -517,7 +574,7 @@ export type OlderProxyReaders = readonly [OlderProxyReader, ...OlderProxyReader[
|
|
|
517
574
|
* would refuse it, naming the fields and never their values, because an origin with userinfo may carry a key.
|
|
518
575
|
*/
|
|
519
576
|
export function contractProxyEntry(placement: ContractEntryPlacement): ContractProxyApp {
|
|
520
|
-
const { table, operationsOrigin, crossOrigins = [] } = placement
|
|
577
|
+
const { table, operationsOrigin, crossOrigins = [], audience, upstreamHost } = placement
|
|
521
578
|
const entry: ContractProxyApp = {
|
|
522
579
|
id: placement.id,
|
|
523
580
|
hosts: [...placement.hosts],
|
|
@@ -529,6 +586,8 @@ export function contractProxyEntry(placement: ContractEntryPlacement): ContractP
|
|
|
529
586
|
csp: table.csp,
|
|
530
587
|
...(operationsOrigin === undefined ? {} : { operationsOrigin }),
|
|
531
588
|
...(crossOrigins.length === 0 ? {} : { crossOrigins: [...crossOrigins] }),
|
|
589
|
+
...(audience === undefined ? {} : { audience }),
|
|
590
|
+
...(upstreamHost === undefined ? {} : { upstreamHost }),
|
|
532
591
|
}
|
|
533
592
|
const parsed = contractProxyAppSchema.safeParse(entry)
|
|
534
593
|
if (!parsed.success) {
|
package/types/src/manifest.d.ts
CHANGED
|
@@ -32,7 +32,13 @@ export interface ContractProxyApp extends ProxyAppBase {
|
|
|
32
32
|
* endpoints"), from Control's registry, never from the contract; absent when it lists none.
|
|
33
33
|
*/
|
|
34
34
|
crossOrigins?: string[];
|
|
35
|
+
/** The IAM app id `<app>@<env>` a dev sandbox entry (`dev:<app>:<workspace>`) mints for; absent on every other entry. */
|
|
36
|
+
audience?: string;
|
|
37
|
+
/** The `Host` the proxy sends upstream in place of the client's; absent, the client's passes. */
|
|
38
|
+
upstreamHost?: string;
|
|
35
39
|
}
|
|
40
|
+
/** The IAM app id an entry's tokens are minted for and verified against: its `audience`, or else its id. */
|
|
41
|
+
export declare function audienceOf(entry: Pick<ContractProxyApp, 'id' | 'audience'>): string;
|
|
36
42
|
/**
|
|
37
43
|
* An installation service protected by an endpoint table (ADR-0022 "Installation entries"). Only trusted platform
|
|
38
44
|
* composition writes `installation: true`; its rows may use the forms no application may declare, and its hop keeps
|
|
@@ -106,6 +112,14 @@ export interface ProxyManifest {
|
|
|
106
112
|
}
|
|
107
113
|
/** Literal LDH hostnames only: Caddy reads wildcard labels and placeholders as routing patterns. */
|
|
108
114
|
export declare function isProxyHost(host: string): boolean;
|
|
115
|
+
export interface DevSandboxEntryId {
|
|
116
|
+
readonly appId: string;
|
|
117
|
+
readonly workspaceId: string;
|
|
118
|
+
}
|
|
119
|
+
/** The entry id of one workspace's dev sandbox, `dev:<appId>:<workspaceId>`. Throws on a part that would not parse back. */
|
|
120
|
+
export declare function devSandboxEntryId(appId: string, workspaceId: string): string;
|
|
121
|
+
/** The parts of `dev:<appId>:<workspaceId>`, or null for any other string. */
|
|
122
|
+
export declare function parseDevSandboxEntryId(id: string): DevSandboxEntryId | null;
|
|
109
123
|
/**
|
|
110
124
|
* One row a contract declares, of a contract app's endpoint table; it refuses a digest that does not describe the row's
|
|
111
125
|
* rules. It never admits the ops row, which only `contractProxyAppSchema` reads.
|
|
@@ -2757,6 +2771,8 @@ export declare const contractProxyAppSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2757
2771
|
}>;
|
|
2758
2772
|
operationsOrigin: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
2759
2773
|
crossOrigins: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "atleastone">>;
|
|
2774
|
+
audience: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
2775
|
+
upstreamHost: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
2760
2776
|
id: z.ZodEffects<z.ZodString, string, string>;
|
|
2761
2777
|
hosts: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
|
|
2762
2778
|
upstream: z.ZodString;
|
|
@@ -2874,8 +2890,10 @@ export declare const contractProxyAppSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2874
2890
|
snapshot: string;
|
|
2875
2891
|
hosts: string[];
|
|
2876
2892
|
upstream: string;
|
|
2893
|
+
audience?: string | undefined;
|
|
2877
2894
|
operationsOrigin?: string | undefined;
|
|
2878
2895
|
crossOrigins?: [string, ...string[]] | undefined;
|
|
2896
|
+
upstreamHost?: string | undefined;
|
|
2879
2897
|
}, {
|
|
2880
2898
|
csp: {
|
|
2881
2899
|
connectSrc: string[];
|
|
@@ -2990,8 +3008,10 @@ export declare const contractProxyAppSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2990
3008
|
hosts: string[];
|
|
2991
3009
|
upstream: string;
|
|
2992
3010
|
scheme?: unknown;
|
|
3011
|
+
audience?: string | undefined;
|
|
2993
3012
|
operationsOrigin?: string | undefined;
|
|
2994
3013
|
crossOrigins?: [string, ...string[]] | undefined;
|
|
3014
|
+
upstreamHost?: string | undefined;
|
|
2995
3015
|
}>, {
|
|
2996
3016
|
csp: {
|
|
2997
3017
|
scriptSrc: string[];
|
|
@@ -3106,8 +3126,10 @@ export declare const contractProxyAppSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3106
3126
|
snapshot: string;
|
|
3107
3127
|
hosts: string[];
|
|
3108
3128
|
upstream: string;
|
|
3129
|
+
audience?: string | undefined;
|
|
3109
3130
|
operationsOrigin?: string | undefined;
|
|
3110
3131
|
crossOrigins?: [string, ...string[]] | undefined;
|
|
3132
|
+
upstreamHost?: string | undefined;
|
|
3111
3133
|
}, {
|
|
3112
3134
|
csp: {
|
|
3113
3135
|
connectSrc: string[];
|
|
@@ -3222,8 +3244,10 @@ export declare const contractProxyAppSchema: z.ZodEffects<z.ZodObject<{
|
|
|
3222
3244
|
hosts: string[];
|
|
3223
3245
|
upstream: string;
|
|
3224
3246
|
scheme?: unknown;
|
|
3247
|
+
audience?: string | undefined;
|
|
3225
3248
|
operationsOrigin?: string | undefined;
|
|
3226
3249
|
crossOrigins?: [string, ...string[]] | undefined;
|
|
3250
|
+
upstreamHost?: string | undefined;
|
|
3227
3251
|
}>;
|
|
3228
3252
|
/** One row of an installation entry: the installation forms, and no application form but `health`. */
|
|
3229
3253
|
export declare const installationProxyEndpointRowSchema: z.ZodEffects<z.ZodUnion<[z.ZodEffects<z.ZodObject<{
|
|
@@ -5247,6 +5271,8 @@ export declare const proxyAppSchema: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
|
|
|
5247
5271
|
}>;
|
|
5248
5272
|
operationsOrigin: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
5249
5273
|
crossOrigins: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "atleastone">>;
|
|
5274
|
+
audience: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
5275
|
+
upstreamHost: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
5250
5276
|
id: z.ZodEffects<z.ZodString, string, string>;
|
|
5251
5277
|
hosts: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
|
|
5252
5278
|
upstream: z.ZodString;
|
|
@@ -5364,8 +5390,10 @@ export declare const proxyAppSchema: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
|
|
|
5364
5390
|
snapshot: string;
|
|
5365
5391
|
hosts: string[];
|
|
5366
5392
|
upstream: string;
|
|
5393
|
+
audience?: string | undefined;
|
|
5367
5394
|
operationsOrigin?: string | undefined;
|
|
5368
5395
|
crossOrigins?: [string, ...string[]] | undefined;
|
|
5396
|
+
upstreamHost?: string | undefined;
|
|
5369
5397
|
}, {
|
|
5370
5398
|
csp: {
|
|
5371
5399
|
connectSrc: string[];
|
|
@@ -5480,8 +5508,10 @@ export declare const proxyAppSchema: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
|
|
|
5480
5508
|
hosts: string[];
|
|
5481
5509
|
upstream: string;
|
|
5482
5510
|
scheme?: unknown;
|
|
5511
|
+
audience?: string | undefined;
|
|
5483
5512
|
operationsOrigin?: string | undefined;
|
|
5484
5513
|
crossOrigins?: [string, ...string[]] | undefined;
|
|
5514
|
+
upstreamHost?: string | undefined;
|
|
5485
5515
|
}>, {
|
|
5486
5516
|
csp: {
|
|
5487
5517
|
scriptSrc: string[];
|
|
@@ -5596,8 +5626,10 @@ export declare const proxyAppSchema: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
|
|
|
5596
5626
|
snapshot: string;
|
|
5597
5627
|
hosts: string[];
|
|
5598
5628
|
upstream: string;
|
|
5629
|
+
audience?: string | undefined;
|
|
5599
5630
|
operationsOrigin?: string | undefined;
|
|
5600
5631
|
crossOrigins?: [string, ...string[]] | undefined;
|
|
5632
|
+
upstreamHost?: string | undefined;
|
|
5601
5633
|
}, {
|
|
5602
5634
|
csp: {
|
|
5603
5635
|
connectSrc: string[];
|
|
@@ -5712,8 +5744,10 @@ export declare const proxyAppSchema: z.ZodUnion<[z.ZodEffects<z.ZodObject<{
|
|
|
5712
5744
|
hosts: string[];
|
|
5713
5745
|
upstream: string;
|
|
5714
5746
|
scheme?: unknown;
|
|
5747
|
+
audience?: string | undefined;
|
|
5715
5748
|
operationsOrigin?: string | undefined;
|
|
5716
5749
|
crossOrigins?: [string, ...string[]] | undefined;
|
|
5750
|
+
upstreamHost?: string | undefined;
|
|
5717
5751
|
}>, z.ZodEffects<z.ZodObject<{
|
|
5718
5752
|
scheme: z.ZodEffects<z.ZodDefault<z.ZodEnum<["http", "https"]>>, "http" | "https", unknown>;
|
|
5719
5753
|
installation: z.ZodLiteral<true>;
|
|
@@ -6170,6 +6204,9 @@ export interface ContractEntryPlacement {
|
|
|
6170
6204
|
readonly operationsOrigin?: string;
|
|
6171
6205
|
/** The environment's list from Control's registry; an empty one is omitted. */
|
|
6172
6206
|
readonly crossOrigins?: readonly string[];
|
|
6207
|
+
/** A dev sandbox entry's `<app>@<env>`; see `ContractProxyApp.audience`. */
|
|
6208
|
+
readonly audience?: string;
|
|
6209
|
+
readonly upstreamHost?: string;
|
|
6173
6210
|
}
|
|
6174
6211
|
/**
|
|
6175
6212
|
* What the proxy of one older platform release parses of an application's manifest entry: a row, and the entry's CSP
|
|
@@ -7566,6 +7603,8 @@ export declare const proxyManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
7566
7603
|
}>;
|
|
7567
7604
|
operationsOrigin: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
7568
7605
|
crossOrigins: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "atleastone">>;
|
|
7606
|
+
audience: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
7607
|
+
upstreamHost: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
7569
7608
|
id: z.ZodEffects<z.ZodString, string, string>;
|
|
7570
7609
|
hosts: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
|
|
7571
7610
|
upstream: z.ZodString;
|
|
@@ -7683,8 +7722,10 @@ export declare const proxyManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
7683
7722
|
snapshot: string;
|
|
7684
7723
|
hosts: string[];
|
|
7685
7724
|
upstream: string;
|
|
7725
|
+
audience?: string | undefined;
|
|
7686
7726
|
operationsOrigin?: string | undefined;
|
|
7687
7727
|
crossOrigins?: [string, ...string[]] | undefined;
|
|
7728
|
+
upstreamHost?: string | undefined;
|
|
7688
7729
|
}, {
|
|
7689
7730
|
csp: {
|
|
7690
7731
|
connectSrc: string[];
|
|
@@ -7799,8 +7840,10 @@ export declare const proxyManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
7799
7840
|
hosts: string[];
|
|
7800
7841
|
upstream: string;
|
|
7801
7842
|
scheme?: unknown;
|
|
7843
|
+
audience?: string | undefined;
|
|
7802
7844
|
operationsOrigin?: string | undefined;
|
|
7803
7845
|
crossOrigins?: [string, ...string[]] | undefined;
|
|
7846
|
+
upstreamHost?: string | undefined;
|
|
7804
7847
|
}>, {
|
|
7805
7848
|
csp: {
|
|
7806
7849
|
scriptSrc: string[];
|
|
@@ -7915,8 +7958,10 @@ export declare const proxyManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
7915
7958
|
snapshot: string;
|
|
7916
7959
|
hosts: string[];
|
|
7917
7960
|
upstream: string;
|
|
7961
|
+
audience?: string | undefined;
|
|
7918
7962
|
operationsOrigin?: string | undefined;
|
|
7919
7963
|
crossOrigins?: [string, ...string[]] | undefined;
|
|
7964
|
+
upstreamHost?: string | undefined;
|
|
7920
7965
|
}, {
|
|
7921
7966
|
csp: {
|
|
7922
7967
|
connectSrc: string[];
|
|
@@ -8031,8 +8076,10 @@ export declare const proxyManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
8031
8076
|
hosts: string[];
|
|
8032
8077
|
upstream: string;
|
|
8033
8078
|
scheme?: unknown;
|
|
8079
|
+
audience?: string | undefined;
|
|
8034
8080
|
operationsOrigin?: string | undefined;
|
|
8035
8081
|
crossOrigins?: [string, ...string[]] | undefined;
|
|
8082
|
+
upstreamHost?: string | undefined;
|
|
8036
8083
|
}>, z.ZodEffects<z.ZodObject<{
|
|
8037
8084
|
scheme: z.ZodEffects<z.ZodDefault<z.ZodEnum<["http", "https"]>>, "http" | "https", unknown>;
|
|
8038
8085
|
installation: z.ZodLiteral<true>;
|
|
@@ -8635,8 +8682,10 @@ export declare const proxyManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
8635
8682
|
snapshot: string;
|
|
8636
8683
|
hosts: string[];
|
|
8637
8684
|
upstream: string;
|
|
8685
|
+
audience?: string | undefined;
|
|
8638
8686
|
operationsOrigin?: string | undefined;
|
|
8639
8687
|
crossOrigins?: [string, ...string[]] | undefined;
|
|
8688
|
+
upstreamHost?: string | undefined;
|
|
8640
8689
|
} | {
|
|
8641
8690
|
endpoints: ({
|
|
8642
8691
|
kind: "service";
|
|
@@ -8809,8 +8858,10 @@ export declare const proxyManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
8809
8858
|
hosts: string[];
|
|
8810
8859
|
upstream: string;
|
|
8811
8860
|
scheme?: unknown;
|
|
8861
|
+
audience?: string | undefined;
|
|
8812
8862
|
operationsOrigin?: string | undefined;
|
|
8813
8863
|
crossOrigins?: [string, ...string[]] | undefined;
|
|
8864
|
+
upstreamHost?: string | undefined;
|
|
8814
8865
|
} | {
|
|
8815
8866
|
endpoints: ({
|
|
8816
8867
|
kind: "service";
|
|
@@ -8983,8 +9034,10 @@ export declare const proxyManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
8983
9034
|
snapshot: string;
|
|
8984
9035
|
hosts: string[];
|
|
8985
9036
|
upstream: string;
|
|
9037
|
+
audience?: string | undefined;
|
|
8986
9038
|
operationsOrigin?: string | undefined;
|
|
8987
9039
|
crossOrigins?: [string, ...string[]] | undefined;
|
|
9040
|
+
upstreamHost?: string | undefined;
|
|
8988
9041
|
} | {
|
|
8989
9042
|
endpoints: ({
|
|
8990
9043
|
kind: "service";
|
|
@@ -9157,8 +9210,10 @@ export declare const proxyManifestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
9157
9210
|
hosts: string[];
|
|
9158
9211
|
upstream: string;
|
|
9159
9212
|
scheme?: unknown;
|
|
9213
|
+
audience?: string | undefined;
|
|
9160
9214
|
operationsOrigin?: string | undefined;
|
|
9161
9215
|
crossOrigins?: [string, ...string[]] | undefined;
|
|
9216
|
+
upstreamHost?: string | undefined;
|
|
9162
9217
|
} | {
|
|
9163
9218
|
endpoints: ({
|
|
9164
9219
|
kind: "service";
|