Previous Topic: NEXTKEY and $PREFIXNext Topic: What Are Rule Directories?


Using NEXTKEYs With $ROLESET Rules

When using the NEXTKEY parameter in a ROLESET rule, the same ROLE has to match throughout the NEXTKEY chain. Higher level rules could use ROLE(-) since ROLE(-) will match any role.

Note: ROLE(-) will also match for logonids that have no roles.

During access validation on a $ROLESET rule, the first role in the user’s list of roles is used for validation. If access is denied, the next role in the list is selected and validation is re-driven, possibly taking a different NEXTKEY path. This process continues until access is allowed or the user’s list of roles is exhausted.

You can combine $ROLESET rules and regular UID rules in the same NEXTKEY path.

The following examples assume the following information for logonid USER01:

Example 1

$KEY(MASTER) 
$ROLESET  
$TYPE(ttt)
 SHOP ROLE(CROLC) NEXTKEY(MASTER2)  
 SHOP ROLE(ZROLZ) NEXTKEY(MASTER2)  
 DROP ROLE(CROLC) NEXTKEY(MASTER2) 
 CROP ROLE(-) NEXTKEY(MASTER2) 

$KEY(MASTER2) 
$ROLESET
$TYPE(ttt)
$PREFIX(MASTER)
 SHOP ROLE(CROLC) PREVENT
 SHOP ROLE(ZROLZ) ALLOW or LOG
 DROP ROLE(CROLA) ALLOW
 CROP ROLE(AROLA) ALLOW                                       

Example 2

$KEY(MASTER)
$ROLESET
 SHOP USER(USER01) NEXTKEY(MASTER2)
 DROP USER(-) NEXTKEY(MASTER2)
$KEY(MASTER2)
$ROLESET
$PREFIX(MASTER)
 SHOP ROLE(ZROLZ) NEXTKEY(MASTER3)
 DROP ROLE(CROLZ) NEXTKEY(MASTER3)
$KEY(MASTER3)
$PREFIX(MASTER)
 SHOP UID(TFINPAY) ALLOW 
 DROP UID(TFINPAY) ALLOW

Example 3

$KEY(MASTER)
$ROLESET
 SHOP ROLE(*ROL*) NEXTKEY(MASTER2)
 DROP USER(US-) NEXTKEY(MASTER2)
$KEY(MASTER2)
$PREFIX(MASTER)
 SHOP UID(TFINPAY) ALLOW
 DROP UID(TFINPAY) ALLOW