feat(pqc): add manual Apiary BigQuery PQC verification script#8902
feat(pqc): add manual Apiary BigQuery PQC verification script#8902danieljbruce wants to merge 1 commit into
Conversation
Creates a Node.js verification script `pqc-apiary-test.cjs` that uses `getAPI` from `googleapis-common` to connect to the Google Cloud BigQuery service and extracts the negotiated TLS algorithm/group to ensure post-quantum cryptography compliance. Co-authored-by: danieljbruce <8935272+danieljbruce@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
There was a problem hiding this comment.
Code Review
This pull request introduces a verification script, pqc-apiary-test.cjs, to test Post-Quantum Cryptography (PQC) connections to BigQuery by intercepting TLS handshakes. Feedback suggests moving the newly added googleapis dependency to devDependencies to prevent bloating production installs, and refactoring the tls.connect override to use rest parameters to robustly handle different signature variations.
| "chalk": "^5.0.0", | ||
| "figures": "^6.0.0", | ||
| "gaxios": "^7.0.0-rc", | ||
| "googleapis": "^173.0.0", |
There was a problem hiding this comment.
| tls.connect = function (options, callback) { | ||
| const socket = originalConnect.call(tls, options, callback); | ||
| socket.on('secureConnect', () => { | ||
| socketInfo = { | ||
| protocol: socket.getProtocol(), | ||
| cipher: socket.getCipher(), | ||
| ephemeral: socket.getEphemeralKeyInfo(), | ||
| }; | ||
| }); | ||
| return socket; | ||
| }; |
There was a problem hiding this comment.
Overriding tls.connect with fixed parameters (options, callback) can cause issues if the underlying HTTP client or Node.js internals call it with a different signature (e.g., tls.connect(port, host, options, callback)). Using rest parameters (...args) and forwarding them via apply is more robust and prevents potential signature mismatch errors.
tls.connect = function (...args) {
const socket = originalConnect.apply(tls, args);
socket.on('secureConnect', () => {
socketInfo = {
protocol: socket.getProtocol(),
cipher: socket.getCipher(),
ephemeral: socket.getEphemeralKeyInfo(),
};
});
return socket;
};
This PR adds a standalone manual verification script
pqc-apiary-test.cjsthat connects to the Google Cloud BigQuery service using the Apiary clients /getAPIfunction and prints out the negotiated TLS protocol, cipher suite, and key exchange algorithm (such asX25519MLKEM768). This ensures verification of Post-Quantum Cryptography compliance for REST/Apiary node clients.PR created automatically by Jules for task 12686984612465946612 started by @danieljbruce