Skip to content

Commit

Permalink
add relations to type key in OpenFGA model
Browse files Browse the repository at this point in the history
  • Loading branch information
MGTheTrain committed Nov 18, 2024
1 parent 1278ae0 commit 3e33490
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion docs/diagrams/openfga.dsl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ type user_group
define grantee: [user] # A user who has been granted permissions for an owner's blob
define admin: [user] # Admin can manage all blobs, including cryptographic actions

type key
relations
define manage_cryptographic_keys: admin
define create_own_cryptographic_keys: owner

# Ownership and user roles
define owner: [user, user_group#owner]
define admin: [user, user_group#admin] # Admin can manage all blobs, including cryptographic actions


type blob
relations
# Permissions related to file management
Expand All @@ -18,7 +28,6 @@ type blob
define can_view_blobs_with_given_permission: grantee

# Cryptographic actions
define create_own_cryptographic_keys: owner
define encrypt_decrypt_own_files: owner
define generate_signature_for_own_files: owner
define verify_file_signature: owner or grantee # Public key verification is possible for grantee
Expand Down

0 comments on commit 3e33490

Please sign in to comment.