Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delineate intersecting shards #16

Merged
merged 16 commits into from
Jan 3, 2022

Conversation

Sam-Martin
Copy link
Contributor

@Sam-Martin Sam-Martin commented Jan 3, 2022

  • Renamed dedupe_policy_shards to dedupe_policy_shard_subsets to differentiate it from delineate_intersecting_shards.
  • Added delineate_intersecting_shards to reduce the size of PolicyShards which have conditions whose ARPs intersect with ones without conditions.
    This helps clear up #10
  • Improved issubset on PolicyShard to recognise that a shard without conditions CANNOT be a subset of a shard with conditions.
  • Added < and > to PolicyShard.
  • Updated difference on PolicyShard so that it only adds other's conditions to self's not_conditions if self is allow and other is deny.
  • Added documentation on how PolicyShard dedupe works
  • Renamed ConditionCollection to RawConditionCollection
  • Ensured that Conditions are always treated as a set not a list.
  • Ensured that Condition's Operator, Key, Values are always of type ConditionOperator, ConditionKey and ConditionValue.
  • Corrected bug in CaseInsensitiveString that caused it to generate case sensitive hashes.
  • Added dedupe_result param to difference method on PolicyShard to allow merging of intersecting shards that are not subsets of one another.
  • Added intersection to PolicyShard.
  • Prevent attempting to calculate the difference between a Deny shard and an Allow shard. Other way makes sense as that's effective permission.
  • Updated PolicyShard implementation to Support pydantic 1.9

@Sam-Martin Sam-Martin merged commit 780cae1 into main Jan 3, 2022
@Sam-Martin Sam-Martin deleted the bugfix/dedupe-policyshards-with-conditions branch January 3, 2022 20:26
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