5.0.0 • Published 10 months ago

@lifeomic/abac v5.0.0

Weekly downloads
3,676
License
MIT
Repository
github
Last release
10 months ago

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

Terminology

  • Rules
    • Comparison
      • endsWith: value being checked that ends with an exact string value
      • equals: value being checked is exactly equal to the value defined in the ABAC policy
      • in: value being checked is contained within the array in ABAC policy
      • includes: array of values includes the value in the ABAC policy
      • notEquals: value being checked does not equal the value defined in the ABAC policy
      • notIn: value not in ABAC array
      • notIncludes: array of values does not include the value in the ABAC policy
      • prefixOf: value being checked is a prefix of the value defined in the ABAC policy
      • startsWith: value being checked starts with an exact string value
      • subset: array of values is a subset of the array in the ABAC policy
      • suffixOf: value being checked is a suffix of the value defined in the ABAC policy
      • superset: array of values is a superset of the array in the ABAC policy
    • Target
      • Value of another attribute
    • Value
      • Literal value

Usage

TypeScript usage:

import * as abac from '@lifeomic/abac';

abac.validate(policy);
abac.merge(policies);
abac.reduce(policy, attributes);
abac.extract(policy, privileges, attribute);
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.

Release process

Increment the version in package.json, make a PR, merge the PR, and then finally create a new release using the github UI. Creating the release will publish the head of master to npm. Name the release vX.Y.Z to match the version in package.json.

5.0.0

10 months ago

4.10.1

11 months ago

4.10.2

10 months ago

4.10.3

10 months ago

4.9.1

1 year ago

4.10.0

12 months ago

4.9.0

2 years ago

4.8.0

2 years ago

4.7.0

2 years ago

4.6.1

2 years ago

4.6.0

3 years ago

4.5.5

3 years ago

4.5.3

3 years ago

4.5.2

3 years ago

4.5.1

3 years ago

4.5.0

3 years ago

4.3.1

3 years ago

4.3.0

3 years ago

4.2.0

4 years ago

4.1.0

4 years ago

4.0.2

4 years ago

4.0.1

4 years ago

4.0.0

4 years ago

3.4.0

5 years ago

3.3.0

5 years ago

3.2.0

5 years ago

3.1.1

5 years ago

3.1.0

5 years ago

3.0.0

5 years ago

2.1.0

5 years ago

2.0.5

5 years ago

2.0.4

5 years ago

2.0.3

5 years ago

2.0.2

6 years ago

2.0.0

6 years ago

1.3.0

6 years ago

1.2.2

6 years ago

1.2.1

6 years ago

1.2.0

6 years ago

1.1.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago