Authentication and Password Security in Perspective

Good morning.

I'm working on a Perspective project that currently uses Ignition's local DB to store the user base. I'm looking to switch the User Source to point to a SQL Server DB for authentication and user management.

I've tested the connection and everything works great, and I am using manual connection where I can set up the queries that will be used by Ignition while attempting to validate the user.

Here's the authentication query:
select COALESCE(FN.[Value], '') AS firstname, COALESCE(LN.[Value], '') AS lastname from tbl_User U LEFT JOIN vw_UserInfoDetail FN ON FN.UUID = U.User_UUID AND FN.Parameter = 'First Name' LEFT JOIN vw_UserInfoDetail LN ON LN.UUID = U.User_UUID AND LN.Parameter = 'Last Name' where U.[Username] = ? and U.[Password] = DBName.dbo.fn_PasswordCheck_v1(?) and U.[IsActive] = 1

However, because Ignition's connection with the DB is done via TCP/IP, when the user enters the password on the login screen, that value is being passed as plain text over to the authentication query. Ideally, I would like to hash the password before it is passed to the query so there's no risk of the plain text password being intercepted.

Has anyone dealt with this before and has any recommendations on how I can accomplish this?

Thanks in advance!

Enable TLS for your connection to the database?

Better - don't use this antiquated approach to authentication and user management at all - use an Identity Provider.

3 Likes