Skip to content

Commit

Permalink
feat(authz): Typed Entities (#1249)
Browse files Browse the repository at this point in the history
Add Category field to Entity struct
Environment entities not included in access decision
 
resolves #1220
documentation: opentdf/docs#37
  • Loading branch information
elizabethhealy authored Aug 9, 2024
1 parent 9921962 commit cfab3ad
Show file tree
Hide file tree
Showing 10 changed files with 632 additions and 253 deletions.
42 changes: 41 additions & 1 deletion docs/grpc/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 14 additions & 1 deletion docs/openapi/authorization/authorization.swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 14 additions & 1 deletion docs/openapi/entityresolution/entity_resolution.swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions examples/cmd/authorization.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@ func authorizationExamples() error {

// model two groups of entities; user bob and user alice
entityChains := []*authorization.EntityChain{{
Id: "ec1", // ec1 is an arbitrary tracking id to match results to request
Entities: []*authorization.Entity{{EntityType: &authorization.Entity_EmailAddress{EmailAddress: "[email protected]"}}},
Id: "ec1", // ec1 is an arbitrary tracking id to match results to request
Entities: []*authorization.Entity{{EntityType: &authorization.Entity_EmailAddress{EmailAddress: "[email protected]"},
Category: authorization.Entity_CATEGORY_SUBJECT}},
}, {
Id: "ec2", // ec2 is an arbitrary tracking id to match results to request
Entities: []*authorization.Entity{{EntityType: &authorization.Entity_UserName{UserName: "[email protected]"}}},
Id: "ec2", // ec2 is an arbitrary tracking id to match results to request
Entities: []*authorization.Entity{{EntityType: &authorization.Entity_UserName{UserName: "[email protected]"},
Category: authorization.Entity_CATEGORY_SUBJECT}},
}}

// TODO Get attribute value ids
Expand Down
Loading

0 comments on commit cfab3ad

Please sign in to comment.