Skip to content

Document requestOptions for SSL/TLS configuration; fix broken rpOptions example#279

Merged
aviadhahami merged 5 commits intomasterfrom
copilot/fix-error-in-vault-usage
Mar 10, 2026
Merged

Document requestOptions for SSL/TLS configuration; fix broken rpOptions example#279
aviadhahami merged 5 commits intomasterfrom
copilot/fix-error-in-vault-usage

Conversation

Copy link
Contributor

Copilot AI commented Mar 10, 2026

config.requestOptions already forwards agentOptions to postman-request on every call, but this was entirely undocumented — leaving Node 18+ users stuck on EPROTO ... unsafe legacy renegotiation disabled errors with no clear path forward. The README also had a broken SOCKS proxy example referencing a non-existent rpOptions config key.

Changes

  • README.md: Fix rpOptionsrequestOptions in SOCKS proxy example; add SSL/TLS configuration section
  • example/pass_request_options.js: Show both init-time (config.requestOptions) and per-call usage
  • test/unit.js: Add tests verifying config.requestOptions forwarding across all HTTP methods, generated functions, and per-call override

Usage

const vault = require('node-vault')({
  endpoint: 'https://vault.example.com:8200',
  token: 'MY_TOKEN',
  requestOptions: {
    agentOptions: {
      securityOptions: 'SSL_OP_LEGACY_SERVER_CONNECT',
    },
  },
});

Per-call overrides work too:

vault.read('secret/hello', {
  agentOptions: { securityOptions: 'SSL_OP_LEGACY_SERVER_CONNECT' },
});

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/graphql
    • Triggering command: /usr/bin/gh gh pr ready 279 (http block)
    • Triggering command: /usr/bin/gh gh auth status (http block)
    • Triggering command: /usr/bin/gh gh api graphql -f query=mutation { markPullRequestReadyForReview(input: { pullRequestId: "" }) { pullRequest { isDraft } } } (http block)
  • https://api.github.com/repos/nodevault/node-vault/pulls/279
    • Triggering command: /usr/bin/gh gh api repos/nodevault/node-vault/pulls/279 --jq .node_id (http block)
    • Triggering command: /usr/bin/curl curl -s -H Authorization: ****** -H Accept: application/vnd.github+json REDACTED (http block)
    • Triggering command: /usr/bin/curl curl -v -H Authorization: ****** -H Accept: application/vnd.github+json REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits March 10, 2026 22:55
…onfig.requestOptions

Fix issue #239 - Users upgrading to Node 18+ encounter SSL errors due to
OpenSSL changes. The config.requestOptions mechanism already supports passing
agentOptions through to postman-request, but was undocumented.

Changes:
- Fix README: change broken rpOptions to requestOptions in SOCKS proxy example
- Add SSL/TLS configuration section to README with usage examples
- Update pass_request_options.js example to show init-time and per-call options
- Add 7 unit tests verifying config.requestOptions forwarding for all methods

Co-authored-by: aviadhahami <7353632+aviadhahami@users.noreply.github.com>
Co-authored-by: aviadhahami <7353632+aviadhahami@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix error in vault usage documentation Document requestOptions for SSL/TLS configuration and fix broken rpOptions example Mar 10, 2026
Copilot AI changed the title Document requestOptions for SSL/TLS configuration and fix broken rpOptions example Document requestOptions for SSL/TLS configuration; fix broken rpOptions example Mar 10, 2026
@aviadhahami aviadhahami marked this pull request as ready for review March 10, 2026 23:18
@aviadhahami aviadhahami enabled auto-merge March 10, 2026 23:24
@aviadhahami aviadhahami disabled auto-merge March 10, 2026 23:24
@aviadhahami aviadhahami merged commit 6681879 into master Mar 10, 2026
8 checks passed
@aviadhahami aviadhahami deleted the copilot/fix-error-in-vault-usage branch March 10, 2026 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants