Authentication

A place for users and developers of the Xataface to discuss and receive support.

Authentication

Postby pipegrep » Wed Jan 20, 2010 9:59 am

Hi all,

I'm new to PHP and sql in general but have successfully created a basic mysql database via phpmyadmin and have managed to integrate Xataface thanks to these forums and the good tutorial pages.

I can view, insert, delete, etc. with Xataface and am now trying to perform a little more authentication and haven't been able to make it all the way through. I've been using two resources;
http://xataface.com/wiki/authentication#toc2 and http://xataface.com/documentation/tutorial/getting_started/permissions. Both are quite straightforward but I've been working primarily with the second link WRT tables, etc.

That said, I now see the login page but get that blank white page after I log in. I feel like I've followed the tutorials very closely but clearly I've dropped the ball somewhere.

conf.ini
Code: Select all
[_database]
host = "localhost"
user = "userview"
password = "secret"
name = "quest_accounts"

[_auth]
users_table = Users
username_column = UserName
password_column = Password

;[password]
;encryption=md5

[_tables]
user_all = "user_all"
allocations = "allocations"


Permissions look good;
Code: Select all
[root@bandit conf]# cd ..
[root@bandit quest_accounts]# ls -al *
-rwxr--r-- 1 apache apache  617 Jan 20 10:15 conf.ini
-rw-r--r-- 1 apache apache  733 Jan 19 16:30 index.php

conf:
total 12
drwxr-xr-x 2 apache apache 4096 Jan 20 10:16 .
drwxr-xr-x 4 apache apache 4096 Jan 20 10:15 ..
-rw-r--r-- 1 apache apache 1090 Jan 20 10:06 ApplicationDelegate.php

tables:
total 16
drwxr-xr-x 4 apache apache 4096 Jan 19 15:03 .
drwxr-xr-x 4 apache apache 4096 Jan 20 10:15 ..
drwxr-xr-x 2 apache apache 4096 Jan 19 15:03 allocations
drwxr-xr-x 2 apache apache 4096 Jan 19 15:03 user_all


...and conf/ApplicationDelegate.php is a direct cut and paste.

My suspicion is that I'm doing something wring in conf.ini but the white page tells me this is probably not entirely the case.

Can somebody help me up? :)
pipegrep
 
Posts: 4
Joined: Wed Jan 20, 2010 9:11 am

Re: Authentication

Postby shannah » Mon Jan 25, 2010 10:45 am

Check your error log when you get this white screen. Also see this document for other solutions to help find the problem:
http://xataface.com/wiki/Troubleshooting

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Authentication

Postby pipegrep » Wed Jan 27, 2010 12:10 pm

Thanks, I'm getting errors logged to the page now.

The error I see is;
Fatal error: CREATE command denied to user 'userview'@'localhost' for table 'dataface__failed_logins' in /var/www/html/xataface-1.2.2/Dataface/AuthenticationTool.php on line 368

There are two accounts I am attempting to use via the table of users, one (userview) is meant to be read only and the other is administrative. I get the same error with each. I was following the page directly and I'm going through it again to see where I may have tripped up but I just can't pin it down.
pipegrep
 
Posts: 4
Joined: Wed Jan 20, 2010 9:11 am

Re: Authentication

Postby shannah » Wed Jan 27, 2010 12:16 pm

Your mysql user doesn't have sufficient permissions to create tables. Dataface needs to be able to create some tables to help it do some housekeeping.
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm

Re: Authentication

Postby pipegrep » Wed Jan 27, 2010 1:03 pm

Thanks. I was thinking (incorrectly it seems) that this was already handled by ApplicationDelegate.php. Is there a blanket of permissions that I can lay down for read-only viewers that still allows for this housekeeping work?
pipegrep
 
Posts: 4
Joined: Wed Jan 20, 2010 9:11 am

Re: Authentication

Postby pipegrep » Wed Jan 27, 2010 1:12 pm

Okay, I opened up all permissions for the read-only account (userview) in the database via phpmyadmin and it appears that the administrative account can administer and the read-only account can only read.
It looks like I was trying too hard or didn't read deeply enough or both; Xataface manages the filters access.
pipegrep
 
Posts: 4
Joined: Wed Jan 20, 2010 9:11 am

Re: Authentication

Postby shannah » Wed Jan 27, 2010 1:20 pm

Yes. Xataface permissions are independent from MySQL permissions. When setting up authentication/permissions with Xataface you are not using MySQL users and permissions - rather you are using your own custom permissions that are managed and enforced in Xataface. The MySQL user account will correspond with the credentials you supply in the [_database] section of the conf.ini file. Only one mysql user is generally used for the entire application - through your Xataface application may have hundreds or thousands of users.

Generally you want the mysql user as which Xataface connects as to have full access to that database. (not all databases, just the one that the application is based on).

-Steve
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 18 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved