Configuring Authentication Plug-Ins
This section shows how to configure the authentication plug-ins described in Table 21. Because authentication and authorization are similar, the plug-in user interface does not distinguish between them. However, when you configure plug-ins, you need to set them up to perform the correct behavior, either authentication or authorization.
You can configure multiple authentication plug-ins. The plug-ins are called in an arbitrary order, and each plug-in can return authorization values. (If multiple plug-ins return a session-timeout value, the smallest value is used.) Authentication or authorization succeeds if all plug-in calls succeed.
Limiting Subscribers on Router Interfaces
You can limit the number of authenticated subscribers who connect to an IP interface on the router. This plug-in does not limit the number of unauthenticated subscribers who connect to an IP interface, and does not limit the number of subscribers who connect to a physical or link-layer interface. In the case of subscriber interfaces, the plug-in limits the number of authenticated subscribers on the subscriber interface but not on the underlying primary IP interface.
Use the following configuration statement to set up a plug-in that limits the number of subscribers who connect to interfaces:
shared sae configuration plug-ins poolnameinterface-subscriber-limit {concurrent-subscribersconcurrent-subscribers;}To set up a plug-in that limits the number of subscribers on interfaces:
- From configuration mode, access the custom RADIUS accounting plug-in configuration. In this sample procedure, the plug-in called subsLimit is configured in the west-region SAE group.
user@host#edit shared sae group west-region configuration plug-ins pool subsLimit interface-subscriber-limit- Configure the number of authenticated subscribers who can connect to an IP interface on the router simultaneously.
[edit shared sae group west-region configuration plug-ins pool subsLimit interface-subscriber-limit]user@host#set concurrent-subscribersconcurrent-subscribers- (Optional) Verify your configuration.
[edit shared sae group west-region configuration plug-ins pool subsLimit interface-subscriber-limit]user@host#showconcurrent-subscribers 1;Configuring Basic RADIUS Authentication Plug-Ins
You can use basic RADIUS authentication plug-ins to send authentication information to an external RADIUS accounting server or a group of redundant servers. To communicate with nonredundant servers, you need to create additional instances of the plug-in.
Use the following configuration statements to set up basic RADIUS authentication plug-ins:
shared sae configuration plug-ins poolname radius-authentication {load-balancing-mode (failover | roundRobin); failback-timerfailback-timer; nas-ip (SspIp | ErxIp); retry-intervalretry-interval; maximum-queue-lengthmaximum-queue-length; bind-addressbind-address; udp-portudp-port; default-peerdefault-peer;}To set up basic RADIUS authentication plug-ins:
- From configuration mode, access the basic RADIUS authentication plug-in configuration. In this sample procedure, the plug-in called RadiusAuth is configured in the west-region SAE group.
user@host#edit shared sae group west-region configuration plug-ins pool RadiusAuth radius-authentication- Configure the mode for load-balancing RADIUS servers.
[edit shared sae group west-region configuration plug-ins pool RadiusAuth radius-authentication]user@host#set load-balancing-mode(failover | roundRobin)- Specify if and when the SAE attempts to fail back to the default peer.
[edit shared sae group west-region configuration plug-ins pool RadiusAuth radius-authentication]user@host#set failback-timerfailback-timer- (Optional) Configure the value of the NAS-Ip attribute.
[edit shared sae group west-region configuration plug-ins pool RadiusAuth radius-authentication]user@host#set nas-ip(SspIp | ErxIp)- Configure the time the SAE waits for a response from a RADIUS server before it resends the RADIUS packet.
[edit shared sae group west-region configuration plug-ins pool RadiusAuth radius-authentication]user@host#set retry-intervalretry-interval- Configure the maximum number of unacknowledged RADIUS messages that the plug-in receives from the RADIUS server before it discards new messages.
[edit shared sae group west-region configuration plug-ins pool RadiusAuth radius-authentication]user@host#set maximum-queue-lengthmaximum-queue-length- (Optional) Configure the source IP address that the plug-in uses to communicate with the RADIUS server. If you do not specify an address, the global default address is used.
[edit shared sae group west-region configuration plug-ins pool RadiusAuth radius-authentication]user@host#set bind-addressbind-address- (Optional) Configure the source UDP port or a range of source UDP ports used for communication with the RADIUS server. If you do not specify a UDP port, the global UDP port is used.
[edit shared sae group west-region configuration plug-ins pool RadiusAuth radius-authentication]user@host#set udp-portudp-port- Configure the name of the RADIUS server to which the SAE sends packets for this plug-in.
[edit shared sae group west-region configuration plug-ins pool RadiusAuth radius-authentication]user@host#set default-peerdefault-peer- (Optional) Verify your configuration.
[edit shared sae group west-region configuration plug-ins pool RadiusAuth radius-authentication]user@host#showload-balancing-mode failover;failback-timer -1;retry-interval 3000;maximum-queue-length 10000;default-peer peer1;Related Information
For additional information, see the following sources:
- For information about setting up SAE groups, see SRC-PE Getting Started Guide, Chapter 16, Setting Up an SAE with the SRC CLI.
- For information about setting up default peers, see Creating RADIUS Peers.
Configuring Flexible RADIUS Authentication Plug-Ins
Flexible RADIUS authentication plug-ins provide the same features as basic RADIUS authentication plug-ins. In addition, they allow you to customize RADIUS authentication packets that the system sends to RADIUS servers and specify which fields are included in the RADIUS authentication packets and what information is contained in the fields.
Use the following configuration statements to set up flexible RADIUS authentication plug-ins:
shared sae configuration plug-ins poolnameflex-radius-authentication {load-balancing-mode (failover | roundRobin); failback-timerfailback-timer; timeouttimeout; retry-intervalretry-interval; maximum-queue-lengthmaximum-queue-length; bind-addressbind-address; udp-portudp-port; error-handling (0 | 1); default-peerdefault-peer;templatetemplate;}To set up flexible RADIUS authentication plug-ins:
- From configuration mode, access the flexible RADIUS authentication plug-in configuration. In this sample procedure, the plug-in called flexRadiusAuth is configured in the west-region SAE group.
user@host#edit shared sae group west-region configuration plug-ins pool flexRadiusAuth flex-radius-authentication- Configure the mode for load-balancing RADIUS servers.
[edit shared sae group west-region configuration plug-ins pool flexRadiusAuth flex-radius-authentication]user@host#set load-balancing-mode(failover | roundRobin)- Specify if and when the SAE attempts to fail back to the default peer.
[edit shared sae group west-region configuration plug-ins pool flexRadiusAuth flex-radius-authentication]user@host#set failback-timerfailback-timer- (Optional) Configure the maximum time the SAE waits for a response from a RADIUS server.
[edit shared sae group west-region configuration plug-ins pool flexRadiusAuth flex-radius-authentication]user@host#set timeouttimeout- Configure the time the SAE waits for a response from a RADIUS server before it resends the RADIUS packet.
[edit shared sae group west-region configuration plug-ins pool flexRadiusAuth flex-radius-authentication]user@host#set retry-intervalretry-interval- Configure the maximum number of unacknowledged RADIUS messages that the plug-in receives from the RADIUS server before it discards new messages.
[edit shared sae group west-region configuration plug-ins pool flexRadiusAuth flex-radius-authentication]user@host#set maximum-queue-lengthmaximum-queue-length- (Optional) Configure the source IP address that the plug-in uses to communicate with the RADIUS server. If you do not specify an address, the global default address is used.
[edit shared sae group west-region configuration plug-ins pool flexRadiusAuth flex-radius-authentication]user@host#set bind-addressbind-address- (Optional) Configure the source UDP port or a range of source UDP ports used for communication with the RADIUS server. If you do not specify a UDP port, the global UDP port is used.
[edit shared sae group west-region configuration plug-ins pool flexRadiusAuth flex-radius-authentication]user@host#set udp-portudp-port- Configure the way the SAE handles errors.
[edit shared sae group west-region configuration plug-ins pool flexRadiusAuth flex-radius-authentication]user@host#set error-handling(0 | 1)- Configure the name of the RADIUS server to which the SAE sends packets for this plug-in.
[edit shared sae group west-region configuration plug-ins pool flexRadiusAuth flex-radius-authentication]user@host#set default-peerdefault-peer- Configure the name of the RADIUS packet template that defines attributes for this plug-in.
[edit shared sae group west-region configuration plug-ins pool flexRadiusAct flex-radius-accounting]user@host#set templatetemplate- (Optional) Verify your configuration.
[edit shared sae group west-region configuration plug-ins pool flexRadiusAuth flex-radius-authentication]user@host#showload-balancing-mode failover;failback-timer -1;timeout 15000;retry-interval 3000;maximum-queue-length 10000;error-handling 0;default-peer 1;template stdAuth;peer-group 1 {server-address ;server-port 1812;secret ********;}Related Information
For additional information, see the following sources:
- For information about setting up SAE groups, see SRC-PE Getting Started Guide, Chapter 16, Setting Up an SAE with the SRC CLI.
- For information about setting up default peers, see Creating RADIUS Peers.
- For information about defining RADIUS packet templates, see Defining RADIUS Packets for Flexible RADIUS Plug-Ins with the SRC CLI.
Configuring Custom RADIUS Authentication Plug-Ins
The custom RADIUS authentication plug-ins provide the same functions as the flexible RADIUS authentication plug-ins, but are designed to deliver better system performance. To use a custom plug-in, you must provide a Java class that implements the SPI defined in the RADIUS client library. Use this SPI to specify which fields and field values to include in RADIUS accounting packets. The RADIUS client library is part of the SAE core API.
See the documentation for the RADIUS client library in the SRC software distribution in the folder SDK/doc/sae/net/juniper/smgt/sae/radiuslib or the SAE core API documentation on the Juniper Networks Web site at
http://www.juniper.net/techpubs/software/management/sdx/api-index.htmlFor a sample implementation, see the following directory in the SRC software distribution: SDK/plugin/java/src/net/juniper/smgt/sample/radiuslib/RadiusPacketHandlerImpl.java.
Use the following configuration statements to set up custom RADIUS authentication plug-ins:
shared sae configuration plug-ins poolnamecustom-radius-authentication {java-class-radius-packet-handlerjava-class-radius-packet-handler; class-path-radius-packet-handlerclass-path-radius-packet-handler; require-mandatory-attributes; load-balancing-mode (failover | roundRobin); failback-timerfailback-timer; timeouttimeout; retry-intervalretry-interval; maximum-queue-lengthmaximum-queue-length; bind-addressbind-address; udp-portudp-port; default-peerdefault-peer;}To set up custom RADIUS authentication plug-ins:
- From configuration mode, access the custom RADIUS authentication plug-in configuration. In this sample procedure, the plug-in called customRadiusAuth is configured in the west-region SAE group.
user@host#edit shared sae group west-region configuration plug-ins pool customRadiusAuth custom-radius-authentication- Configure the name of the Java class that implements the RadiusPacketHandler interface in the RADIUS client library.
[edit shared sae group west-region configuration plug-ins pool customRadiusAuth custom-radius-authentication]user@host#set java-class-radius-packet-handlerjava-class-radius-packet-handler- Configure the URLs that identify a location from which Java classes are loaded when the plug-in is initialized.
[edit shared sae group west-region configuration plug-ins pool customRadiusAuth custom-radius-authentication]user@host#set class-path-radius-packet-handlerclass-path-radius-packet-handler- (Optional) Specify that a RADIUS authentication or accounting request must contain all mandatory RADIUS attributes before sending the request packet.
[edit shared sae group west-region configuration plug-ins pool customRadiusAuth custom-radius-authentication]user@host#set require-mandatory-attributes- Configure the mode for load-balancing RADIUS servers.
[edit shared sae group west-region configuration plug-ins pool customRadiusAuth custom-radius-authentication]user@host#set load-balancing-mode(failover | roundRobin)- Specify if and when the SAE attempts to fail back to the default peer.
[edit shared sae group west-region configuration plug-ins pool customRadiusAuth custom-radius-authentication]user@host#set failback-timerfailback-timer- (Optional) Configure the maximum time the SAE waits for a response from a RADIUS server.
[edit shared sae group west-region configuration plug-ins pool customRadiusAuth custom-radius-authentication]user@host#set timeouttimeout- Configure the time the SAE waits for a response from a RADIUS server before it resends the RADIUS packet.
[edit shared sae group west-region configuration plug-ins pool customRadiusAuth custom-radius-authentication]user@host#set retry-intervalretry-interval- Configure the maximum number of unacknowledged RADIUS messages that the plug-in receives from the RADIUS server before it discards new messages.
[edit shared sae group west-region configuration plug-ins pool customRadiusAuth custom-radius-authentication]user@host#set maximum-queue-lengthmaximum-queue-length- (Optional) Configure the source IP address that the plug-in uses to communicate with the RADIUS server. If you do not specify an address, the global default address is used.
[edit shared sae group west-region configuration plug-ins pool customRadiusAuth custom-radius-authentication]user@host#set bind-addressbind-address- (Optional) Configure the source UDP port or a range of source UDP ports used for communication with the RADIUS server. If you do not specify a UDP port, the global UDP port is used.
[edit shared sae group west-region configuration plug-ins pool customRadiusAuth custom-radius-authentication]user@host#set udp-portudp-port- Configure the name of the RADIUS server to which the SAE sends packets for this plug-in.
[edit shared sae group west-region configuration plug-ins pool customRadiusAuth custom-radius-authentication]user@host#set default-peerdefault-peer- (Optional) From operational mode, verify your configuration.
[edit shared sae configuration plug-ins pool customRadiusAuth custom-radius-authorization]user@host#showjava-class-radius-packet-handler net.juniper.smgt.radius.RadiusPacketHandlerImpl;require-mandatory-attributes;load-balancing-mode failover;failback-timer -1;timeout 15000;retry-interval 3000;maximum-queue-length 10000;default-peer peer4;Related Information
For additional information, see the following sources:
- For information about setting up SAE groups, see SRC-PE Getting Started Guide, Chapter 16, Setting Up an SAE with the SRC CLI.
- For information about setting up default peers, see Creating RADIUS Peers.
Configuring LDAP Authentication Plug-Ins
Use the following configuration statements to configure LDAP authentication plug-ins:
shared sae configuration plug-ins poolnameldap-authentication {method (search | bind); serverserver; bind-dnbind-dn; bind-passwordbind-password; search-filtersearch-filter; (ldaps); search-base-dnsearch-base-dn; name-attributename-attribute; password-attributepassword-attribute; service-bundle-attributeservice-bundle-attribute; session-volume-quotasession-volume-quota; timeouttimeout;}To create LDAP authentication plug-ins:
- From configuration mode, access the custom LDAP authentication plug-in configuration. In this sample procedure, the plug-in called ldapAuth is configured in the west-region SAE group.
user@host#edit shared sae group west-region configuration plug-ins pool ldapAuth ldap-authentication- Configure the LDAP authentication method that the SAE uses.
[edit shared sae group west-region configuration plug-ins pool ldapAuth ldap-authentication]user@host#set method(search | bind)- (Optional) Configure a comma-separated list of IP addresses or hostnames of the LDAP authentication server.
[edit shared sae group west-region configuration plug-ins pool ldapAuth ldap-authentication]user@host#set serverserver- (Optional) Configure the DN used to authenticate access to the directory.
[edit shared sae group west-region configuration plug-ins pool ldapAuth ldap-authentication]user@host#set bind-dnbind-dn- (Optional) Configure the password that the SAE uses to authenticate its access to the directory to search for the subscriber profile. If you do not specify a bind DN or bind password, the SAE uses anonymous access.
[edit shared sae group west-region configuration plug-ins pool ldapAuth ldap-authentication]user@host#set bind-passwordbind-password- (Optional) Configure the additional LDAP search filter that the SAE uses to search the directory for the subscriber profile.
[edit shared sae group west-region configuration plug-ins pool ldapAuth ldap-authentication]user@host#set search-filtersearch-filter- (Optional) Enable the secure protocol used for LDAP connections with the directory. LDAPS, the only secure protocol supported, causes communication with the directory to be encrypted with Secure Sockets Layer (SSL).
[edit shared sae group west-region configuration plug-ins pool ldapAuth ldap-authentication]user@host#set ldaps- (Optional) Configure the base DN for searching entries in the directory.
[edit shared sae group west-region configuration plug-ins pool ldapAuth ldap-authentication]user@host#set search-base-dnsearch-base-dn- (Optional) Configure the name of the directory attribute that holds the username.
[edit shared sae group west-region configuration plug-ins pool ldapAuth ldap-authentication]user@host#set name-attributename-attribute- (Optional) Configure the name of the directory attribute that stores the password.
[edit shared sae group west-region configuration plug-ins pool ldapAuth ldap-authentication]user@host#set password-attributepassword-attribute- (Optional) Configure the name of the directory attribute that contains the name of the service bundle that is used for subscriber authentication. This value is made available to the subscriber classification process and can be used to select the subscriber profile to load.
[edit shared sae group west-region configuration plug-ins pool ldapAuth ldap-authentication]user@host#set service-bundle-attributeservice-bundle-attribute- (Optional) Configure the name of the LDAP attribute that contains the value of the session volume quota. The LDAP plug-in sets the session volume quota to this value.
[edit shared sae group west-region configuration plug-ins pool ldapAuth ldap-authentication]user@host#set session-volume-quotasession-volume-quota- (Optional) Configure the maximum time the SAE waits for a response from a directory server.
[edit shared sae group west-region configuration plug-ins pool ldapAuth ldap-authentication]user@host#set timeouttimeout- (Optional) From operational mode, verify your configuration.
[edit shared sae group west-region configuration plug-ins pool ldapAuth ldap-authentication]user@host#showmethod search;search-filter (objectClass=umcSubscriber);name-attribute uniqueId;timeout 5000;Related Information