npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@zanii/identity-bridge

v0.2.0

Published

Consume enterprise agent identity as an input, don't compete with it. Bind a Microsoft Entra Agent ID or a SPIFFE SVID to a Zanii did:key with a two-way attestation - the external identity's subject and the did:key both sign the same binding, so a Zanii r

Downloads

276

Readme

@zanii/identity-bridge

Consume enterprise agent identity — don't compete with it. Enterprises just deployed Microsoft Entra Agent ID, Okta for AI Agents, and SPIFFE. Asking them to rip that out for a Zanii did:key loses the deal. Instead bind the identity they already trust to a Zanii key, so a Zanii receipt is provably by the agent their IdP governs — one keypair, two identity systems.

npm install @zanii/identity-bridge @zanii/core
import { buildBinding, verifyBinding, bindingReceipt } from '@zanii/identity-bridge';

// the agent signs the Zanii side of the binding to its Entra identity:
const binding = buildBinding(
  { did: agent.did, scheme: 'entra', externalId: entraObjectId, issuer: tenant, ts: now },
  agent.privateKey,
);
await zanii.record(bindingReceipt(binding));   // anchor it into the agent's history

// anyone verifies both sides — the did:key signature AND the enterprise token:
const check = await verifyBinding(binding, presentedToken, myEntraVerifier);
check.ok;        // did:key signed it, AND the IdP authenticated a token for the SAME subject
check.identity;  // { scheme, external_id, issuer }

Python: from zanii.identity_bridge import build_binding, verify_binding, ...

Injected verification (the @zanii/attest discipline)

This package does not fetch Entra JWKS or validate a SPIFFE X.509 chain — that pins you to token formats that change and needs live tenants to test. You pass a verifyToken(token) → { scheme, external_id, issuer } | null — your existing Entra/SPIFFE/OIDC middleware already does exactly this. We verify the binding; you supply the trust root. Schemes: entra, spiffe, oidc (scheme-agnostic — a SPIFFE SVID binds the same way an Entra JWT does).

The two-way check fails unless both sides agree: a binding signed by the Zanii key but backed by a token for a different subject is rejected with subject mismatch.

The limit, stated up front

The binding is only as strong as the injected verifier. It proves "the holder of this did:key presented a token your IdP issued for subject X" — it does not re-derive Microsoft's or SPIFFE's trust, and it cannot vouch for an IdP you don't actually check. Bind an identity you verify; never one you merely received.