harperdb 4.7.0-beta.2 → 4.7.0-beta.4

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.
Files changed (44) hide show
  1. package/README.md +1 -1
  2. package/bin/harperdb.js +79 -79
  3. package/bin/lite.js +77 -77
  4. package/config/yaml/defaultConfig.yaml +1 -1
  5. package/json/systemSchema.json +30 -0
  6. package/launchServiceScripts/launchNatsIngestService.js +77 -77
  7. package/launchServiceScripts/launchNatsReplyService.js +77 -77
  8. package/launchServiceScripts/launchUpdateNodes4-0-0.js +77 -77
  9. package/npm-shrinkwrap.json +302 -294
  10. package/package.json +3 -1
  11. package/resources/RequestTarget.d.ts +2 -0
  12. package/resources/Table.d.ts +34 -34
  13. package/resources/analytics/hostnames.d.ts +5 -477
  14. package/resources/blob.d.ts +6 -3
  15. package/resources/databases.d.ts +1 -478
  16. package/resources/openApi.d.ts +27 -0
  17. package/security/certificateVerification/certificateVerificationSource.d.ts +18 -0
  18. package/security/certificateVerification/configValidation.d.ts +14 -0
  19. package/security/certificateVerification/crlVerification.d.ts +29 -0
  20. package/security/certificateVerification/index.d.ts +31 -0
  21. package/security/certificateVerification/ocspVerification.d.ts +23 -0
  22. package/security/certificateVerification/types.d.ts +105 -0
  23. package/security/certificateVerification/verificationConfig.d.ts +29 -0
  24. package/security/certificateVerification/verificationUtils.d.ts +79 -0
  25. package/server/jobs/jobProcess.js +77 -77
  26. package/server/operationsServer.d.ts +13 -3
  27. package/server/replication/replicator.d.ts +6 -0
  28. package/server/threads/threadServer.js +77 -77
  29. package/studio/web/assets/index-BsZJSz4i.js +1 -0
  30. package/studio/web/assets/index-BwVqw4zI.js +453 -0
  31. package/studio/web/assets/index-OpljqLtb.css +4 -0
  32. package/studio/web/assets/profiler-CW5dV_9B.js +1 -0
  33. package/studio/web/assets/startRecording--YUj61DT.js +2 -0
  34. package/studio/web/index.html +2 -2
  35. package/studio/web/running.html +90 -0
  36. package/utility/hdbTerms.d.ts +22 -3
  37. package/utility/scripts/restartHdb.js +77 -77
  38. package/security/certificateVerification.d.ts +0 -87
  39. package/studio/web/assets/index-B797owPM.js +0 -1
  40. package/studio/web/assets/index-CXaPu3wc.js +0 -445
  41. package/studio/web/assets/index-Dj8x6atJ.css +0 -4
  42. package/studio/web/assets/profiler-CgmzpljF.js +0 -1
  43. package/studio/web/assets/startRecording-DiD-ht9H.js +0 -2
  44. /package/security/{pkijs-ed25519-patch.d.ts → certificateVerification/pkijs-ed25519-patch.d.ts} +0 -0
