@wtfalch/foundry 0.16.14 → 0.16.15
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.
|
@@ -259,6 +259,14 @@ export declare class FoundryPlatformStepExecutor implements PlatformStepExecutor
|
|
|
259
259
|
private executeSfu;
|
|
260
260
|
private coolifyJobs;
|
|
261
261
|
}
|
|
262
|
+
/**
|
|
263
|
+
* Every ZITADEL OIDC/management/console/asset path -- `deploy/proxy/Caddyfile`'s
|
|
264
|
+
* own explicit list, restated here as one regex since the tunnel routes by a
|
|
265
|
+
* single `path` per ingress rule rather than a set. Anything not matching
|
|
266
|
+
* falls through to the login app's own ingress rule below (login v2 answers
|
|
267
|
+
* everything else, including the root).
|
|
268
|
+
*/
|
|
269
|
+
export declare const AUTH_ZITADEL_PATH_PATTERN = "^/(oidc|oauth|saml|management|admin|system|auth|assets|debug/healthz|ui/console|\\.well-known|v2|v2beta|zitadel\\.[A-Za-z0-9.]+)(/|$)";
|
|
262
270
|
/**
|
|
263
271
|
* #283: the ref the new instance's IAM_OWNER machine token (a PAT) is
|
|
264
272
|
* delivered under, once. A host reads it back to build `zitadelForInstance`
|
|
@@ -550,7 +550,11 @@ const AUTH_BROKER_PORT = '3000';
|
|
|
550
550
|
* falls through to the login app's own ingress rule below (login v2 answers
|
|
551
551
|
* everything else, including the root).
|
|
552
552
|
*/
|
|
553
|
-
|
|
553
|
+
// `v2`, `v2beta` and `zitadel.<service>` are ZITADEL's v2 REST and connect
|
|
554
|
+
// APIs (providers' `inviteOrgOwner` calls `POST /v2/users`); without them those
|
|
555
|
+
// calls reach the login app and answer 404. The login app itself lives under
|
|
556
|
+
// `/ui/v2/login`, which none of these match.
|
|
557
|
+
export const AUTH_ZITADEL_PATH_PATTERN = '^/(oidc|oauth|saml|management|admin|system|auth|assets|debug/healthz|ui/console|\\.well-known|v2|v2beta|zitadel\\.[A-Za-z0-9.]+)(/|$)';
|
|
554
558
|
/**
|
|
555
559
|
* `@wtfalch/auth`'s own `brokerUrl` default, `<issuer>/api`
|
|
556
560
|
* (`packages/auth/src/config.ts`) -- `deploy/proxy/Caddyfile`'s own
|
|
@@ -1423,8 +1427,12 @@ async function provisionPlatformAuth(context, deps, owners = []) {
|
|
|
1423
1427
|
});
|
|
1424
1428
|
await record(PLATFORM_AUTH_SMTP_SCOPE_KEY, smtp.id);
|
|
1425
1429
|
}
|
|
1426
|
-
catch {
|
|
1427
|
-
|
|
1430
|
+
catch (error) {
|
|
1431
|
+
// The cause, with the Lettermint key redacted, so a failure says why.
|
|
1432
|
+
const cause = redactSecrets(error instanceof Error ? error.message : String(error), [
|
|
1433
|
+
mailToken,
|
|
1434
|
+
]);
|
|
1435
|
+
throw new Error(`platform:auth: could not configure ZITADEL's SMTP provider for ${hostname}: ${cause}`);
|
|
1428
1436
|
}
|
|
1429
1437
|
if (!context.recordedIds()[PLATFORM_AUTH_OWNER_INVITE_SCOPE_KEY]) {
|
|
1430
1438
|
const owner = owners[0];
|
|
@@ -1444,8 +1452,14 @@ async function provisionPlatformAuth(context, deps, owners = []) {
|
|
|
1444
1452
|
email: owner.email,
|
|
1445
1453
|
}));
|
|
1446
1454
|
}
|
|
1447
|
-
catch {
|
|
1448
|
-
|
|
1455
|
+
catch (error) {
|
|
1456
|
+
// The cause, with the owner's email and the Lettermint key redacted, so a failure says why.
|
|
1457
|
+
const cause = redactSecrets(error instanceof Error ? error.message : String(error), [
|
|
1458
|
+
owner.email,
|
|
1459
|
+
owner.email.toLowerCase(),
|
|
1460
|
+
mailToken,
|
|
1461
|
+
]);
|
|
1462
|
+
throw new Error(`platform:auth: could not invite the platform owner into ZITADEL org ${ownerOrgId}: ${cause}`);
|
|
1449
1463
|
}
|
|
1450
1464
|
await record(PLATFORM_AUTH_OWNER_INVITE_SCOPE_KEY, invitedUserId);
|
|
1451
1465
|
}
|