Cisco Identity Services Engine User Guide, Release 1.2
Sample Code for Sponsor and Guest Portal Customizations
Downloads: This chapterpdf (PDF - 230.0KB) The complete bookPDF (PDF - 10.09MB) | Feedback

Table of Contents

Sample Code for Sponsor and Guest Portal Customizations

Sample Code for Custom Guest Notifications from Sponsor Portal

E-Mail Notification Template

SMS Text Message Notification Template

Print Notification Template

Sample HTML for Custom Pages for the Guest Portal

Fields Used on Custom HTML Pages

Sample Code for Sponsor and Guest Portal Customizations

Cisco ISE enables you customize the guest notifications in the Sponsor portal and the look-and-feel of the Guest portal.

Sample Code for Custom Guest Notifications from Sponsor Portal

You can customize the templates used by sponsors to send guests their login credentials:


Note You cannot use HTML tags to format text in the guest notifications.


E-Mail Notification Template

The following is an example of the login information for the body of an e-mail in an English language template:

Welcome to the Guest Portal, your username is $username$ and password is $password$

The $username$ and $password$ strings will be replaced with the username and password values from the Guest User account.

In the e-mail body, you can use special variables to provide the details for the created guest account. When using these variables, you must use all uppercase or all lowercase letters, and you cannot mix them. For example, the string for username can be either $USERNAME$ or $username%, but it cannot be $UserName$.

You can use these variables in the e-mail notification template:

    • $USERNAME$ = The username created for the guest.
    • $PASSWORD$ = The password created for the guest.
    • $STARTTIME$ = The time from which the guest account will be valid.
    • $ENDTIME$ = The time at which the guest account will expire.
    • $FIRSTNAME$ = The first name of the guest.
    • $LASTNAME$ = The last name of the guest.
    • $EMAIL$ = The e-mail address of the guest.
    • $TIMEZONE$ = The time zone of the user.
    • $MOBILENUMBER$ = The mobile number of the guest.
    • $OPTION1$ = Optional field for editing.
    • $OPTION2$ = Optional field for editing.
    • $OPTION3$ = Optional field for editing.
    • $OPTION4$ = Optional field for editing.
    • $OPTION5$ = Optional field for editing.
    • $DURATION$ = Duration of time for which the account will be valid.
    • $RESTRICTEDWINDOW$ = The time window during which the guest is not allowed to log in.
    • $TIMEPROFILE$ = The name of the time profile assigned.

SMS Text Message Notification Template

In the text message, you can use special variables to provide the details for the created guest account. When using these variables, you must use all uppercase or all lowercase letters, and you cannot mix them. For example, the string for username can be either $USERNAME$ or $username%, but it cannot be $UserName$.

You can use these variables in the SMS text message notification template:

    • $USERNAME$ = The username created for the guest.
    • $PASSWORD$ = The password created for the guest.
    • $STARTTIME$ = The time from which the guest account will be valid.
    • $ENDTIME$ = The time at which the guest account will expire.
    • $FIRSTNAME$ = The first name of the guest.
    • $LASTNAME$ = The last name of the guest.
    • $EMAIL$ = The e-mail address of the guest.
    • $TIMEZONE$ = The time zone of the user.
    • $MOBILENUMBER$ = The mobile number of the guest.
    • $OPTION1$ = Optional field for editing.
    • $OPTION2$ = Optional field for editing.
    • $OPTION3$ = Optional field for editing.
    • $OPTION4$ = Optional field for editing.
    • $OPTION5$ = Optional field for editing.
    • $DURATION$ = Duration of time for which the account will be valid.
    • $RESTRICTEDWINDOW$ = The time window during which the guest is not allowed to log in.
    • $TIMEPROFILE$ = The name of the time profile assigned.

Replacing the variable $MOBILENUMBER$ in the SMS destination is not supported.

Print Notification Template

In the printed copy, you can use special variables to provide the details for the created guest account. When using these variables, you must use all uppercase or all lowercase letters, and you cannot mix them. For example, the string for username can be either $USERNAME$ or $username%, but it cannot be $UserName$.

