@tetrascience-npm/ts-connectors-sdk 4.0.0-beta.185.1 → 4.0.0-beta.187.1

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/README.md CHANGED
@@ -104,6 +104,37 @@ const s3 = client.createAwsClient(S3Client);
104
104
  const s3WithOverrides = client.createAwsClient(S3Client, { region: 'us-west-2' });
105
105
  ```
106
106
 
107
+ All clients created this way use a **generic request handler with a 120-second
108
+ timeout**, which is suitable for most AWS services.
109
+
110
+ **For S3 specifically**, the SDK already manages an internal `S3Client` tuned
111
+ with socket idle timeouts instead of a fixed request timeout — a better fit for
112
+ large or slow file transfers. If you need S3 access with that tuning, prefer
113
+ either of these over `createAwsClient(S3Client)`:
114
+
115
+ - **`uploadFile()`** — the primary way to upload files to the TDP datalake.
116
+ Handles credentials, metadata, checksums, and multipart uploads automatically.
117
+ - **`assertAwsInitialized().s3Client`** — returns the SDK-managed `S3Client`
118
+ directly, for cases where you need to make S3 calls beyond what `uploadFile()`
119
+ covers:
120
+
121
+ ```ts
122
+ const { s3Client } = await client.assertAwsInitialized();
123
+ ```
124
+
125
+ If you have a specific reason to create your own `S3Client` via `createAwsClient`
126
+ and still want the S3-tuned handler, you can pass it as an override:
127
+
128
+ ```ts
129
+ const s3 = client.createAwsClient(S3Client, {
130
+ requestHandler: client.createProxyAWSNodeHttpHandlers().s3Handler,
131
+ });
132
+ ```
133
+
134
+ Note that this creates new handler instances rather than sharing the SDK's
135
+ internal ones, so the simpler `assertAwsInitialized().s3Client` is preferred
136
+ when possible.
137
+
107
138
  #### tdpDeploymentCertificates
108
139
 
109
140
  A read-only getter that returns the TDP deployment certificates loaded during
@@ -0,0 +1,37 @@
1
+ export interface SelfSignedCert {
2
+ cert: string;
3
+ key: string;
4
+ }
5
+ /**
6
+ * A minimal HTTPS server that uses a freshly generated self-signed certificate.
7
+ *
8
+ * Purpose: provide a real TLS endpoint for testing that TDPClient.createAxiosInstance()
9
+ * correctly wires TDP deployment certificates into the httpsAgent CA bundle.
10
+ *
11
+ * The server always responds 200 OK — tests only care about whether the TLS handshake
12
+ * succeeds or fails, not the response body.
13
+ *
14
+ * Usage:
15
+ * const server = new TestHttpsServer();
16
+ * const port = await server.start();
17
+ * // ... test against https://127.0.0.1:{port} ...
18
+ * await server.stop();
19
+ */
20
+ export declare class TestHttpsServer {
21
+ private server;
22
+ private port;
23
+ /** PEM-encoded certificate used by this server (also the CA cert for trusting it). */
24
+ readonly cert: string;
25
+ private readonly key;
26
+ constructor();
27
+ /**
28
+ * Start the server on a random available port on 127.0.0.1.
29
+ * @returns the port number the server is listening on
30
+ */
31
+ start(): Promise<number>;
32
+ /** Stop the server and wait for all connections to close. */
33
+ stop(): Promise<void>;
34
+ /** Base URL of the running server (e.g. https://127.0.0.1:54321) */
35
+ get url(): string;
36
+ }
37
+ //# sourceMappingURL=test-https-server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-https-server.d.ts","sourceRoot":"","sources":["../../../api-tests/fixture/test-https-server.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAkDD;;;;;;;;;;;;;;GAcG;AACH,qBAAa,eAAe;IAC1B,OAAO,CAAC,MAAM,CAAe;IAC7B,OAAO,CAAC,IAAI,CAAa;IAEzB,sFAAsF;IACtF,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;;IAa7B;;;OAGG;IACG,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC;IAW9B,6DAA6D;IACvD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAS3B,oEAAoE;IACpE,IAAI,GAAG,IAAI,MAAM,CAEhB;CACF"}
@@ -0,0 +1,153 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
+ return new (P || (P = Promise))(function (resolve, reject) {
38
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
39
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
40
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
41
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
42
+ });
43
+ };
44
+ Object.defineProperty(exports, "__esModule", { value: true });
45
+ exports.TestHttpsServer = void 0;
46
+ const child_process_1 = require("child_process");
47
+ const fs = __importStar(require("fs"));
48
+ const https = __importStar(require("https"));
49
+ const os = __importStar(require("os"));
50
+ const path = __importStar(require("path"));
51
+ /**
52
+ * Generates a self-signed certificate for 127.0.0.1 / localhost using openssl.
53
+ *
54
+ * A temporary openssl config file is written so that the certificate includes a
55
+ * Subject Alternative Name (SAN) for both IP 127.0.0.1 and DNS localhost.
56
+ * Modern Node.js TLS validation checks the SAN — without it the handshake fails
57
+ * with an IP-mismatch error even when the CA is trusted.
58
+ */
59
+ function generateSelfSignedCert() {
60
+ const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'tdp-tls-test-'));
61
+ try {
62
+ const opensslCnf = [
63
+ '[req]',
64
+ 'distinguished_name = req_distinguished_name',
65
+ 'x509_extensions = v3_req',
66
+ 'prompt = no',
67
+ '',
68
+ '[req_distinguished_name]',
69
+ 'CN = localhost',
70
+ '',
71
+ '[v3_req]',
72
+ 'subjectAltName = @alt_names',
73
+ '',
74
+ '[alt_names]',
75
+ 'IP.1 = 127.0.0.1',
76
+ 'DNS.1 = localhost',
77
+ ].join('\n');
78
+ const configFile = path.join(tmpDir, 'openssl.cnf');
79
+ const certFile = path.join(tmpDir, 'cert.pem');
80
+ const keyFile = path.join(tmpDir, 'key.pem');
81
+ fs.writeFileSync(configFile, opensslCnf);
82
+ (0, child_process_1.execSync)(`openssl req -x509 -newkey rsa:2048 -keyout "${keyFile}" -out "${certFile}" -days 1 -nodes -config "${configFile}"`, { stdio: 'pipe' });
83
+ return {
84
+ cert: fs.readFileSync(certFile, 'utf-8'),
85
+ key: fs.readFileSync(keyFile, 'utf-8'),
86
+ };
87
+ }
88
+ finally {
89
+ fs.rmSync(tmpDir, { recursive: true, force: true });
90
+ }
91
+ }
92
+ /**
93
+ * A minimal HTTPS server that uses a freshly generated self-signed certificate.
94
+ *
95
+ * Purpose: provide a real TLS endpoint for testing that TDPClient.createAxiosInstance()
96
+ * correctly wires TDP deployment certificates into the httpsAgent CA bundle.
97
+ *
98
+ * The server always responds 200 OK — tests only care about whether the TLS handshake
99
+ * succeeds or fails, not the response body.
100
+ *
101
+ * Usage:
102
+ * const server = new TestHttpsServer();
103
+ * const port = await server.start();
104
+ * // ... test against https://127.0.0.1:{port} ...
105
+ * await server.stop();
106
+ */
107
+ class TestHttpsServer {
108
+ constructor() {
109
+ this.port = 0;
110
+ const { cert, key } = generateSelfSignedCert();
111
+ this.cert = cert;
112
+ this.key = key;
113
+ this.server = https.createServer({ key: this.key, cert: this.cert }, (_req, res) => {
114
+ res.writeHead(200, { 'Content-Type': 'text/plain' });
115
+ res.end('ok');
116
+ });
117
+ }
118
+ /**
119
+ * Start the server on a random available port on 127.0.0.1.
120
+ * @returns the port number the server is listening on
121
+ */
122
+ start() {
123
+ return __awaiter(this, void 0, void 0, function* () {
124
+ return new Promise((resolve, reject) => {
125
+ this.server.listen(0, '127.0.0.1', () => {
126
+ const address = this.server.address();
127
+ this.port = address.port;
128
+ resolve(this.port);
129
+ });
130
+ this.server.once('error', reject);
131
+ });
132
+ });
133
+ }
134
+ /** Stop the server and wait for all connections to close. */
135
+ stop() {
136
+ return __awaiter(this, void 0, void 0, function* () {
137
+ return new Promise((resolve, reject) => {
138
+ this.server.close((err) => {
139
+ if (err)
140
+ reject(err);
141
+ else
142
+ resolve();
143
+ });
144
+ });
145
+ });
146
+ }
147
+ /** Base URL of the running server (e.g. https://127.0.0.1:54321) */
148
+ get url() {
149
+ return `https://127.0.0.1:${this.port}`;
150
+ }
151
+ }
152
+ exports.TestHttpsServer = TestHttpsServer;
153
+ //# sourceMappingURL=test-https-server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-https-server.js","sourceRoot":"","sources":["../../../api-tests/fixture/test-https-server.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAyC;AACzC,uCAAyB;AACzB,6CAA+B;AAE/B,uCAAyB;AACzB,2CAA6B;AAO7B;;;;;;;GAOG;AACH,SAAS,sBAAsB;IAC7B,MAAM,MAAM,GAAG,EAAE,C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EAAoE;IACpE,IAAI,GAAG;QACL,OAAO,qBAAqB,IAAI,CAAC,IAAI,EAAE,CAAC;IAC1C,CAAC;CACF;AAjDD,0CAiDC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=tls-cert.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tls-cert.test.d.ts","sourceRoot":"","sources":["../../api-tests/tls-cert.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,129 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const vitest_1 = require("vitest");
13
+ const fixture_1 = require("./fixture/fixture");
14
+ const test_https_server_1 = require("./fixture/test-https-server");
15
+ const test_proxy_server_1 = require("./fixture/test-proxy-server");
16
+ /**
17
+ * TDP Deployment Certificate — createAxiosInstance CA-bundle Tests
18
+ *
19
+ * PR #125 (WA-1335) changed how TDP deployment certificates flow through TDPClient:
20
+ * Before: certs were local variables inside init(), threaded explicitly into one axios
21
+ * instance, then discarded — external callers got nothing.
22
+ * After: certs are stored on the instance (_tdpDeploymentCertificates) and
23
+ * automatically injected into the CA bundle of every axios instance created
24
+ * by any consumer via createAxiosInstance().
25
+ *
26
+ * Unit tests (test/tdp-client.test.ts) verify the wiring with mocks.
27
+ * These api-tests verify the actual TLS handshake with a real HTTPS server —
28
+ * something mocks cannot exercise.
29
+ *
30
+ * Test design:
31
+ * - A real HTTPS server (TestHttpsServer) uses a freshly generated self-signed cert.
32
+ * - The cert is injected directly into _tdpDeploymentCertificates, simulating what
33
+ * init() does after loadCertificatesFromLocalVolume reads the localCertificateFile.
34
+ * - We use standaloneConnector for a fully initialised TDPClient (jwt, proxy, etc.)
35
+ * so that assertInitialized() / assertProxyInitialized() pass without a real cert
36
+ * file on disk.
37
+ */
38
+ (0, vitest_1.describe)('TDP Deployment Certificate CA-bundle Tests', () => {
39
+ (0, fixture_1.connectorTest)('DAM-T193: createAxiosInstance trusts self-signed cert when stored in _tdpDeploymentCertificates', { timeout: 2 * 60 * 1000 }, (_a) => __awaiter(void 0, [_a], void 0, function* ({ standaloneConnector, expect }) {
40
+ const httpsServer = new test_https_server_1.TestHttpsServer();
41
+ yield httpsServer.start();
42
+ try {
43
+ yield standaloneConnector.start();
44
+ const tdpClient = standaloneConnector.tdpClient;
45
+ // Simulate what init() does when it reads the cert from localCertificateFile.
46
+ // The unit tests already cover the file → instance path; here we exercise the
47
+ // instance → CA bundle → real TLS handshake path.
48
+ tdpClient._tdpDeploymentCertificates = [httpsServer.cert];
49
+ // Consumer creates an axios instance — deployment certs included automatically
50
+ // because includeAdditionalCertificates defaults to true.
51
+ const axiosInstance = tdpClient.createAxiosInstance({
52
+ baseUrl: httpsServer.url,
53
+ });
54
+ const response = yield axiosInstance.get('/');
55
+ expect(response.status).toBe(200);
56
+ }
57
+ finally {
58
+ yield standaloneConnector.shutdown();
59
+ yield httpsServer.stop();
60
+ }
61
+ }));
62
+ (0, fixture_1.connectorTest)('DAM-T194: createAxiosInstance rejects self-signed cert when includeAdditionalCertificates is false', { timeout: 2 * 60 * 1000 }, (_a) => __awaiter(void 0, [_a], void 0, function* ({ standaloneConnector, expect }) {
63
+ const httpsServer = new test_https_server_1.TestHttpsServer();
64
+ yield httpsServer.start();
65
+ try {
66
+ yield standaloneConnector.start();
67
+ const tdpClient = standaloneConnector.tdpClient;
68
+ // Same cert injected — but the consumer explicitly opts out of deployment certs.
69
+ tdpClient._tdpDeploymentCertificates = [httpsServer.cert];
70
+ // With deployment certs excluded, the self-signed cert is not in the CA bundle
71
+ // and Node.js TLS rejects the handshake.
72
+ const axiosInstance = tdpClient.createAxiosInstance({
73
+ baseUrl: httpsServer.url,
74
+ includeAdditionalCertificates: false,
75
+ });
76
+ yield expect(axiosInstance.get('/')).rejects.toThrow(/self.signed certificate|certificate verify failed/i);
77
+ }
78
+ finally {
79
+ yield standaloneConnector.shutdown();
80
+ yield httpsServer.stop();
81
+ }
82
+ }));
83
+ (0, fixture_1.connectorTest)('DAM-T195: createAxiosInstance trusts self-signed cert via PatchedHttpsProxyAgent when stored in _tdpDeploymentCertificates', { timeout: 2 * 60 * 1000 }, (_a) => __awaiter(void 0, [_a], void 0, function* ({ standaloneConnector, expect }) {
84
+ const httpsServer = new test_https_server_1.TestHttpsServer();
85
+ const proxyServer = new test_proxy_server_1.TestProxyServer();
86
+ yield Promise.all([httpsServer.start(), proxyServer.start()]);
87
+ // Start the connector before setting proxy env vars so that TDP init calls
88
+ // (auth, org certs, etc.) are not routed through the test proxy.
89
+ // isProxyInitialized is set during init(), so createAxiosInstance will work.
90
+ yield standaloneConnector.start();
91
+ const tdpClient = standaloneConnector.tdpClient;
92
+ // Save and override proxy env vars.
93
+ // Clear no_proxy so proxy-from-env doesn't exclude 127.0.0.1.
94
+ const savedHttpsProxy = process.env.HTTPS_PROXY;
95
+ const savedNoProxy = process.env.no_proxy;
96
+ process.env.HTTPS_PROXY = proxyServer.getProxyUrl();
97
+ delete process.env.no_proxy;
98
+ try {
99
+ tdpClient._tdpDeploymentCertificates = [httpsServer.cert];
100
+ const axiosInstance = tdpClient.createAxiosInstance({
101
+ baseUrl: httpsServer.url,
102
+ });
103
+ const response = yield axiosInstance.get('/');
104
+ expect(response.status).toBe(200);
105
+ }
106
+ finally {
107
+ if (savedHttpsProxy === undefined) {
108
+ delete process.env.HTTPS_PROXY;
109
+ }
110
+ else {
111
+ process.env.HTTPS_PROXY = savedHttpsProxy;
112
+ }
113
+ if (savedNoProxy === undefined) {
114
+ delete process.env.no_proxy;
115
+ }
116
+ else {
117
+ process.env.no_proxy = savedNoProxy;
118
+ }
119
+ yield standaloneConnector.shutdown();
120
+ yield Promise.all([httpsServer.stop(), proxyServer.stop()]);
121
+ }
122
+ }));
123
+ // The hpagent HttpsProxyAgent path (HTTPS_AGENT=hpagent) is intentionally not tested here.
124
+ // It is a legacy escape hatch kept from before PatchedHttpsProxyAgent was introduced (CON-2178),
125
+ // requiring explicit opt-in via an env var. Its CA wiring (proxyRequestOptions: { ca }) is
126
+ // internal to the hpagent library — not our code. PatchedHttpsProxyAgent is the default and
127
+ // the only path that warrants a real TLS handshake test.
128
+ });
129
+ //# sourceMappingURL=tls-cert.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tls-cert.test.js","sourceRoot":"","sources":["../../api-tests/tls-cert.test.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,mCAAkC;AAElC,+CAAkD;AAClD,mEAA8D;AAC9D,mEAA8D;AAE9D;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,IAAA,iBAAQ,EAAC,4CAA4C,EAAE,GAAG,EAAE;IAC1D,IAAA,uBAAa,EACX,iGAAiG,EACjG,EAAE,OAAO,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI,EAAE,EAC1B,KAAwC,EAAE,4CAAnC,EAAE,mBAAmB,EAAE,MAAM,EAAE;QACpC,MAAM,WAAW,GAAG,IAAI,mCAAe,EAAE,CAAC;QAC1C,MAAM,WAAW,CAAC,KAAK,EAAE,CAAC;QAE1B,IAAI,CAAC;YACH,MAAM,mBAAmB,CAAC,KAAK,EAAE,CAAC;YAClC,MAAM,SAAS,GAAI,mBAA2B,CAAC,SAAS,CAAC;YAEzD,8EAA8E;YAC9E,8EAA8E;YAC9E,kDAAkD;YACjD,SAAiB,CAAC,0BAA0B,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YAEnE,+EAA+E;YAC/E,0DAA0D;YAC1D,MAAM,aA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