@fabrika/auth-core 0.0.14 → 0.0.16
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 +1 -1
- package/src/environment.ts +15 -0
package/package.json
CHANGED
package/src/environment.ts
CHANGED
|
@@ -27,6 +27,21 @@
|
|
|
27
27
|
/** The environment name every bypass is gated on. Compared literally; there is no other spelling. */
|
|
28
28
|
export const LOCAL_ENVIRONMENT = 'local'
|
|
29
29
|
|
|
30
|
+
/**
|
|
31
|
+
* The ONE name an IAM issuer travels under, from the platform's own configuration to the application
|
|
32
|
+
* that verifies tokens against it ([ADR-0035](../../../docs/decisions/0035-the-platform-owns-the-application-iam-issuer.md)).
|
|
33
|
+
*
|
|
34
|
+
* PLATFORM-OWNED, which is why it is a constant here rather than a string each reader spells. It is the
|
|
35
|
+
* `iss` of every token, it is identical for every application on an installation, and the control plane
|
|
36
|
+
* is the only thing that knows it — so a deploy delivers it in `managedEnvironment` and an application
|
|
37
|
+
* that declares it for itself is refused rather than quietly pointed somewhere else.
|
|
38
|
+
*
|
|
39
|
+
* It lives in this package because everything that reads or writes it — `@fabrika/auth`, both proxies,
|
|
40
|
+
* `@fabrika/provider-contract` and the control plane — already depends on `@fabrika/auth-core`, and
|
|
41
|
+
* `@fabrika/auth-core` depends on nothing.
|
|
42
|
+
*/
|
|
43
|
+
export const FABRIKA_IAM_ISSUER = 'FABRIKA_IAM_ISSUER'
|
|
44
|
+
|
|
30
45
|
export class EnvironmentNameError extends Error {
|
|
31
46
|
constructor(publicOrigin: string) {
|
|
32
47
|
super(
|