@sdux-vault/engine 0.9.0 → 0.13.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sdux-vault/engine",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
},
|
|
12
12
|
"homepage": "https://www.sdux-vault.com",
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@sdux-vault/devtools": "0.
|
|
15
|
-
"@sdux-vault/shared": "0.
|
|
14
|
+
"@sdux-vault/devtools": "0.6.0",
|
|
15
|
+
"@sdux-vault/shared": "0.5.0",
|
|
16
16
|
"tslib": "^2.3.0"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
@@ -325,6 +325,34 @@ declare class FeatureCellClass<T> extends FeatureCellBuilder<T> {
|
|
|
325
325
|
build(): FeatureCellShape<T>;
|
|
326
326
|
}
|
|
327
327
|
|
|
328
|
+
/**
|
|
329
|
+
* Static license verification utility used to validate signed license tokens
|
|
330
|
+
* against tier-specific public keys. Tokens use a dot-separated format:
|
|
331
|
+
* `base64(payload).base64(signature)`.
|
|
332
|
+
*
|
|
333
|
+
* The verification process:
|
|
334
|
+
* - Splits the token on `.` to extract the encoded payload and signature
|
|
335
|
+
* - Decodes the payload from base64 to determine the license tier
|
|
336
|
+
* - Rejects tokens with missing or unrecognized tier
|
|
337
|
+
* - Loads the appropriate PEM-encoded public key for the tier
|
|
338
|
+
* - Uses `crypto.subtle.verify()` (RSA-SHA256) to validate the signature
|
|
339
|
+
* against the raw base64-encoded payload string
|
|
340
|
+
*
|
|
341
|
+
* Verification failures return `false` rather than throwing.
|
|
342
|
+
*/
|
|
343
|
+
declare const VerifyLicenseToken: {
|
|
344
|
+
/**
|
|
345
|
+
* Verifies the supplied signed license token using the public key associated
|
|
346
|
+
* with its declared tier.
|
|
347
|
+
*
|
|
348
|
+
* @param token - A dot-separated token in the format
|
|
349
|
+
* `base64(payload).base64(signature)`.
|
|
350
|
+
* @returns A promise resolving to `true` if the signature validates;
|
|
351
|
+
* otherwise `false`.
|
|
352
|
+
*/
|
|
353
|
+
verify: (token: string) => Promise<boolean>;
|
|
354
|
+
};
|
|
355
|
+
|
|
328
356
|
interface RegisteredFeatureCellShape {
|
|
329
357
|
key: string;
|
|
330
358
|
}
|
|
@@ -344,6 +372,7 @@ declare function resetVaultForTests(): void;
|
|
|
344
372
|
declare function resetFeatureCellRegistry(): void;
|
|
345
373
|
declare function getVaultRegistryForTests(): ReadonlyMap<string, VaultRegistrationShape> | undefined;
|
|
346
374
|
declare function isAuthorizedKey(key: string): boolean;
|
|
375
|
+
declare function isBypassLicensing(): boolean;
|
|
347
376
|
declare function hasVaultLicense(): boolean;
|
|
348
377
|
|
|
349
378
|
declare abstract class LicensingAbstract<T> {
|
|
@@ -386,5 +415,5 @@ declare function getFeatureCellToken(key: string): FeatureCellToken;
|
|
|
386
415
|
*/
|
|
387
416
|
declare const isPipelineTerminal: <T>(current: FinalState<T>) => boolean;
|
|
388
417
|
|
|
389
|
-
export { Conductor, FeatureCellClass, LicensingAbstract, VAULT_LICENSE_ID, VaultCore, createFeatureCellToken, getFeatureCellToken, getLicensePayload, getVaultRegistryForTests, hasVaultLicense, isAuthorizedKey, isPipelineTerminal, registerFeatureCell, registerVaultSettled, resetFeatureCellRegistry, resetVaultForTests, vaultAllSettled, vaultSettled };
|
|
418
|
+
export { Conductor, FeatureCellClass, LicensingAbstract, VAULT_LICENSE_ID, VaultCore, VerifyLicenseToken, createFeatureCellToken, getFeatureCellToken, getLicensePayload, getVaultRegistryForTests, hasVaultLicense, isAuthorizedKey, isBypassLicensing, isPipelineTerminal, registerFeatureCell, registerVaultSettled, resetFeatureCellRegistry, resetVaultForTests, vaultAllSettled, vaultSettled };
|
|
390
419
|
export type { ConductorConfig, FeatureCellConfig, FeatureCellShape, VaultStateRef };
|