Install
Hello, world
The canonical execution-boundary surface.protect() mints and
verifies a Permit end-to-end and returns it on
success. There is no allow/deny return discriminator — if protect()
resolves, the action is authorized.
withPermit() — lexically-scoped form
When the action body is a single scope, bind it to the permit’s
lifetime directly. Same wire contract as protect(); same audit-chain
entry. The callback runs only on a verified permit.
protect() returns the Permit to the caller; withPermit() binds it
to the callback. Pick the form that fits the call site — both produce
identical wire calls, identical audit-chain entries, and identical
fail-closed semantics. Errors thrown inside the callback propagate
untouched; the permit is already consumed by the verify step, so
there is no compensating revoke.
requirePermit() — descriptor form
For dangerous operations described by a richer ProtectedAction
(resource_id, environment):
Error model
protect() and withPermit() collapse policy denial, hold,
escalate, and verification failure into AtlaSentDeniedError.
Inspect err.decision ("deny" / "hold" / "escalate") if you
need to branch.
Inspecting the four-value decision
protect() and withPermit() raise on anything other than allow.
If you need to inspect hold / escalate at the call site — for
example, to route to an approval queue — drop down to the raw
evaluate() primitive on AtlaSentClient:
evaluate() does not verify the permit for you. Callers using the
raw primitive must call verifyPermitById() before executing — see
Verify a permit explicitly.
SCIM provisioning
Manage SCIM 2.0 user and group provisioning viaclient.scim.
client.scim.groups.*. See SCIM 2.0 provisioning guide for IdP configuration.
Token management
Multi-IdP token refresh viaclient.auth. Use this in programmatic integrations that maintain long-lived access tokens.
Evidence bundles
Create and download compliance evidence bundles.Links
- Source:
atlasent-sdk/typescript - Changelog:
/changelog/sdks#typescript - Bundle size: 11 KB gzipped (core); 14 KB with audit iterators.