Database access security iOS

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
ekek
Posts: 51
Joined: Fri Sep 21, 2012 9:33 am

Database access security iOS

Post by ekek » Thu Feb 21, 2013 9:06 am

Hi:

I'm developing an App for iOS that can read and writa data to a database in a server. Everything can be done, but we have a concern about putting the login data inside the code. Does anyone knows a best practice in order to connect to a database without embedding the user and password inside the code?

Thanks

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Database access security iOS

Post by FourthWorld » Thu Feb 21, 2013 5:38 pm

SSL is the solution most sites use to protect the stream.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

monte
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1564
Joined: Fri Jan 13, 2012 1:47 am
Contact:

Re: Database access security iOS

Post by monte » Fri Feb 22, 2013 9:25 am

If they are in the script then password protection on the stack will secure them
LiveCode User Group on Facebook : http://FaceBook.com/groups/LiveCodeUsers/

ekek
Posts: 51
Joined: Fri Sep 21, 2012 9:33 am

Re: Database access security iOS

Post by ekek » Mon Oct 07, 2013 8:17 pm

Thanks for your comments!

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Database access security iOS

Post by Klaus » Tue Oct 08, 2013 11:59 am

Hi ekek,

another way is to store the MD5Digest of the password in a custom property!
Can be compared but that's it :D
...
## DO this in the message box or wehreever, at least NOT in the stack!
set the cMD5Password of stack "your db stack here" to md5digest("Dabatabes password here...")
...

Then you can later ask the user for a password and compare its md5digest with the stored md5digest:

Code: Select all

...
ask password clear "Enter password for database access:"
put it into tuserPWD
put the cMD5Password of stack "your db stack here" into tStoredMD5
if tStoredMD5 <> md5digest(tUserPWD) then
  ## wrong password
  exit to top
end if
...
Best

Klaus

Adrien Bron
Posts: 5
Joined: Tue Oct 08, 2013 2:26 pm
Contact:

Re: Database access security iOS

Post by Adrien Bron » Tue Oct 08, 2013 3:02 pm

I use SSL for this class of problems.

Post Reply