Skip to content

Level checking soundness proof#533

Merged
john-h-kastner-aws merged 136 commits intomainfrom
levels-checking
Apr 11, 2025
Merged

Level checking soundness proof#533
john-h-kastner-aws merged 136 commits intomainfrom
levels-checking

Conversation

@john-h-kastner-aws
Copy link
Contributor

@john-h-kastner-aws john-h-kastner-aws commented Feb 7, 2025

Proves that level based entity slicing at level n cannot change the authorization decision when using polices that validate at level n.

The main theorem is

theorem validate_with_level_is_sound {ps : Policies} {schema : Schema} {n : Nat} {request : Request} {entities slice : Entities}
  (hr : validateRequest schema request = .ok ())
  (he : validateEntities schema entities = .ok ())
  (hs : slice = entities.sliceAtLevel request n)
  (htl : validateWithLevel ps schema n = .ok ()) :
  isAuthorized request entities ps = isAuthorized request slice ps

Signed-off-by: John Kastner <jkastner@amazon.com>
Signed-off-by: John Kastner <jkastner@amazon.com>
Signed-off-by: John Kastner <jkastner@amazon.com>
Signed-off-by: John Kastner <jkastner@amazon.com>
Signed-off-by: John Kastner <jkastner@amazon.com>
Signed-off-by: John Kastner <jkastner@amazon.com>
Signed-off-by: John Kastner <jkastner@amazon.com>
Signed-off-by: John Kastner <jkastner@amazon.com>
Signed-off-by: John Kastner <jkastner@amazon.com>
Signed-off-by: John Kastner <jkastner@amazon.com>
Signed-off-by: John Kastner <jkastner@amazon.com>
Signed-off-by: John Kastner <jkastner@amazon.com>
Signed-off-by: John Kastner <jkastner@amazon.com>
Signed-off-by: John Kastner <jkastner@amazon.com>
Signed-off-by: John Kastner <jkastner@amazon.com>
Signed-off-by: John Kastner <jkastner@amazon.com>
Signed-off-by: John Kastner <jkastner@amazon.com>
Signed-off-by: John Kastner <jkastner@amazon.com>
Signed-off-by: John Kastner <jkastner@amazon.com>
Signed-off-by: John Kastner <jkastner@amazon.com>
Signed-off-by: John Kastner <jkastner@amazon.com>
Base automatically changed from type-annot-inversion to main April 8, 2025 18:08
@john-h-kastner-aws john-h-kastner-aws marked this pull request as ready for review April 8, 2025 19:27
@john-h-kastner-aws john-h-kastner-aws changed the title Level checking implementation and proof (WIP) Level checking soundness proof Apr 8, 2025
Signed-off-by: John Kastner <jkastner@amazon.com>
Copy link
Contributor

@emina emina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Copy link

@chaluli chaluli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@john-h-kastner-aws john-h-kastner-aws merged commit 090f863 into main Apr 11, 2025
6 checks passed
@john-h-kastner-aws john-h-kastner-aws deleted the levels-checking branch April 14, 2025 17:46
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.

4 participants