Skip to content

feat(store): add concept of policy statement groups#71

Merged
freakyfelt merged 7 commits intomainfrom
bruce/feat-add-policy-groups
Mar 7, 2023
Merged

feat(store): add concept of policy statement groups#71
freakyfelt merged 7 commits intomainfrom
bruce/feat-add-policy-groups

Conversation

@freakyfelt
Copy link
Copy Markdown
Owner

This PR adds the ability to group statements by a group ID (gid), allowing consuming systems to ingest a policy document and keep track of their relationship. It also renames PolicyStore#add -> PolicyStore#set since it is technically replacing whatever is present. Finally this PR adds more test coverage

  • refactor!(parsed-policy-statement): drop extending original statement and instead use a custom shape
  • feat(store): add byGID index
  • refactor(store): isolate discrete steps for better reusability

@freakyfelt freakyfelt merged commit 094e2e3 into main Mar 7, 2023
@freakyfelt freakyfelt deleted the bruce/feat-add-policy-groups branch March 7, 2023 21:56
github-actions bot pushed a commit that referenced this pull request Mar 8, 2023
# [1.1.0](v1.0.0...v1.1.0) (2023-03-08)

### Features

* **policy-resolver:** use an LRU cache instead of a map ([03ad4f7](03ad4f7))
* **store:** add concept of policy statement groups ([#71](#71)) ([094e2e3](094e2e3))
* use an event emitter to invalidate caches ([032ac8d](032ac8d))
freakyfelt added a commit that referenced this pull request Mar 8, 2023
* **policy-resolver:** use an LRU cache instead of a map ([03ad4f7](03ad4f7))
* **store:** add concept of policy statement groups ([#71](#71)) ([094e2e3](094e2e3))
* use an event emitter to invalidate caches ([032ac8d](032ac8d))
freakyfelt added a commit that referenced this pull request Mar 8, 2023
* **policy-resolver:** use an LRU cache instead of a map ([03ad4f7](03ad4f7))
* **store:** add concept of policy statement groups ([#71](#71)) ([094e2e3](094e2e3))
* use an event emitter to invalidate caches ([032ac8d](032ac8d))
github-actions bot pushed a commit that referenced this pull request Mar 8, 2023
# [1.1.0](v1.0.0...v1.1.0) (2023-03-08)

### Features

* **policy-resolver:** use an LRU cache instead of a map ([03ad4f7](03ad4f7))
* **store:** add concept of policy statement groups ([#71](#71)) ([094e2e3](094e2e3))
* use an event emitter to invalidate caches ([032ac8d](032ac8d))
freakyfelt added a commit that referenced this pull request Mar 8, 2023
* **policy-resolver:** use an LRU cache instead of a map ([03ad4f7](03ad4f7))
* **store:** add concept of policy statement groups ([#71](#71)) ([094e2e3](094e2e3))
* use an event emitter to invalidate caches ([032ac8d](032ac8d))
freakyfelt added a commit that referenced this pull request Mar 8, 2023
* refactor: make ParsedPolicyStatement its own thing

* refactor: use arrayify in parser

* feat: add addGroup and deleteGroup

* fix(store): use correct filter for exact reindexing

* chore(store): add tests for add/deleteGroup

* refactor: add -> set since we are replacing statements by sid

* chore: add more test coverage
freakyfelt added a commit that referenced this pull request Mar 8, 2023
* **policy-resolver:** use an LRU cache instead of a map ([03ad4f7](03ad4f7))
* **store:** add concept of policy statement groups ([#71](#71)) ([094e2e3](094e2e3))
* use an event emitter to invalidate caches ([032ac8d](032ac8d))
freakyfelt added a commit that referenced this pull request Mar 8, 2023
* refactor: make ParsedPolicyStatement its own thing

* refactor: use arrayify in parser

* feat: add addGroup and deleteGroup

* fix(store): use correct filter for exact reindexing

* chore(store): add tests for add/deleteGroup

* refactor: add -> set since we are replacing statements by sid

* chore: add more test coverage
freakyfelt added a commit that referenced this pull request Mar 8, 2023
* **policy-resolver:** use an LRU cache instead of a map ([03ad4f7](03ad4f7))
* **store:** add concept of policy statement groups ([#71](#71)) ([094e2e3](094e2e3))
* use an event emitter to invalidate caches ([032ac8d](032ac8d))
github-actions bot pushed a commit that referenced this pull request Mar 8, 2023
# [2.0.0](v1.0.0...v2.0.0) (2023-03-08)

* feat!: rewrite to simpler interface ([167d5f3](167d5f3))

### Features

* **policy-resolver:** use an LRU cache instead of a map ([9fac528](9fac528))
* **store:** add concept of policy statement groups ([#71](#71)) ([67dc8c2](67dc8c2))
* use an event emitter to invalidate caches ([15363f7](15363f7))

### BREAKING CHANGES

* the 2.x interface drops environments and resource types
freakyfelt added a commit that referenced this pull request Mar 8, 2023
* refactor: make ParsedPolicyStatement its own thing

* refactor: use arrayify in parser

* feat: add addGroup and deleteGroup

* fix(store): use correct filter for exact reindexing

* chore(store): add tests for add/deleteGroup

* refactor: add -> set since we are replacing statements by sid

* chore: add more test coverage
freakyfelt added a commit that referenced this pull request Mar 8, 2023
* **policy-resolver:** use an LRU cache instead of a map ([03ad4f7](03ad4f7))
* **store:** add concept of policy statement groups ([#71](#71)) ([094e2e3](094e2e3))
* use an event emitter to invalidate caches ([032ac8d](032ac8d))
freakyfelt pushed a commit that referenced this pull request Mar 8, 2023
# [2.0.0](v1.0.0...v2.0.0) (2023-03-08)

* feat!: rewrite to simpler interface ([167d5f3](167d5f3))

### Features

* **policy-resolver:** use an LRU cache instead of a map ([9fac528](9fac528))
* **store:** add concept of policy statement groups ([#71](#71)) ([67dc8c2](67dc8c2))
* use an event emitter to invalidate caches ([15363f7](15363f7))

### BREAKING CHANGES

* the 2.x interface drops environments and resource types
freakyfelt added a commit that referenced this pull request Mar 8, 2023
* refactor: make ParsedPolicyStatement its own thing

* refactor: use arrayify in parser

* feat: add addGroup and deleteGroup

* fix(store): use correct filter for exact reindexing

* chore(store): add tests for add/deleteGroup

* refactor: add -> set since we are replacing statements by sid

* chore: add more test coverage
freakyfelt added a commit that referenced this pull request Mar 8, 2023
* **policy-resolver:** use an LRU cache instead of a map ([03ad4f7](03ad4f7))
* **store:** add concept of policy statement groups ([#71](#71)) ([094e2e3](094e2e3))
* use an event emitter to invalidate caches ([032ac8d](032ac8d))
freakyfelt pushed a commit that referenced this pull request Mar 8, 2023
# [2.0.0](v1.0.0...v2.0.0) (2023-03-08)

* feat!: rewrite to simpler interface ([167d5f3](167d5f3))

### Features

* **policy-resolver:** use an LRU cache instead of a map ([9fac528](9fac528))
* **store:** add concept of policy statement groups ([#71](#71)) ([67dc8c2](67dc8c2))
* use an event emitter to invalidate caches ([15363f7](15363f7))

### BREAKING CHANGES

* the 2.x interface drops environments and resource types
github-actions bot pushed a commit that referenced this pull request Mar 8, 2023
# [2.0.0](v1.0.0...v2.0.0) (2023-03-08)

### Bug Fixes

* **resolver:** return false if a deny statement is missing context ([7efaa56](7efaa56))

* feat!: rewrite to simpler interface ([f3a11b3](f3a11b3))

### Features

* **policy-resolver:** use an LRU cache instead of a map ([2c573b1](2c573b1))
* **store:** add concept of policy statement groups ([#71](#71)) ([c93708f](c93708f))
* use an event emitter to invalidate caches ([6ab9059](6ab9059))

### BREAKING CHANGES

* the 2.x interface drops environments and resource types
github-actions bot pushed a commit that referenced this pull request Mar 8, 2023
# [2.0.0](v1.0.0...v2.0.0) (2023-03-08)

### Bug Fixes

* **resolver:** return false if a deny statement is missing context ([7efaa56](7efaa56))

* feat!: rewrite to simpler interface ([f3a11b3](f3a11b3))

### Features

* **policy-resolver:** use an LRU cache instead of a map ([2c573b1](2c573b1))
* **store:** add concept of policy statement groups ([#71](#71)) ([c93708f](c93708f))
* use an event emitter to invalidate caches ([6ab9059](6ab9059))

### BREAKING CHANGES

* the 2.x interface drops environments and resource types
freakyfelt pushed a commit that referenced this pull request Mar 8, 2023
# [2.0.0](v1.0.0...v2.0.0) (2023-03-08)

### Bug Fixes

* **resolver:** return false if a deny statement is missing context ([7efaa56](7efaa56))

* feat!: rewrite to simpler interface ([f3a11b3](f3a11b3))

### Features

* **policy-resolver:** use an LRU cache instead of a map ([2c573b1](2c573b1))
* **store:** add concept of policy statement groups ([#71](#71)) ([c93708f](c93708f))
* trigger ci ([6c141ff](6c141ff))
* use an event emitter to invalidate caches ([6ab9059](6ab9059))

### BREAKING CHANGES

* the 2.x interface drops environments and resource types
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant