Product Documentation

NetScaler as a SAML SP

Jan 04, 2016

The SAML Service Provider (SP) is a SAML entity that is deployed by the service provider. When a user tries to access a protected application, the SP evaluates the client request. If the client is unauthenticated (does not have a valid NSC_TMAA or NSC_TMAS cookie), the SP redirects the request to the SAML Identity Provider (IdP).

The SP also validates SAML assertions that are received from the IdP.

When the NetScaler appliance is configured as an SP, all user requests are received by a traffic management virtual server (load balancing or content switching) that is associated with the relevant SAML action.

Note

A NetScaler appliance can be used as a SAML SP in a deployment where the SAML IdP is configured either on the appliance or on any external SAML IdP.

When used as a SAML SP, a NetScaler appliance:

  • Can extract the user information (attributes) from the SAML token. This information can then be used in the policies that are configured on the NetScaler. For example, if you want to extract the GroupMember and emailaddress attributes, in the SAMLAction, specify the Attribute2 parameter as GroupMember and the Attribute3 parameter as emailaddress.

    Note: Default attributes such as username, password, and logout URL must not be extracted in attributes 1 to 16, because they as are implicitly parsed and stored in the session.

  • Can extract attribute names of upto 127 bytes from an incoming SAML assertion. The previous limit was 63 bytes. Support introduced in NetScaler 11.0 Build 64.x.
  • Supports post, redirect, and artifact bindings. Support for redirect and artifact bindings is introduced in NetScaler 11.0 Build 55.x.

    Note: Redirect binding should not be used for large amount of data, when the assertion after inflate or decoding is greater than 10K.

  • Can decrypt assertions. Support introduced in NetScaler 11.0 Build 55.x.
  • Can extract multi-valued attributes from a SAML assertion. These attributes are sent is nested XML tags such as:

    <AttributeValue>      <AttributeValue>Value1</AttributeValue>      <AttributeValue>Value2</AttributeValue </AttributeValue>

    When presented with above XML, the NetScaler appliance can extract both Value1 and Value2 as values of a given attribute, as opposed to the old firmware that extracts only Value1.

    Note: Support introduced in NetScaler 11.0 Build 64.x.

  • Can specify the validity of a SAML assertion.

    If the system time on NetScaler SAML IdP and the peer SAML SP is not in sync, the messages might get invalidated by either party. To avoid such cases, you can now configure the time duration for which the assertions will be valid.

    This duration, called the “skew time,” specifies the number of minutes for which the message should be accepted. The skew time can be configured on the SAML SP and the SAML IdP.

    Note: Support introduced in NetScaler 11.0 Build 64.x.

To configure the NetScaler appliance as a SAML SP by using the command line interface

  1. Configure a SAML SP action.

    Example: The following command adds a SAML action that redirects unauthenticated user requests. > add authentication samlAction SamlSPAct1 -samlIdPCertName nssp –samlRedirectUrl https://auth1.example.com

  2. Configure the SAML policy.

    Example: The following command defines a SAML policy that applies the above defined SAML action to all traffic. > add authentication samlPolicy SamlSPPol1 ns_true SamlSPAct1

  3. Bind the SAML policy to the authentication virtual server.

    Example: The following command binds the SAML policy to a authentication virtual server named “av_saml”. > bind authentication vserver av_saml -policy SamlSPPol1

  4. Bind the authentication virtual server to the appropriate traffic management virtual server.

    Example: The following command adds a load balancing virtual server named “lb1_ssl” and associates the authentication virtual server named “av_saml” to the load balancing virtual server. > add lb vserver lb1_ssl SSL 10.217.28.224 443 -persistenceType NONE -cltTimeout 180 -AuthenticationHost auth1.example.com -Authentication ON -authnVsName av_saml

To configure a NetScaler appliance as a SAML SP by using the graphical user interface

  1. Configure the SAML action and policy.

    Navigate to Security > AAA - Application Traffic > Policies > Authentication > Advanced Policies > Policy, create a policy with SAML as the action type, and associate the required SAML action with the policy.

  2. Associate the SAML policy with an authentication virtual server.

    Navigate to Security > AAA - Application Traffic > Virtual Servers, and associate the SAML policy with the authentication virtual server.

  3. Associate the authentication server with the appropriate traffic management virtual server.

    Navigate to Traffic Management > Load Balancing (or Content Switching) > Virtual Servers, select the virtual server, and associate the authentication virtual server with it.