ADC

Citrix ADC as a SAML SP

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 Citrix ADC 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.

The Citrix ADC appliance also supports POST and Redirect bindings during logout.

Note

  • A Citrix ADC 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 Citrix ADC 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 Citrix ADC appliance. 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 Citrix ADC 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 Citrix ADC 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.

  • Can send additional attribute called ‘ForceAuth’ in the authentication request to external IDP (Identity Provider). By default, the ForceAuthn is set to ‘False’. It can be set to ‘True’ to suggest IDP to force authentication despite existing authentication context. Additionally, Citrix ADC SP does authentication request in query parameter when configured with artifact binding.

To configure the Citrix ADC appliance as a SAML SP by using the CLI

  1. Configure a SAML SP action.

    Example

    The following command adds a SAML action that redirects unauthenticated user requests.

    add authentication samlAction SamlSPAct1 -metadataUrl "https://ksidp1.ksaaa.local/metadata/samlidp/SAML_IDP_profile" -samlIdPCertName nssp –samlRedirectUrl https://auth1.example.com -relaystateRule "AAA.LOGIN.RELAYSTATE.EQ(\"https://lb.example1.com/\")"

    Points to note

    • Certificate provided for -samlIdPCertName in the samlAction command must match the corresponding certificate from IdP for the signature verification to succeed.
    • It is recommended to have a full domain name with trailing ‘/’ in the expression.
    • Administrators must configure an expression for relaysStateRule in the samlAction command. The expression must contain the list of published domains that the user connects to before being redirected to the authentication virtual server. For example, the expression must contain the domains of the front-end virtual server (VPN, LB, or CS) that use this SAML action for authentication.
    • If the authentication virtual server is configured as a SAML IdP, the metadata URL that must be used in the SAML SP action is https://<citrix-adc-saml-idp-fqdn>/metadata/samlidp/SAML_IDP_profile.

    Note

    If there are multiple SAML policies as part of an IdP chain, it is sufficient to configure a relay state rule only on the first SAML policy.

    For more details on the command, see https://developer-docs.citrix.com/projects/citrix-adc-command-reference/en/latest/authentication/authentication-samlAction and https://support.citrix.com/article/CTX316577.

  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<!--NeedCopy-->

  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<!--NeedCopy-->

  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<!--NeedCopy-->

To configure a Citrix ADC appliance as a SAML SP by using the GUI

  1. Configure the SAML action and policy.

    Navigate to Security > AAA - Application Traffic > Policies > Authentication > Advanced Policies > Policy.

    On the Create Authentication Policy page, create a policy with details such as name, action type, and action. In the Expression editor text box, specify rule value as true for the SAML policy to take effect and the corresponding SAML action to be executed.

  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.

Citrix ADC as a SAML SP