Enabling the Security Framework with the Quick Setup Genie
The Security Framework Quick Setup Genie can be used to quickly create users, groups, and the components necessary to add authentication to your application.
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.
When you select the Quick Setup Genie, the following dialog is displayed:
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:
A UX component that serves as the Login component.
This component can also be created when adding a new Web Component on the Web Projects Control Panel. Choose the "Login" component when prompted for what type of Web Component you would like to add. If asked if you would like to create a UX or Legacy login component, choose Login UX.
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.
A UX component that is launched from the masterTabbedUI component that allows a logged in user to change their password.
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.
This component is also available as a UX Template. Select "SecurityFramework-Two-FactorAuthenticationPreferences" when creating a new UX from a template to add it to your project. Note that you will also need to configure Two-Factor Authentication to use this component if you are adding it manually to an existing project.
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.
This component is also available as a UX Template. Select "SecurityFramework-Edit_ExtendedUserInformation" when creating a new UX from a template to add it to your project. Note that you will also need to configure the Extended User Information Table to use this component if you are adding it manually to an existing project.
A UX component that is launched from the masterTabbedUI component that can be used to manage users and groups in the published application. This component is also available as a UX Template. When creating a new UX, select "SecurityFramework-Admin_MaintainUsersAndGroups" from the list of templates.
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.
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.
The system tables you can add are described below.
- System Table
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.
Stores help information for controls in a UX or Grid component.
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.
The Security Genie will prompt for the type of style to use for the Login UX component.
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:
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.
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.
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.
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.
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.
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.
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.
Managing Users and Groups at Run-time
This video shows how you can add an ability to manage Users and Groups at run-time in your Web Application by adding a sample template UX component (SecurityFramework-Admin_MaintainUsersAndGroups) to your Web Project.
Webinar: Intro to The New Alpha Anywhere Security Genie
Dion McCormick presents an introduction to Alpha Anywhere's new Security Genie.