TritonDataCenter / node-manta

Node.js SDK for Manta
75 stars 54 forks source link

test suite does not work with self-signed certs #268

Closed davepacheco closed 7 years ago

davepacheco commented 8 years ago

client.test.js reports problems like this one:

✖ MANTA-2812 null signer

AssertionError: "ForbiddenError" === undefined
    at Object.strictEqual (/home/dap/node-manta/node_modules/nodeunit/lib/types.js:83:39)
    at /home/dap/node-manta/test/client.test.js:765:11
    at f (/home/dap/node-manta/node_modules/once/once.js:17:25)
    at /home/dap/node-manta/lib/client.js:1610:17
    at self.client.head.onRequestCallback.onResult (/home/dap/node-manta/lib/client.js:1113:21)
    at res.once.headers (/home/dap/node-manta/lib/client.js:425:17)
    at readError (/home/dap/node-manta/lib/client.js:391:17)
    at ClientRequest.resultToInfo (/home/dap/node-manta/lib/client.js:424:13)
    at ClientRequest.g (events.js:180:16)
    at ClientRequest.emit (events.js:98:17)
    at _emitResult (/home/dap/node-manta/node_modules/restify-clients/lib/HttpClient.js:187:14)
    at f (/home/dap/node-manta/node_modules/once/once.js:17:25)
    at /home/dap/node-manta/node_modules/restify-clients/lib/HttpClient.js:238:17
    at process._tickCallback (node.js:458:13)

Error: DEPTH_ZERO_SELF_SIGNED_CERT
    at SecurePair.<anonymous> (tls.js:1381:32)
    at SecurePair.emit (events.js:92:17)
    at SecurePair.maybeInitFinished (tls.js:980:10)
    at CleartextStream.read [as _read] (tls.js:472:13)
    at CleartextStream.Readable.read (_stream_readable.js:341:10)
    at EncryptedStream.write [as _write] (tls.js:369:25)
    at doWrite (_stream_writable.js:226:10)
    at writeOrBuffer (_stream_writable.js:216:5)
    at EncryptedStream.Writable.write (_stream_writable.js:183:11)
    at write (_stream_readable.js:602:24)
    at flow (_stream_readable.js:611:7)
    at Socket.pipeOnReadable (_stream_readable.js:643:5)
    at Socket.emit (events.js:92:17)
    at emitReadable_ (_stream_readable.js:427:10)
    at emitReadable (_stream_readable.js:423:5)
    at readableAddChunk (_stream_readable.js:166:9)
    at Socket.Readable.push (_stream_readable.js:128:10)
    at TCP.onread (net.js:529:21)

✖ MANTA-2812 undefined signer

AssertionError: "ForbiddenError" === undefined
    at Object.strictEqual (/home/dap/node-manta/node_modules/nodeunit/lib/types.js:83:39)
    at /home/dap/node-manta/test/client.test.js:783:11
    at f (/home/dap/node-manta/node_modules/once/once.js:17:25)
    at /home/dap/node-manta/lib/client.js:1610:17
    at self.client.head.onRequestCallback.onResult (/home/dap/node-manta/lib/client.js:1113:21)
    at res.once.headers (/home/dap/node-manta/lib/client.js:425:17)
    at readError (/home/dap/node-manta/lib/client.js:391:17)
    at ClientRequest.resultToInfo (/home/dap/node-manta/lib/client.js:424:13)
    at ClientRequest.g (events.js:180:16)
    at ClientRequest.emit (events.js:98:17)
    at _emitResult (/home/dap/node-manta/node_modules/restify-clients/lib/HttpClient.js:187:14)
    at f (/home/dap/node-manta/node_modules/once/once.js:17:25)
    at /home/dap/node-manta/node_modules/restify-clients/lib/HttpClient.js:238:17
    at process._tickCallback (node.js:458:13)

Error: DEPTH_ZERO_SELF_SIGNED_CERT
    at SecurePair.<anonymous> (tls.js:1381:32)
    at SecurePair.emit (events.js:92:17)
    at SecurePair.maybeInitFinished (tls.js:980:10)
    at CleartextStream.read [as _read] (tls.js:472:13)
    at CleartextStream.Readable.read (_stream_readable.js:341:10)
    at EncryptedStream.write [as _write] (tls.js:369:25)
    at doWrite (_stream_writable.js:226:10)
    at writeOrBuffer (_stream_writable.js:216:5)
    at EncryptedStream.Writable.write (_stream_writable.js:183:11)
    at write (_stream_readable.js:602:24)
    at flow (_stream_readable.js:611:7)
    at Socket.pipeOnReadable (_stream_readable.js:643:5)
    at Socket.emit (events.js:92:17)
    at emitReadable_ (_stream_readable.js:427:10)
    at emitReadable (_stream_readable.js:423:5)
    at readableAddChunk (_stream_readable.js:166:9)
    at Socket.Readable.push (_stream_readable.js:128:10)
    at TCP.onread (net.js:529:21)

The clients that it creates do not appear to respect MANTA_TLS_INSECURE.

trentm commented 7 years ago

https://cr.joyent.us/#/c/1381/