Working with Constraints
Constraints allow you to add the fine-grained element to your authorization rule. AuthScope defined constraints are simple flow charts based rules composed on blocks defined separately.
Click on "Constraints" button to load all existing constraints for the current app version:
By default, system creates a "DEFAULT_CONSTRAINT" which GRANTS access. Click on the "+" button to add a new constraint:
Constraint Name and Description.
Provide the name and description for a constraint.
Click on "Edit Constraint Graph" to create a constraint graph:
The highlights above represent the following:
- Double Click on the "+" sign to add a new block to this graph.
- Double Click on the eye icon to turn legends on/off (Legends highlight the success/failure connection points of a block).
- Every Constraint graph starts with a "Start" block which has a connection point that can be used to connect it to other blocks on the graph.
Adding blocks/nodes to a constraint graph.
Double click anywhere on the graph canvas or double click on the "+" sign to add a new block to graph. A screen will pop up listing all blocks that can be added to the graph:
Select a block from the list and click on "Select". This block will be added to the constraint graph canvas:
Every block that has been added to the canvas has following connection points:
- A blue connection point which represents an incoming connection to this block.
- Following two outgoing connection points:
- Green: To add a Success Block, connect the green dot from end of a block to the top of another block.
- Red: To add a Failure Block, connect the red dot from end of a block to the top of another block.
You can use the above connection points to connect multiple blocks and form a constraint chain as follows: