-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #59, Switch some older "0.5" IDQL versions and switched to hexa…
…policy.IdqlVersion Signed-off-by: Phil Hunt <phil.hunt@independentid.com>
- Loading branch information
1 parent
c8a1cb3
commit d559e07
Showing
8 changed files
with
181 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
{ | ||
"policies": [ | ||
{ | ||
"meta": { | ||
"policyId": "GetUsers", | ||
"version": "0.6", | ||
"description": "Get information (e.g. email, picture) associated with a user" | ||
}, | ||
"subject": { | ||
"members": ["anyAuthenticated"] | ||
}, | ||
"actions": [ | ||
{ | ||
"actionUri": "can_read_user" | ||
} | ||
], | ||
"object": { | ||
"resource_id": "todo" | ||
} | ||
}, | ||
{ | ||
"meta": { | ||
"policyId": "GetTodos", | ||
"version": "0.6", | ||
|
||
"description": "Get the list of todos. Always returns true for every user??" | ||
}, | ||
"subject": { | ||
"members": ["anyAuthenticated"] | ||
}, | ||
"actions": [ | ||
{ | ||
"actionUri": "can_read_todos" | ||
} | ||
], | ||
"object": { | ||
"resource_id": "todo" | ||
} | ||
}, | ||
{ | ||
"meta": { | ||
"version": "0.6", | ||
"description": "Create a new Todo", | ||
"policyId": "PostTodo" | ||
}, | ||
"subject": { | ||
"members": ["role:admin","role:editor"] | ||
}, | ||
"actions": [ | ||
{ | ||
"actionUri": "can_create_todo" | ||
} | ||
], | ||
"object": { | ||
"resource_id": "todo" | ||
} | ||
}, | ||
{ | ||
"meta": { | ||
"version": "0.6", | ||
"description": "Edit(complete) a todo.", | ||
"policyId": "PutTodo" | ||
}, | ||
"subject": { | ||
"members": ["anyAuthenticated"] | ||
}, | ||
"actions": [ | ||
{ | ||
"actionUri": "can_update_todo" | ||
} | ||
], | ||
"condition": { | ||
"rule": "subject.roles co evil_genius or ( subject.roles co editor and resource.ownerID eq subject.claims.id )", | ||
"action": "allow" | ||
}, | ||
"object": { | ||
"resource_id": "todo" | ||
} | ||
}, | ||
{ | ||
"meta": { | ||
"version": "0.6", | ||
"description": "Delete a todo if admin or owner of todo", | ||
"policyId": "DeleteTodo" | ||
}, | ||
"subject": { | ||
"members": ["anyAuthenticated"] | ||
}, | ||
"actions": [ | ||
{ | ||
"actionUri": "can_delete_todo" | ||
} | ||
], | ||
"condition": { | ||
"rule": "subject.roles co admin or ( subject.roles co editor and resource.ownerID eq subject.claims.id )", | ||
"action": "allow" | ||
}, | ||
"object": { | ||
"resource_id": "todo" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters