@qnsp/tenant-sdk 0.1.1 → 0.3.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/CHANGELOG.md CHANGED
@@ -1,5 +1,104 @@
1
1
  # @qnsp/tenant-sdk
2
2
 
3
+ ## 0.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Enforce mandatory API key at SDK construction time (BREAKING)
8
+
9
+ - All SDK clients (except @qnsp/browser-sdk) now require `apiKey` at
10
+ construction time. Constructors throw a clear error with signup URL,
11
+ free tier details, and documentation link if apiKey is missing or empty.
12
+ - Removed runtime 401 no-apiKey checks — validation is now fail-fast at
13
+ construction, not at request time.
14
+ - Removed conditional `if (apiKey)` guards on Authorization headers —
15
+ headers are always set since apiKey is guaranteed non-empty.
16
+ - @qnsp/kms-client: `apiToken` parameter is now required in the string
17
+ overload of `HttpKmsServiceClient` constructor.
18
+ - @qnsp/browser-sdk: Added opt-in telemetry module (`configureTelemetry`,
19
+ `recordTelemetryEvent`, `flushTelemetry`) for usage analytics without
20
+ collecting PII or cryptographic material. No API key required (local-only
21
+ PQC crypto).
22
+ - Updated cloud portal SDK factory functions to always pass apiKey.
23
+ - Updated crypto-inventory-service internal callers to always pass apiKey.
24
+ - Updated all SDK documentation examples to include apiKey.
25
+ - Updated developer hub quickstart code examples.
26
+
27
+ ### Patch Changes
28
+
29
+ - ad6d0d4: Automated changeset generated for staged code updates to keep release workflows fully synchronized.
30
+ - b7599c7: Automated changeset generated for staged code updates to keep release workflows fully synchronized.
31
+ - be1dd80: Automated changeset generated for staged code updates to keep release workflows fully synchronized.
32
+ - 0f7ee07: Automated changeset generated for staged code updates to keep release workflows fully synchronized.
33
+ - 2b5dff8: Automated changeset generated for staged code updates to keep release workflows fully synchronized.
34
+ - Enterprise-grade SDK hardening across all API-calling SDKs:
35
+
36
+ 1. **Constructor validation**: Runtime guards for required API key/token with developer-friendly error messages
37
+ 2. **HTTPS enforcement**: All SDKs reject non-HTTPS baseUrl in production (HTTP allowed only for localhost in development/test)
38
+ 3. **Rate limiting with retry**: 429 handling with Retry-After header support, exponential backoff (2^attempt \* baseDelay, capped 30s), configurable maxRetries (default 3) and retryDelayMs (default 1000)
39
+ 4. **Error message sanitization**: HTTP error responses no longer leak server error body text; errors report status code and status text only
40
+ 5. **Input validation**: UUID validation via Zod for all tenant/resource ID parameters (storage-sdk, search-sdk, kms-client, ai-sdk)
41
+ 6. **Telemetry hooks**: OpenTelemetry-based observability with configurable OTLP export, request counters, failure counters, and duration histograms (auth-sdk, crypto-inventory-sdk, kms-client, ai-sdk, search-sdk)
42
+
43
+ - 7256284: SDK onboarding error messages and edge gateway universal auth enforcement
44
+
45
+ - All 12 SDKs now return developer-friendly 401 error messages with signup URL
46
+ (https://cloud.qnsp.cuilabs.io/signup) and documentation links when API key
47
+ is missing and backend returns 401
48
+ - Edge gateway service proxy now enforces authentication on ALL non-health,
49
+ non-public proxy routes (previously only tenant-service and ai-orchestrator
50
+ intelligence routes required auth)
51
+ - Updated proxy enforcement E2E test to include auth header for entitlement
52
+ enforcement test (correctly expects 403 after auth, not 401 before auth)
53
+
54
+ ## 0.2.0
55
+
56
+ ### Minor Changes
57
+
58
+ - Add tenant crypto policy integration and PQC algorithm utilities to all SDKs.
59
+
60
+ ### @qnsp/tenant-sdk
61
+
62
+ - Added crypto policy management APIs: `getTenantCryptoPolicy()`, `upsertTenantCryptoPolicy()`
63
+ - Added algorithm query methods: `getAllowedKemAlgorithms()`, `getAllowedSignatureAlgorithms()`, `getDefaultKemAlgorithm()`, `getDefaultSignatureAlgorithm()`
64
+ - Added `CRYPTO_POLICY_ALGORITHMS` tier configurations
65
+ - Added `toNistAlgorithmName()` and `ALGORITHM_TO_NIST` utilities
66
+
67
+ ### @qnsp/storage-sdk
68
+
69
+ - Added `PqcMetadata` interface with `algorithmNist` field
70
+ - `initiateUpload()` now returns NIST algorithm name
71
+ - Added `toNistAlgorithmName()` utility
72
+
73
+ ### @qnsp/auth-sdk
74
+
75
+ - Added `PqcSignatureMetadata` interface
76
+ - Added `toNistAlgorithmName()` and `ALGORITHM_TO_NIST` for signature algorithms
77
+
78
+ ### @qnsp/vault-sdk
79
+
80
+ - Enhanced `VaultSecretPqcMetadata` with `algorithmNist` field
81
+ - Added `toNistAlgorithmName()` utility
82
+
83
+ ### @qnsp/kms-client
84
+
85
+ - Added `KmsPqcMetadata` interface
86
+ - `wrapKey()` now returns `algorithmNist` field
87
+ - Added `toNistAlgorithmName()` utility
88
+
89
+ ### @qnsp/audit-sdk
90
+
91
+ - Added `toNistAlgorithmName()` and `ALGORITHM_TO_NIST` for signature algorithms
92
+
93
+ ### @qnsp/access-control-sdk
94
+
95
+ - Added `toNistAlgorithmName()` and `ALGORITHM_TO_NIST` for signature algorithms
96
+
97
+ ### Documentation
98
+
99
+ - Updated all SDK documentation with crypto policy integration examples
100
+ - Added algorithm naming conventions (internal vs NIST)
101
+
3
102
  ## 0.1.1
4
103
 
5
104
  ### Patch Changes
package/README.md CHANGED
@@ -18,7 +18,7 @@ signatures generated by the control plane; the SDK forwards your payloads but do
18
18
  import { TenantClient } from "@qnsp/tenant-sdk";
19
19
 
20
20
  const tenants = new TenantClient({
21
- baseUrl: "https://tenant.qnsp.cuilabs.io",
21
+ baseUrl: "https://api.qnsp.cuilabs.io/proxy/tenant",
22
22
  apiKey: process.env.QNSP_SERVICE_TOKEN!,
23
23
  });
24
24
  ```
@@ -34,7 +34,7 @@ features, but there are no SDK-side restrictions.
34
34
  import { TenantClient } from "@qnsp/tenant-sdk";
35
35
 
36
36
  const tenants = new TenantClient({
37
- baseUrl: "https://tenant.qnsp.cuilabs.io",
37
+ baseUrl: "https://api.qnsp.cuilabs.io/proxy/tenant",
38
38
  apiKey: process.env.QNSP_SERVICE_TOKEN!,
39
39
  });
40
40
 
package/dist/index.d.ts CHANGED
@@ -7,13 +7,132 @@ import type { TenantClientTelemetry, TenantClientTelemetryConfig } from "./obser
7
7
  */
8
8
  export interface TenantClientConfig {
9
9
  readonly baseUrl: string;
10
- readonly apiKey?: string;
10
+ readonly apiKey: string;
11
11
  readonly timeoutMs?: number;
12
12
  readonly telemetry?: TenantClientTelemetry | TenantClientTelemetryConfig;
13
13
  readonly maxRetries?: number;
14
14
  readonly retryDelayMs?: number;
15
15
  }
16
16
  export type TenantStatus = "active" | "suspended" | "pending" | "deleted";
17
+ export type HsmMode = "none" | "supported" | "required";
18
+ /**
19
+ * Crypto policy tier determines which PQC algorithms are allowed.
20
+ * Maps to tenant_crypto_policies.policy_tier in tenant-service.
21
+ */
22
+ export type CryptoPolicyTier = "default" | "strict" | "maximum" | "government";
23
+ /**
24
+ * Crypto policy v1 uses profiles + tiers (evidence-first model).
25
+ */
26
+ export type QnspTier = "TIER0_LEGACY" | "TIER1_APPROVED" | "TIER2_HIGH_ASSURANCE" | "TIER3_DIVERSITY" | "TIER4_EXPERIMENTAL";
27
+ export type TenantType = "FREE_FOREVER" | "DEV_STARTER" | "DEV_PRO" | "DEV_ELITE" | "BUSINESS_TEAM" | "BUSINESS_ADVANCED" | "BUSINESS_ELITE" | "ENTERPRISE_STANDARD" | "ENTERPRISE_PRO" | "ENTERPRISE_ELITE" | "PUBLIC_SECTOR";
28
+ export type CryptoProfileId = "gov-high-assurance" | "defense-long-life-data" | "financial-hybrid-pqc" | "research-eval";
29
+ export type TenantCryptoPolicyV1Action = "CREATE" | "UPDATE" | "ROLLBACK";
30
+ export interface CryptoPolicyV1 {
31
+ readonly version: "v1";
32
+ readonly tenantType: TenantType;
33
+ readonly profile: CryptoProfileId;
34
+ readonly enabledTiers: readonly QnspTier[];
35
+ readonly tier0Expiry?: string;
36
+ readonly tier4Acknowledgement?: {
37
+ readonly nonCompliant: true;
38
+ readonly noProductionSecrets: true;
39
+ readonly approvedBy: string;
40
+ readonly approvedAt: string;
41
+ };
42
+ readonly overrides?: {
43
+ readonly allowFalcon?: boolean;
44
+ };
45
+ readonly requirements: {
46
+ readonly fipsAligned: boolean;
47
+ readonly evidenceRequired: boolean;
48
+ readonly cryptoAgilityMetadataRequired: boolean;
49
+ readonly statefulLifecycleGuards: boolean;
50
+ readonly downgradeDetection: boolean;
51
+ };
52
+ }
53
+ export interface TenantCryptoPolicyV1Record {
54
+ readonly id: string;
55
+ readonly tenantId: string;
56
+ readonly version: "v1";
57
+ readonly policy: CryptoPolicyV1;
58
+ readonly policyHash: string;
59
+ readonly etag: string;
60
+ readonly createdAt: string;
61
+ readonly createdByPrincipal: string;
62
+ readonly createdByIp: string | null;
63
+ readonly updatedAt: string;
64
+ readonly updatedByPrincipal: string;
65
+ readonly updatedByIp: string | null;
66
+ }
67
+ export interface TenantCryptoPolicyV1HistoryRecord {
68
+ readonly id: string;
69
+ readonly tenantId: string;
70
+ readonly version: "v1";
71
+ readonly policy: CryptoPolicyV1;
72
+ readonly policyHash: string;
73
+ readonly action: TenantCryptoPolicyV1Action;
74
+ readonly reason: string | null;
75
+ readonly changedAt: string;
76
+ readonly changedByPrincipal: string;
77
+ readonly changedByIp: string | null;
78
+ }
79
+ export interface TenantCryptoPolicyV1HistoryResponse {
80
+ readonly tenantId: string;
81
+ readonly items: readonly TenantCryptoPolicyV1HistoryRecord[];
82
+ }
83
+ /**
84
+ * Tenant crypto policy configuration.
85
+ */
86
+ export interface TenantCryptoPolicy {
87
+ readonly tenantId: string;
88
+ readonly policyTier: CryptoPolicyTier;
89
+ readonly customAllowedKemAlgorithms: readonly string[] | null;
90
+ readonly customAllowedSignatureAlgorithms: readonly string[] | null;
91
+ readonly customAllowedSymmetricAlgorithms?: readonly string[] | null;
92
+ readonly customForbiddenAlgorithms?: readonly string[] | null;
93
+ readonly requireHsmForRootKeys: boolean;
94
+ readonly maxKeyAgeDays: number;
95
+ readonly enforcementMode?: "audit" | "enforce";
96
+ readonly createdAt: string;
97
+ readonly updatedAt: string;
98
+ }
99
+ /**
100
+ * Input for creating or updating a tenant crypto policy.
101
+ */
102
+ export interface TenantCryptoPolicyInput {
103
+ readonly policyTier: CryptoPolicyTier;
104
+ readonly customAllowedKemAlgorithms?: readonly string[] | null;
105
+ readonly customAllowedSignatureAlgorithms?: readonly string[] | null;
106
+ readonly requireHsmForRootKeys?: boolean;
107
+ readonly maxKeyAgeDays?: number;
108
+ }
109
+ /**
110
+ * Algorithm configuration per crypto policy tier.
111
+ */
112
+ export interface TierAlgorithmConfig {
113
+ readonly kemAlgorithms: readonly string[];
114
+ readonly signatureAlgorithms: readonly string[];
115
+ readonly defaultKemAlgorithm: string;
116
+ readonly defaultSignatureAlgorithm: string;
117
+ }
118
+ /**
119
+ * Default algorithms per crypto policy tier.
120
+ */
121
+ export declare const CRYPTO_POLICY_ALGORITHMS: Record<CryptoPolicyTier, TierAlgorithmConfig>;
122
+ /**
123
+ * Mapping from internal algorithm names to NIST/standards display names.
124
+ * Covers all 90 PQC algorithms supported by QNSP.
125
+ * Canonical source: @qnsp/cryptography pqc-standards.ts ALGORITHM_NIST_NAMES
126
+ */
127
+ export declare const ALGORITHM_TO_NIST: Record<string, string>;
128
+ /**
129
+ * Convert internal algorithm name to NIST standardized name.
130
+ */
131
+ export declare function toNistAlgorithmName(internal: string): string;
132
+ /**
133
+ * Get algorithm config for a crypto policy tier.
134
+ */
135
+ export declare function getAlgorithmConfigForTier(tier: CryptoPolicyTier): TierAlgorithmConfig;
17
136
  export interface TenantSecurityEnvelope {
18
137
  readonly controlPlaneTokenSha256: string | null;
19
138
  readonly pqcSignatures: readonly {
@@ -47,6 +166,7 @@ export interface Tenant {
47
166
  readonly plan: string;
48
167
  readonly region: string;
49
168
  readonly complianceTags: readonly string[];
169
+ readonly hsmMode: HsmMode;
50
170
  readonly metadata: Record<string, unknown>;
51
171
  readonly security: TenantSecurityEnvelope;
52
172
  readonly domains: readonly TenantDomain[];
@@ -59,6 +179,7 @@ export interface CreateTenantRequest {
59
179
  readonly plan?: string;
60
180
  readonly region?: string;
61
181
  readonly complianceTags?: readonly string[];
182
+ readonly hsmMode?: HsmMode;
62
183
  readonly metadata?: Record<string, unknown>;
63
184
  readonly domains?: readonly {
64
185
  readonly domain: string;
@@ -71,6 +192,7 @@ export interface UpdateTenantRequest {
71
192
  readonly plan?: string;
72
193
  readonly status?: TenantStatus;
73
194
  readonly complianceTags?: readonly string[];
195
+ readonly hsmMode?: HsmMode;
74
196
  readonly metadata?: Record<string, unknown>;
75
197
  readonly security: TenantSecurityEnvelope;
76
198
  readonly signature?: TenantSignature;
@@ -110,6 +232,73 @@ export declare class TenantClient {
110
232
  readonly limit?: number;
111
233
  readonly cursor?: string;
112
234
  }): Promise<ListTenantsResponse>;
235
+ /**
236
+ * Get the crypto policy for a tenant.
237
+ * Returns the tenant's crypto policy configuration including allowed algorithms.
238
+ * If no policy exists, a default policy is created and returned.
239
+ */
240
+ getTenantCryptoPolicy(tenantId: string): Promise<TenantCryptoPolicy>;
241
+ /**
242
+ * Get the v1 crypto policy for a tenant (profiles + tiers model).
243
+ * If no policy exists, a default policy is created and returned.
244
+ */
245
+ getTenantCryptoPolicyV1(tenantId: string): Promise<TenantCryptoPolicyV1Record>;
246
+ /**
247
+ * List v1 crypto policy history entries.
248
+ */
249
+ listTenantCryptoPolicyV1History(tenantId: string, options?: {
250
+ readonly limit?: number;
251
+ }): Promise<TenantCryptoPolicyV1HistoryResponse>;
252
+ /**
253
+ * Create or update the crypto policy for a tenant.
254
+ * Sets the policy tier and optional custom algorithm restrictions.
255
+ */
256
+ upsertTenantCryptoPolicy(tenantId: string, policy: TenantCryptoPolicyInput): Promise<TenantCryptoPolicy>;
257
+ /**
258
+ * Update the v1 crypto policy for a tenant (requires If-Match with current ETag).
259
+ */
260
+ updateTenantCryptoPolicyV1(tenantId: string, policy: CryptoPolicyV1, etag: string): Promise<TenantCryptoPolicyV1Record>;
261
+ /**
262
+ * Enable Tier0 legacy algorithms (time-bounded) for a tenant.
263
+ */
264
+ enableTier0Legacy(tenantId: string, input: {
265
+ readonly expiry: string;
266
+ }, etag: string): Promise<TenantCryptoPolicyV1Record>;
267
+ /**
268
+ * Disable Tier0 legacy algorithms for a tenant.
269
+ */
270
+ disableTier0Legacy(tenantId: string, etag: string): Promise<TenantCryptoPolicyV1Record>;
271
+ /**
272
+ * Enable Tier4 experimental algorithms with acknowledgement.
273
+ */
274
+ enableTier4Experimental(tenantId: string, input: {
275
+ readonly approvedBy: string;
276
+ }, etag: string): Promise<TenantCryptoPolicyV1Record>;
277
+ /**
278
+ * Roll back the v1 crypto policy to a previous history record or policy hash.
279
+ */
280
+ rollbackTenantCryptoPolicyV1(tenantId: string, input: {
281
+ readonly historyId?: string;
282
+ readonly policyHash?: string;
283
+ }, etag: string): Promise<TenantCryptoPolicyV1Record>;
284
+ /**
285
+ * Get the allowed KEM algorithms for a tenant based on their crypto policy.
286
+ * Convenience method that fetches the policy and returns the allowed algorithms.
287
+ */
288
+ getAllowedKemAlgorithms(tenantId: string): Promise<readonly string[]>;
289
+ /**
290
+ * Get the allowed signature algorithms for a tenant based on their crypto policy.
291
+ * Convenience method that fetches the policy and returns the allowed algorithms.
292
+ */
293
+ getAllowedSignatureAlgorithms(tenantId: string): Promise<readonly string[]>;
294
+ /**
295
+ * Get the default KEM algorithm for a tenant based on their crypto policy tier.
296
+ */
297
+ getDefaultKemAlgorithm(tenantId: string): Promise<string>;
298
+ /**
299
+ * Get the default signature algorithm for a tenant based on their crypto policy tier.
300
+ */
301
+ getDefaultSignatureAlgorithm(tenantId: string): Promise<string>;
113
302
  }
114
303
  export * from "./observability.js";
115
304
  export * from "./validation.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACX,qBAAqB,EACrB,2BAA2B,EAE3B,MAAM,oBAAoB,CAAC;AAI5B;;;;;GAKG;AAEH,MAAM,WAAW,kBAAkB;IAClC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;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