You can use these variables in the print notification template:

    • $USERNAME$ = The username created for the guest.
    • $PASSWORD$ = The password created for the guest.
    • $STARTTIME$ = The time from which the guest account will be valid.
    • $ENDTIME$ = The time at which the guest account will expire.
    • $FIRSTNAME$ = The first name of the guest.
    • $LASTNAME$ = The last name of the guest.
    • $EMAIL$ = The e-mail address of the guest.
    • $TIMEZONE$ = The time zone of the user.
    • $MOBILENUMBER$ = The mobile number of the guest.
    • $OPTION1$ = Optional field for editing.
    • $OPTION2$ = Optional field for editing.
    • $OPTION3$ = Optional field for editing.
    • $OPTION4$ = Optional field for editing.
    • $OPTION5$ = Optional field for editing.
    • $DURATION$ = Duration of time for which the account will be valid.
    • $RESTRICTEDWINDOW$ = The time window during which the guest is not allowed to log in.
    • $TIMEPROFILE$ = The name of the time profile assigned.

Sample HTML for Custom Pages for the Guest Portal

You can download the Cisco-provided sample HTML pages and edit them as required or create new files using them as a model. These HTML samples reference a directory structure for a portal named example. We recommend that you use these sample HTML files with Cisco ISE 1.2 patch 8 release and onwards.

You can download the ISE12CustomPortalPackage-v#.zip file that contains the sample files from the Cisco Download Software center at: http://software.cisco.com/download/release.html?mdfid=283801620&flowid=26081&softwareid=283802505&release=1.2

However, the custom package is available only with a Central Web Authentication (CWA) guest deployment.

Refer to the HowTo: Customize Web Portals guide for detailed information on using the sample html pages: http://www.cisco.com/c/dam/en/us/td/docs/security/ise/how_to/HowTo-42-Customize_ISE12_Web_Portals.pdf

When you create custom portals by uploading your own HTML pages, the details policy, language templates, and portal themes do not apply. So, if these features are important to you, you will need to write the HTML code to deliver similar functionality, or use the standard portal pages instead.

When you upload custom html files, these changes apply only to the guest portal. The other portals use the settings defined in the portal theme (see “Customizing the Web Portal Images and Color Scheme” section). To better synchronize the look-and-feel amongst the portals, upload your custom logos and banners to the portal theme too.

Fields Used on Custom HTML Pages

You must define some of these fields in the Cisco ISE Admin UI, including:

  • Guest password policy: Choose Administration > Web Portal Management > Settings > Guest > Password Policy.
  • Guest username policy: Choose Administration > Web Portal Management > Settings > Guest > Username Policy.

 

Table D-1 Custom HTML Pages Fields

Field
ID Name
Restrictions
Login Page

Username

guestUser.name

1000 alphanumeric, and special characters. Specified in Cisco ISE Admin.

Password

guestUser.password

1000 characters, alphanumeric. Specified in Cisco ISE Admin.

Self Registration Page

First name

guestUser.firstName

100 alphanumeric, and special characters

Last name

guestUser.lastName

100 alphanumeric, and special characters

Email address

guestUser.emailAddress

100 alphanumeric, and special characters

Phone number

guestUser.phoneNumber

1000 alphanumeric, and special characters

Company

guestUser.company

1000 alphanumeric, and special characters

Optional data 1-5

guestUser.optionalData 1
guestUser.optionalData 2
guestUser.optionalData 3
guestUser.optionalData 4
guestUser.optionalData 5

4000 alphanumeric, and special characters

TimeZone

guestUser.timezone

drop-down box

Change Password Page

Username

username

1000 alphanumeric, and special characters. Specified in Cisco ISE Admin.

Old password

currentpassword

1000 alphanumeric, and special characters. Specified in Cisco ISE Admin.

New password

newpassword

1000 alphanumeric, and special characters. Defined in Cisco ISE Admin.

Confirm password

confirmpassword

1000 alphanumeric, and special characters. Specified in Cisco ISE Admin.

AUP Page

Accept terms and conditions

guestUser.acceptUsePolicy

check box

Device Registration Page

Device ID

registeredMac

6-pair alphanumeric character set