Enabling the Security Framework with the Quick Setup Genie

Description

The Security Framework Quick Setup Genie can be used to quickly create users, groups, and the components necessary to add authentication to your application.

Discussion

The Quick Setup Genie allows you to configure the Security Framework for a Web Project more quickly that it could be done by selecting the Security Configuration menu command when you click the Web Security button at the Web Projects Control Panel.

Security Framework Menu
Security Framework Menu
Security Framework Dialog
Security Framework Dialog

When you select the Quick Setup Genie, the following dialog is displayed:

Security Quick Setup Genie
Security Quick Setup Genie

You can specify:

  • The number of sample users to create. You can modify users later.
  • The number of sample groups to create. You can modify groups later.
  • Create sample components. If you check this option, the genie will add sample components to your project that you can use as-is, delete, or modify.
  • Optionally create an extended user information table for the project. The extended user information table is used to store additional information about each user. For example, it can be used to indicate that a particular user has turned on two-factor authentication. If you choose not to create the extended user information table in the Genie you can always add it later on by going to the Project Properties dialog.

The sample components that the genie adds to your project include the following components:

Component
Description
login

A UX component that serves as the Login component.

masterTabbedUI

A TabbedUI component. This component is typically the main menu of your web application. The components that you build in a web application can be launched from a TabbedUI component. The TabbedUI component is displayed when the login component is configured to RedirectToTargetPage in the After login behavior property.

reset_password

A UX component that is launched from the masterTabbedUI component that allows a logged in user to change their password.

two_factor_authentication_preferences

A UX component that is launched from the masterTabbedUI component that allows a logged in user to set their preferences for two-factor authentication. The extended user information table must be enabled to use this component.

extended_user_information

A UX component that is launched from the masterTabbedUI component that allows a logged in user to edit their data in the extended user information table. The extended user information table must be enabled to use this component.

When you click the Yes button, the Genie enables the Security Framework (if not already enabled) and then displays a summary of the sample users and groups that were created.

A list of sample users and groups generated by the genie
A list of sample users and groups generated by the genie

Generating System Tables 

In addition to users and security groups, you can also create system tables using the Security Genie. System tables are tables used to store data, such as help text, saved searches, translations for Text Dictionary tags, extended user information, and more. System tables are managed in the Project Properties. Some security features require a system table. For example, two-factor authentication preferences are stored for a user using the Extended User Information Table.

Available System tables
Available System tables

The system tables you can add are described below.

System Table
Description
Audit

Tracks edits made to SQL tables in an application.

Component Security

Used with the Tabbed UI's Store security groups in a database feature to allow you to edit user's access to controls in the Tabbed UI at runtime.

Global Settings

Used to store name-value pairs in a table.

Help

Stores help information for controls in a UX or Grid component.

Repository

Used for saving Grid searches, Advanced List Searches, email account settings, and other values.

SQL Log

Logs CRUD statements executed against a List with Detail View, Grid Component, or data bound UX Component. This is different from the Audit table in that the Audit table only logs changes. The SQL Log logs all queries, including arguments, results, error messages, and timing information.

Sync Log

Used to keep track of records that have successfully synchronized from your app to the server in the event that the connection to the server is lost while synchronizing data. The log is used to determine which records still need to be processed the next time a connection is available, preventing duplicate records.

Text dictionary

Text dictionary tags are used to provide multiple language translations for your application. Translations for text dictionary tags are stored in the Text dictionary table.

You change the system tables used in your project at any time in the Project Properties.

Choosing a Login Component Style 

The Security Genie will prompt for the type of style to use for the Login UX component.

Login Component Style Prompt
Login Component Style Prompt

You can choose from one of two styles for the login UX: an image displayed to the left of the login controls or an image behind the login controls, as shown in the images below:

Login Component Layout with Image on Left
Login Component Layout with Image on Left
Login Component Layout with Image in the Background
Login Component Layout with Image in the Background

If you specified that you want to create the Extended User Information Table, the Genie will prompt you to create the table next. You can specify the connection string to the SQL database where the table will be created. The table where the extended user information is stored can be an existing table or a new table which can be created from within Alpha Anywhere.

Extended User Information Table dialog
Extended User Information Table dialog

Videos 

Using the Quick Setup Genie

When you create a new project, it is quite common to turn on the Security Framework to enable login to your application. There are quite a few steps to set up the Security Framework and it can be quite tedious. The Quick Setup Genie configures the Security Framework and creates sample users and groups to get you started very quickly.

In this video we show how the Quick Setup Genie works.

2021-06-22

Using a UX Component as your Login

When you enable the Security Framework for your project you will need a login dialog where users will log into your application. A UX component can be used as the Login component and can be configured to allow password reset and new account creation.

In this video, we show how to use a UX component as your Login dialog.

2021-06-22

Reset Password

A common requirement in any Security Framework is the ability for the user to reset their password if they have forgotten it. The typical pattern for this is to send an email to the user. The email has a link that the user can click to bring up a dialog where they can change their password.

In this video, we show how this is done.

2021-06-22

Create new account

A common requirement in any Security Framework is the ability for a user to create a new account.

In addition, if the Web Project has defined an Extended User information table, then at the same time that the user creates their new account, they can choose to enable two-factor authentication.

In this video, we show how this is done.

2021-06-22

After Login Behavior

After the user has logged into your application using a UX component, configured as a Login dialog, the after login behavior can either redirect the user to another page in your application, or to another Panel in the UX component.

In this video, we show how the after login behavior is configured.

2021-06-22

Persistent Login

A common requirement when building an application with the Security Framework is to enable persistent login. With persistent login, a user will not need to log into the app again after they have successfully logged in once.

In this video, we show how persistent login is enabled.

2021-06-22

Webinar: Intro to The New Alpha Anywhere Security Genie

Dion McCormick presents an introduction to Alpha Anywhere's new Security Genie.

2021-10-20

See Also