This articles describes how to perform authorization using advanced policy expressions in NetScaler.
Only one policy type (either advanced or classic) is allowed to be bound for a type of policy
The admin wants to block a set of users to not allow them to access the download page of citrix.com. For this the admin has created a user group called ‘BlacklistUserGroup’, any user that is a part of this group should not be allowed to access the download page.
With advanced policy expressions, the administrator can create an authorization policy on http request and link it to the BlackListUserGroup.
Complete the following steps from NetScaler GUI:
Log on to NetScaler GUI, navigate to Configuration > NetScaler Gateway > Policies > Authorization.
Click on the Add button.
Create an authorization policy. In our case, we have created the following:
Click Expression Editor and use simple and intuitive drop-downs to create a policy expression. For us the expression is- http.req.hostname.contains("citrix.com")&&http.req.url.contains("downloads")
Using the operator ‘&&’ and creating another expression as below:
Finally, this is what the expression looks like:
Bind this authorization policy to the AAA-User group. Navigate to Configuration > NetScaler Gateway > User Administration > AAA Groups. In this case, we select BlackListUserGroup and bind this policy to it.
Let us take a look at the Authorization Policy which is bound to this group:
We have a user - Blacklistuser who is a part of the BlackListUserGroup. This user should not be allowed to access the downloads page of citrix.com.
User launches Citrix.com from the bookmarks set as below:
The website launches as shown below.
The user clicks on the downloads tab on the website and is denied access with the below message.
We have the tested our configuration of the authorization policy to deny access to blacklisted users to the download page of citrix.com