@@ -1,87 +0,0 @@
1
- /**
2
- * Certificate verification for mTLS authentication
3
- *
4
- * This module provides certificate revocation checking for client certificates
5
- * in mutual TLS (mTLS) connections. Currently supports OCSP (Online Certificate
6
- * Status Protocol) with the ability to add CRL (Certificate Revocation List) support.
7
- * Uses a system table, hdb_certificate_cache, for a certificate verification
8
- * status cache.
9
- *
10
- * Default configuration:
11
- * - Enabled by default when mTLS is configured
12
- * - Timeout: 5 seconds
13
- * - Cache TTL: 1 hour (success results)
14
- * - Error Cache TTL: 5 minutes (error results, for faster recovery)
15
- * - Failure mode: fail-open (allows connections if verification fails)
16
- */
17
- import './pkijs-ed25519-patch.ts';
18
- interface CertificateVerificationResult {
19
- valid: boolean;
20
- status: string;
21
- cached?: boolean;
22
- error?: string;
23
- method?: 'ocsp' | 'crl' | 'disabled';
24
- }
25
- interface PeerCertificate {
26
- subject?: {
27
- CN?: string;
28
- [key: string]: any;
29
- };
30
- raw?: Buffer;
31
- issuerCertificate?: PeerCertificate;
32
- }
33
- interface CertificateVerificationConfig {
34
- timeout?: number;
35
- cacheTtl?: number;
36
- errorCacheTtl?: number;
37
- failureMode?: 'fail-open' | 'fail-closed';
38
- }
39
- interface CertificateChainEntry {
40
- cert: Buffer;
41
- issuer?: Buffer;
42
- }
43
- /**
44
- * Determine if certificate verification should be performed based on configuration
45
- * @param mtlsConfig - The mTLS configuration (can be boolean or object)
46
- * @returns Configuration object or false if verification is disabled
47
- */
48
- export declare function getCertificateVerificationConfig(mtlsConfig: boolean | Record<string, any> | null | undefined): false | CertificateVerificationConfig;
49
- /**
50
- * Verify certificate revocation status
51
- * @param peerCertificate - Peer certificate object from TLS connection
52
- * @param mtlsConfig - The mTLS configuration from the request
53
- * @returns Promise resolving to verification result
54
- */
55
- export declare function verifyCertificate(peerCertificate: PeerCertificate, mtlsConfig?: boolean | Record<string, any> | null): Promise<CertificateVerificationResult>;
56
- /**
57
- * Verify OCSP status of a client certificate
58
- * @param certPem - Client certificate in PEM format or Buffer
59
- * @param issuerPem - Issuer (CA) certificate in PEM format or Buffer
60
- * @param config - Optional configuration object
61
- * @param config.timeout - OCSP request timeout in milliseconds (default: 5000)
62
- * @param config.cacheTtl - Cache TTL for successful results in milliseconds (default: 3600000)
63
- * @param config.errorCacheTtl - Cache TTL for error results in milliseconds (default: 300000)
64
- * @param config.failureMode - How to handle OCSP failures: 'fail-open' | 'fail-closed' (default: 'fail-open')
65
- * @returns Promise resolving to verification result
66
- */
67
- export declare function verifyOCSP(certPem: Buffer | string, issuerPem: Buffer | string, config?: CertificateVerificationConfig): Promise<CertificateVerificationResult>;
68
- /**
69
- * Set TTL configuration for the certificate cache
70
- * @param ttlConfig - Configuration for cache expiration and eviction
71
- */
72
- export declare function setCertificateCacheTTL(ttlConfig: {
73
- expiration: number;
74
- eviction?: number;
75
- scanInterval?: number;
76
- }): void;
77
- /**
78
- * Convert a buffer to PEM format
79
- */
80
- export declare function bufferToPem(buffer: Buffer, type: string): string;
81
- /**
82
- * Extract certificate chain from peer certificate object
83
- * @param peerCertificate - Peer certificate object from TLS connection
84
- * @returns Certificate chain
85
- */
86
- export declare function extractCertificateChain(peerCertificate: PeerCertificate): CertificateChainEntry[];
87
- export {};
@@ -1 +0,0 @@
1
- import{u as h,a as f,o as P,s as t,b as N,c as g,d as y,e as k,f as C,g as F,r as v,t as b,l as U,j as e,F as S,h as u,i as p,k as n,m as i,I as l,n as x,B as z,S as I}from"./index-CXaPu3wc.js";async function L(a){const{id:d,newPassword:o,confirmNewPassword:r,...c}=a,m={...c};o&&o===r&&(m.password=o);const{data:w}=await f.patch(`/User/${d}`,m);return w}function E(){return h({mutationFn:a=>L(a)})}const M=P({id:t(),firstname:t({error:"Please enter your first name."}).min(2,{error:"First name is required."}).max(50,{error:"First name must be less than 50 characters."}),lastname:t({error:"Please enter your last name."}).min(2,{error:"Last name is required."}).max(50,{error:"Last name must be less than 50 characters."}),newPassword:t({error:"Please enter your new password."}).min(8,{error:"Password must be 8 characters or more."}).or(t().max(0)),confirmNewPassword:t().optional()}).refine(a=>a.newPassword===a.confirmNewPassword,{error:"Passwords do not match",path:["confirmNewPassword"]});function q(){const a=N(),d=g(),{user:o}=y(),r=k({resolver:C(M),defaultValues:async()=>{const s=await F();return{confirmNewPassword:"",firstname:s.firstname,id:s.id,lastname:s.lastname,newPassword:""}}}),{mutate:c,isPending:m}=E(),w=v.useCallback(async s=>{s&&c(s,{onSuccess:j=>{r.reset(j),s.newPassword?(b.success("Profile updated successfully!",{description:"Please sign in with your new password."}),U(),d({to:"/sign-in"}),a.invalidate()):b.success("Profile updated successfully!")}})},[r,d,a,c]);return e.jsxs("div",{className:"mt-20 px-4 pt-4 md:px-12",children:[e.jsx("h2",{className:"text-2xl font-light",children:"Profile"}),e.jsx(S,{...r,children:e.jsxs("form",{onSubmit:r.handleSubmit(w),className:"grid gap-4 my-4",children:[e.jsx(u,{control:r.control,name:"firstname",render:({field:s})=>e.jsxs(p,{children:[e.jsx(n,{className:"pb-1",children:"First Name"}),e.jsx(i,{children:e.jsx(l,{type:"text",className:"bg-purple-400 border-purple-400 dark:bg-black dark:border-black",autoCapitalize:"words",...s})}),e.jsx(x,{})]})}),e.jsx(u,{control:r.control,name:"lastname",render:({field:s})=>e.jsxs(p,{children:[e.jsx(n,{className:"pb-1",children:"Last Name"}),e.jsx(i,{children:e.jsx(l,{type:"text",className:"bg-purple-400 border-purple-400 dark:bg-black dark:border-black",autoCapitalize:"words",...s})}),e.jsx(x,{})]})}),e.jsx(n,{className:"pb-1",children:"Email"}),e.jsx(i,{children:e.jsx(l,{type:"email",enterKeyHint:"next",autoComplete:"email",autoCapitalize:"none",value:o?.email||"",disabled:!0,readOnly:!0})}),e.jsx(u,{control:r.control,name:"newPassword",render:({field:s})=>e.jsxs(p,{children:[e.jsx(n,{className:"pb-1",children:"New Password"}),e.jsx(i,{children:e.jsx(l,{type:"password",placeholder:"Optional",className:"bg-purple-400 border-purple-400 dark:bg-black dark:border-black",autoComplete:"new-password",autoCapitalize:"none",...s})}),e.jsx(x,{})]})}),e.jsx(u,{control:r.control,name:"confirmNewPassword",render:({field:s})=>e.jsxs(p,{children:[e.jsx(n,{className:"pb-1",children:"Confirm New Password"}),e.jsx(i,{children:e.jsx(l,{type:"password",className:"bg-purple-400 border-purple-400 dark:bg-black dark:border-black",autoComplete:"new-password",autoCapitalize:"none",...s})}),e.jsx(x,{})]})}),e.jsx("div",{className:"flex justify-between w-full",children:e.jsxs(z,{type:"submit",variant:"submit",className:"rounded-full",disabled:m||!r.formState.isDirty||!r.formState.isValid,children:[e.jsx(I,{})," Update Profile"]})})]})})]})}export{q as ProfileIndex};