vestauth 0.13.0 β†’ 0.14.0

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/CHANGELOG.md CHANGED
@@ -2,7 +2,14 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
- [Unreleased](https://github.com/vestauth/vestauth/compare/v0.13.0...main)
5
+ [Unreleased](https://github.com/vestauth/vestauth/compare/v0.14.0...main)
6
+
7
+ ## [0.14.0](https://github.com/vestauth/vestauth/compare/v0.13.0...v0.14.0) (2026-02-18)
8
+
9
+ ### Changed
10
+
11
+ * Renamed instances of `provider` with `tool` ([#22](https://github.com/vestauth/vestauth/pull/22))
12
+ * `provider` still backwards compatible
6
13
 
7
14
  ## [0.13.0](https://github.com/vestauth/vestauth/compare/v0.12.1...v0.13.0) (2026-02-18)
8
15
 
package/README.md CHANGED
@@ -4,13 +4,13 @@
4
4
 
5
5
  > [1 minute demo πŸ“Ί](https://www.youtube.com/watch?v=cHARyULr_qk)
6
6
  >
7
- > Vestauth gives agents a cryptographic identity and a simple way to authenticate HTTP requests. Most agent systems rely on API keys, bearer tokens, or username/passwords. These approaches are difficult to rotate, easy to leak, and hard to attribute to a specific agent. Vestauth replaces shared secrets with public/private key cryptography. Agents sign requests using a private key, and providers verify those requests using the agent's public key. It's elegant and the future. [[1](#compare)]
7
+ > Vestauth gives agents a cryptographic identity and a simple way to authenticate HTTP requests. Most agent systems rely on API keys, bearer tokens, or username/passwords. These approaches are difficult to rotate, easy to leak, and hard to attribute to a specific agent. Vestauth replaces shared secrets with public/private key cryptography. Agents sign requests using a private key, and tools verify those requests using the agent's public key. It's elegant and the future. [[1](#compare)]
8
8
  >
9
9
  > *Scott Motte–creator of `dotenv` and `dotenvx`*
10
10
 
11
11
   
12
12
 
13
- ### Quickstart [![npm version](https://img.shields.io/npm/v/vestauth.svg)](https://www.npmjs.com/package/vestauth) [![downloads](https://img.shields.io/npm/dw/vestauth)](https://www.npmjs.com/package/vestauth) [![RFC 9421 Compatible](https://img.shields.io/badge/RFC%209421-Compatible-0A7F5A)](https://datatracker.ietf.org/doc/rfc9421/) [![Web-Bot-Auth Draft Compatible](https://img.shields.io/badge/Web--Bot--Auth-Draft%20Compatible-0A7F5A)](https://datatracker.ietf.org/doc/html/draft-meunier-web-bot-auth-architecture)
13
+ ### Quickstart [![npm version](https://img.shields.io/npm/v/vestauth.svg)](https://www.npmjs.com/package/vestauth) [![downloads](https://img.shields.io/npm/dm/vestauth)](https://www.npmjs.com/package/vestauth) [![RFC 9421 Compatible](https://img.shields.io/badge/RFC%209421-Compatible-0A7F5A)](https://datatracker.ietf.org/doc/rfc9421/) [![Web-Bot-Auth Draft Compatible](https://img.shields.io/badge/Web--Bot--Auth-Draft%20Compatible-0A7F5A)](https://datatracker.ietf.org/doc/html/draft-meunier-web-bot-auth-architecture)
14
14
 
15
15
  ```sh
16
16
  npm i -g vestauth
@@ -102,7 +102,7 @@ AGENT_UID="agent-4b94ccd425e939fac5016b6b"
102
102
 
103
103
  | Variable | Role | Usage |
104
104
  |----------|------------|------------|
105
- | `AGENT_PUBLIC_JWK` | Verification | Published for provider signature validation |
105
+ | `AGENT_PUBLIC_JWK` | Verification | Published for tool signature validation |
106
106
  | `AGENT_PRIVATE_JWK` | Signing | Used locally to sign HTTP requests |
107
107
  | `AGENT_UID` | Identity | Builds discovery FQDN and identifies the agent |
108
108
 
@@ -117,13 +117,13 @@ $ vestauth primitives headers GET https://api.vestauth.com/whoami --pp
117
117
  }
118
118
  ```
119
119
 
120
- Vestauth turns `curl` into a powerful primitive for provider-side agent identity, verification, and authentication. See the next section.
120
+ Vestauth turns `curl` into a powerful primitive for tool-side agent identity, verification, and authentication. See the next section.
121
121
 
122
122
  </details>
123
123
 
124
124
  &nbsp;
125
125
 
126
- ## Provider: Verification
126
+ ## Tool: Verification
127
127
 
128
128
  > Verify requests and safely trust agent identity using cryptographic proof.
129
129
 
@@ -140,10 +140,10 @@ app.get('/whoami', async (req, res) => {
140
140
 
141
141
  // --------------------------------------------------------------------------------
142
142
  // πŸͺͺ Reveal the agent's cryptographic identity. //
143
- // The `provider.verify` method turns your endpoint into a cryptographically //
144
- // authenticated provider β€” verifying signatures, keys, and returning the agent. //
143
+ // The `tool.verify` method turns your endpoint into a cryptographically //
144
+ // authenticated tool β€” verifying signatures, keys, and returning the agent. //
145
145
  // --------------------------------------------------------------------------------
146
- const agent = await vestauth.provider.verify(req.method, url, req.headers)
146
+ const agent = await vestauth.tool.verify(req.method, url, req.headers)
147
147
 
148
148
  res.json(agent)
149
149
  } catch (err) {
@@ -168,7 +168,7 @@ $ vestauth agent curl http://localhost:3000/whoami
168
168
  <details><summary>learn more</summary><br>
169
169
 
170
170
  ```sh
171
- Agent β†’ Signs Request β†’ Provider β†’ Discovers Keys β†’ Verifies Signature β†’ Trusted Agent
171
+ Agent β†’ Signs Request β†’ Tool β†’ Discovers Keys β†’ Verifies Signature β†’ Trusted Agent
172
172
  ```
173
173
 
174
174
  Vestauth verifies requests using public key discovery and HTTP Message Signature validation.
@@ -181,7 +181,7 @@ When a signed request is received, Vestauth:
181
181
  4. Verifies the request signature using RFC 9421.
182
182
  5. Validates timestamps and nonce protections to prevent replay attacks.
183
183
 
184
- If verification succeeds, the provider can safely trust the agent's cryptographic identity.
184
+ If verification succeeds, the tool can safely trust the agent's cryptographic identity.
185
185
 
186
186
  Vestauth intentionally separates identity discovery from verification to support key rotation and distributed agent infrastructure.
187
187
 
@@ -303,12 +303,12 @@ $ vestauth agent rotate
303
303
  ```
304
304
 
305
305
  </details>
306
- <details><summary>`provider verify`</summary><br>
306
+ <details><summary>`tool verify`</summary><br>
307
307
 
308
308
  Verify agent.
309
309
 
310
310
  ```sh
311
- $ vestauth provider verify GET https://api.vestauth.com/whoami --signature "sig1=:H1kxwSRWFbIzKbHaUy4hQFp/JrmVTX//72JPHcW4W7cPt9q6LytRJgx5pUgWrrr7DCcMWgx/jpTPc8Ht8SZ3CQ==:" --signature-input "sig1=(\"@authority\");created=1770396709;keyid=\"FGzgs758DBGnI1S0BejChDsK0IKZm3qPpOOXdRnnBkM\";alg=\"ed25519\";expires=1770397009;nonce=\"BZSDVktdkjO6XH5jafAdPDttsB6eytXO7u8KXJN1tMtd5bprE3rp08HiaTRo7H6gZGtYb4_qtL7RiGi8P2Gq7w\";tag=\"web-bot-auth\"" --signature-agent "sig1=agent-609a4fd2ebf4e6347108c517.api.vestauth.com"
311
+ $ vestauth tool verify GET https://api.vestauth.com/whoami --signature "sig1=:H1kxwSRWFbIzKbHaUy4hQFp/JrmVTX//72JPHcW4W7cPt9q6LytRJgx5pUgWrrr7DCcMWgx/jpTPc8Ht8SZ3CQ==:" --signature-input "sig1=(\"@authority\");created=1770396709;keyid=\"FGzgs758DBGnI1S0BejChDsK0IKZm3qPpOOXdRnnBkM\";alg=\"ed25519\";expires=1770397009;nonce=\"BZSDVktdkjO6XH5jafAdPDttsB6eytXO7u8KXJN1tMtd5bprE3rp08HiaTRo7H6gZGtYb4_qtL7RiGi8P2Gq7w\";tag=\"web-bot-auth\"" --signature-agent "sig1=agent-609a4fd2ebf4e6347108c517.api.vestauth.com"
312
312
  {"uid":"agent-609a4fd2ebf4e6347108c517",...}
313
313
  ```
314
314
 
@@ -367,21 +367,21 @@ $ vestauth primitives verify GET https://api.vestauth.com/whoami --signature "si
367
367
 
368
368
  Use vestauth directly in code.
369
369
 
370
- <details><summary>`provider.verify()`</summary><br>
370
+ <details><summary>`tool.verify()`</summary><br>
371
371
 
372
372
  Verify and authenticate an agent's cryptographic identity.
373
373
 
374
374
  ```js
375
- const agent = await vestauth.provider.verify(req.method, url, req.headers)
375
+ const agent = await vestauth.tool.verify(req.method, url, req.headers)
376
376
  ```
377
377
 
378
378
  </details>
379
379
 
380
380
  &nbsp;
381
381
 
382
- ## Available Providers
382
+ ## Available Tools
383
383
 
384
- > Vestauth is pioneering the auth layer for agents. Get in early on this distribution train. [Become a vestauth provider](mailto:mot@dotenvx.com)
384
+ > Vestauth is pioneering the auth layer for agents. Get in early on this distribution train. [Become a vestauth tool](mailto:mot@dotenvx.com)
385
385
 
386
386
  * AS2 (Agentic Secret Storage) - https://as2.dotenvx.com
387
387
 
@@ -389,7 +389,7 @@ const agent = await vestauth.provider.verify(req.method, url, req.headers)
389
389
 
390
390
  ## Compare
391
391
 
392
- **Agent + Provider Matrix** – Compare Vestauth vs existing auth.
392
+ **Agent + Tool Matrix** – Compare Vestauth vs existing auth.
393
393
 
394
394
  | Capability | Vestauth | API Keys | OAuth | Cookies |
395
395
  |---|---|---|---|---|
@@ -398,11 +398,11 @@ const agent = await vestauth.provider.verify(req.method, url, req.headers)
398
398
  | **Agent: no shared secret** | βœ… | ❌ | ⚠️ (bearer tokens) | ❌ |
399
399
  | **Agent: per‑request identity proof** | βœ… | ❌ | ⚠️ (token‑based) | ❌ |
400
400
  | **Agent: easy key/token rotation** | βœ… | ⚠️ | ⚠️ | ⚠️ |
401
- | **Provider: no secret storage** | βœ… (public keys only) | ❌ | ❌ | ❌ |
402
- | **Provider: strong attribution to agent** | βœ… | ⚠️ | ⚠️ | ❌ |
403
- | **Provider: stateless verification** | βœ… | βœ… | βœ… | ❌ |
404
- | **Provider: simple to implement** | ⚠️ (sig verification) | βœ… | ❌ | βœ… |
405
- | **Provider: revocation control** | βœ… | ⚠️ | βœ… | ⚠️ |
401
+ | **Tool: no secret storage** | βœ… (public keys only) | ❌ | ❌ | ❌ |
402
+ | **Tool: strong attribution to agent** | βœ… | ⚠️ | ⚠️ | ❌ |
403
+ | **Tool: stateless verification** | βœ… | βœ… | βœ… | ❌ |
404
+ | **Tool: simple to implement** | ⚠️ (sig verification) | βœ… | ❌ | βœ… |
405
+ | **Tool: revocation control** | βœ… | ⚠️ | βœ… | ⚠️ |
406
406
 
407
407
  Legend: βœ… strong fit, ⚠️ partial/conditional, ❌ poor fit
408
408
 
@@ -410,7 +410,7 @@ Legend: βœ… strong fit, ⚠️ partial/conditional, ❌ poor fit
410
410
 
411
411
  1. An agent generates a public/private keypair.
412
412
  2. The agent signs each HTTP request with its private key.
413
- 3. The provider verifies the signature using the agent’s public key.
413
+ 3. The tool verifies the signature using the agent’s public key.
414
414
  4. Requests are attributable, auditable, and do not require shared secrets or browser sessions.
415
415
 
416
416
  &nbsp;
@@ -424,7 +424,7 @@ Vestauth builds on open internet standards for agent authentication.
424
424
  | **[RFC 9421 – HTTP Message Signatures](https://datatracker.ietf.org/doc/rfc9421/)** | Defines how requests are cryptographically signed and verified |
425
425
  | **[Web-Bot-Auth Draft](https://datatracker.ietf.org/doc/html/draft-meunier-web-bot-auth-architecture)** | Defines headers and authentication architecture for autonomous agents |
426
426
 
427
- Vestauth follows these specifications to ensure interoperability between agents and providers while avoiding vendor lock-in. Vestauth focuses on developer ergonomics while staying compliant with these emerging standards.
427
+ Vestauth follows these specifications to ensure interoperability between agents and tools while avoiding vendor lock-in. Vestauth focuses on developer ergonomics while staying compliant with these emerging standards.
428
428
 
429
429
  &nbsp;
430
430
 
@@ -443,7 +443,7 @@ Vestauth follows these specifications to ensure interoperability between agents
443
443
  >
444
444
  > Most agent systems rely on API keys, bearer tokens, or username/passwords. These approaches are difficult to rotate, easy to leak, and hard to attribute to a specific agent.
445
445
  >
446
- > Vestauth replaces shared secrets with public/private key cryptography. Agents sign requests using a private key, and providers verify those requests using the agent's public key.
446
+ > Vestauth replaces shared secrets with public/private key cryptography. Agents sign requests using a private key, and tools verify those requests using the agent's public key.
447
447
 
448
448
  &nbsp;
449
449
 
@@ -453,7 +453,7 @@ Vestauth follows these specifications to ensure interoperability between agents
453
453
 
454
454
  > API keys are shared secrets. Anyone who obtains the key can impersonate the client, and keys are difficult to rotate safely.
455
455
  >
456
- > Vestauth uses cryptographic signing instead of shared secrets. This allows providers to verify identity without storing or distributing sensitive credentials.
456
+ > Vestauth uses cryptographic signing instead of shared secrets. This allows tools to verify identity without storing or distributing sensitive credentials.
457
457
 
458
458
  &nbsp;
459
459
 
@@ -464,7 +464,7 @@ Vestauth follows these specifications to ensure interoperability between agents
464
464
  > Agent keys are generated locally and stored in the agent's environment configuration (`.env`).
465
465
  >
466
466
  > * `AGENT_PRIVATE_JWK` is used to sign requests and must never be shared.
467
- > * `AGENT_PUBLIC_JWK` is safe to publish and is used by providers for verification.
467
+ > * `AGENT_PUBLIC_JWK` is safe to publish and is used by tools for verification.
468
468
 
469
469
  &nbsp;
470
470
 
@@ -500,7 +500,7 @@ Vestauth follows these specifications to ensure interoperability between agents
500
500
 
501
501
  > No.
502
502
  >
503
- > Vestauth is primarily a client-side and verification library. Agents generate keys locally and sign requests directly. Providers verify requests using public keys exposed via .well-known discovery endpoints.
503
+ > Vestauth is primarily a client-side and verification library. Agents generate keys locally and sign requests directly. Tools verify requests using public keys exposed via .well-known discovery endpoints.
504
504
  >
505
505
  > There is no central authentication server required.
506
506
 
@@ -529,9 +529,9 @@ Vestauth follows these specifications to ensure interoperability between agents
529
529
  > * Signature-Input
530
530
  > * Signature-Agent
531
531
  >
532
- > Providers verify the request by retrieving the agent's public key from a discovery endpoint and verifying the signature cryptographically.
532
+ > Tools verify the request by retrieving the agent's public key from a discovery endpoint and verifying the signature cryptographically.
533
533
  >
534
- > If the signature is valid, the provider knows the request was created by the agent that owns that private key.
534
+ > If the signature is valid, the tool knows the request was created by the agent that owns that private key.
535
535
 
536
536
  &nbsp;
537
537
 
@@ -547,7 +547,7 @@ Vestauth follows these specifications to ensure interoperability between agents
547
547
  > * expires timestamp - defines a short validity window
548
548
  > * nonce value - ensures each request is unique
549
549
  >
550
- > Providers verify that:
550
+ > Tools verify that:
551
551
  >
552
552
  > 1. The signature is still within the allowed time window
553
553
  > 2. The nonce has not been used before
@@ -555,7 +555,7 @@ Vestauth follows these specifications to ensure interoperability between agents
555
555
  >
556
556
  > Because signatures are short-lived and tied to unique nonce values, an intercepted request cannot be reused successfully.
557
557
  >
558
- > Providers may optionally store nonce values for additional replay protection.
558
+ > Tools may optionally store nonce values for additional replay protection.
559
559
 
560
560
  &nbsp;
561
561
 
@@ -563,7 +563,7 @@ Vestauth follows these specifications to ensure interoperability between agents
563
563
 
564
564
  <details><summary>Why does Vestauth use public key discovery?</summary><br>
565
565
 
566
- > Public key discovery allows providers to verify agent signatures without manual key exchange. Each agent hosts its public keys in a standardized .well-known directory.
566
+ > Public key discovery allows tools to verify agent signatures without manual key exchange. Each agent hosts its public keys in a standardized .well-known directory.
567
567
  >
568
568
  > This enables dynamic agent onboarding while preserving cryptographic verification.
569
569
 
@@ -591,16 +591,16 @@ Vestauth follows these specifications to ensure interoperability between agents
591
591
  > *.api.vestauth.com
592
592
  > ```
593
593
  >
594
- > When a provider verifies a request, Vestauth converts the agent identity into a fixed .well-known endpoint within this trusted domain. Because this domain is controlled by Vestauth, providers never fetch attacker-supplied URLs or internal network addresses.
594
+ > When a tool verifies a request, Vestauth converts the agent identity into a fixed .well-known endpoint within this trusted domain. Because this domain is controlled by Vestauth, tools never fetch attacker-supplied URLs or internal network addresses.
595
595
  >
596
596
  > This removes the most common SSRF attack vector during signature verification.
597
597
  >
598
598
  > **Custom trusted discovery domains**
599
599
  >
600
- > Providers can optionally configure additional trusted discovery domains using:
600
+ > Tools can optionally configure additional trusted discovery domains using:
601
601
  >
602
602
  > ```ini
603
- > PROVIDER_FQDN_REGEX
603
+ > TOOL_FQDN_REGEX
604
604
  > ```
605
605
  >
606
606
  > This allows organizations to:
@@ -612,14 +612,14 @@ Vestauth follows these specifications to ensure interoperability between agents
612
612
  > For example:
613
613
  >
614
614
  > ```ini
615
- > PROVIDER_FQDN_REGEX=".*\.agents\.vestauth\.com|.*\.agents\.example\.internal"
615
+ > TOOL_FQDN_REGEX=".*\.agents\.vestauth\.com|.*\.agents\.example\.internal"
616
616
  > ```
617
617
  >
618
618
  > Only discovery endpoints matching this allowlist will be fetched.
619
619
  >
620
620
  > **Defense in depth**
621
621
  >
622
- > Even with domain scoping, providers may optionally add safeguards such as:
622
+ > Even with domain scoping, tools may optionally add safeguards such as:
623
623
  >
624
624
  > * HTTPS-only enforcement
625
625
  > * Request timeouts
@@ -636,17 +636,17 @@ Vestauth follows these specifications to ensure interoperability between agents
636
636
 
637
637
  > Vestauth uses .well-known discovery to keep requests small, enable key rotation, and support long-term identity management.
638
638
  >
639
- > Embedding public keys directly in every request would increase header size, reduce caching opportunities, and make key rotation difficult. By publishing keys through a discovery endpoint, Vestauth allows providers to fetch and cache keys independently from individual requests.
639
+ > Embedding public keys directly in every request would increase header size, reduce caching opportunities, and make key rotation difficult. By publishing keys through a discovery endpoint, Vestauth allows tools to fetch and cache keys independently from individual requests.
640
640
  >
641
641
  > This approach provides several benefits:
642
642
  >
643
643
  > **Efficient requests**
644
644
  >
645
- > Public keys are retrieved once and can be cached by providers. Agents do not need to send large key material with every request.
645
+ > Public keys are retrieved once and can be cached by tools. Agents do not need to send large key material with every request.
646
646
  >
647
647
  > **Key rotation support**
648
648
  >
649
- > Agents can rotate signing keys without changing their identity. Providers simply refresh keys from the discovery endpoint.
649
+ > Agents can rotate signing keys without changing their identity. Tools simply refresh keys from the discovery endpoint.
650
650
  >
651
651
  > **Multi-key support**
652
652
  >
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vestauth",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "auth for agents–from the creator of dotenvx",
5
5
  "keywords": [
6
6
  "vestauth",
@@ -1,7 +1,7 @@
1
1
  const { logger } = require('./../../../shared/logger')
2
2
  const catchAndLog = require('./../../../lib/helpers/catchAndLog')
3
3
 
4
- const provider = require('./../../../lib/provider')
4
+ const tool = require('./../../../lib/tool')
5
5
 
6
6
  async function verify (httpMethod, uri) {
7
7
  try {
@@ -17,7 +17,7 @@ async function verify (httpMethod, uri) {
17
17
  'Signature-Agent': options.signatureAgent
18
18
  }
19
19
 
20
- const output = await provider.verify(httpMethod, uri, headers)
20
+ const output = await tool.verify(httpMethod, uri, headers)
21
21
 
22
22
  let space = 0
23
23
  if (options.prettyPrint) {
@@ -0,0 +1,34 @@
1
+ const { logger } = require('./../../../shared/logger')
2
+ const catchAndLog = require('./../../../lib/helpers/catchAndLog')
3
+
4
+ const tool = require('./../../../lib/tool')
5
+
6
+ async function verify (httpMethod, uri) {
7
+ try {
8
+ logger.debug(`httpMethod: ${httpMethod}`)
9
+ logger.debug(`uri: ${uri}`)
10
+
11
+ const options = this.opts()
12
+ logger.debug(`options: ${JSON.stringify(options)}`)
13
+
14
+ const headers = {
15
+ Signature: options.signature,
16
+ 'Signature-Input': options.signatureInput,
17
+ 'Signature-Agent': options.signatureAgent
18
+ }
19
+
20
+ const output = await tool.verify(httpMethod, uri, headers)
21
+
22
+ let space = 0
23
+ if (options.prettyPrint) {
24
+ space = 2
25
+ }
26
+
27
+ console.log(JSON.stringify(output, null, space))
28
+ } catch (error) {
29
+ catchAndLog(error)
30
+ process.exit(1)
31
+ }
32
+ }
33
+
34
+ module.exports = verify
@@ -12,7 +12,7 @@ const keypairAction = require('./../actions/primitives/keypair')
12
12
  primitives.command('keypair')
13
13
  .description('generate public/private keypair')
14
14
  .option('--private-jwk <privateJwk>', 'pre-existing private JWK')
15
- .option('--prefix <type>', 'agent (default) | provider | none', 'agent')
15
+ .option('--prefix <type>', 'agent (default) | tool | none', 'agent')
16
16
  .option('--pp, --pretty-print', 'pretty print output')
17
17
  .action(keypairAction)
18
18
 
@@ -3,7 +3,7 @@ const { Command } = require('commander')
3
3
  const provider = new Command('provider')
4
4
 
5
5
  provider
6
- .description('πŸ”Œ provider')
6
+ .description('πŸ”¨ provider')
7
7
  .allowUnknownOption()
8
8
 
9
9
  // vestauth provider verify
@@ -0,0 +1,21 @@
1
+ const { Command } = require('commander')
2
+
3
+ const tool = new Command('tool')
4
+
5
+ tool
6
+ .description('πŸ”¨ tool')
7
+ .allowUnknownOption()
8
+
9
+ // vestauth tool verify
10
+ const verifyAction = require('./../actions/tool/verify')
11
+ tool.command('verify')
12
+ .description('verify agent')
13
+ .argument('<httpMethod>', 'GET (default)')
14
+ .argument('<uri>', '')
15
+ .requiredOption('--signature <signature>', '')
16
+ .requiredOption('--signature-input <signatureInput>', '')
17
+ .requiredOption('--signature-agent <signatureAgent>', '')
18
+ .option('--pp, --pretty-print', 'pretty print output')
19
+ .action(verifyAction)
20
+
21
+ module.exports = tool
@@ -39,7 +39,8 @@ program
39
39
  .allowUnknownOption()
40
40
 
41
41
  program.addCommand(require('./commands/agent'))
42
- program.addCommand(require('./commands/provider'))
42
+ program.addCommand(require('./commands/tool'))
43
+ program.addCommand(require('./commands/provider'), { hidden: true })
43
44
  program.addCommand(require('./commands/primitives'))
44
45
 
45
46
  // vestauth help
@@ -1,7 +1,7 @@
1
1
  const verify = require('./verify')
2
2
  const Errors = require('./errors')
3
3
 
4
- async function providerVerify (httpMethod, uri, headers = {}) {
4
+ async function toolVerify (httpMethod, uri, headers = {}) {
5
5
  if (!httpMethod) {
6
6
  throw new Errors().missingHttpMethod()
7
7
  }
@@ -17,4 +17,4 @@ async function providerVerify (httpMethod, uri, headers = {}) {
17
17
  return verify(httpMethod, uri, headers)
18
18
  }
19
19
 
20
- module.exports = providerVerify
20
+ module.exports = toolVerify
@@ -1,14 +1,14 @@
1
- const DEFAULT_PROVIDER_FQDN_REGEX = /^[A-Za-z0-9-]+\.(?:agents|api)\.vestauth\.com$/
1
+ const DEFAULT_TOOL_FQDN_REGEX = /^[A-Za-z0-9-]+\.(?:agents|api)\.vestauth\.com$/
2
2
  const Errors = require('./errors')
3
3
 
4
- function getProviderFqdnRegex () {
5
- const override = process.env.PROVIDER_FQDN_REGEX
6
- if (!override) return DEFAULT_PROVIDER_FQDN_REGEX
4
+ function getToolFqdnRegex () {
5
+ const override = process.env.TOOL_FQDN_REGEX || process.env.PROVIDER_FQDN_REGEX
6
+ if (!override) return DEFAULT_TOOL_FQDN_REGEX
7
7
 
8
8
  try {
9
9
  return new RegExp(override)
10
10
  } catch {
11
- return DEFAULT_PROVIDER_FQDN_REGEX
11
+ return DEFAULT_TOOL_FQDN_REGEX
12
12
  }
13
13
  }
14
14
 
@@ -17,7 +17,7 @@ function verifyAgentFqdn (fqdn) {
17
17
  throw new Errors().invalidSignatureAgent()
18
18
  }
19
19
 
20
- const pattern = getProviderFqdnRegex()
20
+ const pattern = getToolFqdnRegex()
21
21
  if (!pattern.test(fqdn)) {
22
22
  throw new Errors().invalidSignatureAgent()
23
23
  }
package/src/lib/main.js CHANGED
@@ -1,9 +1,12 @@
1
1
  const agent = require('./agent')
2
- const provider = require('./provider')
2
+ const tool = require('./tool')
3
3
  const primitives = require('./primitives')
4
4
 
5
5
  module.exports = {
6
6
  agent,
7
- provider,
8
- primitives
7
+ tool,
8
+ primitives,
9
+
10
+ // deprecate: synonym
11
+ provider: tool
9
12
  }
@@ -0,0 +1,5 @@
1
+ const toolVerify = require('./helpers/toolVerify')
2
+
3
+ module.exports = {
4
+ verify: toolVerify
5
+ }
@@ -1,5 +0,0 @@
1
- const providerVerify = require('./helpers/providerVerify')
2
-
3
- module.exports = {
4
- verify: providerVerify
5
- }