30.2 Creating a Form Fill Policy for the Sample Form

The sample form has ten input fields and five select options that need to be configured in the Form Fill policy. The following steps explain how to create a shared secret to store the values and use that shared secret to create a Form Fill policy for this sample form.

  1. To create the policy, click Policies > New.

  2. Specify a display name for the policy and select Access Gateway: Form Fill for its type.

  3. (Optional) Specify a description for the Form Fill policy. This is useful if you plan to create multiple Form Fill policies.

    You might want to specify the name of the HTML page that contains the form this policy is designed to fill.

  4. In the Actions section, click New, then select Form Fill.

    Configuring the actions for a sample form fill policy
  5. In the Form Selection section, select Form Name and specify mylogin in the text box. The form name comes from the HTML page. See the following line in the source for the page:

    <form name="mylogin" action="validatepassword.php" method="post"
            id="mylogin"> 
    
  6. In the Fill Options section, specify all the input fields and select options. For each new field, click New. Specify the fields in the order in which they appear on the form. The following table displays the Fill Options selected for each input field.

    Form Name

    Fill Options

    username

    Input Field Name: username

    Input Field Type: Text

    Input Field Value: Credential Profile: LDAP Credentials: LDAP User Name

    The default contracts assign the cn attribute to the Credential Profile.

    If your user store is an Active Directory server, you need to be aware that the cn attribute is used even though the user login is chosen from the SAMAccountName attribute.

    password

    Input Field Name: password

    Input Field Type: Password

    Input Field Value: Credential Profile: LDAP Credentials: LDAP Password

    webserv

    Input Field Name: webserv

    Input Field Type: Select

    Input Field Value: Shared Secret: sampleLogin: webserv

    role

    Input Field Name: role

    Input Field Type: Radio Button

    Input Field Value: Shared Secret: sampleLogin: role

    mail

    Input Field Name: mail

    Input Field Type: Checkbox

    Input Field Value: Shared Secret: sampleLogin: mail

    payroll

    Input Field Name: payroll

    Input Field Type: Checkbox

    Input Field Value: Shared Secret: sampleLogin: payroll

    selfservice

    Input Field Name: selfservice

    Input Field Type: Checkbox

    Input Field Value: Shared Secret: sampleLogin: selfservice

  7. In the Submit Options section, fill in the following fields:

    Auto Submit: Select this option to submit the form as soon as all the values are filled in. If this option is not selected, even though all the values are filled in for the user, the user must click the Submit button.

    Debug Mode: Select the Debug Mode option, which allows you to verify that the information is correct before submitting the form. If values must be filled in, you first see the form to add the values. When the form is submitted, you are presented with a JavaScript that contains all of the name/value pairs. To submit the form, you need to click the Submit button.

    Insert Text in Header: Select this option so you can add a static value. In the Text to Insert box, specify the city value. Enter:

    city = Provo
    
  8. To create a login failure policy, click New in the Actions section, then select Form Login Failure.

    Form Fill Login Failure Policy
  9. In the Form Selection section, select Form Name and specify mylogin in the text box. The form name comes from the HTML page.

  10. In the Login Failure Processing section, fill in the following field:

    Clear Shared Secret Data Values from Policy: Select this option to clear the data stored in the Shared Secret object when log in fails. Select the name you have given to this policy.

  11. Use the up-arrow button to move the Form Login Failure policy to the top of the policy.

    You want the failure policy to execute first on login failure.

  12. Click OK.

  13. On the Policies page, click Apply Changes.