New:Socket for Asana Is Now Available.Learn more
Get Started

@grantex/conformance

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@grantex/conformance

Conformance test suite for the Grantex protocol

Source
npmnpm
Version
0.1.6
Version published
Weekly downloads
153
2450%
Maintainers
1
Weekly downloads
 
Created
Source

@grantex/conformance

Conformance test suite for the Grantex protocol. Validates that a server implementation correctly implements the Grantex specification by running black-box HTTP tests against a live endpoint.

Quick Start

npx @grantex/conformance --base-url http://localhost:3001 --api-key YOUR_API_KEY

Installation

npm install -g @grantex/conformance

Usage

grantex-conformance --base-url URL --api-key KEY [options]

Options:
  --base-url <url>       Base URL of the Grantex auth service (required)
  --api-key <key>        API key for authentication (required)
  --suite <name>         Run a specific suite only
  --include <ext,...>    Include optional extensions (comma-separated)
  --format <format>      Output format: text or json (default: text)
  --bail                 Stop on first failure
  -h, --help             Display help

Run all core suites

grantex-conformance --base-url http://localhost:3001 --api-key sk_test_xxx

Run a single suite

grantex-conformance --base-url http://localhost:3001 --api-key sk_test_xxx --suite health

Include optional extensions

grantex-conformance --base-url http://localhost:3001 --api-key sk_test_xxx \
  --include policies,webhooks,scim

JSON output

grantex-conformance --base-url http://localhost:3001 --api-key sk_test_xxx --format json

Core Suites (40 tests)

SuiteTestsDescription
health2Health check endpoint and JWKS key validation
agents5Agent registration, listing, retrieval, update, deletion
authorize4Authorization request creation and consent flow
token3Token exchange, invalid code rejection, code reuse prevention
tokens4Token verification, revocation, post-revoke verification
grants4Grant listing, retrieval, revocation, status validation
delegation5Grant delegation, JWT claims, scope enforcement, depth limits, cascade revocation
audit5Audit log creation, hash chain integrity, entry retrieval
security5Auth enforcement, JWKS algorithm, scope escalation prevention, audit immutability
rate-limit-headers3Rate limit header presence and format, JWKS endpoint exemption

Optional Extensions

SuiteTestsDescription
policies5Policy CRUD operations
webhooks3Webhook registration and management
scim6SCIM 2.0 provisioning endpoints
sso4SSO configuration and flow
anomalies3Anomaly detection and acknowledgement
compliance4Compliance reporting and evidence export

Programmatic API

import { runConformanceTests } from '@grantex/conformance/runner';
import { reportJson } from '@grantex/conformance/reporter';

const report = await runConformanceTests({
  baseUrl: 'http://localhost:3001',
  apiKey: 'sk_test_xxx',
  format: 'json',
  bail: false,
});

console.log(reportJson(report));

Server Requirements

  • The server must implement the Grantex protocol endpoints
  • An API key with sufficient permissions to create agents, authorize, and manage grants
  • For sandbox mode servers, authorization codes are returned directly
  • For non-sandbox servers, the /v1/consent/:id/approve endpoint must be available

Exit Codes

CodeMeaning
0All tests passed
1One or more tests failed
2Configuration or runtime error

License

Apache-2.0

Keywords

grantex

FAQs

Package last updated on 08 Mar 2026

Related posts