@vensofts-integration-testkit/authz-pro
v0.1.4
Published
Authorization Contract SDK Pro: access lifecycle orchestration (grant/use/revoke, role change, suspension, deferred jobs), old/fresh session checks with deadlines.
Maintainers
Readme
@vensofts-integration-testkit/authz-pro
Pro features for the NodeSDK Authorization Contract SDK: reports for CI dashboards and code
scanning, lifecycle scenarios (revocation, downgrades, stale sessions), and analysis that finds the
mistakes your tests cannot see. Commercial license (see LICENSE).
Works with @vensofts-integration-testkit/authz-core
and @vensofts-integration-testkit/authz-cli.
Node.js 22 or newer.
Pricing
The free packages (authz-core, authz-cli, scenario-core, scenario-postgres, scenario-cli,
license-core, test-witness) need no license file. The Pro features need a trial or Pro license
file; one license covers every Pro package: authz-pro, scenario-pro and suite.
| Plan | Price | Includes | | --------- | ------------------------------- | --------------------------------------------------------------------------- | | Trial | Free for 14 days | Every Pro feature, to try on your own project. Expires after 14 days. | | Pro | USD 299 / year per organization | Every Pro feature for your whole organization, email support. Renew yearly. |
When a license expires, the Pro features stop with exit code 5 until you renew; the free packages keep working. The command line reminds you during a trial and in the last 14 days of a license.
To start a trial or buy Pro, email [email protected] with your organization's name. You receive an invoice, and after payment a license file.
Features
| Feature | What you get |
| ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Reports (authz.reports) | A standalone, accessible HTML report (strict CSP, no network requests), JUnit for test dashboards, SARIF 2.1.0 for GitHub code scanning, and a Markdown job summary |
| Lifecycle scenarios (authz.lifecycle) | Revoked grants, role downgrades, suspensions, tenant moves, archival and expiry, tested with old and fresh sessions, deadlines and deferred jobs. A cache or session that keeps access is reported as stale-after-revoke |
| Sensitivity analysis (authz.sensitivity) | Mutates your contract (drops conditions, flips effects, widens states) and lists blind spots: mistakes your current test data would not catch, with the missing test record that would |
| Contract review (authz.review) | Turns a contract change into the concrete allow/deny changes it causes and checks them against an approval file. Changes are never auto-approved |
See what you get
These come from a real run against the demo app that ships with this SDK's tests, with one bug switched on: the document endpoints forget to check the tenant, so people from other companies can read and export your documents.
HTML report. One standalone file you can attach to a ticket or open from CI. It is filtered here to the failures, and each one opens into its evidence and the contract rule behind it.


Markdown job summary. Shown on the GitHub Actions run page (excerpt):
Authorization contract project-access@1 — exit 1
| declared | runnable | exercised | pass | fail | unresolved | | -------: | -------: | --------: | ---: | ---: | ---------: | | 1060 | 1060 | 1060 | 998 | 62 | 0 |
| case | classification | reason | | ------------------------------------ | ------------------ | ------------------------------- | | document.read#0:stranger:docA | unauthorized-allow | expected deny (404) but got 200 | | document.export#0:stranger:docA | unauthorized-allow | expected deny (404) but got 202 | | document.read#0:suspendedMember:docA | unauthorized-allow | expected deny (404) but got 200 | | document.export#0:revokedGuest:docA | unauthorized-allow | expected deny (404) but got 202 |
Sensitivity analysis. Run on a deliberately thin set of test data, it lists contract rules your tests could get wrong without noticing, and the exact test record that would catch each one:
$ npx authz sensitivity --license license.json
mutants: 125, killed 9, blind spots 115, equivalent 1, score 0.073
blind spot drop-conjunct:doc-read-member:0: rule doc-read-member: condition {actorState:{in:[active]}} removed
missing witness: document.read: actor suspended, active viewer in the resource tenant; document state active, classification=internal
blind spot drop-conjunct:doc-read-member:2: rule doc-read-member: condition {state:{in:[active,archived]}} removed
missing witness: document.read: actor active, active viewer in the resource tenant; document state deleted, classification=internalSARIF results appear as code-scanning alerts on pull requests, and JUnit results appear in any CI test dashboard.
Use with the CLI
npm install --save-dev @vensofts-integration-testkit/authz-cli @vensofts-integration-testkit/authz-core @vensofts-integration-testkit/authz-pro
npx authz run --format json,html,junit,sarif,md --out-dir reports --license license.json
npx authz sensitivity --license license.json
npx authz review --base ./contract-main.mjs --approval approval.json --license license.jsonInstead of --license, you can set license: { file: 'license.json' } in authz.config.mjs.
Use as a library
Also install @vensofts-integration-testkit/license-core, which loads and checks the license file.
import { readFileSync } from 'node:fs';
import { entitlementOrThrow } from '@vensofts-integration-testkit/license-core';
import { renderHtml } from '@vensofts-integration-testkit/authz-pro';
const entitlement = entitlementOrThrow(readFileSync('license.json', 'utf8'), { product: 'authz' });
const html = renderHtml(report, entitlement); // report from authz-core's buildReportKeep the license file private
- Don't commit it to a public repository.
- In CI, store it as a secret and write it to a file before the run, for example:
echo "$NODESDK_LICENSE" > license.json.
The license is checked offline: no network call, no machine fingerprint, no phoning home.
Without a valid license, a Pro feature stops with exit code 5 and a clear message
(FEATURE_UNLICENSED, LICENSE_RELEASE_NOT_COVERED, …). It never silently runs a smaller test.
