how do i perform authorization using advanced policy … · 2020-03-02 · how do i perform...

5
How do I perform Authorization using advanced policy expressions in NetScaler? Background Advanced policy expressions provide a rich set of expressions like body based, DNS based expressions to administrators compared to older classic ones. Advanced will be the default expression editor for Session, Traffic and Authorization policy editors. Option to switch to classic by clicking on “Switch to Classic Syntax” Only one policy type (either advanced or classic) is allowed to be bound for a type of policy o E.g.: All authorization policies bound at any level must be either advanced or classic o Authorization policies of Advanced-type and Traffic policies of Classic type are allowed Use case 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. Steps to achieve this With advanced policy expressions, the administrator can create an authorization policy on http request and link it to the BlackListUserGroup. Please see below the steps from the NetScaler GUI: 1. Login to the GUI, navigate to this path: Configuration->NetScaler Gateway -> Policies-> Authorization 2. Click on the add button

Upload: others

Post on 21-Mar-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: How do I perform Authorization using advanced policy … · 2020-03-02 · How do I perform Authorization using advanced policy expressions in NetScaler? Background Advanced policy

HowdoIperformAuthorizationusingadvancedpolicyexpressionsinNetScaler?

BackgroundAdvancedpolicyexpressionsprovidearichsetofexpressionslikebodybased,DNSbasedexpressionstoadministratorscomparedtoolderclassicones.AdvancedwillbethedefaultexpressioneditorforSession,TrafficandAuthorizationpolicyeditors.Optiontoswitchtoclassicbyclickingon“SwitchtoClassicSyntax”

• Onlyonepolicytype(eitheradvancedorclassic)isallowedtobeboundforatypeofpolicyo E.g.:Allauthorizationpoliciesboundatanylevelmustbeeitheradvancedorclassico AuthorizationpoliciesofAdvanced-typeandTrafficpoliciesofClassictypeareallowed

UsecaseTheadminwantstoblockasetofuserstonotallowthemtoaccessthedownloadpageofcitrix.com.Forthistheadminhascreatedausergroupcalled‘BlacklistUserGroup’,anyuserthatisapartofthisgroupshouldnotbeallowedtoaccessthedownloadpage.StepstoachievethisWithadvancedpolicyexpressions,theadministratorcancreateanauthorizationpolicyonhttprequestandlinkittotheBlackListUserGroup.PleaseseebelowthestepsfromtheNetScalerGUI:

1. LogintotheGUI,navigatetothispath:Configuration->NetScalerGateway->Policies->Authorization

2. Clickontheaddbutton

Page 2: How do I perform Authorization using advanced policy … · 2020-03-02 · How do I perform Authorization using advanced policy expressions in NetScaler? Background Advanced policy

3. Createanauthorizationpolicy.Inourcase,wehavecreatedthefollowing-

4. Clickonexpressioneditorandusesimpleandintuitivedropdownstocreateapolicyexpression.Forustheexpressionis-http.req.hostname.contains("citrix.com")&&http.req.url.contains("downloads")

Usingtheoperator‘&&’andthencreatinganotherexpressionasbelow:

Finally,thisiswhattheexpressionlookslike:

Page 3: How do I perform Authorization using advanced policy … · 2020-03-02 · How do I perform Authorization using advanced policy expressions in NetScaler? Background Advanced policy

5. BindthisauthorizationpolicytotheAAA-Usergroup.Navigateto:Configuration->NetScaler

Gateway->UserAdministration->AAAGroups.Inthiscase,weselectBlackListUserGroupandBindthispolicytoit.

LetustakealookattheAuthorizationPolicywhichisboundtothisgroup:

Now,letustestthisout:

1. Wehaveauser–BlacklistuserwhichisapartoftheBlackListUserGroup.Thisusershouldnotbeallowedtoaccessthedownloadspageofcitrix.com

Page 4: How do I perform Authorization using advanced policy … · 2020-03-02 · How do I perform Authorization using advanced policy expressions in NetScaler? Background Advanced policy

2. LaunchesCitrix.comfromthebookmarkssetasbelow:

Thewebsitelaunchesasshownbelow.

3. Theuserclicksonthedownloadstabonthewebsiteandisdeniedaccesswiththebelowmessage.

Page 5: How do I perform Authorization using advanced policy … · 2020-03-02 · How do I perform Authorization using advanced policy expressions in NetScaler? Background Advanced policy

Therefore,wehavethetestedourconfigurationoftheauthorizationpolicytodenyaccesstoblacklisteduserstothedownloadpageofcitrix.com