Skip to content

Exports

The full public surface of the package, by entry point.

Main entry — @alexify/kerberos

ExportPurpose
KerberosMain authorization engine.
Effect{ Allow: 'EFFECT_ALLOW', Deny: 'EFFECT_DENY' }.
ResourcePolicy, PrincipalPolicy, RolePolicy, DerivedRolesPolicy classes (rarely constructed directly).
Conditions, Variables, Constants, OutputsDSL building blocks.
createSafeExprCodec, serializePolicy, deserializePolicySafe AST codec for dynamic/stored policies.
PlanKind{ AlwaysAllowed, AlwaysDenied, Conditional }query plan filter kinds.
expandRelationOperandsMaterializes ReBAC relation operands of a query plan into id filters.
KerberosValidationError, KerberosCacheError, KerberosCodecError, KerberosExprError, KerberosRelationsErrorTyped error classes.
registerAjvKeywords, createAjvAdapterValidation helpers.
JsonSchemas, TypeBoxSchemas, ZodSchemas, KerberosJsonSchemas, ResourcePolicyJsonSchemas, PrincipalPolicyJsonSchemas, RolePolicyJsonSchemas, …Schema builders for the three backends.
ALL_ACTIONS, ALL_ROLES, ALL_RESOURCES, DEFAULT_VERSION, BASE_SCOPEWildcard/default tokens ('*', 'default', '').

@alexify/kerberos/relations

Opt-in ReBAC — kept out of the main entry so non-ReBAC bundles do not grow:

ExportPurpose
RelationResolverThe built-in Zanzibar-lite resolver (check / list / lookupSubjects / lookupResources).
RelationSchemaCompiles the relation-schema DSL standalone (validated schemas reusable across resolvers).
Relations*Schemas, parse helpersSchema builders / parsers for the resolver's shapes (three validation backends).

@alexify/kerberos/tests

Dev/test only — not loaded by the main entry:

ExportPurpose
KerberosTest, KerberosTestsCerbos-style declarative test runner.
PrincipalMock, PrincipalsMock, ResourceMock, ResourcesMockNamed fixtures for test suites.
*ZodSchemas, *JsonSchemas, *TypeBoxSchemasSchema builders for the test harness.

Released under the MIT License.