the web front-end for your database

Database Authentication

If your list of users is managed by a database then you can setup dbFront so that it will call a stored procedure to validate users.

dbFront create database connection

Enable Database Authentication

To enable Database Authentication for users you need to update the Database Connection to so that it uses Database Authentication.  For more details see: Connection Access.  Once you choose Database Authentication, a second tab will be opened where you can complete the setup.

  • Source Database: You will need to select the name of the Database that contains the validation procedures.
  • Validate Procedure: Enter the name of the validation procedure.  The user used to create the connection must have access to this procedure.
  • Access Level: The access level of users who are validated by this procedure.

Login UI Change

Enabling Database Authentication will add a new dropdown to the Login Screen named Directory.  Users can then use this dropdown to select the name of the Connection to login.

Validation Procedure

The validation procedure will be called with 6 parameters and if the login is successful it must return a single database row.  Example implementations are given below.

It should be noted that it is entirely up to the DBA to decide what a successful login looks like.

MySql Server

CREATE PROCEDURE `validateUser`(
          IN `p_username` VARCHAR(64),
          IN `p_password` VARCHAR(64),
          IN `p_hostname` VARCHAR(64),
          IN `p_ip4` VARCHAR(64),
          IN `p_ip6` VARCHAR(256),
          IN `p_useragent` VARCHAR(256))
-- Check to see if the user exists..

select * from tblauthors t where t.id = p_username and t.password=p_password;

SQL Server

CREATE PROCEDURE validateUser
          @username  VARCHAR(64),
          @password  VARCHAR(64),
          @hostname  VARCHAR(64),
          @ip4   VARCHAR(64),
          @ip6   VARCHAR(256),
          @useragent VARCHAR(256)
AS
BEGIN
-- Check to see if the user exists..
select * from tblauthors t where t.id = @username and t.password=@password;
END;

More Security Options

For more security options see: Authentication Overview

Content you want the user to see goes here.
close