@naylence/runtime 0.3.5-test.923 → 0.3.5-test.924
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/dist/browser/index.cjs +212 -136
- package/dist/browser/index.mjs +204 -131
- package/dist/cjs/naylence/fame/factory-manifest.js +2 -0
- package/dist/cjs/naylence/fame/security/default-security-manager-factory.js +12 -4
- package/dist/cjs/naylence/fame/security/index.js +6 -1
- package/dist/cjs/naylence/fame/security/trust-store/noop-trust-store-provider-factory.js +23 -0
- package/dist/cjs/naylence/fame/security/trust-store/trust-store-provider-factory.js +44 -0
- package/dist/cjs/naylence/fame/security/trust-store/trust-store-provider.js +2 -0
- package/dist/cjs/version.js +2 -2
- package/dist/esm/naylence/fame/factory-manifest.js +2 -0
- package/dist/esm/naylence/fame/security/default-security-manager-factory.js +12 -4
- package/dist/esm/naylence/fame/security/index.js +2 -0
- package/dist/esm/naylence/fame/security/trust-store/noop-trust-store-provider-factory.js +19 -0
- package/dist/esm/naylence/fame/security/trust-store/trust-store-provider-factory.js +39 -0
- package/dist/esm/naylence/fame/security/trust-store/trust-store-provider.js +1 -0
- package/dist/esm/version.js +2 -2
- package/dist/node/index.cjs +208 -132
- package/dist/node/index.mjs +204 -131
- package/dist/node/node.cjs +208 -132
- package/dist/node/node.mjs +204 -131
- package/dist/types/naylence/fame/factory-manifest.d.ts +1 -1
- package/dist/types/naylence/fame/security/default-security-manager-factory.d.ts +3 -0
- package/dist/types/naylence/fame/security/index.d.ts +3 -0
- package/dist/types/naylence/fame/security/security-manager-factory.d.ts +2 -0
- package/dist/types/naylence/fame/security/trust-store/noop-trust-store-provider-factory.d.ts +18 -0
- package/dist/types/naylence/fame/security/trust-store/trust-store-provider-factory.d.ts +27 -0
- package/dist/types/naylence/fame/security/trust-store/trust-store-provider.d.ts +42 -0
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Provides the list of runtime factory modules for registration.
|
|
6
6
|
*/
|
|
7
|
-
export declare const MODULES: readonly ["./connector/broadcast-channel-connector-factory.js", "./connector/broadcast-channel-listener-factory.js", "./connector/http-listener-factory.js", "./connector/http-stateless-connector-factory.js", "./connector/inpage-connector-factory.js", "./connector/inpage-listener-factory.js", "./connector/websocket-connector-factory.js", "./connector/websocket-listener-factory.js", "./delivery/at-least-once-delivery-policy-factory.js", "./delivery/at-most-once-delivery-policy-factory.js", "./delivery/delivery-profile-factory.js", "./fabric/in-process-fame-fabric-factory.js", "./node/admission/admission-profile-factory.js", "./node/admission/direct-admission-client-factory.js", "./node/admission/noop-admission-client-factory.js", "./node/admission/welcome-service-client-factory.js", "./node/node-factory.js", "./placement/static-node-placement-strategy-factory.js", "./security/auth/bearer-token-header-auth-injection-strategy-factory.js", "./security/auth/default-authorizer-factory.js", "./security/auth/jwks-jwt-token-verifier-factory.js", "./security/auth/jwt-token-issuer-factory.js", "./security/auth/jwt-token-verifier-factory.js", "./security/auth/no-auth-injection-strategy-factory.js", "./security/auth/none-token-provider-factory.js", "./security/auth/noop-authorizer-factory.js", "./security/auth/noop-token-issuer-factory.js", "./security/auth/noop-token-verifier-factory.js", "./security/auth/oauth2-authorizer-factory.js", "./security/auth/oauth2-client-credentials-token-provider-factory.js", "./security/auth/oauth2-pkce-token-provider-factory.js", "./security/auth/query-param-auth-injection-strategy-factory.js", "./security/auth/shared-secret-authorizer-factory.js", "./security/auth/shared-secret-token-provider-factory.js", "./security/auth/shared-secret-token-verifier-factory.js", "./security/auth/static-token-provider-factory.js", "./security/auth/websocket-subprotocol-auth-injection-strategy-factory.js", "./security/credential/dev-fixed-key-credential-provider-factory.js", "./security/credential/env-credential-provider-factory.js", "./security/credential/none-credential-provider-factory.js", "./security/credential/prompt-credential-provider-factory.js", "./security/credential/secret-store-credential-provider-factory.js", "./security/credential/session-key-credential-provider-factory.js", "./security/credential/static-credential-provider-factory.js", "./security/default-security-manager-factory.js", "./security/encryption/noop-encryption-manager-factory.js", "./security/encryption/noop-secure-channel-manager-factory.js", "./security/keys/default-key-manager-factory.js", "./security/keys/in-memory-key-store-factory.js", "./security/keys/noop-key-validator-factory.js", "./security/node-security-profile-factory.js", "./security/policy/default-security-policy-factory.js", "./security/policy/no-security-policy-factory.js", "./security/signing/eddsa-envelope-signer-factory.js", "./security/signing/eddsa-envelope-verifier-factory.js", "./sentinel/capability-aware-routing-policy-factory.js", "./sentinel/composite-routing-policy-factory.js", "./sentinel/hybrid-path-routing-policy-factory.js", "./sentinel/load-balancing/composite-load-balancing-strategy-factory.js", "./sentinel/load-balancing/hrw-load-balancing-strategy-factory.js", "./sentinel/load-balancing/load-balancing-profile-factory.js", "./sentinel/load-balancing/random-load-balancing-strategy-factory.js", "./sentinel/load-balancing/round-robin-load-balancing-strategy-factory.js", "./sentinel/load-balancing/sticky-load-balancing-strategy-factory.js", "./sentinel/routing-profile-factory.js", "./sentinel/sentinel-factory.js", "./sentinel/store/route-store-factory.js", "./stickiness/simple-load-balancer-stickiness-manager-factory.js", "./telemetry/noop-trace-emitter-factory.js", "./telemetry/open-telemetry-trace-emitter-factory.js", "./telemetry/trace-emitter-profile-factory.js", "./welcome/default-welcome-service-factory.js"];
|
|
7
|
+
export declare const MODULES: readonly ["./connector/broadcast-channel-connector-factory.js", "./connector/broadcast-channel-listener-factory.js", "./connector/http-listener-factory.js", "./connector/http-stateless-connector-factory.js", "./connector/inpage-connector-factory.js", "./connector/inpage-listener-factory.js", "./connector/websocket-connector-factory.js", "./connector/websocket-listener-factory.js", "./delivery/at-least-once-delivery-policy-factory.js", "./delivery/at-most-once-delivery-policy-factory.js", "./delivery/delivery-profile-factory.js", "./fabric/in-process-fame-fabric-factory.js", "./node/admission/admission-profile-factory.js", "./node/admission/direct-admission-client-factory.js", "./node/admission/noop-admission-client-factory.js", "./node/admission/welcome-service-client-factory.js", "./node/node-factory.js", "./placement/static-node-placement-strategy-factory.js", "./security/auth/bearer-token-header-auth-injection-strategy-factory.js", "./security/auth/default-authorizer-factory.js", "./security/auth/jwks-jwt-token-verifier-factory.js", "./security/auth/jwt-token-issuer-factory.js", "./security/auth/jwt-token-verifier-factory.js", "./security/auth/no-auth-injection-strategy-factory.js", "./security/auth/none-token-provider-factory.js", "./security/auth/noop-authorizer-factory.js", "./security/auth/noop-token-issuer-factory.js", "./security/auth/noop-token-verifier-factory.js", "./security/auth/oauth2-authorizer-factory.js", "./security/auth/oauth2-client-credentials-token-provider-factory.js", "./security/auth/oauth2-pkce-token-provider-factory.js", "./security/auth/query-param-auth-injection-strategy-factory.js", "./security/auth/shared-secret-authorizer-factory.js", "./security/auth/shared-secret-token-provider-factory.js", "./security/auth/shared-secret-token-verifier-factory.js", "./security/auth/static-token-provider-factory.js", "./security/auth/websocket-subprotocol-auth-injection-strategy-factory.js", "./security/credential/dev-fixed-key-credential-provider-factory.js", "./security/credential/env-credential-provider-factory.js", "./security/credential/none-credential-provider-factory.js", "./security/credential/prompt-credential-provider-factory.js", "./security/credential/secret-store-credential-provider-factory.js", "./security/credential/session-key-credential-provider-factory.js", "./security/credential/static-credential-provider-factory.js", "./security/default-security-manager-factory.js", "./security/encryption/noop-encryption-manager-factory.js", "./security/encryption/noop-secure-channel-manager-factory.js", "./security/keys/default-key-manager-factory.js", "./security/keys/in-memory-key-store-factory.js", "./security/keys/noop-key-validator-factory.js", "./security/node-security-profile-factory.js", "./security/policy/default-security-policy-factory.js", "./security/policy/no-security-policy-factory.js", "./security/signing/eddsa-envelope-signer-factory.js", "./security/signing/eddsa-envelope-verifier-factory.js", "./security/trust-store/noop-trust-store-provider-factory.js", "./sentinel/capability-aware-routing-policy-factory.js", "./sentinel/composite-routing-policy-factory.js", "./sentinel/hybrid-path-routing-policy-factory.js", "./sentinel/load-balancing/composite-load-balancing-strategy-factory.js", "./sentinel/load-balancing/hrw-load-balancing-strategy-factory.js", "./sentinel/load-balancing/load-balancing-profile-factory.js", "./sentinel/load-balancing/random-load-balancing-strategy-factory.js", "./sentinel/load-balancing/round-robin-load-balancing-strategy-factory.js", "./sentinel/load-balancing/sticky-load-balancing-strategy-factory.js", "./sentinel/routing-profile-factory.js", "./sentinel/sentinel-factory.js", "./sentinel/store/route-store-factory.js", "./stickiness/simple-load-balancer-stickiness-manager-factory.js", "./telemetry/noop-trace-emitter-factory.js", "./telemetry/open-telemetry-trace-emitter-factory.js", "./telemetry/trace-emitter-profile-factory.js", "./welcome/default-welcome-service-factory.js"];
|
|
8
8
|
export type FactoryModuleSpec = (typeof MODULES)[number];
|
|
9
9
|
export type FactoryModuleLoader = () => Promise<Record<string, unknown>>;
|
|
10
10
|
export declare const MODULE_LOADERS: Record<FactoryModuleSpec, FactoryModuleLoader>;
|
|
@@ -14,6 +14,7 @@ import { SecurityManagerFactory, type SecurityManagerComponentOverrides } from '
|
|
|
14
14
|
import type { SecurityManagerConfig } from './security-manager-config.js';
|
|
15
15
|
import type { NodeEventListener } from '../node/node-event-listener.js';
|
|
16
16
|
import type { CryptoProvider } from './crypto/providers/crypto-provider.js';
|
|
17
|
+
import type { TrustStoreProvider } from './trust-store/trust-store-provider.js';
|
|
17
18
|
export interface DefaultSecurityManagerConfig extends SecurityManagerConfig {
|
|
18
19
|
type: 'DefaultSecurityManager';
|
|
19
20
|
policy?: SecurityPolicy | Record<string, unknown> | null;
|
|
@@ -37,6 +38,8 @@ export interface DefaultSecurityManagerConfig extends SecurityManagerConfig {
|
|
|
37
38
|
event_listeners?: NodeEventListener[] | null;
|
|
38
39
|
cryptoProvider?: CryptoProvider | null;
|
|
39
40
|
crypto_provider?: CryptoProvider | null;
|
|
41
|
+
trustStoreProvider?: TrustStoreProvider | null;
|
|
42
|
+
trust_store_provider?: TrustStoreProvider | null;
|
|
40
43
|
[key: string]: unknown;
|
|
41
44
|
}
|
|
42
45
|
export declare const FACTORY_META: {
|
|
@@ -18,6 +18,9 @@ export * from './auth/token.js';
|
|
|
18
18
|
export * from './cert/certificate-manager.js';
|
|
19
19
|
export { CERTIFICATE_MANAGER_FACTORY_BASE_TYPE, CertificateManagerFactory, } from './cert/certificate-manager-factory.js';
|
|
20
20
|
export type * from './cert/certificate-manager-factory.js';
|
|
21
|
+
export * from './trust-store/trust-store-provider.js';
|
|
22
|
+
export { TRUST_STORE_PROVIDER_FACTORY_BASE_TYPE, TrustStoreProviderFactory, NoopTrustStoreProvider, } from './trust-store/trust-store-provider-factory.js';
|
|
23
|
+
export type * from './trust-store/trust-store-provider-factory.js';
|
|
21
24
|
export * from './encryption/encryption-manager.js';
|
|
22
25
|
export { ENCRYPTION_MANAGER_FACTORY_BASE_TYPE } from './encryption/encryption-manager-factory.js';
|
|
23
26
|
export * from './encryption/encryption-manager-factory.js';
|
|
@@ -12,6 +12,7 @@ import type { CertificateManager } from './cert/certificate-manager.js';
|
|
|
12
12
|
import type { SecureChannelManager } from './encryption/secure-channel-manager.js';
|
|
13
13
|
import type { NodeEventListener } from '../node/node-event-listener.js';
|
|
14
14
|
import type { CryptoProvider } from './crypto/providers/crypto-provider.js';
|
|
15
|
+
import type { TrustStoreProvider } from './trust-store/trust-store-provider.js';
|
|
15
16
|
export declare const SECURITY_MANAGER_FACTORY_BASE_TYPE = "SecurityManagerFactory";
|
|
16
17
|
export interface SecurityManagerComponentOverrides {
|
|
17
18
|
policy?: SecurityPolicy | null;
|
|
@@ -25,6 +26,7 @@ export interface SecurityManagerComponentOverrides {
|
|
|
25
26
|
secureChannelManager?: SecureChannelManager | null;
|
|
26
27
|
eventListeners?: NodeEventListener[] | null;
|
|
27
28
|
cryptoProvider?: CryptoProvider | null;
|
|
29
|
+
trustStoreProvider?: TrustStoreProvider | null;
|
|
28
30
|
}
|
|
29
31
|
export declare abstract class SecurityManagerFactory<C extends SecurityManagerConfig = SecurityManagerConfig> extends AbstractResourceFactory<SecurityManager, C> {
|
|
30
32
|
abstract create(config?: C | Record<string, unknown> | null, overrides?: SecurityManagerComponentOverrides | null): Promise<SecurityManager>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TrustStoreProviderFactory, type TrustStoreProviderConfig } from "./trust-store-provider-factory.js";
|
|
2
|
+
import type { TrustStoreProvider } from "./trust-store-provider.js";
|
|
3
|
+
export interface NoopTrustStoreProviderConfig extends TrustStoreProviderConfig {
|
|
4
|
+
readonly type: "NoopTrustStoreProvider";
|
|
5
|
+
}
|
|
6
|
+
export declare const FACTORY_META: {
|
|
7
|
+
readonly base: "TrustStoreProviderFactory";
|
|
8
|
+
readonly key: "NoopTrustStoreProvider";
|
|
9
|
+
readonly isDefault: true;
|
|
10
|
+
readonly priority: 10;
|
|
11
|
+
};
|
|
12
|
+
export declare class NoopTrustStoreProviderFactory extends TrustStoreProviderFactory<NoopTrustStoreProviderConfig> {
|
|
13
|
+
readonly type = "NoopTrustStoreProvider";
|
|
14
|
+
readonly isDefault = true;
|
|
15
|
+
readonly priority = 10;
|
|
16
|
+
create(_config?: NoopTrustStoreProviderConfig | Record<string, unknown> | null, ..._factoryArgs: unknown[]): Promise<TrustStoreProvider>;
|
|
17
|
+
}
|
|
18
|
+
export default NoopTrustStoreProviderFactory;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { CreateResourceOptions, ResourceConfig } from "@naylence/factory";
|
|
2
|
+
import { AbstractResourceFactory } from "@naylence/factory";
|
|
3
|
+
import type { TrustAnchor, TrustStoreProvider } from "./trust-store-provider.js";
|
|
4
|
+
export interface TrustStoreProviderConfig extends ResourceConfig {
|
|
5
|
+
readonly type: string;
|
|
6
|
+
}
|
|
7
|
+
export interface TrustStoreProviderDependencies {
|
|
8
|
+
readonly env?: Record<string, unknown> | null;
|
|
9
|
+
readonly [key: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
export interface CreateTrustStoreProviderOptions extends Omit<CreateResourceOptions, "factoryArgs"> {
|
|
12
|
+
readonly factoryArgs?: unknown[];
|
|
13
|
+
readonly dependencies?: TrustStoreProviderDependencies;
|
|
14
|
+
}
|
|
15
|
+
export declare const TRUST_STORE_PROVIDER_FACTORY_BASE_TYPE = "TrustStoreProviderFactory";
|
|
16
|
+
export declare abstract class TrustStoreProviderFactory<C extends TrustStoreProviderConfig = TrustStoreProviderConfig> extends AbstractResourceFactory<TrustStoreProvider, C> {
|
|
17
|
+
abstract create(config?: C | Record<string, unknown> | null, ...factoryArgs: unknown[]): Promise<TrustStoreProvider>;
|
|
18
|
+
protected createUnconfiguredProvider(reason?: string): TrustStoreProvider;
|
|
19
|
+
static createTrustStoreProvider<C extends TrustStoreProviderConfig = TrustStoreProviderConfig>(config?: C | Record<string, unknown> | null, options?: CreateTrustStoreProviderOptions): Promise<TrustStoreProvider>;
|
|
20
|
+
}
|
|
21
|
+
export declare class NoopTrustStoreProvider implements TrustStoreProvider {
|
|
22
|
+
private readonly reason;
|
|
23
|
+
constructor(reason?: string);
|
|
24
|
+
getTrustStorePem(): Promise<string>;
|
|
25
|
+
getRoots(): Promise<readonly TrustAnchor[]>;
|
|
26
|
+
initialize(): Promise<void>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export interface TrustAnchor {
|
|
2
|
+
readonly pem: string;
|
|
3
|
+
readonly kid?: string;
|
|
4
|
+
readonly notBefore?: string;
|
|
5
|
+
readonly notAfter?: string;
|
|
6
|
+
readonly spkiSha256?: string;
|
|
7
|
+
readonly version?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface TrustStoreProvider {
|
|
10
|
+
/**
|
|
11
|
+
* Resolve the PEM-encoded trust bundle used for certificate verification. Implementations
|
|
12
|
+
* should normalize line endings and return the same material they expose via {@link getRoots}.
|
|
13
|
+
*/
|
|
14
|
+
getTrustStorePem(): Promise<string>;
|
|
15
|
+
getRoots(): Promise<readonly TrustAnchor[]>;
|
|
16
|
+
onUpdate?(callback: () => void): () => void;
|
|
17
|
+
initialize?(): Promise<void> | void;
|
|
18
|
+
}
|
|
19
|
+
export type TrustBundleSourceType = "INLINE_PEM" | "DATA_PEM" | "FILE" | "HTTPS_BUNDLE";
|
|
20
|
+
export interface TrustBundlePins {
|
|
21
|
+
readonly hashPins?: readonly string[];
|
|
22
|
+
readonly allowedSpkis?: readonly string[];
|
|
23
|
+
readonly allowTofu?: boolean;
|
|
24
|
+
readonly refreshIntervalMs?: number;
|
|
25
|
+
}
|
|
26
|
+
export interface InlinePemSource {
|
|
27
|
+
readonly type: "INLINE_PEM";
|
|
28
|
+
readonly pem: string;
|
|
29
|
+
}
|
|
30
|
+
export interface DataPemSource {
|
|
31
|
+
readonly type: "DATA_PEM";
|
|
32
|
+
readonly dataUri: string;
|
|
33
|
+
}
|
|
34
|
+
export interface FilePemSource {
|
|
35
|
+
readonly type: "FILE";
|
|
36
|
+
readonly path: string;
|
|
37
|
+
}
|
|
38
|
+
export interface HttpsBundleSource extends TrustBundlePins {
|
|
39
|
+
readonly type: "HTTPS_BUNDLE";
|
|
40
|
+
readonly url: string;
|
|
41
|
+
}
|
|
42
|
+
export type TrustBundleSource = InlinePemSource | DataPemSource | FilePemSource | HttpsBundleSource;
|
package/dist/types/version.d.ts
CHANGED