Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

@lifeomic/abac

4.1.0 • Public • Published

abac

This is a Javascript implementation of Attribute Based Access Control use in Lifeomic products.

This module is suitable for use in both UIs and backend node.js services.

Installation

yarn install @lifeomic/abac

Usage

TypeScript usage:

import * as abac from '@lifeomic/abac';
 
abac.validate(policy);
abac.merge(policies);
abac.reduce(policy, attributes);
abac.enforce(operationName, policy, attributes);
abac.enforceLenient(operationName, policy, attributes);
abac.enforceAny(operationName, policy, attributes);
abac.privileges(policy, attributes);
abac.privilegesLenient(policy, attributes);
abac.policyRequiresAttribute(policy, attribute);

See unit tests in /test folder - many good examples.

Keywords

none

Install

npm i @lifeomic/abac

DownloadsWeekly Downloads

4,437

Version

4.1.0

License

MIT

Unpacked Size

150 kB

Total Files

35

Last publish

Collaborators

  • avatar
  • avatar