Skip to content

Instantly share code, notes, and snippets.

@dtornow
Last active March 18, 2019 17:10
Show Gist options
  • Save dtornow/b354e6ec9f197b5f9d639cf2157d7bc0 to your computer and use it in GitHub Desktop.
Save dtornow/b354e6ec9f197b5f9d639cf2157d7bc0 to your computer and use it in GitHub Desktop.
RBAC
Matches(Binding, User) ≝
∃ Subject ∈ Binding.Subjects:
CASE Subject.Kind = "User" ⟶
Subject.Name = User.Name
[] Subject.Kind = "Group" ⟶
Subject.Name \in User.Groups
[] Subject.Kind = "ServiceAccount" ⟶
ServiceAccount(Subject.Name, WithDefault(Subject.Namespace, Binding.Namespace)) = User.Name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment